shawnj
08-21-2010, 10:20 AM
I know there is no official support for Plot but hopefully the community can help.
Is there a way to include stuff drawn in Plot() to be part of the chart's AutoScale? I can vaguely remember seeing something while perusing the Intellisense withing the scope of Plot that I thought might be usefully for chart scaling but now I can't find it. I may have dreamed it ( :) ) or I might have been coding in another environment.
Currently, to force the chart's AutoScale to include stuff drawn in Plot, I do a rather crude hack. Within OnBarUpdate, I call DrawRectangle with AutoScale set, Height and Width=0, Color.Empty at the price drawn in Plot.
Something like:
DrawRectangle("ScaleHigh",AutoScale,0,scalePrice,0,scalePrice,Color.Empty,C olor.Empty,10); //Not visible (height and width = 0).
I'm hoping there is a much cleaner way to do this within the Plot.
Any suggestion would be appreciated.
PS. I'm on NT6.5 but if NT7 brings something useful in this regard I would love to hear about it.
thanks,
shawnj
Is there a way to include stuff drawn in Plot() to be part of the chart's AutoScale? I can vaguely remember seeing something while perusing the Intellisense withing the scope of Plot that I thought might be usefully for chart scaling but now I can't find it. I may have dreamed it ( :) ) or I might have been coding in another environment.
Currently, to force the chart's AutoScale to include stuff drawn in Plot, I do a rather crude hack. Within OnBarUpdate, I call DrawRectangle with AutoScale set, Height and Width=0, Color.Empty at the price drawn in Plot.
Something like:
DrawRectangle("ScaleHigh",AutoScale,0,scalePrice,0,scalePrice,Color.Empty,C olor.Empty,10); //Not visible (height and width = 0).
I'm hoping there is a much cleaner way to do this within the Plot.
Any suggestion would be appreciated.
PS. I'm on NT6.5 but if NT7 brings something useful in this regard I would love to hear about it.
thanks,
shawnj