Max. Martigale not working correctly in live testing

This topic contains 6 replies, has 2 voices, and was last updated by  Yannick 1 year, 10 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #159405

    bondtrader
    Member

    Hi Yannick

    I’m trading the Bollinger Band EA using the break in strategy on USDCHF. I tested the Martingale setting on back testing and got good results so decided to try it on live trading. In the back tests, the martingale function correctly increments the trade size from 0.1 to 0.3 and 0.5. My martingale settings are as follows:

    What I have found is that it increases the lot size by 0.2 for the first martigale level from 0.1 to 0.3, this has been consistently correctly executed. However, following the second profitable trade, the EA resets the lot size to 0.1 and doesn’t go to Martigale level 2, as in the settings and in the back tests, to increase the lot size to 0.5.

    Here’s the most recent example. The trade below is at Level 1 Martigale at 0.3 lot size, as you can see, it is profitable so the next trade should be 0.5 lot size:

    Here’s the next trade, it resets to 0.1 lot size.

    Is the Martingale function not working correctly in MT4? Or does the Martingale make a distinction between buy and sell trades (I didn’t think so)? Or could there be another explanation?

    • This topic was modified 1 year, 10 months ago by  bondtrader.
    • This topic was modified 1 year, 10 months ago by  bondtrader. Reason: insert graphics not shown in the right place
    • This topic was modified 1 year, 10 months ago by  bondtrader.
    • This topic was modified 1 year, 10 months ago by  bondtrader.
    • This topic was modified 1 year, 10 months ago by  bondtrader.
    #159462

    Yannick
    Keymaster

    Based on the information you provide, the EA should have opened the new position with the lotSize of 0.5.

    I’ve quickly looked at the code and notices a line that could cause this error.

    I upload a modified version (limited license) so that you can test it. I will also run it on my server for a week. Please check it and notify me if it works.

    #159482

    bondtrader
    Member

    Thanks! I will test this and let you know.

    1 user thanked author for this post.
    #159637

    Yannick
    Keymaster

    Luckily before the market closed, the EA took 3 trades on AUDCAD with a positive result. The EA has increased the position size from 0.1 to 0.3 to 0.5.

    Do you already have some results too?

    #160462

    bondtrader
    Member

    Hi Yannick, just to let you know that the fix you did worked. I got a trade where the lot size was correctly incremented to 0.5. I set the EA to martingale on profit. FYI as feedback, the second trade was a breakeven so strictly a 0 profit, but it was treated as a profitable trade for martingale purposes that’s why the third trade was incremented to 0.5 lots.

    1 user thanked author for this post.
    #160477

    Yannick
    Keymaster

    Thanks for the feedback. My tests were also successful. I will soon update all EA with the Martingale function and send a newsletter about it.

    Yes, all trades which are >= 0 are considered as profitable trades.

    Thanks a lot for your help 🙂

    #164875

    Yannick
    Keymaster

    I have now updated all EA with the martingale function (all Pro version except SuperTrend EA). You can download the new version in your purchase history.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.