anuwat:
HiHello,
I have an indicator on MT5 which includes linear regression slope, with the slope function (to get the slope of array x[]) as follows:
This function works normally on my MT5 indicator. However, running it on MT4, the indicator gets "zero divide" on the line: lrs1=6.*(2.*wsum/(per+1)/sum-1.)/(per-1); at the "/sum-1."
Is the function missing something for MT4?
Thank you.
A quick and dirty solution is to check if (sum-1) = 0 and make it something like 0.0000000001 instead
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
Hello,
I have an indicator on MT5 which includes linear regression slope, with the slope function (to get the slope of array x[]) as follows:
This function works normally on my MT5 indicator. However, running it on MT4, the indicator gets "zero divide" on the line: lrs1=6.*(2.*wsum/(per+1)/sum-1.)/(per-1); at the "/sum-1."
Is the function missing something for MT4?
Thank you.