Having some problems with my automated strategy. When I click on Enable Strategy, the strategy tries to place an order of the current 4-hour bar. But prices have already moved a lot since then, so I'm getting a "Unable to submit order, price too far ....." error.
How should I approach this?
I'm running the strategy on a 1-min interval. I have added two timeframes in the Initialize() section (240min and 1day).
I submit the orders via the following code:
entryOrder = EnterLongLimit(iMainPeriodNr, false, iPositionSize, Closes[iMainPeriodNr][0]-(TickSize*3), "EnterLong");
But apparently I'm thinking wrong, because I'm getting errors. The strategy still tries to execute the order.
I have set Sync Account To Postition to False, and I have set Wait Until Flat to enabled. So it should not try to execute historical orders right?
Comment