I created the following afl:
startTime = 90000;
endTime = 220000;
Buy = TimeNum() <= startTime;
Sell = TimeNum() >= endTime;
My problem with this is, sometimes the exchanges closes earlier then 22:00:00.
So how can I get the last bar intraday independently the exchange closes.