Cross MA-RSI

MQL4 Scripts

Trabalho concluído

Tempo de execução 16 horas
Comentário do cliente
Programmer motion helpful and professional. Recommended!!

Termos de Referência

Hi, I need to correct this code. When the MA3 crosses the RSI2 from the bottom up, it must appear to the arrow. I wrote this code but it does not work. Thanks, Max.


#property indicator_chart_window
#property indicator_buffers 1

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 clrGreen
#property indicator_label1 "Buy"

input int Period_RSI=2;
input int Period_MA=3;

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


//+------------------------------------------------------------------+
//|                    |
//+------------------------------------------------------------------+
int OnInit()
  {   
   IndicatorBuffers(2);
   SetIndexBuffer(0, Buffer1);
   SetIndexEmptyValue(0, 0);
   SetIndexArrow(0, 241);
   
  
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//|                          |
//+------------------------------------------------------------------+
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[])
  {
  double RSI[];
  double MA[];
  RSI[0]= iRSI(NULL,PERIOD_CURRENT,Period_RSI,PRICE_CLOSE,0);
  MA[0]= iMA(NULL,PERIOD_CURRENT,Period_MA,0,MODE_SMA,PRICE_CLOSE,0);
  
   int limit = rates_total - prev_calculated;
   //--- counting from 0 to rates_total
   ArraySetAsSeries(Buffer1, true);
   
   //--- initial zero
   if(prev_calculated < 1)
     {
      ArrayInitialize(Buffer1, 0);
      
     }
   else
      limit++;
   
   //--- main loop
   for(int i = limit-1; i >= 0; i--)
     {
      if (i >= MathMin(300-1, rates_total-1-50)) continue; 
      //Indicator Buffer 1
      if (iMAOnArray(RSI,0,Period_MA,0,0,1)< iRSIOnArray(MA,0,Period_RSI,0)//Cross MA-RSI
      && iMAOnArray(RSI,0,Period_MA,0,0,0)>iRSIOnArray(MA,0,Period_RSI,0)
      
      )
        {
         Buffer1[i] = Low[i] - 10 *Point();
        }
      else
        {
         Buffer1[i] = 0;
        }
     
     }
   return(rates_total);
  }

Respondido

1
Desenvolvedor 1
Classificação
(879)
Projetos
1393
67%
Arbitragem
117
32% / 42%
Expirado
215
15%
Trabalhando
2
Desenvolvedor 2
Classificação
(590)
Projetos
789
71%
Arbitragem
9
33% / 33%
Expirado
22
3%
Livre
3
Desenvolvedor 3
Classificação
(219)
Projetos
405
60%
Arbitragem
13
38% / 23%
Expirado
160
40%
Trabalhando
4
Desenvolvedor 4
Classificação
(1133)
Projetos
1436
62%
Arbitragem
21
57% / 10%
Expirado
43
3%
Livre
5
Desenvolvedor 5
Classificação
(2103)
Projetos
2674
62%
Arbitragem
114
46% / 25%
Expirado
420
16%
Carregado
6
Desenvolvedor 6
Classificação
(1100)
Projetos
1782
61%
Arbitragem
14
64% / 7%
Expirado
84
5%
Livre
Pedidos semelhantes
Hi there, I am offering $30 usd for someone to convert four pictures I have to metatrader icons(arrows) that I can use in both MT4 & MT5. We all know that we can change arrows on the chart by using a different arrow code, but the arrows in metatrader are boring and I want to use custom ones. I want the four attached pictures as icons that i can use with indicators that give the option to choose your arrow type. I
I need an expert to decrypt my itf file using on prorealtime. I forgot my password, so I need to generate the source code. I need someone that can help me to derive source code from the itf file I have

Informações sobre o projeto

Orçamento
10 - 15 USD
IVA (22%): 2.2 - 3.3 USD
Total: 12.2 - 18.3 USD
Desenvolvedor
9 - 13.5 USD
Prazo
de 1 para 3 dias