Tried your suggestions - used hard code values to first have core logic (plot) work - i am stuck at few blockers - pls help…
how to make the width of the line fatter? styleThick isnt good enough; width =5 or will even higher number make a difference?
how to make the line extend beyond current bar - xshift=10 isnt extending the line
how do i draw a vertical line for a particular bar (say last bar or yesterday’s bar)
But the big question is how do i link this code to a ticker?
Right now i am executing this code after going to a specific ticker chart and overlaying it - instead, i want all my specific tickers
in a newly created watchlist say-WD0715 and have this code executed on those ticker charts?
Here is my code:
function drawLine(txt,coloor,level)
{
x0=1;
x1=5;
y0=y1=level;
Line = LineArray( x0, y0, x1, y1, 3 );
Plot(Line, txt, coloor, style = styleLine|styleThick, xshift=10, width=5 );
}
function drawVLine()
{
x0=x1=BarCount;
y0=150;
y1=200;
Line = LineArray( x0, y0, x1, y1, 3 );
Plot(Line, “Date”, colorBlue, style = styleLine|styleThick, width=5 );
}
EntryPrice =210.20;
InitialStop=208;
TargetPrice=214.44;
drawLine(“Entry”,colorCustom9,EntryPrice);
drawLine(“I-Stop”,colorRed,InitialStop);
drawLine(“PE”,colorCustom12,TargetPrice);
drawVLine();
drawVLine isnt working as expected.