TRSI Indicator Issue

 

Hey guys,

The TRSI indicator below is a important part of my system. However it simply quit working. I don't know if indicators expire or not. Could someone please be so kind to make the indicator start working once again or to use the formula below to create a new indicator. I have the code intact below. I can't tell you how much I would appreciate it.

|

//+------------------------------------------------------------------+

#property copyright "Copyright © 2006, Robert Hill "

#property link "Forex Trading Software: Forex Trading Platform MetaTrader 4"

//---- indicator settings

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Gray

#property indicator_color2 Blue

#property indicator_color3 Red

#property indicator_width1 1

#property indicator_width2 1

#property indicator_width3 1

extern int RSI_Period = 14;

//---- buffers

double RSI[];

double EmaOfRSI[];

double EmaOfEmaOfRSI[];

double EmaOfEmaOfEmaOfRSI[];

double TRSI[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- drawing settings

IndicatorBuffers(5);

SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexStyle(2,DRAW_LINE);

SetIndexDrawBegin(0,RSI_Period);

IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2);

//---- 3 indicator buffers mapping

if(!SetIndexBuffer(0,RSI) &&

!SetIndexBuffer(1,EmaOfEmaOfEmaOfRSI) &&

!SetIndexBuffer(2,TRSI)

!SetIndexBuffer(3,EmaOfRSI)

!SetIndexBuffer(4,EmaOfEmaOfRSI))

Print("cannot set indicator buffers!");

//---- name for DataWindow and indicator subwindow label

SetIndexLabel(0,"RSI");

SetIndexLabel(1,"TripleEmaOfRSI");

SetIndexLabel(2,"TRSI");

IndicatorShortName("TRSI("+RSI_Period+")");

//---- initialization done

return(0);

}

int start()

{

int i, limit;

int counted_bars=IndicatorCounted();

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars - RSI_Period;

// 1) RSI 14 period of close. Plot this as the gray line

for(i = limit; i >= 0; i--)

RSI = iRSI(NULL,0,RSI_Period,PRICE_CLOSE,i);

// 2) 3-period exponential moving average of #1 above.
for(i = limit; i >=0; i--)
EmaOfRSI = iMAOnArray(RSI,Bars,3,0,MODE_EMA,i);

// 3) 3-period exponential moving average of #2 above.
for(i = limit; i >=0; i--)
EmaOfEmaOfRSI = iMAOnArray(EmaOfRSI,Bars,3,0,MODE_EMA,i);

// 4) 3-period exponential moving average of #3 above.
for(i = limit; i >=0; i--)
EmaOfEmaOfEmaOfRSI = iMAOnArray(EmaOfEmaOfRSI,Bars,3,0,MODE_EMA,i);

//========== COLOR CODING ===========================================

// 5) 5-period simple moving average of #4 above
// displaced 3 bars to the right.
for(i = limit; i >=0; i--)
{
TRSI = iMAOnArray(EmaOfEmaOfEmaOfRSI,Bars,5,3,MODE_SMA,i);
}

return(0);
}
//+------------------------------------------------------------------+

 

Would greatly appreciate a response and or suggestion regarding my issue and or if someone has a TRSI indicator to share that would be great too.

Make it a great day..

 

This indicator has worked for me for several months so what's happening now is it's not updating while on the chart. Any assistance would be so appreciative to my original posting...

 
FXViper:
This indicator has worked for me for several months so what's happening now is it's not updating while on the chart. Any assistance would be so appreciative to my original posting...

There's no time limitation in this indicator. If it worked before, it should work now.

FerruFx

 

Got it working .... Thanks for your input FerruFx.

 

You're welcome.

FerruFx

 

hi..all

im newbie in this forum.i hope all bro can help me

thanks

 
gadek01:
hi..allim newbie in this forum.i hope all bro can help me thanks

Welcome gadek01!

Feel free to ask and of course use the search feature.

FerruFx

 

Hi all, what was the answer to resolve this. I have this indicator and love it but it doesn't loop (stops refreshing) and I have to go to properties on it and close them again to make it refresh.

Anyone got any code fix to resolve this ? (code is as posted at the first post).

 

I changed this one line:

limit=Bars-counted_bars - RSI_Period;

to this:

limit=Bars-counted_bars/RSI_Period;

and it now draws continually and the chart looks the same as the previous one bit doesn't stop, ran them side by side for a while...

Reason: