Cross MA-RSI

MQL4 Scripts

Tâche terminée

Temps d'exécution 16 heures
Commentaires du client
Programmer motion helpful and professional. Recommended!!

Spécifications

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

Répondu

1
Développeur 1
Évaluation
(879)
Projets
1396
67%
Arbitrage
117
32% / 42%
En retard
214
15%
Gratuit
2
Développeur 2
Évaluation
(590)
Projets
789
71%
Arbitrage
9
33% / 33%
En retard
22
3%
Gratuit
3
Développeur 3
Évaluation
(219)
Projets
406
60%
Arbitrage
13
38% / 23%
En retard
161
40%
Gratuit
4
Développeur 4
Évaluation
(1135)
Projets
1438
62%
Arbitrage
21
57% / 10%
En retard
43
3%
Gratuit
5
Développeur 5
Évaluation
(2120)
Projets
2691
62%
Arbitrage
116
45% / 25%
En retard
419
16%
Occupé
6
Développeur 6
Évaluation
(1101)
Projets
1784
61%
Arbitrage
14
64% / 7%
En retard
84
5%
Gratuit
Commandes similaires
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

Informations sur le projet

Budget
10 - 15 USD
TVA (22%): 2.2 - 3.3 USD
Total: 12.2 - 18.3 USD
Pour le développeur
9 - 13.5 USD
Délais
de 1 à 3 jour(s)