Thanks mladenmladen wrote: Sun Dec 22, 2019 4:35 am Replace the code of OnCalculate() with this :The code used in that indicator is unnecessarily complicatedCode: 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.