Mother of Dragons trading strategy…

Forums ProRealTime English forum ProOrder support Mother of Dragons trading strategy…

This topic contains 333 replies, has 43 voices, and was last updated by avatar Dow Jones 11 minutes ago.

Currently, there are 14 users and 6 guests visiting this topic.
View all attachments
Viewing 15 posts - 1 through 15 (of 334 total)
  • #117373

    Well, I had to call it something, right?

    Attached is the first code I’ve put together that ‘seems to work’. Survives all manner of WF tests: 70-30, 50-50, 30-70 – however you want to chop it.

    Also does well in Vonasi’s robustness tester, Random 10-10. I tried hitting it with a very big hammer but still performs well.

    Uses a combination of HullMA and Supertrend on the 2h TF to define the primary trend, then another HullMA + trailing stop on a 5m TF to control entry and exit.

    The 5m TF doesn’t give us much in the backtest but it does well in clear uptrends and downtrends. Just that choppy bit in March 2019 where it couldn’t cope. I hate to see whole month where a strategy doesn’t come good, but one out of 16 is not too shabby.

    It runs around the clock so I’ve allowed for a spread of 3.3, calculated for IG as: (6.5 x 2.4 + 6.5 x 1.6 + 2 x 9.8 + 9 x 3.8)/24

    All backtesting was done with MM disabled but I ran the final optimization with it turned on just to demonstrate the boost it gives. Starts with position size = 1 and by the end of the run when equity has trebled, it’s placing position size of ~3.4, so more or less in keeping with standard practise. Also reduces position size in bad patches.

    Credit where credit is due: Vonasi wrote the Money Management part and coded the HullMA for me. The trailing stop I believe is Nicolas’ work – big thanks to both!

    But the really cool thing about this strategy is that the equity graph draws a perfect profile of Daenerys Targaryen! You might have to squint a bit, but if you can’t see Daenerys then you haven’t optimized correctly.

    All comments, suggestions, mods etc welcome!



    1. DJ-5m-Mother.of_.Dragons.itf
    9 users thanked author for this post.

    One more attachment, opt with MM

    1 user thanked author for this post.

    Looks amazing! I will try on 200k later today and post the results


    You are coming out with good work @nonetheless!

    Even ‘compiling’ others snippets needs a flair (and you deffo have it! ) but also effort and enthusiasm and time in front of the screen.  Even more so with the WF and robustness testing you are doing.

    Many Thanks for Sharing!

    1 user thanked author for this post.

    I’ve had so much help on this forum, it’s good to be able to give something back!


    The robustness test results look good. Just need to check if you added the TRADEON condition correctly as it is a strategy that can reverse position direction.

    It should be added like this:


    1 user thanked author for this post.

    I redid it with those TRADEON conditions and it’s not much changed, but possibly better!

    1 user thanked author for this post.

    We have to be careful when analysing the results of robustness tests of strategies that reverse position as the robustness test is some what diluted. In an extreme example of dilution a strategy could open a trade on the first bar and then reverse position repeatedly until the last bar in a data sample. This robustness test would only tell us how good an idea it was to open a trade on the first bar! All of our robustness tests will in reality be something between that very diluted test and the ideal robustness test that completely randomly opens and closes trades and never reverses positions.

    What I’m basically trying to say is that a robustness test on a strategy that reverses positions will never be as robust a test as a robustness test on a strategy that does not reverse positions and so we can’t say the results are better because we are not comparing eggs with eggs!

    1 user thanked author for this post.

    Yeah, that makes sense. I’ll put it on forward testing for a couple of months and see how it goes.

    So far though, looks like it could be worth a punt…


    No positions opened after 2018 in 200k. Why?


    Because the MM is set to quit the whole thing after 25% drawdown … which is bad bad bad!

    Try it with

    MM1stType = 0               
    MM2ndType = 0
    (disables the MM)
    And/or raise DrawdownNeededToQuit = 25  to 50 just so it will complete the run.
    1 user thanked author for this post.

    Got it! 200k here

    1 user thanked author for this post.

    Thanks for the OOS 200k test Francesco. The strategy doesn’t completely fail but it is not a total success by a long way. That OOS equity curve would be one that most people would soon give up trading.

    There are quite a few variables in the strategy that are most likely curve fitted especially when they are given values like 84 and 2.1. I see eight variables and that is quite a lot in my mind:

    • period
    • periodb
    • A long take profit %
    • A short take profit %
    • A long stop loss %
    • A short stop loss %
    • Trailingstart
    • TrailingStep


    I would start by removing the trailing stop as personally I think these are very easy to curve fit and rarely bring any performance benefit. Then I would plot charts of each other variable for a range of values to see how important their actual value is and whether it is majorly fitted or standing on a cliff edge. Sometimes it is a combination of optimised variables which is where 3D charts come in useful. Roll on being able to use v11 more easily!

    I would also consider removing the short part of the strategy as the DJI is a long only index in my mind and this removes two variables straight away from the curve fit.

    1 user thanked author for this post.

    @francesco, thanks for the backtest, even if it’s not what I had hoped for!

    @vonasi, I must reluctantly agree with your analysis, it does look curve fit to the 100k period i was testing on. I’ll play around with some of your suggestions and see if it can’t be salvaged…


    No problem! I’m ready to test on 200k when u will do some optimizations 🙂

Viewing 15 posts - 1 through 15 (of 334 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login