Stops Slippage with IB

Questions about MultiCharts and user contributed studies.
TheTrend
Posts: 17
Joined: 26 Jul 2011
Has thanked: 3 times

Stops Slippage with IB

Postby TheTrend » 30 Aug 2011

I need further explanation of what could impact the slippage and how to minimize it.

Last Friday I had 8.5 pips of slippage with a Stop Loss, please see attached.

This seems completely crazy for an instrument like EUR/USD at a time when there's no news (5.16 PM Paris Time) with such a small position (110k).

In my mind, such a slippage could only happen during a low liquidity period and with a relatively large position (night and position > 1Mio) or during high volatility following report like NFP.

The code for the SL is completely standard:

Code: Select all

if MarketPosition = 1 then Sell( "Pct Stop Long" ) CurrentContracts shares next bar at (entryprice * ( 1 - StopLossPct))stop ;
Does anyone experience the same kind of problem ? How can I fix this ?

Useless to say that if I need to include 8 pips of slippage for stop entries or exit, any strategy will become completely unreliable.
Attachments
slippage.png
(5.09 KiB) Downloaded 624 times

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

Re: Stops Slippage with IB

Postby Henry MultiСharts » 30 Aug 2011

From the provided information it can be seen that the order name in the Order and Position Tracker is different from the order name in the script code. Please make sure that the order is generated by the provided script and it is not sent from the other chart. The broker is in charge of the filled price. The difference in the price between the stop and filled price is the issue, is that correct? Or the stop price is incorrect from your point of view? Please let us know what type of account do you have (demo/live).

TheTrend
Posts: 17
Joined: 26 Jul 2011
Has thanked: 3 times

Re: Stops Slippage with IB

Postby TheTrend » 30 Aug 2011

Thanks for your reply Henry.

I've given you the sell stop order as an example but you're right I should have copied / pasted the line for the buy stop.

The problem is clearly the 8,5 pips difference between the stop order issued and the filled price.

This is an Intreactive Brokers demo account, do you believe it wouldn't have happened on a live account ?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Stops Slippage with IB

Postby TJ » 30 Aug 2011

Thanks for your reply Henry.

I've given you the sell stop order as an example but you're right I should have copied / pasted the line for the buy stop.

The problem is clearly the 8,5 pips difference between the stop order issued and the filled price.

This is an Intreactive Brokers demo account, do you believe it wouldn't have happened on a live account ?
Please clarify whether you were using the IB demo account, or the IB papertrading account.
They are 2 different things.

The demo account does not use realtime data, while the papertrading account does.

TheTrend
Posts: 17
Joined: 26 Jul 2011
Has thanked: 3 times

Re: Stops Slippage with IB

Postby TheTrend » 31 Aug 2011

Hi TJ, I'm using the paper trading account.

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

Re: Stops Slippage with IB

Postby Henry MultiСharts » 31 Aug 2011

If the order execution price in IB TWS coincides with the price listed in the MultiCharts and the stop price is calculated correctly- then there is nothing wrong on MultiCharts side. Please keep in mind that the broker is in charge of the execution price.
You might be using Trade field on the chart. But the order is executed basing on Asks and Bids prices. What we can recommend is to use the extended backtesting mode (Precise Strategy Back Testing) to get filled at the more realistic Ask and Bid prices.

To use Precise Strategy Back Testing:
1. Make sure the symbol contains historical bid and ask data.
2. Add the symbol into a chart window.
3. Designate this chart as the Ask data series.
4. Add the same symbol into the same chart window. The chart window now has two charts.
5. Designate this chart (the second chart) as the Bid data series.
6. Apply the strategy to the Ask data series, which is the first chart. It does not matter if the strategy is applied to the Ask data series or the Bid data series. It only matters that the strategy is applied to the first chart.
Attachments
Extended backtesting.PNG
(57.6 KiB) Downloaded 608 times

TheTrend
Posts: 17
Joined: 26 Jul 2011
Has thanked: 3 times

Re: Stops Slippage with IB

Postby TheTrend » 31 Aug 2011

Thanks for the tip regarding backtesting.

However, this has nothing to do with back-testing. What I do is forward test my strategy in real time with an IB paper trading account.

The stop calculation was correct and I can't believe IB is executing 8.5 pips later a stop loss order on EUR/USD, it has never happened to me with manual trading.

There must be something else but I'm wondering what....

By the the way, similar orders of the very same strategy have been correctly executed with at most 1 pip of slippage.

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

Re: Stops Slippage with IB

Postby Henry MultiСharts » 31 Aug 2011

The extended backtesting mode (Precise Strategy Back Testing) is also relevant for realtime/forward testing. In realtime the strategy will be calculated at the more realistic Ask and Bid prices, rather then on average Trade price.

Please contact IB regarding the order execution price.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Stops Slippage with IB

Postby arjfca » 01 Sep 2011

This seems completely crazy for an instrument like EUR/USD at a time when there's no news (5.16 PM Paris Time) with such a small position (110k).
Can't say if it is relevant, but here around 5:15 pm in Montreal (New York time) I may experience the same kind of slippage. IB is closing is server and switch to another one

Look at the picture. Between 17:00 and 17:16 No transaction reported. Personnaly, I avoid these period.

Could it be the same problem with IB in Paris?
Does anyone experience the same kind of problem ? How can I fix this ?
You could use Stop Limit entry. Order is activated after your stop target is reach, then a limit price is attach to your order. This way, you could reduce your risk to get a big slippage. Please remind, you may not get in and miss a trade if your limit price is not reach after a big gap.

You could also monitor the bid and ask price. SpreadAskBid = Bid - Ask. For myself, my rule will be if the value is greater than 2 pips, don't issue a trade ( rule not implemented yet).

Good luck

Martin
Attachments
FiveO'clock.jpg
(78.23 KiB) Downloaded 602 times

TheTrend
Posts: 17
Joined: 26 Jul 2011
Has thanked: 3 times

Re: Stops Slippage with IB

Postby TheTrend » 01 Sep 2011

Merci Martin.

Users are sometimes more helpful...

I think the server switches between 23:00 and 23:15 in europe because I have no data at this time of the night (not sure it is related, I need to check).

Don't want to use stop limit order because I'll miss the best trades.

Monitoring the bid-ask is a good idea but I can't believe IB has ever been displaying a spread of 8.5 pips for EUR/USD !

Thanks for the tips anyway !

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Stops Slippage with IB

Postby arjfca » 01 Sep 2011

Monitoring the bid-ask is a good idea but I can't believe IB has ever been displaying a spread of 8.5 pips for EUR/USD !
Yes it could happen. As an ECN, IB does not ( not suppose to) play with the price. IB show the best Ask and Bid at the moment. So yes, it could be true.

Try to display the historic bid and ask for the given time period.

Stop Limit order are like insurance. You pay a premium( missing some trades) to be more assured of your calculated risk.

Good luck

Martin

TheTrend
Posts: 17
Joined: 26 Jul 2011
Has thanked: 3 times

Re: Stops Slippage with IB

Postby TheTrend » 01 Sep 2011

Thanks, so I'll try to replay the bid and the ask !

Not sure If I can download few days of tick by tick bid and ask from IB though.


Return to “MultiCharts”