MA2 CCI
Info
The MA2 CCI is a Expert Advisor for MetaTrader 5 that how it works the entry point is determined by the intersection of two moving averages and the concurrent intersection of the zero line by the commodity channel index (cci). The exit point is triggered when the reverse intersection of the two moving averages occurs.
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 MA2 CCI
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
How it works The entry point is determined by the intersection of two moving averages and the concurrent intersection of the zero line by the Commodity Channel Index (CCI).
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 for MT5 - another powerful expert for MetaTrader 5 traders.
How it worksThe entry point is determined by the intersection of two moving averages and the concurrent intersection of the zero line by the Commodity Channel Index (CCI). The exit point is triggered when the reverse intersection of the two moving averages occurs. The image below illustrates a sell position entry, with the signal bar marked by a vertical line and the exit at the reverse intersection of the moving averages.
Also recommended: Quantora Trade Manager MT5: Advanced Position Management - similar expert with strong performance on MetaTrader 5.
The expert advisor adjusts position sizing based on consecutive winning or losing trades. If trades are losing, the volume of new positions is reduced proportionally to the number of losing trades, with the lot size decreasing as losses mount. Conversely, if trades are winning, the expert advisor maintains the initial lot size. This initial lot can be either a constant value or a percentage of available funds.
Parameters:
- FMA: Fast Moving Average period.
- SMA: Slow Moving Average period.
- PCCI: CCI period.
- PATR: ATR period for stop loss.
- Lots: Order volume; when set to 0, the maxr parameter is used.
- SNDML: Sends email notifications when the expert advisor opens or closes positions.
- DCF: Lot reduction factor during losses. A value of 0 disables reduction. Lower values result in greater lot reduction, with the minimum lot used if further reduction is not possible.
- MAXR: Maximum risk as a percentage (0-1) of free funds. Effective when lots value is 0.
Note: Simple moving averages are applied to the closing price, and CCI is calculated based on the closing price. Only indicator periods can be modified in the properties window.
You may also like: Quantora Break Even Manager MT5 - Automated Stop Loss Protection - excellent alternative for expert users on MetaTrader 5.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property version "1.00"
input int fma = 4; /*fma*/ // fast period
input int sma = 8; /*sma*/ // slow ma period
input int pcci = 4; /*pcci*/ // cci period
input int patr = 4; /*patr*/ // atr period for stop loss
input double lots = 0.1; /*lots*/ // volume order; when 0, the maxr parameter is used
input bool sndml = true; /*sndml*/ // sends messages by e-mal when the expert advisor opens and closes positions
.......
⚠ 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.