Re: RSI Indicators for MT4

1219
I found this idea in another forum.+
Can anyone code it?Dear Mr tools can you have a look please ?
"ratio of the rolling n-period averages of the positive vs. negative MA changes,instead of CLOSE PRICE adjusted to a 0-100 scale"
mql5 code piece is something like this:

Code: Select all

       for(int i=0;i<CalPeriod-1;i++) // this only makes sense if the index [CalPeriod-1] stands for the unfinished current candle, that you want to exclude from the calculation [which may be the case]
        {
           //get value of MAh1 and MAh4 value 
            MA1_array[i] = InpMA1_array[i]; 
            MA2_array[i] = InpMA2_array[i]; 
             MADiff_array[i] = NormalizeDouble(MA1_array[i] - MA2_array[i],4);
             
          //pass the MADiff_array value to MANegative and Positive array base on their value
          MAPosDiff_array[i]=MathMax(0,MA1_array[i]-MA2_array[i]);
          MANegDiff_array[i]=MathMax(0,MA2_array[i]-MA1_array[i]);

          //ArraySetAsSeries(MANegDiff_array,true);
          //ArraySetAsSeries(MAPosDiff_array,true);
          }
       //Compute the average 
       double AverageNegMADiff = NormalizeDouble(ArrayAverage(MANegDiff_array),4);
       double AveragePosMADiff =  NormalizeDouble(ArrayAverage(MAPosDiff_array),4);
       double MAdiffRS = NormalizeDouble(100-(100/(1+AveragePosMADiff/AverageNegMADiff)),2);
........
........

Re: RSI Indicators for MT4

1220
thiru wrote: Wed Nov 20, 2019 11:14 am Jurik RSI

Dear mrtools,
could you please fix the JurikRSI indicator? It is not behaving properly upon loading. Also, can you please make it "strict" ?
//
//
jurikrsi_v2.mq4
//
//
2019-11-20 08_06_56-EURUSD,M1.png


thank you
thiru
This is a start, looks like he was using an rsi that was using linear weighted moving average, but need to experiment with the other 3.
These users thanked the author mrtools for the post (total 8):
thiru, camisa, Jimmy, talaate, heispark, pipsquirrel, myrx, Jedidiah


Who is online

Users browsing this forum: kvak, MayaxatL, muhammadFarooq2k20, palex2005, phnthnhnm, Roets1, sdsdzk, twix and 84 guests