Try to declare these variable outside this scope e.g. right after HistorySelect(). It won't explain it but may work.
Thank you Carl. I fixed the division by zero and the code works again. I mean, since the print of the values was correct I presume it's something wrong with the debugger and thus I left the definition of the vars as is...
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
Good morning,
I got an error while running my EA and thus I tried to debug the error. The error "division by zero" makes sense since one variable which is used as the divider is 0. However, for the defined variables "total_PI", "trend_PI" and "Runtime_Days" and others the debugger shows "Unknown identifier". The variables are defined above and if I print them in the Journal I do get values? Haven't yet seen such a behaviour or maybe I currently don't see the forest for the trees...