I hope someone who understands this can lend me some advice..
I just coded a strategy that basically goes long after a breakout past a recent high and then exits on an indicator crossover, whatever..
The strategy is supposed to run 24 hours per day on 5min forex charts, and I have checked on it after leaving it on overnight and noticed something unexpected.
The quantity of order lots was about 85,000 (0.85 standard lots) from the time I started the strategy up until 2am, and then from 3am onward the size traded was about 31,000. It wasn't from the account losing money, it was from something happening to the account's percieved buying power, as the lot size is based on avail buying power.
What I found was similar to what happens when you disable a strategy that has an open position. The strategy is set to Wait until Flat, and Sync account = false, so the strategy restarts and doesn't know there's already an open position going on, and so the buying power is lower and the new shares traded is lower.
I have an open position that is now outside the strategy, not being monitored by it, and while it happens to be way up in P&L because the instrument went up overnight, it could just as well have tanked and my safety exits wouldn't have been triggered.
MAIN POINT OF MY QUESTION: Can someone help me troubleshoot -- why would my strategy seem to have reset itself at 2 - 3am, or lost track of the open positions it had as though it had been turned on or off?
Thanks!
Comment