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.
1
2
3
4
5
6
7
8
9
10
11
12
13
Indicator1=CALL"Basic system 1 + Bollinger"(close)
// Conditions to enter long positions
IFIndicator1=1THEN
BUY1CONTRACTSATMARKET
SET STOPpLOSS27
SET TARGETpPROFIT30
ENDIF
// Conditions to enter short positions
IFIndicator1=-1THEN
SELLSHORT1CONTRACTSATMARKET
SET STOPpLOSS27
SET TARGETpPROFIT30
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.
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.
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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue