I am facing an issue to draw line using ninjascript.
Problem:
Draw trend line between Last Maxima to current high or Last minima to current low.
Implemented Solution:
Start point as curBarIndex= 0 (startPtIndex) next bar i am decreasing the BarAgoIndex value and draw line between start point and endpoint(curBarIndex)
string lineTag = "TAG" + counter;
DrawLine(lineTag,startPtIndex,startPointY , curBarIndex, endPointY,Color.DarkKhaki);
Lines are not drawn properly as per requirement. Initially all lines are drawn in the initial area in the chart section (BackTesting).
Kindly help.
Regards,
Ziaul
Comment