I want to plot yesterday's close on current day's intra-day chart.
And I want only the latest previous close to be plotted, across current day's candles.
I have written the code like this:
-----------------------------------------------------------------------
Coy=TimeFrameGetPrice( "C", inDaily, -1 );
Ccolor=ParamColor("COY Color",ColorRGB(0,128,255));
x0=LastValue(BarIndex())-75;
x1=LastValue(BarIndex());
y0=LastValue(Coy);
y1=LastValue(Coy);
Line = LineArray( x0, y0, x1, y1, 1 );
Plot( Line, "PrevClose", Ccolor,styleNoLabel );
-----------------------------------------------------------------------
I wrote the above code, compromising on the value of x0, to make it somehow
work. Actually, i need the line to start with the first candle of the current day.
1. How should I modify the code to get the value of the variable x0, so that it
represents the first bar of current day?
2. Is it possible to plot the line beyond the last candle on the chart?
Thanks..
And I want only the latest previous close to be plotted, across current day's candles.
I have written the code like this:
-----------------------------------------------------------------------
Coy=TimeFrameGetPrice( "C", inDaily, -1 );
Ccolor=ParamColor("COY Color",ColorRGB(0,128,255));
x0=LastValue(BarIndex())-75;
x1=LastValue(BarIndex());
y0=LastValue(Coy);
y1=LastValue(Coy);
Line = LineArray( x0, y0, x1, y1, 1 );
Plot( Line, "PrevClose", Ccolor,styleNoLabel );
-----------------------------------------------------------------------
I wrote the above code, compromising on the value of x0, to make it somehow
work. Actually, i need the line to start with the first candle of the current day.
1. How should I modify the code to get the value of the variable x0, so that it
represents the first bar of current day?
2. Is it possible to plot the line beyond the last candle on the chart?
Thanks..