Fix Icustom Indicator Code

Job finished

Execution time 1 hour
Feedback from employee
Best Wishes...
Feedback from customer
Excellent job! well done and executed ...very fast and same day delivery...infact 1 hour delivery...even help with installation...will use you again...thank you

Specification

Hello I need you to fix this indicators code to display the arrows according to the main indicator. I have atachhed the icustom code and the main indicaction in mql4 file.

The first indictor is StockRSI...I created the icustom code but its not working see the icustom code below:

//+------------------------------------------------------------------+
//|                                              Indicator: Fixa.mq4 |
//|                                       Created with EABuilder.com |
//|                                        https://www.eabuilder.com |
//+------------------------------------------------------------------+
#property copyright "Created with EABuilder.com"
#property link      "https://www.eabuilder.com"
#property version   "1.00"
#property description ""
#property tester_indicator "Stoch RSI"

#include <stdlib.mqh>
#include <stderror.mqh>

//--- indicator settings
#property indicator_chart_window
#property indicator_buffers 2

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 0xFFAA00
#property indicator_label1 "Buy"

#property indicator_type2 DRAW_ARROW
#property indicator_width2 1
#property indicator_color2 0x0000FF
#property indicator_label2 "Sell"

//--- indicator buffers
double Buffer1[];
double Buffer2[];

extern int InpStockKPeriod = 3;
extern int InpStockDPeriod = 3;
extern int InpRSIPeriod = 14;
extern int InpStochastikPeriod = 14;
double myPoint; //initialized in OnInit

void myAlert(string type, string message)
  {
   if(type == "print")
      Print(message);
   else if(type == "error")
     {
      Print(type+" | Fixa @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
     }
   else if(type == "order")
     {
     }
   else if(type == "modify")
     {
     }
  }

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {   
   IndicatorBuffers(2);
   SetIndexBuffer(0, Buffer1);
   SetIndexEmptyValue(0, EMPTY_VALUE);
   SetIndexArrow(0, 241);
   SetIndexBuffer(1, Buffer2);
   SetIndexEmptyValue(1, EMPTY_VALUE);
   SetIndexArrow(1, 242);
   //initialize myPoint
   myPoint = Point();
   if(Digits() == 5 || Digits() == 3)
     {
      myPoint *= 10;
     }
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime& time[],
                const double& open[],
                const double& high[],
                const double& low[],
                const double& close[],
                const long& tick_volume[],
                const long& volume[],
                const int& spread[])
  {
   int limit = rates_total - prev_calculated;
   //--- counting from 0 to rates_total
   ArraySetAsSeries(Buffer1, true);
   ArraySetAsSeries(Buffer2, true);
   //--- initial zero
   if(prev_calculated < 1)
     {
      ArrayInitialize(Buffer1, EMPTY_VALUE);
      ArrayInitialize(Buffer2, EMPTY_VALUE);
     }
   else
      limit++;
   
   //--- main loop
   for(int i = limit-1; i >= 0; i--)
     {
      if (i >= MathMin(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation   
      
      //Indicator Buffer 1
      if(iCustom(NULL, PERIOD_CURRENT, "Stoch RSI", InpStockKPeriod, InpStockDPeriod, InpRSIPeriod, InpStochastikPeriod, PRICE_CLOSE, 0, i) > iCustom(NULL, PERIOD_CURRENT, "Stoch RSI", InpStockKPeriod, InpStockDPeriod, InpRSIPeriod, InpStochastikPeriod, PRICE_CLOSE, 1, i) //Stoch RSI > Stoch RSI
      )
        {
         Buffer1[i] = Low[i]; //Set indicator value at Candlestick Low
        }
      else
        {
         Buffer1[i] = EMPTY_VALUE;
        }
      //Indicator Buffer 2
      if(iCustom(NULL, PERIOD_CURRENT, "Stoch RSI", InpStockKPeriod, InpStockDPeriod, InpRSIPeriod, InpStochastikPeriod, PRICE_CLOSE, 0, i) < iCustom(NULL, PERIOD_CURRENT, "Stoch RSI", InpStockKPeriod, InpStockDPeriod, InpRSIPeriod, InpStochastikPeriod, PRICE_CLOSE, 1, i) //Stoch RSI < Stoch RSI
      )
        {
         Buffer2[i] = High[i]; //Set indicator value at Candlestick High
        }
      else
        {
         Buffer2[i] = EMPTY_VALUE;
        }
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+

The second iindictor is fractal-adaptive-moving-average...I created the icustom code but its not working see the icustom code below:

//+------------------------------------------------------------------+
//|                                              Indicator: Fixa2.mq4 |
//|                                       Created with EABuilder.com |
//|                                        https://www.eabuilder.com |
//+------------------------------------------------------------------+
#property copyright "Created with EABuilder.com"
#property link      "https://www.eabuilder.com"
#property version   "1.00"
#property description ""
#property tester_indicator "fractal-adaptive-moving-average"

#include <stdlib.mqh>
#include <stderror.mqh>

//--- indicator settings
#property indicator_chart_window
#property indicator_buffers 2

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 0xFFAA00
#property indicator_label1 "Buy"

#property indicator_type2 DRAW_ARROW
#property indicator_width2 1
#property indicator_color2 0x0000FF
#property indicator_label2 "Sell"

//--- indicator buffers
double Buffer1[];
double Buffer2[];

extern int RPeriod = 16;
extern double multiplier = 4.6;
extern double signal_multiplier = 2.5;
double myPoint; //initialized in OnInit

void myAlert(string type, string message)
  {
   if(type == "print")
      Print(message);
   else if(type == "error")
     {
      Print(type+" | Fixa @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
     }
   else if(type == "order")
     {
     }
   else if(type == "modify")
     {
     }
  }

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {   
   IndicatorBuffers(2);
   SetIndexBuffer(0, Buffer1);
   SetIndexEmptyValue(0, EMPTY_VALUE);
   SetIndexArrow(0, 241);
   SetIndexBuffer(1, Buffer2);
   SetIndexEmptyValue(1, EMPTY_VALUE);
   SetIndexArrow(1, 242);
   //initialize myPoint
   myPoint = Point();
   if(Digits() == 5 || Digits() == 3)
     {
      myPoint *= 10;
     }
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime& time[],
                const double& open[],
                const double& high[],
                const double& low[],
                const double& close[],
                const long& tick_volume[],
                const long& volume[],
                const int& spread[])
  {
   int limit = rates_total - prev_calculated;
   //--- counting from 0 to rates_total
   ArraySetAsSeries(Buffer1, true);
   ArraySetAsSeries(Buffer2, true);
   //--- initial zero
   if(prev_calculated < 1)
     {
      ArrayInitialize(Buffer1, EMPTY_VALUE);
      ArrayInitialize(Buffer2, EMPTY_VALUE);
     }
   else
      limit++;
   
   //--- main loop
   for(int i = limit-1; i >= 0; i--)
     {
      if (i >= MathMin(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation   
      
      //Indicator Buffer 1
      if(iCustom(NULL, PERIOD_CURRENT, "fractal-adaptive-moving-average", RPeriod, multiplier, signal_multiplier, 0, i) > iCustom(NULL, PERIOD_CURRENT, "fractal-adaptive-moving-average", RPeriod, multiplier, signal_multiplier, 1, i) //fractal-adaptive-moving-average > fractal-adaptive-moving-average
      )
        {
         Buffer1[i] = Low[i]; //Set indicator value at Candlestick Low
        }
      else
        {
         Buffer1[i] = EMPTY_VALUE;
        }
      //Indicator Buffer 2
      if(iCustom(NULL, PERIOD_CURRENT, "fractal-adaptive-moving-average", RPeriod, multiplier, signal_multiplier, 0, i) < iCustom(NULL, PERIOD_CURRENT, "fractal-adaptive-moving-average", RPeriod, multiplier, signal_multiplier, 1, i) //fractal-adaptive-moving-average < fractal-adaptive-moving-average
      )
        {
         Buffer2[i] = High[i]; //Set indicator value at Candlestick High
        }
      else
        {
         Buffer2[i] = EMPTY_VALUE;
        }
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+

The last indictor is Fractal_Bands...I created the icustom code but its not working see the icustom code below:

//+------------------------------------------------------------------+
//|                                              Indicator: Fixa.mq4 |
//|                                       Created with EABuilder.com |
//|                                        https://www.eabuilder.com |
//+------------------------------------------------------------------+
#property copyright "Created with EABuilder.com"
#property link      "https://www.eabuilder.com"
#property version   "1.00"
#property description ""
#property tester_indicator "fractal-bands"

#include <stdlib.mqh>
#include <stderror.mqh>

//--- indicator settings
#property indicator_separate_window
#property indicator_buffers 2

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 0xFFAA00
#property indicator_label1 "Buy"

#property indicator_type2 DRAW_ARROW
#property indicator_width2 1
#property indicator_color2 0x0000FF
#property indicator_label2 "Sell"

//--- indicator buffers
double Buffer1[];
double Buffer2[];

extern int e_period = 30;
extern int normal_speed = 30;
extern double alpha = 2.0;
double myPoint; //initialized in OnInit

void myAlert(string type, string message)
  {
   if(type == "print")
      Print(message);
   else if(type == "error")
     {
      Print(type+" | Fixa @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
     }
   else if(type == "order")
     {
     }
   else if(type == "modify")
     {
     }
  }

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {   
   IndicatorBuffers(2);
   SetIndexBuffer(0, Buffer1);
   SetIndexEmptyValue(0, EMPTY_VALUE);
   SetIndexArrow(0, 241);
   SetIndexBuffer(1, Buffer2);
   SetIndexEmptyValue(1, EMPTY_VALUE);
   SetIndexArrow(1, 242);
   //initialize myPoint
   myPoint = Point();
   if(Digits() == 5 || Digits() == 3)
     {
      myPoint *= 10;
     }
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime& time[],
                const double& open[],
                const double& high[],
                const double& low[],
                const double& close[],
                const long& tick_volume[],
                const long& volume[],
                const int& spread[])
  {
   int limit = rates_total - prev_calculated;
   //--- counting from 0 to rates_total
   ArraySetAsSeries(Buffer1, true);
   ArraySetAsSeries(Buffer2, true);
   //--- initial zero
   if(prev_calculated < 1)
     {
      ArrayInitialize(Buffer1, EMPTY_VALUE);
      ArrayInitialize(Buffer2, EMPTY_VALUE);
     }
   else
      limit++;
   
   //--- main loop
   for(int i = limit-1; i >= 0; i--)
     {
      if (i >= MathMin(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation   
      
      //Indicator Buffer 1
      if(Close[i] > iCustom(NULL, PERIOD_CURRENT, "fractal-bands", e_period, normal_speed, alpha, 0, PRICE_CLOSE, 0, i) //Candlestick Close > fractal-bands
      )
        {
         Buffer1[i] = Low[i]; //Set indicator value at Candlestick Low
        }
      else
        {
         Buffer1[i] = EMPTY_VALUE;
        }
      //Indicator Buffer 2
      if(Close[i] < iCustom(NULL, PERIOD_CURRENT, "fractal-bands", e_period, normal_speed, alpha, 0, PRICE_CLOSE, 0, i) //Candlestick Close < fractal-bands
      )
        {
         Buffer2[i] = High[i]; //Set indicator value at Candlestick High
        }
      else
        {
         Buffer2[i] = EMPTY_VALUE;
        }
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+

see below all indicators mql4 files.

Please let me know if this something you can do. you can even go ahead do it, send me screen short or ex4 file to check. if everything is okay, then we can conclude fast.


Responded

1
Developer 1
Rating
(374)
Projects
396
31%
Arbitration
61
20% / 67%
Overdue
49
12%
Loaded
2
Developer 2
Rating
(336)
Projects
528
32%
Arbitration
23
65% / 9%
Overdue
15
3%
Free
3
Developer 3
Rating
(26)
Projects
29
45%
Arbitration
0
Overdue
1
3%
Free
4
Developer 4
Rating
(52)
Projects
96
24%
Arbitration
9
22% / 22%
Overdue
12
13%
Working
5
Developer 5
Rating
(66)
Projects
143
34%
Arbitration
11
9% / 55%
Overdue
26
18%
Working
6
Developer 6
Rating
(68)
Projects
81
11%
Arbitration
12
67% / 25%
Overdue
5
6%
Free
7
Developer 7
Rating
(41)
Projects
46
28%
Arbitration
9
0% / 100%
Overdue
7
15%
Free
Similar orders
EA 30 - 75 USD
I would like my robot to open up to 2000 trades. It should be 90-97% accurate at all times. It should trade currency pairs, Indexes and Gold. It must analyze the chart automatically and it must be easy to be set up. It must not lose any money. Profitable all the way. I would like someone who is highly experienced to do the job. NB!! MOBILE ROBOT. It must have automated TP and SL. all trades should be trigger anytime
I want the trade to trigger anytime it sees the opportunity on all time frames, sl tp should be automated and all trades should be trigger anytime on cpi news and etc
Historical 1 min data 30 - 1000 USD
I need 1min historical canfle data based on Tradingviwe UI from Oanda broker. for gold, bitcoin, ……). Data should from tradingviwe UI and also base on OANDA. Tradingviwe only show 20000 candle but i need far further data Who can help me
I need you to convert my tradingview pinescript to mt4, I have just $10 for it now, But i am going to give you more work later on cause i still have more work i am going to need you to work on for me, and i will be paying with crypto, Thank You
Hi, Use MQL5 connect to only one binance websocket API: binance.com/stream?streams=btcusdt@aggTrade and get the returned data successfully(you no need process returned data). MUST use this MQL library to connect binnace: https://www.mql5.com/en/articles/8196 Source code need Related binance websocket document: https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams Thanks
Hi, I want a custom indicator to be coded based on 2 default Indicators. Add alerts for signals and news filter alerts to be sent through metaquotes id, email and phone. Popup alerts for pc/laptop as well. I would like it to have a display panel that logs the trade history and a buy/sell button with risk % based on balance and equity, fixed lots and some other features
Hello I'm in possesion of a straightforward MT% Expert AdvisorThat I want to convert into DXTrade. Are you able to do this conversion? Kindly let me know if the fil atached will be enough
Hello, please let me know if any of these strategies can be turned into a bot (automation) and run 24/7 on a vps. Also note that they might not use the latest versions of indicators, if this matters, then please check for the latest versions. Thank you! Dan https://1drv.ms/f/s!Alr17W7ddJLYgYgiFKZYluOfokbfQg
Hello! Thanks for reading. I need an EA with an inbuilt/already made strategy that I can use for prop firms. The drawdown should be very low of only 2-4% max and another criteria is that no one else other than you are currently using it and if you happen to use it you must tell me which prop firm you are using it on to avoid us using the same EA on the same prop firm to get the account denied. As you know or may
Hello, I would like you to help me develop a simple Expert Advisor (EA) for trading the Boom and Crash markets. All the project requirements is available with me . kindly bid if you can develop EA for boom and out crash . Thanks

Project information

Budget
30+ USD
For the developer
27 USD