Stop loss calculated vs broker fill or chart entry price  [SOLVED]

Questions about MultiCharts and user contributed studies.
CAGMAD
Posts: 15
Joined: 04 May 2016
Been thanked: 1 time

Stop loss calculated vs broker fill or chart entry price

Postby CAGMAD » 06 Apr 2018

Good morning,

I trade in AA mode and I thought the stop loss of my strategies were calculated vs the price seen in the chart, not vs the real entry fills at the broker.
Can you please confirm whether stop loss orders are always calculated vs price in the chart or vs real entry fills?
Is there a way to choose between one or the other?

I have taken a look at the wiki page and I can't find a an answer.
https://www.multicharts.com/trading-sof ... to_Trading section "Get Real Time Data From", talks about special orders but I am not sure whether a simple stop loss is a special order.

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Stop loss calculated vs broker fill or chart entry price

Postby Anna MultiCharts » 06 Apr 2018

Hello, CAGMAD!

AA mode is very similar to forward-testing. The prices are taken from the chart, for AA mode that is not possible to get the prices from the broker for the strategy's calculation.
If for the stop order generation you use the setstoploss command, then this is a special order. If you use other commands, then they will be simple orders.

CAGMAD
Posts: 15
Joined: 04 May 2016
Been thanked: 1 time

Re: Stop loss calculated vs broker fill or chart entry price

Postby CAGMAD » 06 Apr 2018

Anna,

I use the following command in a strategy in AA mode and the stop loss is calculated vs the real fill at the broker:

Code: Select all

Setstopcontract;
Setstoploss (50 * bigpointvalue);
Was the stop loss calculated vs realtime because I use the setstoploss command and then it is a special order?
What can I do to make sure that my stop loss orders are calculated vs chart prices rather than vs real fills at the broker?

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Stop loss calculated vs broker fill or chart entry price

Postby Anna MultiCharts » 10 Apr 2018

CAGMAD,

On the chart that is trading in AA mode your stop loss will be filled according to the prices on the chart. The orders sent to the broker will be filled according to the broker prices. In 99% those prices will be different.

CAGMAD
Posts: 15
Joined: 04 May 2016
Been thanked: 1 time

Re: Stop loss calculated vs broker fill or chart entry price

Postby CAGMAD » 11 Apr 2018

Anna,

I don't understand your answer. Let me explain, in detail, what happened to me the other day:

I have a strategy in AA automation mode on the mini FDAX future. A buy order triggered and was registered in the chart at 12190 but I was filled by my broker (Interactive Brokers) at 12193, so there was a slippage of 3 points. The stop loss of the strategy is 56 points. I was stopped out of the strategy at 12137, that is 56 points below the real fill at the broker, not the fill seen in the chart.

Is this what is to be expected from a strategy in AA mode?
If the answer is yes, is there any way to make sure my stop loss is calculated vs the fill in chart? In the example above, the future turned around at 12136, 2 points above the stop loss, if calculated vs the fill in the chart. The result was a loss in my account and a very nice profit in the chart. My goal is to make sure that, excluding slippage, the outcome of trades in the chart are the same as the outcome of real trades.

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Stop loss calculated vs broker fill or chart entry price  [SOLVED]

Postby Anna MultiCharts » 18 Apr 2018

CAGMAD,

When you use setstoploss in AA mode then it is calculated both vs chart prices and vs broker prices. So as per your example:
1) on the chart stop loss would be 12314
2) at the broker stop loss would be 12317
To avoid this please use SA mode or write your own stop order for AA mode that will have the price calculated based on avgentryprice.

CAGMAD
Posts: 15
Joined: 04 May 2016
Been thanked: 1 time

Re: Stop loss calculated vs broker fill or chart entry price

Postby CAGMAD » 18 Apr 2018

Thanks Anna, that's clear now.

Regards
CAGMAD

GuppyDRV
Posts: 57
Joined: 20 Jan 2017
Has thanked: 1 time
Been thanked: 2 times

Re: Stop loss calculated vs broker fill or chart entry price

Postby GuppyDRV » 09 Oct 2020

Deep thread resurrection for sure,

Thanks for reading. I have always noticed while trading in SA mode that my Stoploss and Profit Targets will be sent to my broker based on the AverageEntryPrice. No real problem with most markets except occasionally the slip can range from 0-7/8 ticks. This will than be the difference on a historic chart from the next bar open price on the chart that Multicharts uses in backtest to set said stops. This difference will inevitably cause the backtest to differ from live trading as occasionally the slip difference cause a live fill that thusly would not have been reached in backtest.

Other than coding a work around is there any easy way internally within Multicharts to have the orders calculated off the actual bar open price in live trading. I realize this would induce a slight difference to live results but they would then match backtest thus allowing for a more accurate picture of long term strategy performance.

Thanks in advance.

GuppyDRV

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Stop loss calculated vs broker fill or chart entry price

Postby Kate MultiCharts » 21 Dec 2020

Deep thread resurrection for sure,

Thanks for reading. I have always noticed while trading in SA mode that my Stoploss and Profit Targets will be sent to my broker based on the AverageEntryPrice. No real problem with most markets except occasionally the slip can range from 0-7/8 ticks. This will than be the difference on a historic chart from the next bar open price on the chart that Multicharts uses in backtest to set said stops. This difference will inevitably cause the backtest to differ from live trading as occasionally the slip difference cause a live fill that thusly would not have been reached in backtest.

Other than coding a work around is there any easy way internally within Multicharts to have the orders calculated off the actual bar open price in live trading. I realize this would induce a slight difference to live results but they would then match backtest thus allowing for a more accurate picture of long term strategy performance.

Thanks in advance.

GuppyDRV
Hello GuppyDRV,

To choose what the Stop Loss calculation is based on, please go to Strategy Properties -> Auto Trading tab -> in the Get Real-Time Data section select Broker/Chart.
You can find more info here.

User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Re: Stop loss calculated vs broker fill or chart entry price

Postby lingwuchung » 31 Dec 2020

CAGMAD,

When you use setstoploss in AA mode then it is calculated both vs chart prices and vs broker prices. So as per your example:
1) on the chart stop loss would be 12314
2) at the broker stop loss would be 12317
To avoid this please use SA mode or write your own stop order for AA mode that will have the price calculated based on avgentryprice.
What is AA mode?


Return to “MultiCharts”