Download MetaTrader 5
To add comments, please log in or register
How to launch your trading signal and become a provider
Jose Freitas
17
Jose Freitas 2015.10.20 12:26 

Good Morning,
Can someone help me convert the indicator RSI BB v1.01, whose code METATRADER 4 is described below in code to ProRealTime ?.
Thank you for your attention and please help me.
I need this indicator ProRealTime
Regards,
José Freitas


The Code of RSI BB v1.01

//------------------------------------------------------------------
//
//------------------------------------------------------------------

#property indicator_separate_window
#property indicator_minimum 5
#property indicator_maximum 95

#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 HotPink//SlateBlue
#property indicator_color3 HotPink
#property indicator_color4 White //DarkGray
#property indicator_width1 2
#property indicator_style4 STYLE_DOT
#property indicator_level1 50
#property indicator_level2 30
#property indicator_level3 70
#property indicator_levelcolor Magenta
#property indicator_levelstyle 2

extern int    RSIPeriod     = 14;
extern int    BandPeriod    = 20;
extern double BandDeviation = 1.3185;

double RSIBuf[],UpZone[],DnZone[],Ma[];

//------------------------------------------------------------------
//
//------------------------------------------------------------------

int init()
{
   SetIndexBuffer(0,RSIBuf);
   SetIndexBuffer(1,UpZone);
   SetIndexBuffer(2,DnZone);
   SetIndexBuffer(3,Ma);
   return(0);
}
int deinit() { return(0); }

//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//

int start()
{
   int counted_bars=IndicatorCounted();
      if(counted_bars < 0) return(-1);
      if(counted_bars>0) counted_bars--;
         int limit = MathMin(Bars-counted_bars,Bars-1);
  
   for(int i=limit; i>=0; i--) RSIBuf[i] = iRSI(NULL,0,RSIPeriod,PRICE_WEIGHTED,i);
   for(    i=limit; i>=0; i--)
   {
      double dev = iStdDevOnArray(RSIBuf,0,BandPeriod,0,MODE_SMA,i);
         Ma[i]     = iMAOnArray(RSIBuf,0,BandPeriod,0,MODE_SMA,i);
         UpZone[i] = Ma[i] + BandDeviation * dev;
         DnZone[i] = Ma[i] - BandDeviation * dev; 
   }
   return(0);
}


whroeder1
13620
whroeder1 2015.10.20 15:45  
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Why don't you ask on their forum because only they are guaranteed to know ProRealTime.
/
To add comments, please log in or register