Incorrect indicator behaviour on some symbols was noticed (histogram is not drawn). Correction here:
Forum on trading, automated trading systems and testing trading strategies
Artyom Trishkin, 2020.01.06 05:45 AM
Do this:
//--- Calculating the indicator for(int i=limit; i>=0 && !IsStopped(); i--) { BufferDIR[i]=MAOnArray(BufferMom,0,period_ma,0,MODE_SMA,i)*period_ma; double F=fabs(BufferDIR[i]); double H=MAOnArray(BufferMomAbs,0,period_ma,0,MODE_SMA,i)*period_ma; double G=MAOnArray(BufferMomAbs,0,2*period_ma,0,MODE_SMA,i)*2*period_ma; BufferTDI[i]=F+H-G; //--- if(BufferTDI[i]>0) BufferSIG[i]=(BufferDIR[i]>0 ? -fabs(BufferDIR[i]) : fabs(BufferDIR[i])); else BufferSIG[i]=BufferSIG[i+1]; BufferColors[i]=(BufferSIG[i]>0 ? 0 : 1); }
There too small values are set for the histogram on some symbols:
BufferSIG[i]=(BufferDIR[i]>0 ? -0.1 : 0.1);
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
TDI:
Possible interpretation of the indicator
Author: Scriptor