Assigning y Co ordinate Values in Line array function


#1

Hi,
The LineArray function generates array equivalent to trend line drawn from point (x0, y0) to point (x1, y1). x coordinates are in bars (zero based), y coordinates are in dollars.

L1=(TimeFrameGetPrice( "L", inDaily, -1));

So in this case ,if I want to assign Prv day's Low to "y0", How can i approach it?
I tried this way,But it does not work.
Any Help Would be appreciated.

Thanks.


#2

from amibroker article

function ShowLastDay( array )
{
    dn = datenum();
    lastDay = dn == LastValue( dn );
    return IIf( lastDay, array, Null );
}
// daily high / low on last day only
dailyH = TimeFrameGetPrice("H", inDaily );
dailyL = TimeFrameGetPrice("L", inDaily );
Plot( ShowLastDay( dailyH ), "dailyH", colorGreen, styleThick  );
Plot( ShowLastDay( dailyL ), "dailyL", colorRed, styleThick  );

for LineArray … y0 & y1 use LastValue(L1)