Choppiness Index Indicator For MT5
Table Of Contents:
- Choppiness Index Indicator For MT5
- 安装Choppiness Index Indicator For MT5
- Choppiness Index Indicator For MT5参数
- Choppiness Index Indicator For MT5缓冲区
- 守则主要部分
EW Dreiss开发了Choppiness Index Indicator For MT5 ,它基于分形几何学并结合了混沌理论。结果,该指标在指标子窗口上震荡,如果市场没有明确的方向,则该子窗口显示更高的价格并显示价格波动。
安装Choppiness Index Indicator For MT5
通过上面的表格下载指标后,您需要解压缩zip文件。然后,您需要将文件Choppiness index.mq5复制到MT5安装的文件夹MQL5Indicators中。之后,请重启MT5,然后您将能够在指标列表中看到该指标。
Choppiness Index Indicator For MT5参数
Choppiness Index Indicator For MT5具有要配置的1 参数。
input int inpChoPeriod = 14; // Choppiness index period
Choppiness Index Indicator For MT5缓冲区
Choppiness Index Indicator For MT5提供1 缓冲区。
SetIndexBuffer(0,csi,INDICATOR_DATA);
守则主要部分
int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[]) { double _log = MathLog(inpChoPeriod)/100.00; for (int i=(int)MathMax(prev_calculated-1,0); i lt rates_total; i++) { double atrSum = 0.00; double maxHig = high[i]; double minLow = low[i]; for (int k = 0; k lt inpChoPeriod && (i-k-1) gt =0; k++) { atrSum += MathMax(high[i-k],close[i-k-1])-MathMin(low[i-k],close[i-k-1]); maxHig = MathMax(maxHig,MathMax(high[i-k],close[i-k-1])); minLow = MathMin(minLow,MathMin( low[i-k],close[i-k-1])); } csi[i] = (maxHig!=minLow) ? MathLog(atrSum/(maxHig-minLow))/_log : 0; } return(rates_total); }