Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Volatility Market Index - MetaTrader 5 Script - MQL5 #21975 - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Choppy market index - indicator for MetaTrader 5

Daniel Fernandez described volatile market indexes in the August 2011 Trading Strategies article, “Using the CMI to Fight Trending and Volatile Markets.”

The CMI is a simple indicator that measures whether a market is behaving in a volatile (non-directional) manner or a trending (directional) manner. The indicator calculates the difference between the closing price of the most recent bar and the closing price n bars ago, and then divides this value by the difference between the high and low of those n bars. This value is then multiplied by 100 to get a normalized value between 0 and 100:

CMI = ((ABS(C[0]-C[n]))/(H[n]-L[n]))*100

ABS = absolute value

C[0] = latest closing price

C[n] = n bars ago close

H[n] = the highest price of the past n bars

L[n] = the lowest price of the past n bars

suggestion:

Choppy market index - indicator for MetaTrader 5


Attachment download

📎choppy_market_index.mq5 (10.72 KB)

Source: MQL5 #21975

Verification code Refresh