For intraday trade square off at market close, I was using the below code...
Sell = TimeNum() >= SquareOffTime OR xxx OR xxx;
I am coding for my swing system where I will be taking trade during the week and needs to be squared off on Friday at 3:20 PM if the trade is open. I am struggling to get the equivalent code for this.
Also, is there any way to know the last trade day of the week. This is because, sometimes Friday may be a holiday, in that case, the last day of the week would be Thursday.
Any help here is highly appreciated. I use Amibroker version 6.30.5.