Correct use of !From Broker To Strategy MP Synchronizer!

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 33 times

Correct use of !From Broker To Strategy MP Synchronizer!

Postby MC_Prog » 22 Nov 2011

Hi.

Could someone kindly provide an authoritative explanation of the correct use of !From Broker To Strategy MP Synchronizer! ?

The reason I ask is that I applied this Signal (turned ON) along with another strategy of mine in order to engage the sync capability in the event I chose to manually exit my trade early (i.e. before the auto-trader would have).

However, in this case, I did not exit manually. The trade reached my profit objective and the autotrader closed it. Then, immediately, new orders were issued that put me back into 2 contracts! This was completely unintended (and at this point, unexplained).

Image

It was my understanding that !From Broker To Strategy MP Synchronizer! did not issue orders to the broker!

Most likely I misunderstand the correct use of !From Broker To Strategy MP Synchronizer! .

Or, possibly, there is a bug.

Either way, I'd really like to clear it up ... (all this with MC 7.2 4776 and IB)
Attachments
MC_ExtraOrders_01.png
Extra unwanted sync orders
MC_ExtraOrders_01.png (31.19 KiB) Viewed 1007 times

User avatar
Henry MultiСharts
Posts: 8443
Joined: 25 Aug 2011
Has thanked: 1207 times
Been thanked: 2703 times

Re: Correct use of !From Broker To Strategy MP Synchronize

Postby Henry MultiСharts » 23 Nov 2011

!From Broker To Strategy MP Synchronizer! - Synchronizes the market position inside MultiCharts with the market position at broker by sending a dummy order in charting.

It is important to know the average time of receiving information from the broker about the market position and filled order from the moment the request was sent.
Timeouts should be increased in case of need.

TimeOutMS-the time MultiCharts waits from the moment the unsynchronization was found between broker and script. If the timeout is exceeded and there is still unsynchronization, then the market order will be sent to synchronize the position.

The broker position can be in sync with the strategy, but if the information about it is received later then the specified TimeOutMS (1 second by default), then the market order will be sent to synchronize the position.

LatencyMS-the time MultiCharts waits from the moment of sending the market order for synchronization. This timeout is important for the script not to send the market order every next calculation. If the timeout is exceeded and there is still unsynchronization, then the market order will be sent to synchronize the position.

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 33 times

Re: Correct use of !From Broker To Strategy MP Synchronize

Postby MC_Prog » 24 Nov 2011

Thanks for this good information to think on.

re:
TimeOutMS-the time MultiCharts waits from the moment the unsynchronization was found between broker and script. If the timeout is exceeded and there is still unsynchronization, then the market order will be sent to synchronize the position.

The broker position can be in sync with the strategy, but if the information about it is received later then the specified TimeOutMS (1 second by default), then the market order will be sent to synchronize the position.

I'd like to confirm that "the market order will be sent" means "a market order will be sent TO THE BROKER". This interacts with the situation as most recently discussed here: ( viewtopic.php?f=1&t=9206#p45325 ) and so I feel a double need to really get this point clarified.

My current "theory" is that the new word ChangeMarketPosition does not itself send an order, however, when ChangeMarketPosition gives the chart a new idea of it's current position, the autotrader, if on, WILL take actions (send live orders to the broker) to cause the brokerage-reported position to agree with the chart's new idea of itself.

Please confirm or correct this, as per the engineering facts.

FWIW, I think this entire subject of autotrading and synchronizing with the broker under various auto-exit and manual-exit scenarios would be extremely worthy of a "white paper" discussion.

User avatar
Henry MultiСharts
Posts: 8443
Joined: 25 Aug 2011
Has thanked: 1207 times
Been thanked: 2703 times

Re: Correct use of !From Broker To Strategy MP Synchronize

Postby Henry MultiСharts » 25 Nov 2011

I am sorry for confusion and not beeing clear enough.
!From Broker To Strategy MP Synchronizer! as well as ChangeMarketPosition does not send a real order to the broker. It places a dummy order on the chart.

when ChangeMarketPosition gives the chart a new idea of it's current position, the autotrader, if on, WILL take actions (send live orders to the broker) to cause the brokerage-reported position to agree with the chart's new idea of itself.

The described situation is specific and depends on the trading script you are using.

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 33 times

Re: Correct use of !From Broker To Strategy MP Synchronize

Postby MC_Prog » 25 Nov 2011

Henry, thanks for your replies.

The described situation is specific and depends on the trading script you are using.

I can imagine that.

I consider that there are at least 4 scenarios that might need to be individually understood:

Auto-Entry, Auto-Exit
Auto-Entry, Manual-Exit
Manual-Entry, Auto-Exit
Manual-Entry, Manual-Exit

IOW, for each case, there is a trading strategy on the chart, prepared to enter on an entry signal and exit on stops/targets/time/exit-signal. The user may or may not be "complicating things" via manual entries/exits (i.e. over-riding/supplementing the trading strategy) on the same symbol.

As traders, we want the "correct" thing to happen in every case - either auto-magically, or by understanding what we need to configure and how to ensure that it happens.


Return to “User Contributed Studies and Indicator Library”