Handle misalignment with chart and broker position due to slippage

Questions about MultiCharts and user contributed studies.
simoneb
Posts: 21
Joined: 18 Apr 2023
Has thanked: 3 times
Been thanked: 1 time

Handle misalignment with chart and broker position due to slippage

Postby simoneb » 21 Jun 2023

I have a very simple situation:

  • I'm using Asynchronous strategy automation
  • The strategy sends a short market order which gets 1 point of slippage, and a profit target at 100 points from the entry
The chart believes that the profit will be satisfied 100 points from the theoretical entry, and doesn't account for the slippage, while the LIMIT order sent to the exchange for the profit target is actually 100 points from the real entry, meaning 1 point below.

Some bars later, the theoretical target price is hit, but not the real one (which is 1 point below the former).

The chart shows the profit target as having been reached and the position to be closed, while in fact the position at the broker is still open and no profit target has been reached. The price will keep going up so the real target will never be hit.

How do I handle this situation? Is there a way to prevent it from happening?

See the image below:
image (3).png
(7.19 KiB) Not downloaded yet

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 56 times

Re: Handle misalignment with chart and broker position due to slippage

Postby Polly MultiCharts » 23 Jun 2023

Hello simoneb,

If you’re using AA mode it can be expected. Prices on the chart and at the broker can differ that can lead to such behavior.
In AA mode the trades are plotted on the chart when the order generation conditions are met with no respect to the real order executions on the broker. In this aspect auto trading in AA is more like backtesting with the only difference: the orders are actually sent to the broker.
If you’d like your broker position, auto trading engine position and chart position to be synchronized, you will need to use SA mode.
For more info about auto trading modes please see this page.

simoneb
Posts: 21
Joined: 18 Apr 2023
Has thanked: 3 times
Been thanked: 1 time

Re: Handle misalignment with chart and broker position due to slippage

Postby simoneb » 23 Jun 2023

Thanks Polly, any other recommendations how to handle this apart from switching to SA mode, which is not an option for me since I'm trading with multiple strategies on the same instruments?

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 56 times

Re: Handle misalignment with chart and broker position due to slippage

Postby Polly MultiCharts » 27 Jun 2023

simoneb,

Strategy can see the real execution prices only in SA mode, I’m afraid. But you might try trading from multiple charts on one instrument in SA mode, too.
Please note that we always recommend testing your signals with our pre-built Paper Trader or with a demo broker account before going live.

simoneb
Posts: 21
Joined: 18 Apr 2023
Has thanked: 3 times
Been thanked: 1 time

Re: Handle misalignment with chart and broker position due to slippage

Postby simoneb » 28 Jun 2023

I am in paper trading :) Meanwhile I found the solution, or at least a mitigation technique. Enabling turning stop/limit orders into market orders mitigates this problem.


Return to “MultiCharts”