Martingale Collection

 

Here we discuss and share some martingale Mql4 code.

tester

Files:
frank1.mq4  15 kb
frank1.ex4  19 kb
 
Erdenebayar Lamjav:

Here we discuss and share some martingale Mql4 code.

Why aren't you discussing?

 

Forum on trading, automated trading systems and testing trading strategies

Something Interesting in Financial Video

Sergey Golubev, 2018.02.02 08:26

Trading The Martingale and Anti Martingale Strategies

In today's lesson we are going to look at the two categories that most position sizing strategies fall into which are known as martingale strategies and anti martingale strategies.


A position sizing strategy which incorporates the martingale technique is basically any strategy which increases the trade size as a trade moves against the trader or after a losing trade. On the flip side a position sizing strategy which incorporates the anti martingale technique is basically any strategy which increases the trade size as the trade moves in the traders favor or after a winning trade.

The most basic martingale strategy is one in which the trader trades a set position size at the beginning of his trading strategy and then double's the size of his trades after each unprofitable trade, returning back to the original position size only after a profitable trade. Using this strategy no matter how large the string of losing trades a trader faces, on the next winning trade they will make up all their losses plus a profit equal to the profit on their original trade size.

As an example lets say that a trader is using a strategy on the full size EUR/USD Forex contract that takes profits and losses both at the 200 point level (I like using the EUR/USD Forex contract because it has a fixed point value of $1 per contract for mini forex contracts and $10 per contract for full sized contracts but the example is the same for any instrument)

The trader starts with $100,000 in his account and decides that his starting position size will be 3 contracts (300,000) and that he will use the basic martingale strategy to place his trades. Using the below 10 trades here is how it would work.

As you can see from the example although the trader was down significantly going into the 10th trade, as the 10th trade was profitable he made up all the his losses plus a brought the account profitable by the equity high of the account plus original profit target of $6000.

At first glance the above method can seem very sound and people often point to their perception that the chances of having a winning trade increase after a string of loosing trades. Mathematically however the large majority of strategies work like flipping a coin, in that the chances of having a profitable trade on the next trade is completely independent of how many profitable or unprofitable trades one has leading up to that trade. As when flipping a coin no matter how many times you flip heads the chances of flipping tails on the next flip of the coin are still 50/50.

The second problem with this method is that it requires an unlimited amount of money to ensure success. Looking at our trade example again but replacing the last trade with another loosing trade instead of a winner, you can see that the trader is now in a position where, at the normal $1000 per contract margin level required, he does not have enough money in his account to put up the necessary margin which is required to initiate the next 48 contract position

So while the pure martingale strategy and variations of it can produce successful results for extended periods of time, as I hope the above shows, odds are that it will eventually end up in blowing ones account completely.

With this in mind the large majority of successful traders that I have seen follow anti martingale strategies which increase size when trades are profitable, never when unprofitable.




 

Forum on trading, automated trading systems and testing trading strategies

Trading: What is Martingale and Is It Reasonable to Use It?

Proximus, 2013.08.24 03:00

It works if the net profit factor is above 1 and the win rate is higher than 50%, martingale is a double or nothing either doubles your money or doubles your losses, so if you have a 60% win rate with 1:1 RR ratio you can use it safely, if not then dont.


Whats funny about forex that you dont start from 50% win rate from the start because the market is changing not a fix probability set like a roulette or blackjack game.So if you start it like a betting system you will have like 40% win rate with 1:1 RR if you take trades random, maybe on the 9999999999999999999999th trade you hit 49.9% but thats still not enough.So it is better to filter out crappy trades first and then increase your win rate to be martingale compatible! And this is the advantage of investing vs gambling, you can filter out bad trades, on the roulette or blackjack you cant filter out bad hands or spins unless you cheat, but surely not the statistical way!!


This is how my 60% win rate, real martingale system looks like, and how it should suppose to look like, on LEVEL 7 settings (2^7)

Here are my martingale type systems:

1) CLASSICAL MARTINGALE AFTER 567 TRADES (60% WR, 1:1 RR)


As you can see after 500 trades it barely hit LEVEL 7 and even if we would lost that we would lose only half of the profit and continue from there to grow it back!

Of course you need a big account for this like one that can support like 10 lot size trades to be only 1% account risk, but statistically its very improbable to blow your account since its only 1% risk versus huge potential gains...The martingale presented in this article is BS with like 40-45% win rate which is sadly not enough, not even 50% is, must be 51 or higher...

2) PROGRESSIVE DYNAMIC GROWTH MARTINGALE (60% WR, 1:1 RR)


3) PROGRESSIVE STATIC GROWTH MARTINGALE (60% WR, 1:1 RR)


4) ANTI MARTINGALE or INVERSE MARTINGALE (60% WR, 1:1 RR)


enjoy and good programming ;)


 

Hello Guys!

I like this discussion. 

I thing the main point on a Strategy in order to win or lose at the end of the day with Martingale is the Consecutive Losses Maximum value and (of course) the size of TP and SL.


Anyway, a strategy that gives you 3 or 4 maximum consecutive losses can be traded with Martingale, period. More than that, will be killing your own account.


Hope to see some more mql4 codes here in near future.

Reason: