SmartQuant Discussion
http://www.smartquant.com/forums/

Unbound Draw() to target a single bar-size chart
http://www.smartquant.com/forums/viewtopic.php?f=61&t=5996
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.
http://www.smartquant.com/forums/viewtopic.php?t=5994

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?

Thanks!

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/