pkuchnicki |
Member
|
Registered User |
|
|
|
|
Gender: |
|
Tuesday, September 1, 2009 |
Friday, August 6, 2010 3:49:56 PM |
7 [0.00% of all post / 0.00 posts per day] |
|
Based upon whatever trading ideas I have, is there a way to "paint" a straight line (either vertical or horizontal) on a chart using only the most recent point from an indicator?
For example, I want to calculate the standard deviation of the last 10 trading bar's closing price and based on that value, paint a straight horizontal line all the way across the price chart?
Same thing for a vertical line if I want to "paint" a vertical line every 10 trading days.
As a variation, I might want to make those lines a color of my choice.
Can that be done? Do we have a solution for that already or some code samples to play with?
|
Never mind. I got it. The Pivot Points calculated using the last day's data I have loaded in Stockfinder (which is 27Jul10), are the Pivot Points for 28Jul10 which is today.
When I go back and use 26Jul10 numbers, it calculates exactly what shows up on my chart.
We're good.
Everything works beautifully.
Thanks,
Peter
|
I am running SF 5.0 Gold edition.
And I do not have any values for 28Jul10 on any of my charts.
|
Now that is seriously fascinating......and scary!
|
Thanks, Bruce. Worked like a champ from the start.
However, I'm not sure the calculations are correct. I really don't understand the code you wrote, however, taking the SP-500 from yesterday, 27Jul10.
High = 1120.95
Low = 1109.78
Close = 1113.84
total is 3344.57
PP value therefore is 1114.86 assuming (PP = (H + L + C) / 3)
The code provided gives a PP value of 1110.44 which does not match. Any ideas?
|
Bruce, I have a related request to Pivot Points. I would like to draw lines on a price chart, e.g., SP-500, so that additional lines show on the chart for each pivot point (PP, R1, S1, R2, S2, R3, S3) just like I see on FreeStockCharts. However, I have not been able to figure out how to generate these lines in StockFinder 5.0.
Is that even possible?
Peter
|
I have three panes open in my chart. The top pane is a symbol which I paint using RealCode (I know..but it's only a proof of concept for coding purposes) as follows:
PlotColor = Color.Yellow
If price.close > price.Open Then
plotcolor = color.green
Else
plotcolor = color.red
End If
I also track the S&P 500 in the bottom pane. However, the code above works in the 'OPPOSITE" manner in the bottom pane. It only paints correctly when I reverse the logic which is counter intuitive.
Peter
|
|