AEParticipant
Senior
Hi,
I´m working in a new proorder in TF 1minute. I would like to know how can I get the closed bar from yesterday at 17:30. I could count bars but is ugly. The worst problem with that it´s on Monday (PRT generate a bar on sunday) and sometimes I don’t have the same previuos bars than always.
So, If today is Monday 9:00 AM I need to know the price close at last Friday at 17:30. If today is Thursday I need to know the price close at yesterday(Monday) at 17:30, etc…
Any idea?
Thanks
if dayofweek <> 0 and time = 173000 then
lastclose = close
endif
AEParticipant
Senior
Thanks Vonasi, it works! But I don’t know why it doesn’t work on friday (to monday) if I change time to 235900.
Any idea why?
If there is a 235900 candle then it will return a value. It works fine for me on the DJI except for this last weekend as there was no trading on Good Friday.
Also the 235900 will not be the close of the day – it will be one minute before because TIME is the closing time of a candle.