Hi, I'm trying to make sure my open orders are closed before the market closes at 4 est. Here is my code
def markethoursC = if secondstilltime(1600) <= 0 and secondstilltime(1500) > 0 then 1 else 0;
# Long Exit end of day
AddOrder(OrderType.SELL_TO_CLOSE, markethoursC > 0, close, quantity, Color.RED, arrowcolor = Color.RED);
This code is not working but I'm not sure why, can someone please help?
def markethoursC = if secondstilltime(1600) <= 0 and secondstilltime(1500) > 0 then 1 else 0;
# Long Exit end of day
AddOrder(OrderType.SELL_TO_CLOSE, markethoursC > 0, close, quantity, Color.RED, arrowcolor = Color.RED);
This code is not working but I'm not sure why, can someone please help?