The message for count is correct. You stopped before the line, and the variable does not yet exist. Step over the line, and then you should get a value.
The message for count is correct. You stopped before the line, and the variable does not yet exist. Step over the line, and then you should get a value.
Thanks for replying.
The green arrow is at line #44 - I had already stepped through line #41. I stopped at line #44 so that you can see the "Expression could not be evaluated" message for "count" after it had been stepped through. Also, the global variable "ObjectsCount" is declared at the top of the indicator and set in the OnInit. That too shows the value "Expression could not be evaluated".
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there,
I am trying to write an indicator to work on Fibs on a chart. To debug this, I created debug.tpl and when I run the indicator in the Debugger, the correct template loads. The debug.tpl has as Fib and some MAs. When I step through the code that assigns some values to variables, the values for each variable in the watch window say "Expression could not be evaluated". I have no idea why and wondered whether anyone might know what is happening. In my sample code, I assigned the same value in the OnInit and OnCalculate but, the result is the same. Thoughts?
Correct template loads in the background.
See values in the watch window.
#