Automated Exit Strategy with Manual Trading

Read before posting.
User avatar
admin
Posts: 79
Joined: 13 Jul 2005
Has thanked: 41 times
Been thanked: 122 times

Automated Exit Strategy with Manual Trading

Postby admin » 21 Apr 2011

!From Broker To Strategy MP Synchronizer!


https://www.multicharts.com/trading-sof ... arch&go=Go

yoyo2000
Posts: 26
Joined: 07 Nov 2012

Re: Automated exit strategy with manual trading

Postby yoyo2000 » 03 Dec 2012

the link is lost,could you refresh it,please?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Automated exit strategy with manual trading

Postby Henry MultiСharts » 03 Dec 2012

The link was referring to “!From Broker To Strategy MP Synchronizer!” signal. This signal allows for the user to synchronize an automatic strategy with the position at the broker (by sending a dummy order in charting) – effectively allowing placing manual trades and then applying a strategy to take care of the exits.

RWDickinson
Posts: 43
Joined: 01 Dec 2008
Has thanked: 2 times
Been thanked: 2 times

Re: Automated exit strategy with manual trading

Postby RWDickinson » 07 Dec 2012

How is the !From Broker To Strategy MP Synchronizer! strategy intended to be used? Should we copy the code into our own exit strategy? What are the Timeout and Latency inputs for? If we only need to synch at the end of a bar, is all this needed?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Automated exit strategy with manual trading

Postby Henry MultiСharts » 07 Dec 2012

Usage examples:
1) When auto trading is turned off - the strategy position becomes zero.
You need to specify the position manually for each strategy next time you turn on the auto trading if you have a position at the broker by means of Format-> Strategy properties-> Auto trading-> Assign the initial market position at the broker setting->Show the assign the initial market position at the broker dialogue-> Show always.
When you start the auto trading - a dialogue window will appear where you can set the position for the strategy. This is how you can synchronize it (continue the trading from the position where you have left it).

You can also synchronize your strategy and broker position automatically with the help of the synchronizer script (!From Broker To Strategy MP Synchronizer!) that comes with the platform as a prebuilt signal. But position at the broker cannot be divided between multiple strategies automatically by means of the "syncronizer" script. If you are trading with multiple strategies on one instrument - you need to assign the position manually for each strategy.

Please also keep in mind that only the open position information is synchronized (direction, amount of contracts, avg entry price), active price orders placed by auto trading are not synchronized. It means you need to manually cancel the active orders at broker and auto trading will place them on the next calculation (if conditions are met in the code).

2) Manual Trading and Automated Trading on the Same Instrument at a Time
3) Trading from Multiple Charts on One Instrument

What it does:
!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.

!From Strategy To Broker MP Synchronizer!- Synchronizes the market position at broker with the market position at chart by sending a real order to the broker.

Inputs:
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.

How to add:
These signals should be used only if the user needs them and understands how to use them.
You do not need to copy the source code of the signal. It is complete and should be added to your strategy as one of the signals. IOG is on by default for these signals.

User avatar
Mark Brown
Posts: 180
Joined: 29 Nov 2016
Has thanked: 109 times
Been thanked: 17 times

Re: Automated Exit Strategy with Manual Trading

Postby Mark Brown » 23 Oct 2022

How to add:
These signals should be used only if the user needs them and understands how to use them.
You do not need to copy the source code of the signal. It is complete and should be added to your strategy as one of the signals. IOG is on by default for these signals.
I have found this signal “!From Broker To Strategy MP Synchronizer!”

Would it be possible to show a demo code of how to include this in a signal please.

//////////////

Let's say I manually enter a LONG position on ES and now I want to

setstoploss_pt(6);

setprofittarget_pt(2);

//////////////

What would that signal code look like?

PS I know this simple bracket could be accomplished with MC built in orders but I want to write much more complicated exits using a signal if possible.

Mark Brown


Return to “MultiCharts FAQ”