Hi, I wonder if anyone can help me on this one. I’ve got a trading strategy that I am running in automated mode. Whilst it behaves pretty much the same as the backtest, I’m getting a slippage of about 5 points per trade from the results I get on the backtest to the real results on my trading platform. I’ve been running it a while, so I can compare what the backtest thinks should have happened to what actually happened. It’s a pretty simple system. Here’s the code.
Indicator1 = CALL "Basic system 1 + Bollinger"(close)
// Conditions to enter long positions
IF Indicator1 = 1 THEN
BUY 1 CONTRACTS AT MARKET
SET STOP pLOSS 27
SET TARGET pPROFIT 30
ENDIF
// Conditions to enter short positions
IF Indicator1 = -1 THEN
SELLSHORT 1 CONTRACTS AT MARKET
SET STOP pLOSS 27
SET TARGET pPROFIT 30
ENDIF
The indicator is against the five minute graph and simply goes to one or minus one when it detects the condition. I am using a spreadbetting account and, looking at the way the orders are treated in backtest and real life, I think it’s something to do with different ways of treating accumulated positions. Does a spreadbetting account close orders in different sequence or something?
Any input from anyone who has encountered a similar problem will be very welcome.
Thanks in advance.
MazParticipant
Veteran
Hi. Are you sure it’s not just the spread widening from time to time? What instrument is it ? What’s the spread in the back test and how does that compare to the asset? Does the system execute 24 hours and does your back test take into account the change of spread throughout the day?
It could of course be regular slippage. But unless you’re doing very frequent folders that should be rare especially with IG but it does depend on the instrument.
During a back test if you are preparing for Life trading then it would be prudent to widen the spread on the back test so as to stress test a little.
Interesting point. It could be, but I’m trading 24hrs on AUD/USD, and I don’t think the spread changes that much on IG?
Thanks for the input
What spread have you got set in the Backtest engine for AUD/USD?
MazParticipant
Veteran
Yep, it’s a frustration. I don’t use pro order / prt for production syatems for these very reasons. At the end of the day it’s at the retail end of the spectrum so this is bound to a occur.
If you are serious about running production systems on PRT then I would suggest using very prudent back test spreads to accommodate for these sort of events.
Ive got a spread of 1 point in the backtest