Fix Icustom Indicator Code

MQL4 指标 专家 外汇 股票 期权

工作已完成

执行时间1 一小时
员工反馈
Best Wishes...
客户反馈
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

指定

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.


反馈

1
开发者 1
等级
(374)
项目
398
31%
仲裁
61
20% / 69%
逾期
50
13%
已载入
2
开发者 2
等级
(341)
项目
536
32%
仲裁
23
65% / 9%
逾期
15
3%
工作中
3
开发者 3
等级
(26)
项目
29
45%
仲裁
0
逾期
1
3%
空闲
4
开发者 4
等级
(52)
项目
96
24%
仲裁
9
22% / 22%
逾期
12
13%
工作中
5
开发者 5
等级
(66)
项目
143
34%
仲裁
11
9% / 55%
逾期
26
18%
工作中
6
开发者 6
等级
(68)
项目
81
11%
仲裁
12
67% / 25%
逾期
5
6%
空闲
7
开发者 7
等级
(41)
项目
46
28%
仲裁
9
0% / 100%
逾期
7
15%
空闲
相似订单
Mt4 mt5 robot 60+ USD
Hi developers i am finding that who can make me Mt4 Ea i want to add three analysis method Rsi, Ichimoku , Candle and to know other features message me for explanation and also budget is fixed 60usd and deadline will be 4days fixed and i also want to attach image with my Ea like when i attach my Ea to any currency pair or timeframe the chart changes to image i attached to my Ea
I have a renko chart generator EA and I want to modify it: 1. I would like it to have a start date where I can give the start time based on the year, month, day, hour, minute, second. 2. I would like to include a "type" section where I can specify whether to calculate the Renko bricks from the "opening" or "closing" price. The Renko EA generator is attached. Thank you
hello great developer I have an mt4 indicator that stopped working with the new mt4 build. Can you fix it to work with the new mt4 build? I do not have the source code. i will looing for great developer that wil bid for it quickly
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
Can you Make ea with mql5 MetaTrader This is ea Find the trends by 3 candles then open one trades counter to the trend and if its not arrive to TP open second currency 0.1 counter to the first trade, If not arrive to TP open new trade with the winner (Biggest win) trade if not arrive to TP open new trade with the winner So in the Max trades we will have one trade in the counter trend and 3 in the trends We find the
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 have the source file for a FOREX EA that I would like to modify to allow it to trade crypto currencies. It currently gives the error that the currency is not recognized when trying to back test and optimize the EA. Will need the EA to recognize BTC/ETH/SOL pairs and be able to trade crypto currencies
Hello There With new mt4 update my EA by the name "BreakFast In Canada" does not work on the new mt4 version so I need someone to make it work, however it looks like I do not have the source code for it. So I do not know if it is still possible to work on it. I have attached the picture of the specific EA as there many EAs with this name
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
Hi Looking for an exisiting bot to create a Expert Advisor, that can pass prop firm Challenges (1 or 2 phases), like FTMO, MFF, TFF etc. Prop Firm EA Bot Using Gold Pairs Need source code Unlimited License NO martingale strategy Need to have nice entries and exits. NO big lots and low risk. Need complied with this restrictions: -Profit 10% -Max Drawdown (DD) 10% -Max Daily Loss 4% -All trades with SL -NO trades

项目信息

预算
30+ USD
开发人员
27 USD