cci_rsi_bar_FxPrime_Kino_All_inOne_v2m

Download script
cci_rsi_bar_FxPrime_Kino_All_inOne_v2m

This script is designed as a visual trading assistant that monitors market momentum by combining three different technical indicators: the Relative Strength Index (RSI) and two separate Commodity Channel Indices (CCI). Its primary purpose is to identify specific "zones" of bullish or bearish sentiment and highlight potential entry points based on historical price behavior.

Core Monitoring Logic

The script constantly scans the market data to determine which category the current price action falls into by checking three distinct conditions:

1. Bullish Momentum Detection The tool looks for a strong upward trend by verifying if the RSI is above a specific threshold (default 55) while both CCI indicators are in positive territory (above zero). When these conditions are met, the script further classifies the strength:

  • High Intensity: If both CCIs are significantly high (above 100), it signals a very strong bullish zone.
  • Moderate Strength: If the indicators are positive but below that 100 mark, it suggests a standard bullish trend.

2. Bearish Momentum Detection Conversely, the script identifies downward trends by checking if the RSI falls below its threshold (default 45) while both CCIs are in negative territory (below zero). It then distinguishes between:

  • High Intensity: If both CCIs are significantly low (below -100), it signals a strong bearish zone.
  • Moderate Bearishness: If they are negative but haven't hit that -100 mark, it indicates a standard downward move.

3. Neutral or "Bad" Zones If the market does not meet the specific criteria for clear bullish or bearish momentum—meaning the indicators are conflicting or moving sideways—the script flags these as "bad zones," helping traders avoid periods of high uncertainty.

Entry Signal Mechanics

In addition to labeling these zones, the script features a specific logic to identify active trade entries (Long and Short).

  • Long Entries: The script looks for a specific "crossover" event where one CCI is already established in positive territory while the other crosses from negative to positive. If this happens while the RSI remains high, it marks a potential long entry.
  • Short Entries: Similarly, it looks for the opposite crossover—where one CCI is already negative and the other crosses from positive to negative—while the RSI is low, marking a potential short entry.

Visual Presentation

The script translates this complex logic into a user-friendly visual format on the chart:

  • Histograms: Different colors represent the various zones (Strong Bullish, Moderate Bullish, Strong Bearish, Moderate Bearish, and Neutral).
  • Arrows: Specific markers appear on the chart to highlight the exact moments the crossover logic identifies a potential entry point for a trade.
Indicators Used
Relative strength indexCommodity channel index
Miscellaneous
Implements a curve of type %1
17 Views
0 Downloads
0 Favorites
cci_rsi_bar_FxPrime_Kino_All_inOne_v2m
//+------------------------------------------------------------------+
//|      kinonen's indic  to see if 2 CCI are above/under zeroLine   |
//|                      Copyright © 2008, Pharmacien@dejante.com    |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
// you are asking if CCI is above/under 45/55 ?
//http://www.forexfactory.com/showthread.php?t=114258 fxprime 5min

#property  copyright "Copyright © 2008, MetaQuotes Software Corp."
#property  link      "http://www.metaquotes.net/"
//---- indicator settings
#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 1

#property  indicator_buffers 7
#property  indicator_color1  Lime         //RSI >55 cci>0 2>100  
#property  indicator_color2  DarkGreen    //RSI >55 cci>0 1>100
#property  indicator_color3  Red          //RSI <45 
#property  indicator_color4  Maroon       //RSI <45 
#property  indicator_color5  Yellow       //other

#property  indicator_color6  Aqua          //entry fxprime long
#property  indicator_color7  Magenta       //entry fxprime short


#property indicator_width1 4
#property indicator_width2 4
#property indicator_width3 4
#property indicator_width4 4
#property indicator_width5 4
#property indicator_width6 3
#property indicator_width7 3



//---- indicator parameters      
extern int CCI1=34;
extern int CCI2=170;
extern int RSI=8;
extern int valeur1=55;
extern int valeur2=45;
extern bool FxPrimeEntry = true;
//Long: When CCI 170 is above 0 ALREADY And CCI 34 crosses up 0 And rsi above 55.//

//extern bool SoundON=true;

//---- indicator buffers
double   ExtBuffer1[];
double   ExtBuffer2[];
double   ExtBuffer3[];
double   ExtBuffer4[];
double   ExtBuffer5[];

double   ExtBuffer6fp[];
double   ExtBuffer7fp[];


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- drawing settings
   SetIndexStyle (0,DRAW_HISTOGRAM);
   SetIndexBuffer(0,ExtBuffer1);
   SetIndexStyle (1,DRAW_HISTOGRAM);
   SetIndexBuffer(1,ExtBuffer2);
   SetIndexStyle (2,DRAW_HISTOGRAM);
   SetIndexBuffer(2,ExtBuffer3);
   SetIndexStyle (3,DRAW_HISTOGRAM);
   SetIndexBuffer(3,ExtBuffer4);
   SetIndexStyle (4,DRAW_HISTOGRAM);
   SetIndexBuffer(4,ExtBuffer5);


   SetIndexStyle(5, DRAW_ARROW); SetIndexArrow(5, 159);  SetIndexEmptyValue(5,EMPTY_VALUE);
   SetIndexStyle(6, DRAW_ARROW); SetIndexArrow(6, 159);  SetIndexEmptyValue(6,EMPTY_VALUE);

   SetIndexBuffer(5,ExtBuffer6fp);
   SetIndexBuffer(6,ExtBuffer7fp);


   
   string shortname = " CCI "+CCI1+", CCI "+CCI2+", RSI "+RSI+", ";
//---- names
   IndicatorShortName(shortname+" kino FxPrime ");
   SetIndexLabel     (0,"RSI>55 2CCIs>0 & 2>+100");
   SetIndexLabel     (1,"RSI>55 2CCIs>0 & 1>+100");
   SetIndexLabel     (2,"RSI<45 2CCIs<0 & 2<-100");
   SetIndexLabel     (3,"RSI<45 2CCIs<0 & 1<-100");
   SetIndexLabel     (4,"bad zona");
   
   SetIndexLabel     (5,"fxprime entry long");
   SetIndexLabel     (6,"fxprime entry short");
   
   
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| Moving Averages                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int limit;
// int N =0; // counter of alerts 
   int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
//---- 
   for(int i=0; i<limit; i++)
   {
     
     ExtBuffer1[i]=0.0;     ExtBuffer2[i]=0.0;     ExtBuffer3[i]=0.0;     
     ExtBuffer4[i]=0.0;     ExtBuffer5[i]=0.0;
     
     ExtBuffer6fp[i]=EMPTY_VALUE;     ExtBuffer7fp[i]=EMPTY_VALUE;


      //Long: When CCI 170 is above 0 ALREADY And CCI 34 crosses up 0 And rsi 8 above 55.//

    
      if  ( iRSI(NULL,0,RSI,PRICE_CLOSE,i) >=valeur1  &&
            iCCI(NULL,0,CCI1,PRICE_TYPICAL,i)>0       && 
            iCCI(NULL,0,CCI2,PRICE_TYPICAL,i)>0  )      
            { 
    
             // 2 cci > +100
            if  ( iCCI(NULL,0,CCI1,PRICE_TYPICAL,i)>100 && 
                  iCCI(NULL,0,CCI2,PRICE_TYPICAL,i)>100 )  
                  
                  ExtBuffer1[i]=1;
    
            else
            if  ( iCCI(NULL,0,CCI1,PRICE_TYPICAL,i)<100    || 
                  iCCI(NULL,0,CCI2,PRICE_TYPICAL,i)<100 )  
                  
                  ExtBuffer2[i]=1;
                  
                  
              
            // cci21 > 0 cci1>0
            if  ( FxPrimeEntry                            &&
                  iCCI(NULL,0,CCI1,PRICE_TYPICAL,i+1)<0   && 
                  iCCI(NULL,0,CCI2,PRICE_TYPICAL,i+1)>0 )  
                  
                  ExtBuffer6fp[i]=0.3;
                  
            }
               //RSI < 45 & the Two CCI are <0  but >-100
      else  
      if  ( iRSI(NULL,0,RSI,PRICE_CLOSE,i)<=valeur2  && 
            iCCI(NULL,0,CCI1,PRICE_TYPICAL,i)<=0     &&
            iCCI(NULL,0,CCI2,PRICE_TYPICAL,i)<=0 )     
            {

               if (  iCCI(NULL,0,CCI1,PRICE_TYPICAL,i)<-100 && 
                     iCCI(NULL,0,CCI2,PRICE_TYPICAL,i)<-100 )  

                     ExtBuffer3[i]=1;


               else   
               if (  iCCI(NULL,0,CCI1,PRICE_TYPICAL,i)>-100 || 
                     iCCI(NULL,0,CCI2,PRICE_TYPICAL,i)>-100 )  

                     ExtBuffer4[i]=1;
                 

                
               if (  FxPrimeEntry                          &&
                     iCCI(NULL,0,CCI1,PRICE_TYPICAL,i+1)>0 && 
                     iCCI(NULL,0,CCI2,PRICE_TYPICAL,i+1)<0 )  
                  
                      ExtBuffer7fp[i]=0.3;
                  

              }


      else            ExtBuffer5[i]=1;
       
        
         
      } 
        
   return(0);
  }
  
//+------------------------------------------------------------------+

Comments