PureBytes Links
Trading Reference Links
|
Hi All,
The below code grabs the opening price on intraday data at the start of
each trading session (assuming 1 trading session per day) and stores these
opening prices for the last 5 days.
{INTRADAY CODE TO STORE THE OPENING PRICE}
Vars:
VEN_ID_OpenPrice0(0),
VEN_ID_OpenPrice1(0),
VEN_ID_OpenPrice2(0),
VEN_ID_OpenPrice3(0),
VEN_ID_OpenPrice4(0);
If Date>Date[1] then begin
VEN_ID_OpenPrice4 = VEN_ID_OpenPrice3;
VEN_ID_OpenPrice3 = VEN_ID_OpenPrice2;
VEN_ID_OpenPrice2 = VEN_ID_OpenPrice1;
VEN_ID_OpenPrice1 = VEN_ID_OpenPrice0;
VEN_ID_OpenPrice0 = Open;
End;
Plot1(VEN_ID_OpenPrice0,"Open[0]");
Plot2(VEN_ID_OpenPrice1,"Open[1]");
Plot3(VEN_ID_OpenPrice2,"Open[2]");
Plot4(VEN_ID_OpenPrice3,"Open[3]");
My question is, can anyone show me how to change this code into a TS array
so that:-
* these opening prices become easier to reference.
* I can reference any opening price as far back as I want to go. For .e.g.
I want to use the opening price of 10 days ago.
Any help or insight on this issue would be great !!
Thanking you in advance,
Robert Bianchi
|