I would like to know if the price pane y-axis grid line values can be accessed? I don't want to change them, i want to know what their resolution is.
Attached are two pics, one labeled SPY the other KO. For SPY the price is resolved in $0.50 increments, KO is $0.25 increments which is fine in both cases.
What i would like to know is can I access those values so I could determine, for example in SPY, how many bar's low fell between $269.5 and $270.00 during some timeframe.
Thanks
Size:
Color:
Forgot pics
Size:
Color:
Why not keep it simple and create a function that loops over the Bars and counts the number of bars the Low was in between the boundaries?
Size:
Color:
Would like to, fact is it's what i'm trying to do. Problem is the boundary, i'm not setting it, i need to read it and would like to use the values you've rendered for the display and trying find out if i can access those values.
Say, using Linq, i've got a List of Low's for some timeframe and want to know which range (ie $269.5 - $270.00) contains the most Lows. How do I compute the range? I can estimate it or use your values and i pick the latter if it's available.
Size:
Color:
Couldn't find such property as the Y-Axis increment value among documented and undocumented properties of the
ChartPane object or
ChartRenderer (an undocumented class). But I wouldn't be far from the truth if I said that the Y-Axis values on the right are determined after the strategy processing has already finished. So the property would be of limited use in a Strategy.
QUOTE:
Say, using Linq, i've got a List of Low's for some timeframe and want to know which range (ie $269.5 - $270.00) contains the most Lows. How do I compute the range? I can estimate it or use your values and i pick the latter if it's available.
Have a look at a method called
PriceVolumeDist in the open
source code of Community Components (../ExtensionMethods/CosmeticEx.cs). The logic you'll find inside will give an idea how to break a range of values into N bins and get the "weight" of each by summing up the values it comprises or by using a counter.
CODE:
Please log in to see this code.
Size:
Color:
Will do, thanks.
Size:
Color: