Results 1 to 4 of 4
 3 Attachment(s)    

Thread: A different vision on martingale

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    1

    Default A different vision on martingale

    Hi guys.
    I need some help to develope a new idea in Martingale system. I know: martingale is able to destroy your account in few minutes, but... why?
    I'm sending here a system I've developed for a thread, never published because I'm always developing something new, and this code contain some bug.
    The system is based on 2 repainting indi : Tro and 3 ZZ levels. It works fine if U have at least 15000 box and use 0.01 lots (don't laught, on M1 it makes more than 5000 pips in 2 months on eurusd, may included, but with a orrible RDD).
    Now, the problem is the RDD. I've tried to fix this, but I'm not a real coder, I'm more a "Monkey see, monkey do".
    Where is the issue with Marty? The margin call, sure. You increase the "bet" (normally 2x), and when you reach the 5th level, you are using 0.01+0.02+0.04+0.08+0.16= 0.31. Not much, if your account is 15000. Add 2 more levels, and you will have 1.27 lots, all in loss.
    Why I use Marty? Bcos my position is losing.
    What I desire from Marty? To bring back my losing position to 0, at least.
    What I've coded different now (I don't remember if this mq4 have the code, I save a new mq4 every time I make a mod. If someone want to take a look, just ask. Nothing to hide ):

    when a position is added, and the last position is gaining, I let it run until a reverse signal appear. Nice money, if U catch the trend at 1.27 lots
    If a reverse signal come and the global profit is >0: close all positions.
    If a reverse signal come, and the global profit is <0, I close the last position (in gain) and I wait for a new signal to add the same marty position.

    What I cannot code is this (I've tried, but I receive an error):

    If I add a Marty position (2x), I close 1/2 of the previous position and increase my target, if I use a tp. My probability to close faster the whole trade is very high: no more 1 vs 2 lots (33% retracement), but 1 vs 4 (20% retracement).

    Yes, maybe U will have a little loss, but U are back in the market immediately, and maybe, I said maybe, U can limit the dramatic DD, that is the real problem in a Martingale System.
    Indeed, is not just the losing positions that bring the margin call. Is the the money U invest in every position opened. Cut 1/2 of the previous position, and U will reduce the investment and avoid the margin call.
    A simple test will say if the loss is too high and benefits too low...

    What's wrong in my code? Marty code have a pips limit: wait n losing pips before searching a new signal. In backtest, works fine. In forward test, not so good: pips limit is not respected. Sometimes, no Marty rules are respected Bcos of this, I've made in 10 days more than 200%. Just very lucky, I swear...

    Is there anyone able to add that feature? (I have some more minor features, but I need to learn coding... OrderSelect(), specially)

    Thanks.

    PS: Tro_Martingale etc...mq4 in expert, 3_Level_zz and TRO_mod in indicators.
    PPS: because of I can use the hedge (Europe), I never tested the part of the code that disable HedgePos... sorry mates if don't works fine I will fix it, eventually.
    Attached Files Attached Files
    Last edited by I-R3d; 06-17-2010 at 01:56.

  2. #2

    Default

    thanks to shareing

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    9

    Default

    This was the strategy I looking for, thank for sharing, I hope i can understand all the code u had written.

  4. #4
    Junior Member blueocean's Avatar
    Join Date
    Mar 2009
    Posts
    21

    Default

    Quote Originally Posted by I-R3d View Post
    Hi guys.
    I need some help to develope a new idea in Martingale system. I know: martingale is able to destroy your account in few minutes, but... why?
    I'm sending here a system I've developed for a thread, never published because I'm always developing something new, and this code contain some bug.
    The system is based on 2 repainting indi : Tro and 3 ZZ levels. It works fine if U have at least 15000 box and use 0.01 lots (don't laught, on M1 it makes more than 5000 pips in 2 months on eurusd, may included, but with a orrible RDD).
    Now, the problem is the RDD. I've tried to fix this, but I'm not a real coder, I'm more a "Monkey see, monkey do".
    Where is the issue with Marty? The margin call, sure. You increase the "bet" (normally 2x), and when you reach the 5th level, you are using 0.01+0.02+0.04+0.08+0.16= 0.31. Not much, if your account is 15000. Add 2 more levels, and you will have 1.27 lots, all in loss.
    Why I use Marty? Bcos my position is losing.
    What I desire from Marty? To bring back my losing position to 0, at least.
    What I've coded different now (I don't remember if this mq4 have the code, I save a new mq4 every time I make a mod. If someone want to take a look, just ask. Nothing to hide ):

    when a position is added, and the last position is gaining, I let it run until a reverse signal appear. Nice money, if U catch the trend at 1.27 lots
    If a reverse signal come and the global profit is >0: close all positions.
    If a reverse signal come, and the global profit is <0, I close the last position (in gain) and I wait for a new signal to add the same marty position.

    What I cannot code is this (I've tried, but I receive an error):

    If I add a Marty position (2x), I close 1/2 of the previous position and increase my target, if I use a tp. My probability to close faster the whole trade is very high: no more 1 vs 2 lots (33% retracement), but 1 vs 4 (20% retracement).

    Yes, maybe U will have a little loss, but U are back in the market immediately, and maybe, I said maybe, U can limit the dramatic DD, that is the real problem in a Martingale System.
    Indeed, is not just the losing positions that bring the margin call. Is the the money U invest in every position opened. Cut 1/2 of the previous position, and U will reduce the investment and avoid the margin call.
    A simple test will say if the loss is too high and benefits too low...

    What's wrong in my code? Marty code have a pips limit: wait n losing pips before searching a new signal. In backtest, works fine. In forward test, not so good: pips limit is not respected. Sometimes, no Marty rules are respected Bcos of this, I've made in 10 days more than 200%. Just very lucky, I swear...

    Is there anyone able to add that feature? (I have some more minor features, but I need to learn coding... OrderSelect(), specially)

    Thanks.

    PS: Tro_Martingale etc...mq4 in expert, 3_Level_zz and TRO_mod in indicators.
    PPS: because of I can use the hedge (Europe), I never tested the part of the code that disable HedgePos... sorry mates if don't works fine I will fix it, eventually.

    Hi there,

    Its looks like that the EA will be an excellent contribution to this forum.
    I hope to have the new improvements posted here at your convenience. I wish I could help but I am not a programmer.

    best of luck
    blueocean

Similar Threads

  1. Add a martingale
    By funyoo in forum MQL programming
    Replies: 45
    Last Post: 05-02-2013, 03:58
  2. RSI + martingale
    By noiahei in forum Ideas for expert advisors
    Replies: 1
    Last Post: 06-21-2010, 17:01
  3. (REQ) Martingale
    By 626mx in forum Ideas for expert advisors
    Replies: 2
    Last Post: 05-05-2010, 01:40
  4. Forex vision
    By secatrix in forum MQL programming
    Replies: 2
    Last Post: 01-15-2010, 18:20

Tags for this Thread

add, backtest, coding, europe, eurusd, expert, hedge, high, indicators, investment, learn, limit, low, martingale, money, mq4, pips, profit, programmer, real, signal, simple, strategy, system, test, time, trend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •