FT CCI MA - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources









Author of the idea - Vasily
mq5 code author - Bara Bashkakon
The EA uses iCCI (Commodity Channel Index, CCI) and iMA (Moving Average, MA) indicators.
When the MA shows growth, the iCCI indicator runs: -100 to buy, 200 to sell!
When the MA shows a decline, the iCCI indicator is running: 100 to buy, -200 to sell!
As a result, there are fewer "erroneous" trades during periods of high volatility. EA then tries to capture the remaining movement!
You can include trading time intervals (enable/disable using time intervals using the time interval parameter). The time interval is set from start time to end time . You can define time intervals within a day and transition time intervals within a day. Examples are provided in the interval definition function:
//+------------------------------------------------------------------+ //|Time control | //+------------------------------------------------------------------+ Boolean time control ( blank ) { Mql date time current time; datetimecurrenttime = timecurrent (); if (time_current == D'1970.01.01 00:00' ) return ( false ); Build time (time_current,STimeCurrent); if (Inp start time//Intraday time interval { /* Example: Input uchar InpStartHour = 5; // Start time input uchar InpEndHour = 10; // End time 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _ _ _ _ _ + + + + + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + + + + + _ _ _ _ _ _ */ If (STimeCurrent.hour>=InpStartHour && STimeCurrent.hour return( true ); } Else if (Inp start time>Inp end time) // Conversion time interval in a day { /* Example: Input uchar InpStartHour = 10; // Start time input uchar InpEndHour = 5; // End time 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _ _ _ _ _ _ _ _ _ _ + + + + + + + + + + + + + + + + + + + _ _ _ _ _ + + + + + + */ If (STimeCurrent.hour>=InpStartHour || STimeCurrent.hour return( true ); } Others return ( wrong ); //--- return ( wrong ); }

Attachment download
📎 ft_cci_ma.mq5 (45.05 KB)
Source: MQL5 #23061
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •