Hello All,
I am really struggling to find the very first open price from the previous day's session. The session should include pre-, regular, and post-sessions. I have tried with the attached code but not working. Please help.
Thanks
I am really struggling to find the very first open price from the previous day's session. The session should include pre-, regular, and post-sessions. I have tried with the attached code but not working. Please help.
Thanks
Code:
def bn= barnumber();
def daycnt = if bn == 1 then 1 else 0;
def prevday =getday()<> getday()[1];
def prevdayop = if prevday and daycnt==1 then open
else prevdayop[1];