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
I was trying to code my own EA and created some custom function, the issue that I am facing is as if the custom function that I have is not being read in the EA if the variable that I have assigned this function to is initialized with -1 although when I change that variable to zero, it works fine, to my understanding that the new value of the function should be assigned to the variable instead of -1 but it seems that is not what happened
Moreover when I test the function separately out of the EA and assign it to variable that is initialized with -1 , it works as expected and the new value of the function take place of the value of initialization (-1).
But still when I try out the function within the EA and just change the initialization value of the variable that the function is assigned to, to be zero it also works fine
the issue happens only when the initialization value of the variable is -1 and trying it within the EA
I was wondering if someone had the same issue and has explanation to it,
anyone can explain to me why?