PDA

View Full Version : Drawline question


commodity_trader
10-30-2008, 03:03 PM
Hi Support,

I have a question regarding drawline, for example as below

DrawLine(string tag, bool autoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color, DashStyle dashStyle, int width)

DrawLine("tag1", false, 10, 1000, 0, 1000, Color.LimeGreen, DashStyle.Dot, 2);


Is there anyway to drawline,so that it starts from the left of the screen to like 50 bars and it remains there as horizontal line.


Thanks
Commodity_trader

NinjaTrader_Josh
10-30-2008, 03:51 PM
You will not be able to know which bar is on the left most edge of the screen, but you can draw a line of 50 bars. Your startBarsAgo will be 50 and your end barsAgo will be 0. That will draw a line of 50. If you don't resubmit this line of code you will not move the code.

koganam
11-03-2008, 01:12 AM
if (CurrentBar < 50) DrawLine("tag1", false, CurrentBar, 1000, 0, 1000, Color.LimeGreen, DashStyle.Dot, 2);