Manual Trading and Automated Trading on the Same Instrument at a Time
Strategy trading on a chart has nothing in common with manual trading on the same instrument even if the same chart is used. Auto Trading Engine doesn't have access to information of what manual orders are placed, it works only with the strategy on chart. The following information should help customers who place orders manually when auto trading is turned on to synchronize their actions with strategy calculation and correct chart or broker positions.
Among prebuilt standard signals in MultiCharts there are 2 scripts that were introduced specifically for comparing market positions at broker and on chart to synchronize one of them with the other if they differ. Essentially there are 2 possible expected scenarios when market positions can get out of synch (only SA mode of auto trading is considered):
- Placing manual orders when a strategy is auto trading (the same broker, account, instrument)
- Auto trading from one chart window when a strategy is auto trading on a different chart (the same broker, account, instrument)
Depending on the direction of synchronization you need to use one or the other synchronizer script:
!From Broker To Strategy MP Synchronizer!
The strategy checks the market position at broker and then checks chart market position. If the positions are different, then the signal generates an emulated order with the number of contracts and average entry price as on broker end to match the broker position. The order is not sent to broker, so it affects only market position on chart for the strategy. It is displayed on the chart, but it is not shown in Order and Position Tracker window.
!From Strategy To Broker MP Synchronizer!
The strategy checks the market position at broker and then checks chart market position. If the positions are different, then the signal generates a market order with the number of contracts to match the chart position. The order is sent to broker, but the strategy itself is not aware of market position change, so it affects only broker position.