two ma one rs i
Info
The two ma one rs i is a Expert Advisor for MetaTrader 5 that idea by:. mql5 code by:.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use two ma one rs i
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.
What this tool does
idea by:.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: Trade Adjustment Panel - another powerful expert for MetaTrader 5 traders.
idea by
: .
mql5 code by
: .
the ea trades on two indicators ima (moving average, ma) and one irsi (relative strength index, rsi). decision on trade signals is only made when a new bar appears, while positions are trailed and closed (in case of profit) at every tick.
Also recommended: Quantora Trade Manager MT5: Advanced Position Management - similar expert with strong performance on MetaTrader 5.
an unconventional solution was applied: theslow
indicator averaging period is calculated as the
fast
averaging period multiplied by two, while the
rsi
averaging period is always equal to the
fast
averaging period. this reduces the number of parameters in optimization.
you can also optimize absolutely all signs "<" and ">" in the signals identification formula. to do so, its own variables (
inpmorelessbuy_1
,
inpmorelessbuy_2
,
inpmorelessbuy_3
,
inpmorelesssell_1
,
inpmorelesssell_2
, and
inpmorelesssell_3
) are introduced. with these variables, the formula is modified as follows:
input parameters
parameters of indicators moving average:
fast: av. period
- averaging period of moving average "fast";
fast: horizontal shift
- horizontal shift of moving average "fast";
fast: type of price
- price type of moving average "fast";
slow: horizontal shift
- horizontal shift of moving average "slow";
slow: type of price
- price type of moving average "slow";
fast and slow: smoothing type
- averaging type (a common parameter for "fast" and "slow").
parameters of indicator rsi and of its signals:
rsi: type of price
- price type of indicator rsi;
rsi: level up
- up level of indicator rsi;
rsi: level down
- down level of indicator rsi.
trading parameters:
stop loss
- stop loss (if set to zero, the parameter will be disabled);
take profit
- take profit (if set to zero, the parameter will be disabled);
trailing stop
- trailing (if set to zero, the parameter will be disabled);
trailing step
- trailing step;
lots
- trading with a permanent lot size (parameter
lots
is above zero and parameter
risk
is equal to zero);
risk
- lot size is calculated dynamically (parameter
risk
is above zero and parameter
lots
is equal to zero);
maximum number of positions in one direction
- the maximum number in one direction (if set to zero, the parameter will be disabled);
close all positions when profit is achieved
- closing positions at reaching the profit (if set to zero, the parameter will be disabled);
close opposite positions
- closing opposite positions (if set to "false," the parameter will be disabled);
magic number
- unique identifier for the ea.
as you can see, along with setting up the parameters of the indicators, this ea allows flexibly setting up (and disabling) stop loss, take profit, trailing, the maximum number of positions opened in one direction, closing positions at gaining profit, and closing opposite positions. you can also manage the calculations of position volume: you can trade with a permanent lot size (
lots
above zero and
risk
equal to zero), or the lot size can be calculated dynamically (
risk
above zero and
lots
equal to zero).
recommendations on optimization
in the "ohlc на m1" mode, select a symbol and timeframe m15. disable (set to zero) stop loss, take profit, and trailing and set the maximum number of positions in each direction to "1." or copy to the mql5\profiles\tester\ folder the
two ma one rsi m15 start.set
file that already contains the initial optimization parameters for m15.
select the type of optimization as "fast (genetic algorithm)" and parameter "balance max" to be optimized.
for optimization, i recommend to involve : for usdjpy over the year 2017, optimization in the cloud plus my quad-core laptop
took
and cost $0.08.
You may also like: Quantora Break Even Manager MT5 - Automated Stop Loss Protection - excellent alternative for expert users on MetaTrader 5.
Source Code
/
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.