mirror of
https://github.com/softwaredevelop/mql5.git
synced 2026-08-16 22:08:07 +00:00
refactor(indicators): Vol Regime
This commit is contained in:
@@ -84,7 +84,7 @@ struct QuantData
|
|||||||
// M15 Flow
|
// M15 Flow
|
||||||
double v_score; // VWAP Z-Score
|
double v_score; // VWAP Z-Score
|
||||||
double autocorr; // Lag-1 Correlation
|
double autocorr; // Lag-1 Correlation
|
||||||
double vol_regime; // ATR(5)/ATR(50)
|
double vol_regime; // ATR(5)/ATR(55)
|
||||||
string sqz; // Squeeze State
|
string sqz; // Squeeze State
|
||||||
double sqz_mom; // New
|
double sqz_mom; // New
|
||||||
double m15_vhf; // New
|
double m15_vhf; // New
|
||||||
@@ -511,7 +511,7 @@ bool RunQuantAnalysis(string sym, QuantData &data)
|
|||||||
|
|
||||||
// 3. Vol Regime (Live)
|
// 3. Vol Regime (Live)
|
||||||
double atr_f = Calc_ATR(mid_o, mid_h, mid_l, mid_c, 5, idx_l2);
|
double atr_f = Calc_ATR(mid_o, mid_h, mid_l, mid_c, 5, idx_l2);
|
||||||
double atr_s = Calc_ATR(mid_o, mid_h, mid_l, mid_c, 50, idx_l2);
|
double atr_s = Calc_ATR(mid_o, mid_h, mid_l, mid_c, 55, idx_l2);
|
||||||
data.vol_regime = (atr_s!=0) ? atr_f/atr_s : 1.0;
|
data.vol_regime = (atr_s!=0) ? atr_f/atr_s : 1.0;
|
||||||
|
|
||||||
// 4. Squeeze
|
// 4. Squeeze
|
||||||
|
|||||||
Reference in New Issue
Block a user