Fix Icustom Indicator Code

Lavoro terminato

Tempo di esecuzione 1 ora
Feedback del dipendente
Best Wishes...
Feedback del cliente
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

Specifiche

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.


Con risposta

1
Sviluppatore 1
Valutazioni
(374)
Progetti
398
31%
Arbitraggio
61
20% / 69%
In ritardo
50
13%
Caricato
2
Sviluppatore 2
Valutazioni
(341)
Progetti
536
32%
Arbitraggio
23
65% / 9%
In ritardo
15
3%
In elaborazione
3
Sviluppatore 3
Valutazioni
(26)
Progetti
29
45%
Arbitraggio
0
In ritardo
1
3%
Gratuito
4
Sviluppatore 4
Valutazioni
(52)
Progetti
96
24%
Arbitraggio
9
22% / 22%
In ritardo
12
13%
In elaborazione
5
Sviluppatore 5
Valutazioni
(66)
Progetti
143
34%
Arbitraggio
11
9% / 55%
In ritardo
26
18%
In elaborazione
6
Sviluppatore 6
Valutazioni
(68)
Progetti
81
11%
Arbitraggio
12
67% / 25%
In ritardo
5
6%
Gratuito
7
Sviluppatore 7
Valutazioni
(41)
Progetti
46
28%
Arbitraggio
9
0% / 100%
In ritardo
7
15%
Gratuito
Ordini simili
can anyone here help me with develop a Pine script on TradingView's Pine Editor for a trading strategy based on certain variations of the Morning Star candlestick pattern which I have been noticing from last 2 years
hi.. i have a pin script (TV) but some lines in the code needs to be fixed,,, i will attach the file, Also I will be paying $20 for the project cause i just need you to adjust some Minor things in it, i will explain more further in the message side
I want to clarify some points, such as: When entering into a buy deal, he opens three deals, each deal has a different take profit and one stop loss. When you look at the code, you will know that there are three take-profit. It opens one deal, taking one profit and adding risk management as well An information screen on the chart shows all the information, I only have $10 for this now, and also I still have more
Hello I want to buy a strategy and put it in an indicator I have This strategy must be strong, with a profit rate of +90% without repeating or deleting the signal The signal should be 1 minute to 5 minutes maximum I do not have a specific strategy or ideas. You show me your strategies and I am ready to test it send ex4 to test it and videos or images too
hi.. i have a pin script (TV) but some lines in the code needs to be fixed,,, i will attach the file thanks very much in advance, Also there will be more project in front, so I need a very dedicated developer
Hello, I am looking for a developer to help me convert my mta4 script into trading and make it work perfectly your expertise is highly needed for this project kindly reach out and let's proceed thanks
Hello I am looking for a developer to help me Backtest my tradingview strategy in tradingview platform and make it work perfectly without errors please kindly reach out to so we can proceed
Hello I am looking for a developer to help me to convert my mt4 strategy to tradingview and make it work perfectly your expertise is highly needed for this project
Hello I am looking for a developer to help me backtest my tradingview script on tradingview platform in other to show me how it perform on tradingview your expertise is highly needed for this project
I will provide pine script and need to convert it as a mql4 EA. The system is based on swing highs and lows. If you interested please knock me, Thank you

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD