Cross MA-RSI

MQL4 Sripts

Trabajo finalizado

Plazo de ejecución 16 horas
Comentario del Cliente
Programmer motion helpful and professional. Recommended!!

Tarea técnica

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);
  }

Han respondido

1
Desarrollador 1
Evaluación
(879)
Proyectos
1396
67%
Arbitraje
117
32% / 42%
Caducado
214
15%
Libre
2
Desarrollador 2
Evaluación
(590)
Proyectos
789
71%
Arbitraje
9
33% / 33%
Caducado
22
3%
Libre
3
Desarrollador 3
Evaluación
(219)
Proyectos
406
60%
Arbitraje
13
38% / 23%
Caducado
161
40%
Libre
4
Desarrollador 4
Evaluación
(1135)
Proyectos
1438
62%
Arbitraje
21
57% / 10%
Caducado
43
3%
Libre
5
Desarrollador 5
Evaluación
(2120)
Proyectos
2691
62%
Arbitraje
116
45% / 25%
Caducado
419
16%
Ocupado
6
Desarrollador 6
Evaluación
(1101)
Proyectos
1784
61%
Arbitraje
14
64% / 7%
Caducado
84
5%
Libre
Solicitudes similares
Hello, thank you for your interest in my project. I want to develop a simple piece of code in ninjascript that does not exceed 8 lines of code. I will give the details of the code in the messages. the work is urgent Thank you
Need to copy the trades and orders generated by expert advisors from my MT4 platform to eToro broker. Etoro offers a trading API (). This could be used to make the connection to their propietary web platform. If the programmer considers there is more stable and faster way to do it then I'm open to suggestions
I have some specific conditions that i want to check during FVG, OB, BB, MSS, BOS, etc. but lets tell them in private if you will choose to work with me
DON'T REACH OUT IF YOU CAN'T CONVERT STRATEGY ON TRADINGVIEW TO A WELL AUTOMATED EXPERT ADVISOR THAT RUN WITHOUT PROBLEM ON METATRADER 5 Well, I am only looking for a programmer who is proficient in coding and can turn strategy on tradingview to a well customized expert advisor, please reach out if you can work timely on exactly what I just said
I want to pull a fib, with set entry price at a certain percentage, with stopploss set at another percentage of the fib. Risk is set in USD. Risk to match stop loss level. TP is set as ratio to stop loss. Calculate no. of contracts. A hot key for buy and one for sell. Illustration: In settings Inputs: Fib% to be displayed Entry level fib% stop loss fib percentage TP ratio Risk in USD or account percentage Operation
I need help with creating a website traders chatroom, it must show traders online,offline,inactive. the chatroom top section must show four clocks with different times and time scale like this.. the chatroom must have a history data of up to 10days, then longer history must be deleted automatically. if you have better chatroom please say your recommendations
I have a python script that connects MT5 to Deriv for binary trading which is having some bug. It stops executing trades after a while. I need someone to check the code and fix it. Negotiable price

Información sobre el proyecto

Presupuesto
10 - 15 USD
IVA (22%): 2.2 - 3.3 USD
Total: 12.2 - 18.3 USD
Para el ejecutor
9 - 13.5 USD
Plazo límite de ejecución
de 1 a 3 día(s)