Ember EA Source Code, free MQL source code for MetaTrader

Ember EA Source Code

Ember EA Source Code, free MQL source code for MetaTrader

This page gives you the Ember EA free source code, the .mq4 file itself and not a compiled robot you have to trust. The strategy behind it is EMA crossover and RSI, written in plain MQL that you can read in one sitting.

  • Platform: MetaTrader 4, a single .mq4 file
  • Strategy: EMA crossover and RSI
  • Price: free, a free account is all you need
  • Licence: study it, edit it and, if you want, rebrand it

In short, you get exactly the file we publish, and therefore nothing stops you from rebuilding any part of it.

How the Ember strategy works

An exponential moving average gives the newest bars more weight than the old ones, so it turns sooner than a simple average without jumping at every tick. The robot reads it as the line that separates a market going up from one going down.

Two averages of different length cross when the short term pace changes against the long term one. That crossing is the oldest trend signal there is, and it works because it forces the robot to wait for a change that already happened instead of predicting one.

The RSI compares the size of the recent rises against the recent falls and turns that into a number between zero and one hundred. Near the top of that range the market has been bought hard, near the bottom it has been sold hard, and the robot reads those extremes as its trigger.

Each filter removes a group of bad entries and, at the same time, a few good ones. Reading the code is the only honest way to judge that balance for your own market.

What is inside the Ember EA free source code file

  • The moving average block, with its period and the side it allows.
  • The two averages, with their periods and the direction of the cross.
  • The RSI block, with its period and the levels that count as overbought and oversold.
  • The risk block, with the lot sizing, the stop loss and the take profit.
  • Finally, every input with its default value, so you can compare it against your own broker.

How to compile and run it

  1. First, download the .mq4 file from the button at the end of this page.
  2. Then open MetaEditor 4 from MetaTrader 4, with F4 or the editor button.
  3. After that, save the file inside MQL4 and then Experts, and press Compile.
  4. Finally, refresh the Navigator and drag Ember onto a chart.
  5. Run it on a demo account first, and read every input before you go live.

If the compiler complains, our guide on compiling MQL source covers the usual causes. In most cases it is simply a missing include or the wrong folder.

What you can change

The period of the average is the first input to try. A longer one holds the robot on the right side of the bigger move, a shorter one lets it turn earlier and get caught more often.

Before any of that, however, look at the risk block. After all, a good entry with the wrong lot size still empties an account, and therefore the sizing deserves the first pass rather than the last.

More robots like this one are in the free EA source code library, and the paid catalogue with documentation and support lives in the MT5 source code section. The idea behind moving averages is explained well on this reference page.

Questions about the Ember EA free source code

Which platform is it for? MetaTrader 4.

Is the file complete? Yes, we remove nothing and we encrypt nothing.

Where should I start? On a demo account with the defaults, so you can see its natural rhythm before you change anything.

Does the broker matter? It does, especially the spread and the execution. Compare two before you judge the strategy.

Download the Ember EA free source code

The file below is the complete .mq4. First of all, create a free account or log in. Then download it and, finally, open it in MetaEditor 4.

Free source code. Log in or create a free account to download the Ember EA Source Code source files.

Login to Download

Shopping Cart
Assistant 🔊 – ✕
← My conversationsEnd chat