SmartQuant Discussion

Unbound Draw() to target a single bar-size chart
Page 1 of 1

Author:  jherr [ Wed Oct 17, 2007 4:18 pm ]
Post subject:  Unbound Draw() to target a single bar-size chart

Please add an overload to the Draw() command so it can target a chart for a single bar size and type.

public void Draw(
TimeSeries series,
DateTime start,
DateTime end,
int padNumber,
BarType targetChartType,
long targetChartSize,

This version of Draw should be a "one time" draw that does not bind the series to the chart. It would be called from OnBar to draw from start time to end time then stop drawing. Drawing could start again at the next OnBar.

See my previous post to see why this is needed.

Author:  PBJ [ Wed Feb 01, 2012 2:33 am ]
Post subject:  Re: Unbound Draw() to target a single bar-size chart

I need something similar: draw an indicator only during a custom "session" (ie between a certain StartTime and a certain EndTime).
Conceptually, I thought that returning double.NaN in Calculate() when the current bar is outside the session would do the job but it doesn't: the NaN's are not displayed but a straight line joins the EndTime's value and the StartTime's value (ie linear interpolation) instead of displaying nothing.
Another way to do it would be to draw this indicator as "points" instead of "lines" but I see no way to choose this option when calling Draw().
Is there any low-level method I could call?


Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group