Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

CCI and Martin - MetaTrader 5 Expert | Martin EA Download - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

Author of the idea : Vladimir

MQL5 code author : Balabashka Kong

The EA uses iCCI (Commodity Channel Index, CCI) indicator values ​​on the last four bars and open/close prices on the last three bars. If the remaining time before closing the current bar is less than 20 seconds (this is a very rare solution) and the EA does not open a position, then check the opening signal.

 // - - buy if (CCI[ 1 ] < 5 && cci[ 2 ]  3 ] && cci[ 1 ]  2 ] && cci[ 0 ]>CCI[ 1 ] && 
open [ 2 ]> close [ 2 ] && open [ 1 ]> close [ 1 ] && open [ 0 ]< close [ 0 ] && open [ 1 ]< close [ 0 ]) // - - sell if (CCI[ 1 ]>- 5 && cci[ 2 ]>CCI[ 3 ] && cci[ 1 ]>CCI[ 2 ] && cci[ 0 ]  1 ] && 
open [ 2 ] < close [ 2 ] && open [ 1 ] < close [ 1 ] && open [ 0 ] > close [ 0 ] && open [ 1 ] > close [ 0 ])

Where:

Can be specified in one of the following ways:

Let's consider the last two ways of setting positions in more detail:

This method is only applied if there are losing positions in the trading history. Main settings:

This method works for a range of losing or profitable positions. Main settings:

When using martingale, the Stop Loss , Take Profit , Trailing Stop and Trailing Step parameters should be chosen carefully in addition to the martingale settings.

Default parameters, M15, initial deposit 10 000 USD, tets on all symbols:


Attachment download

📎 cci_and_martin.mq5 (57.56 KB)

Source: MQL5 #21511

CCI and Martin - MetaTrader 5 Expert | Martin EA Download - MT4/MT5 Resource Usage and Screening Suggestions

CCI and Martin - MetaTrader 5 Expert | Martin EA Download - MT4/MT5 resources belong to Martin EA related resources. Before downloading or referencing, it is recommended to confirm the platform version, transaction type, time period, whether DLL is required, whether source code is included, parameter description and historical update records.

Both automated trading tools and foreign exchange indicators should first undergo backtesting, simulated account observation, and small capital verification. Pay special attention to spreads, slippages, maximum drawdowns, position opening frequency, stop loss methods, trading periods and broker rules, and avoid direct real-time execution based only on titles or short-term profit descriptions.

Verification code Refresh