Normalize histogram value based on instrument tick size
This commit is contained in:
parent
3d4df926d9
commit
a62f245ba9
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user