.
DO NOT ASK FOR SOURCE CODES OR REQUEST FOR DECOMPILED INDICATORS TO BE MODIFIED. To avoid post deletion please follow the rules.

Re: RSI Indicators for MT4

#1231
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

#1232
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.
jurikrsi_v2.1.ex4
(36.58 KiB) Downloaded 272 times
NZDUSDH1.png

Re: RSI Indicators for MT4

#1233
mrtools wrote:
Wed Nov 20, 2019 3:21 pm
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.
Thank you mrtools.
didn't realize it was on LWMA, the EMA looks better but will test it over the week.

wanted to clarify with you, the jurik phase, it ranges from -100 to 100. what would you recommend for the lower time frame ?

Re: RSI Indicators for MT4

#1234
thiru wrote:
Wed Nov 20, 2019 4:30 pm
mrtools wrote:
Wed Nov 20, 2019 3:21 pm
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.
Thank you mrtools.
didn't realize it was on LWMA, the EMA looks better but will test it over the week.

wanted to clarify with you, the jurik phase, it ranges from -100 to 100. what would you recommend for the lower time frame ?
My personal preference is to use it at 0, but really haven't tested other settings.

Re: RSI Indicators for MT4

#1235
thiru wrote:
Tue Nov 19, 2019 2:29 pm
stanisic wrote:
Tue Nov 19, 2019 10:08 am
HI,

does anyone have working version of advanced RSX by Mladen? All versions I've found have renaming error.
Thank you.
have you tried this?
/
advanced rsx 2.01 &amp; arrows.ex4
/
make sure the file name is exactly as follows;
advanced rsx 2.01 & arrows.ex4
Thanks! This one is working.


Re: RSI Indicators for MT4

#1237
please do this RSI trendline

Code: Select all

// RSI TRENDLINE formula ver 1.0

SetBarsRequired(sbrAll, sbrAll);                                                        
TP = Param("Trend Per", 300,2,1000);                                                                
per_RSI= Param("RSI Per", 9, 7, 35,1);
IND =  RSI(per_RSI);                                                                                                      
Center = 50 ;

Plot( RSI(per_RSI), "", 4, 4);     
Plot(50,"",1,1) ;

// CALCULATE  UPTREND

startvalue = LastValue( LLV( IND, TP ) );                                                                          
startbar =  LastValue( ValueWhen( IND == startvalue, BarIndex(), 1) );                      
BP = BarCount - Startbar;                                                                                            

secondvalue =  LastValue( LLV( IND, BP - 5  ) );                                                       
secondbar =  LastValue( ValueWhen( IND == secondvalue, BarIndex(), 1) );            
BP2 = BarCount - secondbar;  

thirdvalue =  LastValue( LLV( IND, BP2 - 5 ) );                                                    
thirdbar =  LastValue( ValueWhen( IND == thirdvalue, BarIndex(), 1) );             
BP3 = BarCount - thirdbar;  

fourthvalue =  LastValue( LLV( IND, BP3 - 5 ) );                                                       
fourthbar =  LastValue( ValueWhen( IND ==fourthvalue, BarIndex(), 1) );         
BP4 = BarCount - fourthbar;  

fifthvalue =  LastValue( LLV( IND, BP4 - 5 ) );                                                    
fifthbar =  LastValue( ValueWhen( IND ==fifthvalue, BarIndex(), 1) );       
BP5 = BarCount - fifthbar;  

sixthvalue =  LastValue( LLV( IND, BP5 - 5 ) );                                             
sixthbar =  LastValue( ValueWhen( IND ==sixthvalue, BarIndex(), 1) );         

Low_1= IIf( BarIndex() == startbar, 80, Null);
Low_2= IIf( BarIndex() == secondbar, 80, Null);
Low_3= IIf( BarIndex() == thirdbar, 80, Null);
Low_4= IIf( BarIndex() == fourthbar, 80, Null);
Low_5= IIf( BarIndex() == fifthbar, 80, Null);
Low_6= IIf( BarIndex() == sixthbar, 80, Null);

b = startvalue ;    
FirstSlope = (secondvalue - b) / (secondbar - startbar) ;
FirstTrendline = FirstSlope * ( BarIndex() - startbar ) + b;                                                             
// Plot(  IIf(  BarIndex() >= startbar  AND FirstTrendline <= 90 , FirstTrendline, Null ) , "FirstTrendline", colorGreen, styleThick +2048 );        

SecondSlope = (thirdvalue - b) / (thirdbar - startbar) ;
SecondTrendline = SecondSlope * ( BarIndex() - startbar ) + b;                                                              

ThirdSlope = (fourthvalue - b) / (fourthbar - startbar) ;
ThirdTrendline = ThirdSlope * ( BarIndex() - startbar ) + b;  

FourthSlope = (fifthvalue - b) / (fifthbar - startbar) ;
FourthTrendline = FourthSlope * ( BarIndex() - startbar ) + b;  

FifthSlope = (sixthvalue - b) / (sixthbar - startbar) ;
FifthTrendline = FifthSlope * ( BarIndex() - startbar ) + b;  

MainSlope = IIf( FirstSlope > SecondSlope,  IIf( SecondSlope > ThirdSlope,  IIf( ThirdSlope > FourthSlope, 
 IIf( FourthSlope >  FifthSlope,  FifthSlope, FourthSlope),ThirdSlope), SecondSlope), FirstSlope) ;

MainLine = MainSlope * ( BarIndex() - startbar ) + b;    
Plot(  IIf(  BarIndex() >= startbar, MainLine, Null ) , "MainLine", colorDarkGreen, styleThick ) ;   


IND_Diff = IIf(  BarIndex() >= startbar, abs( IND - MainLine), Null) ;
MainTrendLine_Diff = Param("Difference IND from MainTrendLine", 2.5, 0.5,5,  0.5);

Cond_Buy = IIf( BarIndex() >= Thirdbar AND  IND_Diff  <= MainTrendLine_Diff, IND, 0)  AND  MainLine < 55 ;

PlotShapes( IIf( Cond_Buy, shapeUpArrow , shapeNone ), colorGreen );



/////////////////////////////////////////////

// CALCULATE  DOWNTREND

starthigh = LastValue( HHV( IND, TP ) );                                                                         
starthighbar =  LastValue( ValueWhen( IND == starthigh, BarIndex(), 1) );                
HBP = BarCount - starthighbar;                                                                                   

secondhigh =  LastValue( HHV( IND, HBP - 5  ) );                                                    
secondhighbar =  LastValue( ValueWhen( IND == secondhigh, BarIndex(), 1) );      
HBP2 = BarCount - secondhighbar;  

thirdhigh =  LastValue( HHV( IND, HBP2 - 5 ) );                                                    
thirdhighbar =  LastValue( ValueWhen( IND == thirdhigh, BarIndex(), 1) );            
HBP3 = BarCount - thirdhighbar;  

fourthhigh =  LastValue( HHV( IND, HBP3 - 5 ) );                                                         
fourthhighbar =  LastValue( ValueWhen( IND ==fourthhigh, BarIndex(), 1) );           
HBP4 = BarCount - fourthhighbar;  

fifthhigh =  LastValue( HHV( IND, HBP4 - 5 ) );                                                   
fifthhighbar =  LastValue( ValueWhen( IND ==fifthhigh, BarIndex(), 1) );         
HBP5 = BarCount - fifthhighbar;  

sixthhigh =  LastValue( HHV( IND, HBP5 - 5 ) );                                                
sixthhighbar =  LastValue( ValueWhen( IND ==sixthhigh, BarIndex(), 1) );           

High_1= IIf( BarIndex() == starthighbar, 90, Null);
High_2= IIf( BarIndex() == secondhighbar, 90, Null);
High_3= IIf( BarIndex() == thirdhighbar, 90, Null);
High_4= IIf( BarIndex() == fourthhighbar, 90, Null);
High_5= IIf( BarIndex() == fifthhighbar, 90, Null);
High_6= IIf( BarIndex() == sixthhighbar, 90, Null);

MainTrendLine_Diff = Param("Difference IND from MainTrendLine", 2.5, 0.5,7,  0.5);

d = starthigh ;    
FirstDownSlope = (secondhigh - d) / (secondhighbar - starthighbar) ;
FirstDownTrendline = FirstDownSlope * ( BarIndex() - starthighbar ) + d;                                                               

SecondDownSlope = (thirdhigh - d) / (thirdhighbar - starthighbar) ;
SecondDownTrendline = SecondDownSlope * ( BarIndex() -  starthighbar ) + d;                                                          

ThirdDownSlope = (fourthhigh - d) / (fourthhighbar - starthighbar) ;
ThirdDownTrendline = ThirdDownSlope * ( BarIndex() - starthighbar ) + d;  

FourthDownSlope = (fifthhigh - d) / (fifthhighbar - starthighbar) ;
FourthDownTrendline = FourthDownSlope * ( BarIndex() - starthighbar ) + d;  

FifthDownSlope = (sixthhigh - d) / (sixthhighbar - starthighbar) ;
FifthDownTrendline = FifthDownSlope * ( BarIndex() - starthighbar ) + d;  

MainDownSlope = IIf( FirstDownSlope < SecondDownSlope,  IIf( SecondDownSlope < ThirdDownSlope,  
IIf( ThirdDownSlope < FourthDownSlope,  IIf( FourthDownSlope <  FifthDownSlope, FifthDownSlope, FourthDownSlope),ThirdDownSlope), SecondDownSlope), FirstDownSlope) ;

MainDownLine =  IIf( MainDownSlope == 0, Null, MainDownSlope * ( BarIndex() - starthighbar ) + d ) ;    
Plot(  IIf(  BarIndex() >=  starthighbar, MainDownLine, Null ) , "Main_DOWN_Line", colorViolet, styleThick ) ;    

IND_Diff = IIf(  BarIndex() >=  starthighbar, abs( IND - MainDownLine), Null) ;

Cond_Sell = IIf( BarIndex() >= Thirdbar AND  IND_Diff  <= MainTrendLine_Diff, IND, 0)  AND  MainDownLine > 45 ;

PlotShapes( IIf( Cond_Sell, shapeDownArrow , shapeNone ), colorRed );


Title =  Name() + "\\c17" +   "  " +"\\c12" + "RSI" +  " " + per_RSI   ;

Mod edit: Link removed. Please follow the rules.

Re: RSI Indicators for MT4

#1238
Dear mrtools,

Could u please make a cci of rsi + atr indi using CCI_nuf_v4 indi display style (showing histo even between overbought/oversold area using different color if possible like second indi)? Thanks.
cci of rsi + atr.ex4
(54.33 KiB) Downloaded 36 times
CCI_nuf_v4.mq4
(5.05 KiB) Downloaded 36 times

Re: RSI Indicators for MT4

#1239
hyasp wrote:
Fri Nov 29, 2019 2:13 pm
Dear mrtools,

Could u please make a cci of rsi + atr indi using CCI_nuf_v4 indi display style (showing histo even between overbought/oversold area using different color if possible like second indi)? Thanks.
Think might be it. Added a choice of 7 different rsi's and alerts on histogram color change.
cci of rsi + atr (mtf + alerts).ex4
(55.45 KiB) Downloaded 128 times
NZDUSDH1.png


  1. Similar Topics

    1. Various Indicators - (MT5)

      2 Replies 2301 Views

      by mntiwana, Wed Nov 28, 2018 12:39 am in MT5 Indicators

      2 Replies
      2301 Views
    2. TDI indicators for MT5

      0 Replies 2614 Views

      by Jimmy, Wed Feb 20, 2019 8:50 pm in MT5 Indicators

      0 Replies
      2614 Views

Return to “MT4 Indicators”

Who is online

Users browsing this forum: acinmavi, Antonio, boros, chandrakumar, CommonCrawl [Bot], DotNetDotCom [Bot], fxtrader, Google [Bot], leowang2018, meteb, moey_dw, myzan, OVII, Qwant [Bot], Seznam [Bot], yoruga and 77 guests