Long only 15 min DAX
Forums › ProRealTime English forum › ProOrder support › Long only 15 min DAX
- This topic has 27 replies, 5 voices, and was last updated 7 years ago by victormork.
-
-
03/17/2017 at 10:52 AM #28890
Yes I did. The drawdown I have now is coming from when the price is consolidation around the moving average. Hopefully the system is better on a longer history now.
03/17/2017 at 11:38 AM #2890103/17/2017 at 12:09 PM #28914Nice. Still not super good until the more volatile market starts in 2015. I added one more short term moving average (100 periods). It didn’t improve the return on the 2 year timeframe I have but it did lower the draw down which is visible on the gain/loss ratio. Backtest with 2p spread.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Prevents the system from placing new orders on specified days of the weekdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Conditions to enter long positionsindicator1 = TEMA[10](close)indicator2 = SuperTrend[3,10]c1 = (indicator1 >= indicator2)indicator3 = CCI[20]c2 = (indicator3 CROSSES OVER -100)indicator4 = SuperTrend[3,10]indicator5 = Average[2200](close)c3 = (indicator4 > indicator5)indicator6 = TEMA[10](close)indicator7 = Average[100](close)c4 = (indicator6 > indicator7)IF (c1 AND c2 AND c3 AND c4) AND not daysForbiddenEntry THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator8 = CCI[20]c5 = (indicator8 CROSSES UNDER 100)IF c5 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator9 = TEMA[10](close)indicator10 = SuperTrend[3,10]c6 = (indicator9 < indicator10)indicator11 = CCI[20]c7 = (indicator11 CROSSES UNDER 200)indicator12 = TEMA[10](close)indicator13 = Average[2200](close)c8 = (indicator12 < indicator13)indicator14 = TEMA[10](close)indicator15 = Average[100](close)c9 = (indicator14 < indicator15)IF (c6 AND c7 AND c8 AND c9) AND not daysForbiddenEntry THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator16 = CCI[20]c10 = (indicator16 CROSSES OVER -200)IF c10 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP %LOSS 0.803/17/2017 at 12:19 PM #28919Better is worse than good. Too much filtering reduce trades (almost 30% less for a limited increase in gain in my 200k bars test) and also statistics about robustness. It’s always difficult to be sure of what is a good filter or not. That’s why you should only make backtest with In Sample and Out Of Sample period, like I explain in this blog article: https://www.prorealcode.com/blog/avoid-equity-curve-fitting-with-probacktest-trading-strategy-optimisation/
(it talks about optimisation, but the idea is the same for a normal backtest).
Try to improve the strategy on IS period with as much ideas you can imagine. Then test the strategy on OOS period to see if it has improved the strategy result in the “future”, like if you were trading the strategy in real time. If the answer is “yes”, then your new ideas may be considered to be a good ones.
03/17/2017 at 12:49 PM #28922Fair point! I have to start doing the OOS test you mention in your blog article. Very well written btw! On that point, do you know why the walk forward settings are not visible on my platform (v10.3)? (I have attached a picture of my screen).
03/17/2017 at 2:03 PM #2893403/18/2017 at 12:06 AM #2900103/20/2017 at 12:30 PM #29158This is the latest update I have on the code. Now without the longer moving average which excluded a large amount of trades. All values have been selected by the optimisation function in PRT, apart from the stop loss which was suggested to be 1.05. In my opinon were the increase of risk greater than the increase of return. I have not yet tested on an OOS period.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Prevents the system from placing new orders on specified days of the weekdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Conditions to enter long positionsindicator1 = CCI[20]c1 = (indicator1 CROSSES OVER -100)indicator2 = TEMA[18](close)indicator3 = SuperTrend[3,10]c2 = (indicator2 > indicator3)indicator4 = TEMA[18](close)indicator5 = Average[130](close)c3 = (indicator4 > indicator5)IF (c1 AND c2 AND c3) AND not daysForbiddenEntry THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator6 = CCI[20]c4 = (indicator6 CROSSES UNDER 200)IF c4 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator7 = TEMA[18](close)indicator8 = SuperTrend[3,10]c5 = (indicator7 < indicator8)indicator9 = CCI[20]c6 = (indicator9 CROSSES UNDER 170)indicator10 = TEMA[18](close)indicator11 = Average[130](close)c7 = (indicator10 < indicator11)IF (c5 AND c6 AND c7) AND not daysForbiddenEntry THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator12 = CCI[20]c8 = (indicator12 CROSSES OVER -160)IF c8 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP %LOSS 0.803/20/2017 at 1:44 PM #2916603/20/2017 at 1:48 PM #29167haha, why didn’t I think of that myself.. thanks a lot Nicolas!
03/20/2017 at 6:51 PM #29220123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Prevents the system from placing new orders on specified days of the weekdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0once ordersize=1if Ordersize>18 thenOrdersize=18endif// Riesgo, multiplicador de contratos.n=1// Conditions to enter long positionsindicator1 = CCI[20]c1 = (indicator1 CROSSES OVER -100)indicator2 = TEMA[18](close)indicator3 = SuperTrend[3,10]c2 = (indicator2 > indicator3)indicator4 = TEMA[18](close)indicator5 = Average[130](close)c3 = (indicator4 > indicator5)IF (c1 AND c2 AND c3) AND not daysForbiddenEntry THENIF PositionPerf(1) < 0 THENOrderSize = OrderSize/2//+1if ordersize 0 THENOrderSize =OrderSize+2endifBUY ordersize*n shares AT MARKETENDIF// Conditions to exit long positionsindicator6 = CCI[20]c4 = (indicator6 CROSSES UNDER 200)IF c4 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator7 = TEMA[18](close)indicator8 = SuperTrend[3,10]c5 = (indicator7 < indicator8)indicator9 = CCI[20]c6 = (indicator9 CROSSES UNDER 170)indicator10 = TEMA[18](close)indicator11 = Average[130](close)c7 = (indicator10 < indicator11)IF (c5 AND c6 AND c7) AND not daysForbiddenEntry THENiF PositionPerf(1) < 0 THENOrderSize = OrderSize/2//+1if ordersize 0 THENOrderSize =OrderSize+2ENDIFSELLSHORT ordersize*n shares AT MARKETENDIF// Conditions to exit short positionsindicator12 = CCI[20]c8 = (indicator12 CROSSES OVER -160)IF c8 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP %LOSS 0.803/20/2017 at 6:57 PM #2922203/27/2017 at 6:48 PM #30041I wouldn’t recommend this. Better to have several systems which you size up simultaneously.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on