Simple candle filter martingale EA
This software component for MetaTrader 4 is built to enhance the capabilities of your trading environment. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use Simple candle filter martingale EA
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
Description & Settings
This EA uses a candle size filter to initiate a trade.
Attribution: Ideas are mine, code is compiled using fxdreema.
Concept
If the Candle size is > x pips, then the EA will enter into a buy trade.
The candle size is an input in the EA settings.
If the buy trade results in a loss, The EA will enter into the next trade at a scaled up lot size.
The scale factor is adjustable in the EA settings.
Main principle of the concept
The main principle behind all EAs that I design is to control the number of consecutive losses (Rather than to predict where the price is moving next).
This control is accomplished by increasing the Candle size required in the settings until a sufficiently low (safe) amount of consecutive losses occur over a long test period. (The reason for controlling the consecutive losses is so that we can safely use the martingale strategy).
Settings
I use USDJPY and 4hr chart for testing. Other timeframes will work too.
I usually set the settings for candle size to be 20 or more , preferably 30.
10 or less will usually not work.
TP and SL
The TP and SL I use are normally a ratio of 1:1
and the settings are 50 TP and 50 SL
Settings of 75TP 50SL; 100TP 50SL, work if you use a lower scale factor such as 1.5.
This is because when the Ratio of TP to SL changes, the probability of winning to losing on average changes, and so do the number of consecutive losses (important).
I find as a rule of thumb that the max consec losses is usually 6 times the average losses, and that average losses in a similar ratio of TP:SL ratio (the same or a multiple of the TP:SL ratio or a less favourable ratio).
EXample a TP:SL of 50pips:50pips gives average wins to losses of 2:2 or worse 2:3 due to spread
And max consec losses of example 2x6=12. (We aim to lower these to less than 8, perhaps 6 would be good- using the candle filter)
Feedback is welcome. We can develop more advanced ideas to control consecutive losses and unleash the power of martingale in a random market environment.