I've been trying to work out how to code the following in NinjaScript. I have lines drawn from a certain time each day. Lets just use 8am UK time at the open. Some of these lines go back months so there can be a lot of lines on the chart so im using the -currentbars to achieve the lines to extend forward. I would prefer to be able to extend these to three bars to the right of the last closed/current bar but can not figure it out. Im also trying to do this for the date each line was created. So to be clear I have 1 line drawing from 8am each day extending to the right of the chart. What I would like to achieve is:
- Draw Lines to a certain location: How can I draw lines exactly 3 bars after the last closed bar?
- Place a Date: How can I place a date label 3 bars after the last closed bar on the chart?
{
// Draw a new line, give it a unique tag
string lineTag = "ProLines Line_" + CurrentBars[0];
// Draw the new most recent line with the RecentLineColor
Draw.Line(this, lineTag, false, -CurrentBar, Open[0], 0, Open[0], RecentLineColor, DashStyleHelper.Solid, 2);
}

Comment