Add Moving Average to Relative Strength Indicator

Hi,

Could someone help with adding 52-period (week) moving average to Comparative Relative Strength indicator? The original code for the indicator below:

base = ParamStr("RS base ticker", GetBaseIndex() );
Plot( RelStrength(base), _SECTION_NAME() + "(" + base + ")", ParamColor( "color", colorCycle ), ParamStyle("Style")  );

Thanks in advance

Look up MA function

base = ParamStr("RS base ticker", GetBaseIndex() );
Plot(r = RelStrength(base), _SECTION_NAME() + "(" + base + ")", ParamColor( "color", colorCycle ), ParamStyle("Style")  );
Plot(MA(r, 52), "MA52", colorRed, styleLine);
1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.