Moving Average Crossover Strategy based Expert Advisor

This expert advisor strategy is based on moving average crossover strategy. It buys when the short-term moving average crosses above the long-term moving average, and sells when the short-term moving average crosses below the long-term moving average.

The specific moving averages used in the strategy are not specified in the code, so you would need to choose those yourself. You would also need to decide on the length of the short-term and long-term moving averages.

In addition to the moving average crossover strategy, the EA also includes some features to stop trading under certain conditions. For example, the EA will stop trading if the account equity falls below a certain level, or if the maximum drawdown reaches a certain level.

The EA also includes some features to manage open trades. For example, the EA can close all trades if the market is closed, or if the EA is stopped by the user.

The overall goal of the EA is to make profits by trading the financial markets. However, it is important to remember that no EA can guarantee profits. There is always a risk of losing money when trading.

Here are some of the key features of the expert advisor strategy:

  • Uses a moving average crossover strategy to identify trading opportunities.
  • Stops trading under certain conditions, such as when the account equity falls below a certain level.
  • Includes features to manage open trades.
  • The overall goal is to make profits by trading the financial markets.

Here are some of the limitations of the expert advisor strategy:

  • The strategy is based on historical data, and there is no guarantee that it will be profitable in the future.
  • The strategy is not immune to market volatility, and there is a risk of losing money.
  • The strategy is complex, and it may be difficult to understand and implement.

Overall, the expert advisor strategy is a moving average crossover strategy with some features to stop trading under certain conditions. It is important to remember that no EA can guarantee profits, and there is always a risk of losing money when trading.

HunterEA.zip (103.9 KB)

Why is it so big? That’s such a simple strategy that there’s no way it should be 100KB to code.

Show us a backtest chart. Spoiler alert, it’ll lose money

1 Like

There is probably a bit of overhead with the MT4 code that is bloating it. If you write the same algorithm in C and then C++ you will see that the C++ code is larger due to the language overhead.

I have back tested lots and lots of moving average crossover stuff and, surprise, surprise, the results are that some of them win and some of them lose. The winners and losers are not predictable and will change over time.

3 Likes

As far as I am currently aware, ANY moving average crossover strategy will leave you broke :smirk:

2 Likes

Thats nonsense. You literally described every strategy on this planet. XD

As far as I know mine are working good. Depends on your strategy if its working with MA or not.

1 Like

At the risk of defying logic, I would also say that every winning strategy will become a loser and every losing strategy will become a winner. And nothing in the charts will predict this in advance, nor even illustrate it historically. But it does seem just to be the way these things work.

Although the strategies rise and fall, the basic principles always hold true - so a trend-following trade will be a high probability win with a modest and slow price movement: a reversal trade will be a low probability win with a potentially dramatic price movement.

2 Likes