i-GentorCCIM_vv1d_0_2
Download scriptThe i-GentorCCIM is a specialized technical analysis tool designed to help traders identify market trends and potential entry points by analyzing price momentum. Instead of just showing a single line, it combines multiple layers of data to provide a clearer picture of whether the market is moving up, down, or shifting direction.
Here is a breakdown of how the logic works:
Core Data Processing
The indicator starts by tracking two different versions of the Commodity Channel Index (CCI), which is a momentum-based oscillator:
- Fast CCI: This reacts quickly to price changes, capturing immediate market fluctuations.
- Slow CCI: This provides a smoothed view of the market, helping to filter out "noise" and identify broader movements.
Trend Identification & Visualization
The tool translates these data points into a visual "Trend Landscape" in a separate window:
- Trend Mapping: It identifies whether the current market sentiment is bullish (upward) or bearish (downward). When the price momentum is positive, it highlights an upward trend; when negative, it marks a downward trend.
- Visual Color Coding: To make this easy to read at a glance, the indicator uses different colors and histogram styles to represent these trends. This allows a trader to see the "flow" of the market instantly without having to manually interpret complex numbers.
Signal Logic & Filtering
The most sophisticated part of this script is its internal counting logic, which acts as a filter to prevent "fake-out" signals:
- Sequence Tracking: The tool keeps track of consecutive price movements. It waits for specific patterns to emerge before confirming a shift in sentiment.
- Signal Bars: Rather than alerting you on every tiny wiggle in price, the script identifies specific moments where momentum reaches a certain threshold of consistency. These are represented as "Signal Bars," which act as highlighted markers for potential trading opportunities.
- Trend Confirmation: By comparing the relationship between the current price movement and the previous one, the script determines when a trend has actually reversed versus when it is simply pausing briefly.
Summary for the User
In simple terms, this tool takes raw, jumpy market data and smooths it out into a color-coded visual map. It tells you:
- The Direction: Is the market currently trending up or down?
- The Strength: How fast is that momentum moving?
- The Opportunity: When has the trend become consistent enough to potentially act upon?
//+------------------------------------------------------------------+
//| i-GentorCCIM_v.0.2.mq4 |
//| Egorov Gennadiy |
//| 2005.08.20 KimIV v.0.0 |
//| Íåìíîãî ìîäåðíèçèðîâàë, äîáàâèâ LSMA è ïîìåíÿâ å¸ ìåñòàìè ñ ÅÌÀ |
//| 2005.08.20 KimIV v.0.1 |
//| Îñâîáîäèë îäèí áóôåð |
//| 2005.08.20 KimIV v.0.2 |
//| Óáðàë LSMA è EMA. |
//| Ñäåëàë ñèãíàëüíûé øåñòîé áàð è òðåíäîâóþ ðàñêðàñêó |
//+------------------------------------------------------------------+
#property copyright "Egorov Gennadiy, FX Sniper, KimIV"
#property link "http://www.kimiv.ru"
//----
#property indicator_separate_window
#property indicator_buffers 6
#property indicator_color1 Red
#property indicator_color2 Black
#property indicator_color3 Silver
#property indicator_color4 Yellow
#property indicator_color5 Lime
#property indicator_color6 Red
#property indicator_level1 300
#property indicator_level2 200
#property indicator_level3 100
#property indicator_level4 50
#property indicator_level5 -50
#property indicator_level6 -100
#property indicator_level7 -200
#property indicator_level8 -300
//------- Âíåøíèå ïàðàìåòðû ------------------------------------------
extern int SlowCCIPeriod=14; // Ïåðèîä ìåäëåííîãî CCI
extern int FastCCIPeriod=6; // Ïåðèîä áûñòðîãî CCI
//------- Áóôåðû èíäèêàòîðà ------------------------------------------
double FastCCI[];
double SlowCCI[];
double HistCCI[];
double SignalBar[];
double TrendUp[];
double TrendDown[];
//------- Ãëîáàëüíûå ïåðåìåííûå --------------------------------------
bool fct=False, fup=False, fdn=False;
int ss=1;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void init()
{
IndicatorDigits(2);
SetIndexStyle (0, DRAW_LINE, STYLE_SOLID, 1);
SetIndexBuffer(0, FastCCI);
SetIndexStyle (1, DRAW_LINE, STYLE_SOLID, 2);
SetIndexBuffer(1, SlowCCI);
SetIndexStyle (2, DRAW_HISTOGRAM, STYLE_SOLID, 1);
SetIndexBuffer(2, HistCCI);
SetIndexStyle (3, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexBuffer(3, SignalBar);
SetIndexStyle (4, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexBuffer(4, TrendUp);
SetIndexStyle (5, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexBuffer(5, TrendDown);
Comment("");
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
void deinit()
{
Comment("");
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int shift;
int counted_bars = IndicatorCounted();
if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars--;
int limit = Bars - counted_bars;
if(counted_bars==0) limit-=1+1;
for(shift=limit; shift>=0; shift--)
{
TrendUp[shift]=0;
TrendDown[shift]=0;
FastCCI[shift]=iCCI(NULL, 0, FastCCIPeriod, PRICE_TYPICAL, shift);
SlowCCI[shift]=iCCI(NULL, 0, SlowCCIPeriod, PRICE_TYPICAL, shift);
HistCCI[shift]=SlowCCI[shift];
if (HistCCI[shift+1]*HistCCI[shift]<0)
{
if (ss<=3)
{
if ((fup && HistCCI[shift]>0)
|| (fdn && HistCCI[shift]<0)) fct=True;
}
else fct=False;
ss=1;
}
if (ss==6) SignalBar[shift]=HistCCI[shift];
else SignalBar[shift]=0;
if (ss>6 || fct)
{
if (HistCCI[shift]>=0)
{
TrendUp[shift]=HistCCI[shift];
fup=True; fdn=False;
}
else
{
TrendDown[shift]=HistCCI[shift];
fdn=True; fup=False;
}
}
ss++;
}
}
//+------------------------------------------------------------------+
Comments