MT4 Indicator convert to CTrader

Created at 05 Feb 2020
SU

surangawije77

Joined 05.02.2020

Status

Open


Budget

10.00 USD


Payment Method

Direct Payment

Job Description

this should be very easy job for anybody. 

 

I need to convert this mt4 moving average color fill indicator to ctrader indicator.  

 

 

//+------------------------------------------------------------------+
//|                                                    MA ribbon.mq4 |
//|                                               mladenfx@gmail.com |
//|                                                                  |
//| original idea by Jose Silva                                      |
//+------------------------------------------------------------------+
#property copyright "mladen"
#property link      "mladenfx@gmail.com"

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Red
#property indicator_color4 Blue
#property indicator_width1 0
#property indicator_width2 0
#property indicator_width3 2
#property indicator_width4 2

//
//
//
//
//

extern int       MA1Period=12;
extern int       MA1Method=MODE_SMMA;
extern int       MA1Price =PRICE_CLOSE;
extern int       MA2Period=34;
extern int       MA2Method=MODE_SMMA;
extern int       MA2Price =PRICE_CLOSE;

//
//
//
//
//

double buffer1[];
double buffer2[];
double buffer3[];
double buffer4[];

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//
//
//
//
//

int init()
{
   SetIndexBuffer(0,buffer3); SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexBuffer(1,buffer4); SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexBuffer(2,buffer1);
   SetIndexBuffer(3,buffer2);
   return(0);
}
int deinit()
{
   return(0);
}

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//
//
//
//
//

int start()
{
   int counted_bars=IndicatorCounted();
   int limit,i;
   
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
           limit=Bars-counted_bars;

   //
   //
   //
   //
   //

   for(i=limit; i>=0; i--)
   {
      buffer1[i] = iMA(NULL,0,MA1Period,0,MA1Method,MA1Price,i);
      buffer2[i] = iMA(NULL,0,MA2Period,0,MA2Method,MA2Price,i);
      buffer3[i] = buffer1[i];
      buffer4[i] = buffer2[i];
   }
   return(0);
}

 

If you prefer, we can also do the project at Freelancer.

If we do the project here I need to confirm the indicator output before I release funds (you will have to send me closed source code indicator for testing). I can pay in  PayPal. : 

 

 

thanks

 

Comments
Log in to add a comment.
DonaldD's avatar
DonaldD · 4 years ago

Hi there,

We can help you with your project. You can contact us at contact@clickalgo.com for more information.

Best Regards,

Donald

bienve.pf's avatar
bienve.pf · 4 years ago

Hi, I can do that.

Email: bienve.pf@hotmail.com
Whatsapp: +34654115547