A simple yet very usefull indicator-help that shows the strength of an issue of a market.
_SECTION_BEGIN("NMN-Strength Finding");
//============== A/D ==============
TRH = IIf( Ref( C, -1 ) > H, Ref( C, -1 ), H );
TRL = IIf( Ref( C, -1 ) < L, Ref( C, -1 ), L );
ad = IIf( C > Ref( C, -1 ), C - TRL, IIf( C < Ref( C, -1 ), C - TRH, 0 ) );
WAD = Cum( ad );
wu = wad > Ref( wad, -1 );
wd = wad < Ref( wad, -1 );
//============== WILLIAM'S %R ==============
WR = ( ( HHV( H, 14 ) - C ) / ( HHV ( H, 14 ) - LLV ( L, 14 ) ) ) * -100;
// Following variables collect values based on their respective indicator
// to express Overbaught ( = -1), ranging ( = 0) or Oversold ( = 1).
AccDst = IIf( wu, -1, IIf( wd, 1, 0));
RSI_14 = IIf( RSI(14) > 30 AND RSI(14) < 70, 0, IIf( RSI(14) < 30, 1, -1 ) );
CCI_14 = IIf( CCI(14) > -100 AND CCI(14) < 100, 0, IIf( CCI(14) < -100, 1, -1 ) );
ROC_14 = IIf( ROC(C,14) > -10 AND ROC(C,14) < 10, 0, IIf( ROC(C,14) <= -10, 1, -1 ) );
WR__14 = IIf( WR > -80 AND WR < -20, 0, IIf( WR < -80, 1, -1 ) );
// Strength thus holds a value within, and including, -5 and 5 giving 'Overbaught' or 'Oversold' conditions
Strength = AccDst + RSI_14 + CCI_14 + ROC_14 + WR__14;
//----------------------------------------------------
_SECTION_END();
Simply download to your Formula
folder of your AmiBroker
installation. Drag it to the 'chart in concern'. Use the variable Strength
in your script like this:
AddColumn( Strength, "5", 1, BuySellFG, BuySellBG);
Go to your AA window. Start watching your analysis.