Is this system to good too be true?
Forums › ProRealTime English forum › ProOrder support › Is this system to good too be true?
- This topic has 11 replies, 7 voices, and was last updated 7 years ago by Francesco78.
-
-
02/15/2017 at 7:31 PM #25197
Hi All,
I’ve created my first system using two moving averages and have been testing it on the DAX, IT40 and Japan 225.
The result I’m getting from the back tests are pretty good, since 2013, but I’m worried that I’m missing something and this system is to good too be true….
The code is below:
123456789101112131415161718192021222324252627282930313233343536373839404142// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM FLATAFTER = 215500// Conditions to enter long positionsindicator1 = ExponentialAverage[10](close)indicator2 = ExponentialAverage[35](close)c1 = (indicator1 CROSSES OVER indicator2)IF c1 THENBUY 10 PERPOINT AT MARKETENDIF// Conditions to exit long positionsindicator3 = ExponentialAverage[10](close)indicator4 = ExponentialAverage[35](close)c2 = (indicator3 CROSSES UNDER indicator4)IF c2 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator5 = ExponentialAverage[10](close)indicator6 = ExponentialAverage[35](close)c3 = (indicator5 CROSSES UNDER indicator6)IF c3 THENSELLSHORT 10 PERPOINT AT MARKETENDIF// Conditions to exit short positionsindicator7 = ExponentialAverage[10](close)indicator8 = ExponentialAverage[35](close)c4 = (indicator7 CROSSES OVER indicator8)IF c4 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP pTRAILING 6Too good to be true, or is this system displaying good results?
02/15/2017 at 7:41 PM #2520102/15/2017 at 7:43 PM #2520302/15/2017 at 7:49 PM #25208Yes i´m sorry but it´s too good to be true. A 6p trailing stop on such a high timeframe doesn’t´t work.
02/15/2017 at 7:54 PM #2521002/15/2017 at 8:01 PM #25214I tweaked it a bit and now it performs quiet well.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM FLATAFTER = 215500n=5m=19// Conditions to enter long positionsindicator1 = ExponentialAverage[n](close)indicator2 = ExponentialAverage[m](close)c1 = (indicator1 CROSSES OVER indicator2)IF c1 THENBUY 10 PERPOINT AT MARKETENDIF// Conditions to exit long positionsindicator3 = ExponentialAverage[n](close)indicator4 = ExponentialAverage[m](close)c2 = (indicator3 CROSSES UNDER indicator4)IF c2 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator5 = ExponentialAverage[n](close)indicator6 = ExponentialAverage[m](close)c3 = (indicator5 CROSSES UNDER indicator6)IF c3 THENSELLSHORT 10 PERPOINT AT MARKETENDIF// Conditions to exit short positionsindicator7 = ExponentialAverage[n](close)indicator8 = ExponentialAverage[m](close)c4 = (indicator7 CROSSES OVER indicator8)IF c4 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP ploss 180set target pprofit 15002/15/2017 at 8:14 PM #25215Ran the following code on japan 225 with good results.
Only problem is the draw down is too high
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM FLATAFTER = 215500n=5m=19// Conditions to enter long positionsindicator1 = ExponentialAverage[n](close)indicator2 = ExponentialAverage[m](close)c1 = (indicator1 CROSSES OVER indicator2)IF c1 THENBUY 1 contract AT MARKETENDIF// Conditions to exit long positionsindicator3 = ExponentialAverage[n](close)indicator4 = ExponentialAverage[m](close)c2 = (indicator3 CROSSES UNDER indicator4)IF c2 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator5 = ExponentialAverage[n](close)indicator6 = ExponentialAverage[m](close)c3 = (indicator5 CROSSES UNDER indicator6)IF c3 THENSELLSHORT 1 contract AT MARKETENDIF// Conditions to exit short positionsindicator7 = ExponentialAverage[n](close)indicator8 = ExponentialAverage[m](close)c4 = (indicator7 CROSSES OVER indicator8)IF c4 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP ploss 180set target pprofit 15002/15/2017 at 10:22 PM #25220Thank you so much everyone for your feedback and for adjusting the code! That’s so kind of you :).
I’m slightly confused though (pardon my ignorance here) but why are the back tests so mis-leading if in the real world they’re not really valid? And how can you determine if a system you’ve developed in actually going to work…?
Best wishes
02/15/2017 at 10:35 PM #2522202/15/2017 at 10:38 PM #25224In any backtest on the 10.2 version of PRT, trades that reach the SL and TP within the same bar that the trade is opened, will always count as a win. That is what can mislead you, which is why you must check for how many bars your trades in the backtest are held.
02/15/2017 at 10:49 PM #2522705/17/2017 at 1:48 PM #35839It is flat after February no? Overfitting here I presume.
-
AuthorPosts
Find exclusive trading pro-tools on