Skip to main content

Mass Index for Amibroker (AFL)

member over 9 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 3)
  • Tags:
    oscillator, ambroker

Developed by Donald Dorsey, the Mass Index uses the high-low range to identify trend reversals based on range expansions. In this sense, the Mass Index is a volatility indicator that does not have a directional bias. Instead, the Mass Index identifies range bulges that can foreshadow a reversal of the current trend.

Indicator / Formula

Copy & Paste Friendly
/*
Developed by Donald Dorsey, the Mass Index uses the high-low range to identify trend reversals based on range expansions. In this sense, the Mass Index is a volatility indicator that does not have a directional bias. Instead, the Mass Index identifies range bulges that can foreshadow a reversal of the current trend.

AFL by DQK 
*/

periods= Param("Periods", 14, 3, 200, 1);
smooth=  Param("Smooth", 7, 3, 200, 1);

function MI( Hi, Lo, periods, smooth )
{	M= EMA( Hi - Lo, smooth)/ EMA( EMA( Hi - Lo, smooth ), smooth );
return Sum( M, periods );
}

Hi= ( H + Max( C, O ) )/ 2;
Lo= ( L + Min( C, O ) )/ 2;

Plot( MI(H, L, periods, smooth), "Mass Index" + StrFormat("(%g,%g)", smooth, periods ), colorBrightGreen, styleLine|styleNoLabel );

0 comments

Leave Comment

Please login here to leave a comment.