Delete line that is saying IndicatorDigits(1) or change it to some bigger number (IndicatorDigits(_Digits+1) would be OK based on the way it is calculated)thiru wrote: ↑Sun Dec 22, 2019 8:34 amThanks mladenmladen wrote: ↑Sun Dec 22, 2019 4:35 am
Replace the code of OnCalculate() with this :The code used in that indicator is unnecessarily complicated
Code: Select all
int limit = rates_total-prev_calculated; if (limit>=rates_total-1) limit = rates_total-1; for(int i=limit; i>=0; i--) Temporary[i]=tick_volume[i]*(close[i]-open[i]); for(int i=limit; i>=0; i--) LinearMomentumBuffer[i]=iMAOnArray(Temporary,0,SmoothingPeriod,0,SmoothingMethod,i); return(rates_total);
with that simplification, we lost the vertical scale. could you please fix that? also input configurable level alert would be very nice
looks like its in the Trend direction & force index category of indicator.
PS: that vertical scale is more or less a thing you should ignore. To see what I mean change time frames and see what happens to the "scale" - that is going to be very similar to macd, and as we all know, "levels" and macd are not something that is recommended to be used in any form
PPS: that 0 there is only n the display. If you use icustom, the values are going to be different from that