How to obtain cross between RSI and Bollinger. - page 2

 
Yes it's easy i know with window but no with --- mql5 --- !
 

If we are talking about BB with RSI on same window so there is good profitable EA for it. The EA is based on indicator:

 

 Name of the EA (MT4 sorry):

 

Live trading statement for 2 years is attached (for many pairs, by points, by deposit currency, etc). For MT4 sorry. 

Files:
FozzyExpert.zip  59 kb
 
 

Hi Zek, 

did you see video? I did it with MT5. On exact way as for MT4.

But  scale for BB and for RSI in separate window is different one, and that is why the traders are asking the programmers to code it by some special indicator (if you will try to trade - you will understand what I mean). But it is the other story related to Job service of our MT5 portal (i am not a programmer sorry :) ).

 
newdigital, you are too kind, and you encourage his laziness :-D
 
#property copyright "Zek"

#property version   "1.00"





//Bollinger bands

int bbHandle;

double      Base[];  

double      Upper[];  

double      Lower[]; 





//Rsi

int rsiHandle;

double      RSI[];



//Cci

int CCI_handle;

double CCI[];





int OnInit()

  {

  

  

    // Rsi indicator initialization

    rsiHandle = iRSI(_Symbol, _Period, 7, PRICE_CLOSE);   

    if (rsiHandle == INVALID_HANDLE) {

        Print("Error in loading of RSI indicator. LastError = ", GetLastError());

    } 

  

  

  

  // Bollinger Bands indicator initialization

    bbHandle = iBands(_Symbol, _Period, 10, 0, 1.5, rsiHandle);   

    if (bbHandle == INVALID_HANDLE) {

        Print("Error in loading of Bollinger Bands indicator. LastError = ", GetLastError());

    }

    

    

    CCI_handle=iCCI(_Symbol,_Period,14,PRICE_TYPICAL);

    if (CCI_handle == INVALID_HANDLE) {

         Print("Error in loading cci");

    }

    

    

    

    

    

   return(0);

  }





void OnDeinit(const int reason){ }







void OnTick()

  {

   

    //buffer rsi

    if(!CopyBufferAsSeries(rsiHandle,0,0,100,true,RSI)) return;

    

    //buffer bands

    if(!GetBandsBuffers(bbHandle,0,100,Base,Upper,Lower,true)) return;

   

    //buffer cci

    if(!CopyBufferAsSeries(CCI_handle,0,0,100,true,CCI)) return;

   

    //debug  

    Comment("Rsi => ",RSI[0],

           "\nBands up => ",Upper[0],

           "\nBands middle => ",Base[0],

           "\nBands down => ",Lower[0],

           "\nCci => ",CCI[0]);

  }



















//function copy buffer

bool CopyBufferAsSeries(

                        int handle,      // indicator's handle

                        int bufer,       // buffer index

                        int start,       // start index

                        int number,      // number of elements to copy

                        bool asSeries,   // if it's true, the elements will be indexed as series

                        double &M[]      // target array

                        )

  {

   if(CopyBuffer(handle,bufer,start,number,M)<=0) return(false);

   ArraySetAsSeries(M,asSeries);

   return(true);

  }

  

  

  

//function bollinger bands

bool GetBandsBuffers(int Bands_handle,

                     int start,

                     int number,

                     double &Bas[],

                     double &Uppe[],

                     double &Lowe[],

                     bool asSeries=true  // as series

                     )

  {

   if(!CopyBufferAsSeries(Bands_handle,0,start,number,asSeries,Bas)) return(false);

   if(!CopyBufferAsSeries(Bands_handle,1,start,number,asSeries,Uppe)) return(false);

   if(!CopyBufferAsSeries(Bands_handle,2,start,number,asSeries,Lowe)) return(false);

   return(true);

  }
 
Zek:

 newdigital : You think i am stupid ?!

 

I KNOW DO THIS !

Just want programm....

 

I am not a programmer so do not ask me about any coding please.

About free coding so read this my post:

Forum

Tukul Thanks To Mr.D,Gardito Utomo

newdigital, 2013.02.19 07:29

Is it some kind of MA Channel? Yes, it is interesting. Where to buy and where to sell (what is the condition for buy and sell)?

Basicly, coders are coding for free if

  • it is personally interesting for them
  • it is interesting for many members of the forum

or you can go to Job service and ask the coder to code it for credits (for money).


 

Please don't double posts, here and pm with me.

Read the doc for CopyBuffer and you easily find your answer.

 
Zek:

 newdigital : You think i am stupid ?!

Please, don't be so touchy, he just trying to help you.
 
Zek:

My problem is resolved :

 

Look my program

 

 

#property copyright "Zek"

#property version   "1.00"



//Bollinger bands

int bbHandle;

double      Base[];  

double      Upper[];  

double      Lower[]; 



//Rsi

int rsiHandle;

double      RSI[];





int OnInit()

  {

   return(0);

  }


void OnDeinit(const int reason)

  {

  }


void OnTick()

  {

   

    

    // Rsi indicator initialization

    rsiHandle = iRSI(_Symbol, _Period, 14, PRICE_CLOSE);   

    if (rsiHandle == INVALID_HANDLE) {

        Print("Error in loading of RSI indicator. LastError = ", GetLastError());

        return;

    } 

   if(!CopyBufferAsSeries(rsiHandle,0,0,100,true,RSI)) return;

    

    

    

    

    // Bollinger Bands indicator initialization

    bbHandle = iBands(_Symbol, _Period, 20, 0, 1.5, rsiHandle);   

    if (bbHandle == INVALID_HANDLE) {

        Print("Error in loading of Bollinger Bands indicator. LastError = ", GetLastError());

        return;

    }

      if(!GetBandsBuffers(bbHandle,0,100,Base,Upper,Lower,true)) return;

   

   Comment("Rsi => ",RSI[0],"\nBands up => ",Upper[0],"\nBands middle => ",Base[0],"\nBands down => ",Lower[0]);

  }






//function copy buffer

bool CopyBufferAsSeries(

                        int handle,      // indicator's handle

                        int bufer,       // buffer index

                        int start,       // start index

                        int number,      // number of elements to copy

                        bool asSeries,   // if it's true, the elements will be indexed as series

                        double &M[]      // target array

                        )

  {

   if(CopyBuffer(handle,bufer,start,number,M)<=0) return(false);

   ArraySetAsSeries(M,asSeries);

   return(true);

  }

  

  

  

//function bollinger bands

bool GetBandsBuffers(int Bands_handle,

                     int start,

                     int number,

                     double &Bas[],

                     double &Uppe[],

                     double &Lowe[],

                     bool asSeries=true  // as series

                     )

  {

   if(!CopyBufferAsSeries(Bands_handle,0,start,number,asSeries,Bas)) return(false);

   if(!CopyBufferAsSeries(Bands_handle,1,start,number,asSeries,Uppe)) return(false);

   if(!CopyBufferAsSeries(Bands_handle,2,start,number,asSeries,Lowe)) return(false);

   return(true);

  } 

Ok, now you can edit all your posts to use SRC button when you post code.


Reason: