Normalize histogram value based on instrument tick size

This commit is contained in:
moshferatu 2024-05-19 05:31:47 -07:00
parent 3d4df926d9
commit a62f245ba9

View File

@ -54,8 +54,8 @@ namespace NinjaTrader.NinjaScript.Indicators
if (CurrentBar < Math.Max(FastEMAPeriod, SlowEMAPeriod))
return;
double macdValue = fastEMA[0] - slowEMA[0];
double previousMacdValue = fastEMA[1] - slowEMA[1];
double macdValue = (fastEMA[0] - slowEMA[0]) / TickSize;
double previousMacdValue = Histogram[1];
Histogram[0] = macdValue;