So far my research on existing indicator searches has come up empty.
So I starting to read the help file,
it appears I would need to get the Sessions Collection, loop thru it to find the start and end times of each session...
but then what?
Would I need to use the event OnBarUpdate to iterate thru the entire historical bars dataset, comparing each bar's date and timestamp to see if it matches a session start or end date & time adn then call a method to draw a vertical line at that spot? That seems like too much processor work. Is there a better concept?
whoa, while typing a tag, it was suggested to use "session lines", so i searched for that and found an example script from Jessica P, which contains something like this:
protected override void OnBarUpdate() { if (Bars.FirstBarOfSession) { DrawHorizontalLine("lineSet" + ++lineSet, resistanceLow(ToTime(Time[0])), Color.Aqua); ...
and for my purpose, i just draw a Vertical Line instead. It appears I would use method
Draw.VerticalLine(NinjaScriptBase owner, string tag, int barsAgo, Brush brush, DashStyleHelper dashStyle, int width, bool drawOnPricePanel)
Comment