Long only 15 min DAX

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #28647 quote
    victormork
    Participant
    Veteran

    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

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions to enter long positions
    indicator1 = 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 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator4 = CCI[20]
    c3 = (indicator4 CROSSES UNDER 100)
    
    IF c3 THEN
    SELL AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pLOSS 25
    Paris thanked this post
    skrmavbild-kl-1489567369c8lp41.png skrmavbild-kl-1489567369c8lp41.png
    #28661 quote
    manel
    Participant
    Veteran

    Hi – 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.

    Paris thanked this post
    DAX-15M-test-150317-chart.jpg DAX-15M-test-150317-chart.jpg DAX-15M-test-150317-results.jpg DAX-15M-test-150317-results.jpg DAX-15M-test-150317-stats.jpg DAX-15M-test-150317-stats.jpg
    #28735 quote
    victormork
    Participant
    Veteran

    Hi 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!

    #28739 quote
    victormork
    Participant
    Veteran

    I 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!

    Skärmavbild-2017-03-16-kl.-10.31.16.png Skärmavbild-2017-03-16-kl.-10.31.16.png Skärmavbild-2017-03-16-kl.-10.30.17.png Skärmavbild-2017-03-16-kl.-10.30.17.png Skärmavbild-2017-03-16-kl.-10.29.12.png Skärmavbild-2017-03-16-kl.-10.29.12.png
    #28744 quote
    victormork
    Participant
    Veteran
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions to enter long positions
    indicator1 = 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 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator4 = CCI[20]
    c3 = (indicator4 CROSSES UNDER 100)
    
    IF c3 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator5 = 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 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator8 = CCI[20]
    c6 = (indicator8 CROSSES OVER -200)
    
    IF c6 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP %LOSS 0.8
    Paris thanked this post
    Skärmavbild-2017-03-16-kl.-10.57.13.png Skärmavbild-2017-03-16-kl.-10.57.13.png Skärmavbild-2017-03-16-kl.-10.56.21.png Skärmavbild-2017-03-16-kl.-10.56.21.png Skärmavbild-2017-03-16-kl.-10.56.03.png Skärmavbild-2017-03-16-kl.-10.56.03.png
    #28757 quote
    Paris
    Participant
    Veteran

    why not implant the system of accumulation  …. ?

    #28771 quote
    Joachim Nilsson
    Participant
    Average

    Good 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 🙂

    #28812 quote
    Nicolas
    Keymaster
    Master

    Hey 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 🙂

    #28831 quote
    victormork
    Participant
    Veteran

    Paris – 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!

    #28840 quote
    Nicolas
    Keymaster
    Master

    About 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.

    long-and-short-dax-intraday-timeframe-trading.png long-and-short-dax-intraday-timeframe-trading.png
    #28844 quote
    victormork
    Participant
    Veteran

    Thanks 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?

    #28846 quote
    Nicolas
    Keymaster
    Master

    or add a long term trend filter to avoid long trades in a bearish market first, and vice-versa. It may reduces a lot trades quantity though .. just my 2 cents.

    #28857 quote
    victormork
    Participant
    Veteran
    
    
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions to enter long positions
    indicator1 = 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 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator6 = CCI[20]
    c4 = (indicator6 CROSSES UNDER 100)
    
    IF c4 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator7 = 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 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator12 = CCI[20]
    c8 = (indicator12 CROSSES OVER -200)
    
    IF c8 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP %LOSS 0.8
    Paris thanked this post
    Skärmavbild-2017-03-17-kl.-09.41.30.png Skärmavbild-2017-03-17-kl.-09.41.30.png Skärmavbild-2017-03-17-kl.-09.45.52.png Skärmavbild-2017-03-17-kl.-09.45.52.png
    #28862 quote
    victormork
    Participant
    Veteran

    I 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.

    #28888 quote
    Nicolas
    Keymaster
    Master

    Good job! Did you find this period with optimisation?

Viewing 15 posts - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.

Long only 15 min DAX


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
victormork @victormork Participant
Summary

This topic contains 27 replies,
has 5 voices, and was last updated by victormork
8 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/15/2017
Status: Active
Attachments: No files
Logo Logo
Loading...