I am having an specific problem in first bar of session when running several automated strategies in real time. Every day I found a "flash trade" like the one in the attached file. In the first 5-20 seconds of session a random strategy (is always a different one) open and close a long position with one contract. In this case, open at 08:00:05 s and close at 08:00:07.
Let me explain my strategies configuration;
1) I am running 16 strategies in one account (for long positions) and 16 strategies in a different account (for short positions). NOT all of them trade at the same time, up to 5 will open long/short positions in the same session.
2) I am running all strategies on the same instrument FESX but on two different account (one for long and for short positions).
3) All strategies are programmed to close ALL positions before session ends. There should be no open positions at the beggining of session.
4) All of them have SyncAccountPosition = True and Wait until flat before executing live enabled.
Your support team suggest me set SyncAccountPosition = false because with so many strategies compiting in the same instrument is not unusual to have orders problems. I tried but it was a mess and strategies made many wrong positions. However when SyncAccountPosition = True all strategies work fine but flash trade apppear.
Is there any function like (firstbarofsession) or any code or configuration that could avoid that flash trade???
Regards,
Azunal
Comment