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/15/2017 at 2:21 PM #28647
Hi
I just started working on a system which is buying pullbacks on Dax 15 min. I would be grateful if anyone had the possibility to test the system on a longer history. The % of winning trades are not very impressive so if anyone have suggestions on how to improve this I would be grateful to hear them. I’m a beginner when it comes to this so any feedback on how to optimise the code is appreciated!
(The backtest I’ve done is with 1p spread)
cheers
123456789101112131415161718192021222324252627// 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 -150)IF (c1 AND c2) AND not daysForbiddenEntry THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator4 = CCI[20]c3 = (indicator4 CROSSES UNDER 100)IF c3 THENSELL AT MARKETENDIF// Stops and targetsSET STOP pLOSS 251 user thanked author for this post.
03/15/2017 at 3:50 PM #28661Hi – Thanks for sharing your code. I have tested it on a longer history going back to 2009 and the good news is that it still wins. However the gains are small compared to the period and no of trades conducted and more importantly it only really starts performing from Oct 2015 onwards (where it has some quite nice results).
I have attached the results (Test 1) together with amending the stop loss to 0.9% (Test 2) as a % based stop loss provides better results given that the DAX was half its current value back then. It produces better results but still needs some improvement. The draw is still only 7% which is pretty good. I’ll have a think about other ways you can improve. Have you optimised anything yet ? It doesn’t look like it, so together with the low draw of 3-7% you’re off to a good start.
1 user thanked author for this post.
03/16/2017 at 8:16 AM #28735Hi Manel,
Thanks a lot for running some more tests. I have not yet optimised the system. My plan is to try filter out trades taken when the market is consolidating. I don’t know if it will improve the result but from just looking at chart it seems as if these trades are not contributing enough to the positiv result. I’ll post any updates I have and if anyone have an Idea of what I should look in to please let me know!
03/16/2017 at 10:33 AM #28739I have now added a short condition similar to the long condition I’m using. It makes up for when the market is more bearish. The best return 2 years history I have is given by a 0,8% stop. Any ideas for improvements are most welcome!
03/16/2017 at 10:58 AM #2874412345678910111213141516171819202122232425262728293031323334353637383940414243444546// 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)IF (c1 AND c2) AND not daysForbiddenEntry THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator4 = CCI[20]c3 = (indicator4 CROSSES UNDER 100)IF c3 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator5 = TEMA[10](close)indicator6 = SuperTrend[3,10]c4 = (indicator5 < indicator6)indicator7 = CCI[20]c5 = (indicator7 CROSSES UNDER 200)IF (c4 AND c5) AND not daysForbiddenEntry THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator8 = CCI[20]c6 = (indicator8 CROSSES OVER -200)IF c6 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP %LOSS 0.81 user thanked author for this post.
03/16/2017 at 2:50 PM #2875703/16/2017 at 4:15 PM #28771Good code!
Don´t add accumulation, it can be a total disaster for your account.
Since you dont have any time restrictions I would test it with more than 1p spread.
I´ll take a closer look at it and come back if I have any feedback 🙂
03/16/2017 at 9:50 PM #28812Hey Victor, thanks for sharing your codes and ideas.
I moved your post, initially sent into the Library, here in ProOrder support forum. I think it would be a nice addition to the library when you think it should be definitive.
Please use the insert PRT code button when you write codes into your posts.I also received your FTSE code, once again I’ll move it here to discuss a bit about it, before adding it into the prorealtime codes library. Have a nice evening 🙂
03/17/2017 at 8:16 AM #28831Paris – I think it would be better to manually size up once every six months if you are in to that. But it’s probably even better to adjust the system for several markets in order to lower the risk.
Joachim – I don’t have a time restriction because it didn’t improve the result. If I use a 2.5p spread the result is WT 53%, G/L 1.36. (BTW så är jag också från Sverige men bor i Nederländerna. Kommer du på något mer så vill jag göra höra vad det är. Jag är nybörjare när det kommer till detta vilket kanske syns på den enkla koden).
The basic idea behind the system is to jump on short term trends in the market. However I have not yet found an efficient way to filter out periods when the market is not moving in any direction. I anyone have an idea on how to do I would be very happy to know more about it.
It would be great if anyone can make a new test on a longer time frame again now when the short condition has been added. Hopefully the return has been improved.
Thanks Nicolas for moving this topic. I have to admit that I didn’t know about PRT code button, but I will make sure to use it in the future!
03/17/2017 at 8:51 AM #28840About filtering range, it has always been something not really simple. You can give a try with (for instance): Keltner channel inside/outside Bollinger Bands, or adapt this indicator’s code I posted recently in the library (Volatility breakout indicator), just 2 rough ideas this morning 🙂
Please find attached the backtest of the system in tick mode with 1.5 points spread over 200.000 units. Symmetry of trading conditions for long and short orders might not be a good option if you plan to stick on a 15 minutes timeframe. The long term trend seems to affect a lot this concept.
03/17/2017 at 9:01 AM #28844Thanks Nicolas! I’ll look in to it and have a look. Do you suggest that I do one long system and once separate short system?
03/17/2017 at 9:08 AM #2884603/17/2017 at 9:44 AM #28857123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051// 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)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 100)IF c4 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator7 = TEMA[10](close)indicator8 = SuperTrend[3,10]c5 = (indicator7 < indicator8)indicator9 = CCI[20]c6 = (indicator9 CROSSES UNDER 200)indicator10 = TEMA[10](close)indicator11 = Average[2200](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 -200)IF c8 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP %LOSS 0.81 user thanked author for this post.
03/17/2017 at 9:48 AM #28862I have added a moving average (2200 periods). This amount of periods gave the best result. Picture in previous post include backtest with 1p spread and 2p spread.
03/17/2017 at 10:48 AM #28888 -
AuthorPosts
Find exclusive trading pro-tools on