Insert an indicator

MQL4 脚本

工作已完成

执行时间4 天
客户反馈
Programmer, very professional and fast !!! Recommended!!!
员工反馈
Thanks for your order!

指定

Hi, I would need to place an indicator inside of a variable or an array, bypassing the iCustom function (iCustom (NULL, PERIOD_CURRENT, "Laguerre", 0.7, 950, 0, i)> 0.2). I have a "Languerre" indicator that I would insert into a "Pippo" container. I attach a code to correct. I hope I was clear enough.

#property indicator_chart_window
#property indicator_buffers 2

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 clrGreen
#property indicator_label1 "Buy"
extern double gamma = 0.7;
extern int CountBars = 950;
//----
double L0 = 0;
double L1 = 0;
double L2 = 0;
double L3 = 0;
double L0A = 0;
double L1A = 0;
double L2A = 0;
double L3A = 0;
double LRSI = 0;
double CU = 0;
double CD = 0;
//---- buffers
double val1[];
double pippo;
double Buffer1[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
IndicatorBuffers(1);
   SetIndexBuffer(0,Buffer1);
   SetIndexEmptyValue(0,0);
   SetIndexArrow(0,241);
   
//---
   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 i=0;
pippo = i=CountBars-1;
   while(i>=0)
   {
      L0A = L0;
      L1A = L1;
      L2A = L2;
      L3A = L3;
      L0 = (1 - gamma)*Close[i] + gamma*L0A;
      L1 = - gamma *L0 + L0A + gamma *L1A;
      L2 = - gamma *L1 + L1A + gamma *L2A;
      L3 = - gamma *L2 + L2A + gamma *L3A;

      CU = 0;
      CD = 0;
      
      if (L0 >= L1) CU = L0 - L1; else CD = L1 - L0;
      if (L1 >= L2) CU = CU + L1 - L2; else CD = CD + L2 - L1;
      if (L2 >= L3) CU = CU + L2 - L3; else CD = CD + L3 - L2;

      if (CU + CD != 0) LRSI = CU / (CU + CD);
      val1[i] = LRSI;
          i--;]
        }
        if (pippo[i]>0.2)
        {
        Buffer1[i]= High[i]+10*Point();
        
        }
        
       
   return(rates_total);
  }
//+------------------------------------------------------------------+
//iCustom(NULL, PERIOD_CURRENT, "Laguerre", 0.7, 950, 0, i) > 0

附加的文件:

MQ4
Laguerre.mq4
2.8 Kb

反馈

1
开发者 1
等级
(590)
项目
789
71%
仲裁
9
33% / 33%
逾期
22
3%
空闲
2
开发者 2
等级
(728)
项目
1048
40%
仲裁
47
49% / 23%
逾期
84
8%
空闲
相似订单
Hello i need a developer who would be able to create ea that will generate report from history with many different variation, this script should read history from mt4 mt5 and output will be excel file
Hi , I need a script written for Auto trading bot to trade on Trading View. This is a simple strategy to trade Renko chart on Trading view. The trading bot will have rules for entry and exit. Stop loss and Take Profit. order size by x% of equity. Daily profit target in pips. I want an experienced Trading View Pine script coder please! Thanks
Looking for a skilled freelancer to create a simple indicator that displays key data directly on the chart during a backtest on MetaTrader 4. The indicator should show: - **Balance** - **Profit in $** - **Profit in %** I already have the sample in MT5 (.mq5 file), but I need it converted and optimized for MT4. This is a straightforward task with a quick turnaround time—just 2 hours. I'm offering $250 for this
Hi, I have a Compiled JForex strategy (.jfx file) I would like someone to convert it in to readable source code. Please let me know if you can do this task. Thank you
I want to make something automatic which EMA will automatically trade in my account. For this I want to make a simple robot I want to get this made automatically on a simple EMA
I need a professional who have the full knowledge in Ctrader and I want to add new idea for my ctrader https://ctrader.com/algos/indicators/show/3444/ Let me know if this is what you can do and the price to get it done. Thanks
I am looking for a skilled Thinkorswim script developer for a one-time project. Your task will be to combine 8 distinct Thinkorswim studies (I will provide the code for each) into one Lower Study. The final script should display histogram rows for the individual studies with a bubble color scheme of bright green, dark green, gray, dark red, and bright red
I need some who can develop my strategy and hand me over the source code... I will give you the specific area in the market i want to mark out and then set pending orders to execute once price move into the zone

项目信息

预算
10 USD
VAT (22%): 2.2 - 2.2 USD
总计: 12.2 - 12.2 USD
开发人员
9 - 9 USD
截止日期
 1  5 天