Difference between revisions of "Manual Trading and Automated Trading on the Same Instrument at a Time"

From MultiCharts
Jump to navigation Jump to search
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
'''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.'''
 
'''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.'''
  
<div style="background-color: #E5F6FF;">'''Example''': Market position at broker = 0. Market position on chart = 0. If your strategy on chart generates 1 contract long entry and it is executed, then the strategy assumes that the position has changed to +1. If 1 contract short market order is placed manually by a customer, then chart doesn't know about it. So the strategiy continue trading individually on the charts, assuming that the chart position is still +1 long. However, since the instrument at broker is the same, the market position at broker on the instrument is the net position of the orders sent from both charts. In this example the position will be flat after 1 generated by the script order and 1 manual order. </div>
+
<div style="background-color: #E5F6FF;">'''Example''': Market position at broker = 0. Market position on chart = 0. If your strategy on chart generates 1 contract long entry and it is executed, then the strategy assumes that the position has changed to +1. If 1 contract short market order is placed manually by a customer, then chart doesn't know about it. So the strategies continue trading individually on the charts, assuming that the chart position is still +1 long. However, since the instrument at broker is the same, the market position at broker on the instrument is the net position of the orders sent from both charts. In this example the position will be flat after 1 generated by the script order and 1 manual order. </div>
  
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 autotrading is considered):
+
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)
 
# 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)
 
# Auto trading from one chart window when a strategy is auto trading on a different chart (the same broker, account, instrument)

Revision as of 13:27, 3 March 2021

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.

Example: Market position at broker = 0. Market position on chart = 0. If your strategy on chart generates 1 contract long entry and it is executed, then the strategy assumes that the position has changed to +1. If 1 contract short market order is placed manually by a customer, then chart doesn't know about it. So the strategies continue trading individually on the charts, assuming that the chart position is still +1 long. However, since the instrument at broker is the same, the market position at broker on the instrument is the net position of the orders sent from both charts. In this example the position will be flat after 1 generated by the script order and 1 manual order.

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):

  1. Placing manual orders when a strategy is auto trading (the same broker, account, instrument)
  2. Auto trading from one chart window when a strategy is auto trading on a different chart (the same broker, account, instrument)


Note: If AA mode of auto trading is used, one should not expect matching of chart position and broker position in any case.


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.

Note: !From Strategy To Broker MP Synchronizer! sends real orders to broker so you need to be careful when using it with a Live account.