On my automated strategies I usually have a time exit condition, to exit the trade shortly before market close. The problem I have is that sometimes it seems to work, and other times it does not, and uses the normal exit on close logic instead.
For example, today I had a live strategy running on the 6B, with the following exit logic:
// Condition set 5
if (ToTime(Time[0]) == ToTime(13, 55, 0))
{
ExitLong("", "");
}
However when time reached 13:55+, the strategy did not exit as programmed. It was only at 13:59:30, 30 seconds before market close, that the strategy took itself out, which again was the normal "exit on close" logic, not the programming. What I don't understand is that all of these strategies use that same code, and sometimes it works, and sometimes it does not. Can you think of any reason why it wouldn't trigger randomly?
Regards,
Andrew
Comment