refactor(indicators): Normalized Deviation (Score)

This commit is contained in:
Toh4iem9
2026-02-10 19:46:52 +01:00
parent 3c23566582
commit 80c9b1f58d
+8
View File
@@ -43,5 +43,13 @@ public:
return 0.0;
return (price - level) / atr;
}
//--- Calculate Normalized Deviation (Score)
// Formula: (CurrentValue - ReferenceValue) / Normalizer (e.g. ATR)
static double CalculateDeviation(double current_val, double ref_val, double normalizer)
{
if(normalizer == 0)
return 0.0;
return (current_val - ref_val) / normalizer;
}
};
//+------------------------------------------------------------------+