Insert an indicator

MQL4 Sripts

Trabajo finalizado

Plazo de ejecución 4 días
Comentario del Cliente
Programmer, very professional and fast !!! Recommended!!!
Comentario del Ejecutor
Thanks for your order!

Tarea técnica

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

Archivos adjuntos:

MQ4
Laguerre.mq4
2.8 Kb

Han respondido

1
Desarrollador 1
Evaluación
(590)
Proyectos
789
71%
Arbitraje
9
33% / 33%
Caducado
22
3%
Libre
Ha publicado: 8 ejemplos
2
Desarrollador 2
Evaluación
(804)
Proyectos
1124
43%
Arbitraje
47
49% / 23%
Caducado
84
7%
Libre
Solicitudes similares
I need a fully automated end-to-end system where a backend continuously runs my deterministic CORE EDGE validator on live market data, generates numeric JSON trade tickets (GO) or alert levels (NO-GO), and automatically pushes those instructions to the MT5 EA for execution. There are no manual signals. ROLE SPLIT (IMPORTANT) Backend (analysis & decision engine): Continuously evaluates live data using my CORE EDGE
Job Description: We are looking for an experienced MQL5 developer to create a script or Expert Advisor (EA) that automatically updates the price of a token CFD on MT5, using a live BTCUSD feed. The goal is to make token fully CFD-tradable , with real-time price updates, charts, and client P/L. Clients should be able to trade long or short and view live candles, just like other MT5 CFDs. Scope of Work / Requirements

Información sobre el proyecto

Presupuesto
10 USD
Plazo límite de ejecución
de 1 a 5 día(s)