Jump to content

Pattern EA (gartley) - can anybody fix the martingale part of the code ?


Recommended Posts

Hi, I had great results with this EA on M1, but the martingale is acting up sometimes using a multiplier a lot bigger than 2. I thought I fixed it by setting tradeoncepersignal to false but now it either uses no multiplier at all or still a huge one. The EA by itself still wins 70-80% of the time, it just has to compensate for the SL which is bigger than the TP.

 

I can get 50-100% profit per month with it, tested on live accounts. It's doing around 100 trades per month per pair, so it's not a one hit wonder and you don't have to be overleveraged.

 

Can a programmer here fix it please ? [-O< So close to riches only to be thwarted by a bug ? :((

 

Here's the EA: http://www.megaupload.com/?d=O5W5FXA0

Link to comment
Share on other sites

After a bit of testing I think I may have found at least part of what's causing the second martingale issue. I believe that if money management is enabled it decides the lot size in part based on equity or balance. It's still weird that before setting tadeoncepersignal to false it didn't use fewer lots than it should have, only many more.

 

So now with money management disabled the fewer lots than it should problem may be fixed, but I'm not sure it won't trade many more again.

 

Also with the tradeoncepersignal at false now it sometimes opens 2 trades at once (really not very good at all) and it's doing that despite the fact I set maxorders to 1. :|

 

@Stormin_Norman you'll look into it ?

Edited by SpacyTrader
Link to comment
Share on other sites

Hello,SpacyTrader.

Can you upload your .set and the result,please?

 

http://www.megaupload.com/?d=K70OEWJ9

 

There^^ After more testing it seems disabling MM doesn't get rid of the problem (though lot size did't seem to be influenced by the balance/equity anymore). So far it was not using huge lot sizes out of the blue, but in one of the demos it failed multiple times to double (took it off live trading naturally). Btw- I'm using it on 2 or 3 charts at the same time if that makes any difference (with different SL).

Edited by SpacyTrader
Link to comment
Share on other sites

After BT finished, click on the "Report" tab, then right click in that area and "Save as Report"

 

I think he meant results from live trading. Figured how to do that too, tks for the hint :)

 

Here it is from one of the real accounts that all this misbehavior tanked: http://www.megaupload.com/?d=BXO296NZ

 

It doesn't list all the transactions from the beginning (the first part was mostly without problems anyway) because I reinstalled mt4 at some point.

Edited by SpacyTrader
Link to comment
Share on other sites

And here is the statement from a demo account after I gave up live trading and changed settings to see if anything could set it straight: http://www.megaupload.com/?d=0CVCQ21R

 

Here are the real live accounts that include the period where they didn't use random lot sizes so you can see the potential: https://www.myfxbook.com/portfolio/gartley1/40381 https://www.myfxbook.com/portfolio/gartley2/41659 For the second one I used lower risk settings.

 

Anybody interested in fixing this pretty please ?

Edited by SpacyTrader
Link to comment
Share on other sites

i cant get it to trade.

 

can you send me your set files? (PM if need be).

 

I uploaded it previously when sunyc requested it: http://www.megaupload.com/?d=K70OEWJ9 That's basically it. I only fiddled with trandeoncepersignal true/false and money management to get a change in the martingale behavior (also enabling or disabling the news filter- but that didn't seem to change anything). I have to say it seemed to use wrong lot sizes less with tradeoncepersignal at the original true than false. But with false it got rid of a specific huge lot tradein BT I used as reference, that's why I thought it was fixed. :( You could try disabling the news filter- that might get you a trade sooner if you're testing live.

 

PS: Put it on EURJPY, AUDUSD USDJPY M1. Those worked for me.

Edited by SpacyTrader
Link to comment
Share on other sites

so far on testing i have not seen it become an issue.

 

I don't know. Look at the statements I uploaded. At times it works as it should, other times it keeps doubling the lots even though the previous position was won, other times it just comes out with a huge lot size out of the blue, and yet at other times it comes with a smaller lot size than at the previous loss.

 

But I see what you mean about the backtest: I ran it on the same period that decimated my accounts and it's impeccable. If you want to see a problem in backtest that I noticed set tradeoncepersignal to true and run it on USDJPY from 2010.07.12 to 2020.07.16 on liteforex demo- in fact it should come with a 3.2 lot trade near the beginning. With tradeoncepersignal false no 3.2 lot trade- everything smooth (if only it did that in live trading too).

 

All I can think of is that perhaps there's a programming issue that's made worse by running the ea on multiple charts or maybe 2 mt4 instances at the same time ? Anyway there's gotta be a problem with the code.

Link to comment
Share on other sites

I mean all the result.Both demo and real,I know this EA very much.From v102-105 I didn't get good result.V101 I can get good result but max DD is huge.So I gave it up.Let me see what your problem is.Maybe I can help u.

 

Thank You. I hope you can help. I uploaded the statements in my previous posts and the set file too. The problem is for some reason it's using quasi-random lot sizes.

Link to comment
Share on other sites

SpacyTrader,the demo result is not very good.why did you go live?From the demo result

http://www.megaupload.com/?d=0CVCQ21R

EURJPY:-281 pips

AUDUSD:-24 pips

USDJPY:-117pips.

Do you have any good result?

 

Look here: https://www.myfxbook.com/portfolio/gartley1/40381 and https://www.myfxbook.com/portfolio/gartley2/41659 That is from real live accounts. The demo result is with changed settings that I believed fixed the aberrant lot sizing. Of course it only made it worse. Those negative pip results would be due to both the changed settings and that news related steep downward movement (without news filter enabled). You can see right at the beginning it opened two trades at the same time for ex and I've had negative peeps in my live account too while being in profit due to martingale (while martingale didn't work properly at all there).

Edited by SpacyTrader
Link to comment
Share on other sites

MaxLots=100,

why don't you try it?

 

I specifically set that to 1 because it opened orders too close together that had the tendency to create a string of losses and then the martingale would need to kick in for all of them at the same time endangering my account.

 

Anyway I told you what the problem is: it doesnt respect the martingale multiplier: multiply the lot size by 2 after a loss. Can you do anything about that ? Somebody needs to look at the code and fix it. I dont think changing settings will do anything about it.

Edited by SpacyTrader
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...