Mathematicians will tell you that a strategy without an edge can not be made profitable with "smart" money management. Grid, averaging down, Martingale, etc. will all fail in the long run when an unfortunate series of loosing trades drains your account. In this thread I would like to do some silly experiments with averaging down to verify that idea.
Simple Expert Advisor
I created a simple expert advisor for Metatrader 5 to do some tests. You can download the EA below, if you want to play along. Basically:
Each day we make a random buy or sell with a fixed SL/TP
More specifically:
- Each day at a fixed hour, we make 1 trade.
- The trade will either be a buy or a sell; chosen at random each day.
- For simplicity, we don't open a new trade if the trade of the previous day has not closed yet.
- Each trade has a fixed stop loss and a fixed take profit.
Here you see the inputs of the expert advisor:
For now, please ignore the settings for level 2, 3 and 4. We will come to that later.
- EntryHour specifies at what time the EA will make an entry each day.
- RandomSeed determines the random buy/sell sequence.
- L1_StopLossPoints and L1_TakeProfitPoints specify the stop loss and take profit distance.
For non-programmers the RandomSeed input probably needs some more explanation. Your computer does not have the hardware to generate truly random numbers. Instead, computers generate pseudo-random numbers using a calculation that gives numbers that jump all over the place effectively looking "random". Given a certain starting value (the RandomSeed) this calculation will always generate the same pseudo-random buy/sell sequence. With another seed you will get a completely different buy/sell sequence. For example:
RandomSeed=1: buy, buy, sell, buy, sell, sell, buy, sell, ...
RandomSeed=2: sell, buy, buy, sell, sell, buy, sell, buy, ...
RandomSeed=3: sell, sell, buy, sell, buy, sell, sell, sell, ...
... etc.
This is useful if we want to replay an earlier backtest. If the EA would give different results each time it is run, it makes it impossible to examine settings we found earlier during an optimization.
- - -
Below is another EA that actually implements averaging UP (instead of averaging down). This is a different strategy than described above. See post #43 for more details.
(Note: we are going to run MILLIONS of backtests, so we need the EA to be fast. The EA will ignore all ticks and only enter/exit the market at the open tick of a new M1 bar. We are not relying on the "1 minute OHLC" setting of the MT5 strategy tester, but coded this in the EA itself. Also, trades are not given a SL/TP, but are checked at the open of each M1 bar and closed by the EA itself using a market order. This ensures the EA will show the same behavior in demo/live trading as it did during backtesting.)