Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 600
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
Greetings! :)
I have about the same code as the indicator:
This is my first experience, don't judge too harshly:)
This says it all. To approximately this code, approximately this answer...write?
The point is that the rest of the code is irrelevant. The essence of the error is described in this piece.
Generally I was afraid of scaring people away with a big post. So I bloated it.
In brief, it can be formulated as follows: If an indicator is calculated for a long time (more than one minute), IndicatorCounted() always returns 0.
To be honest, it seems to me that the tester remembers the past value of the variable - from the last test. How - I don't know, there's not much time for debriefing. Maybe a bug in the terminal. I just inserted a comment in the code and output the values to the log. So it turns out that each time I run a new test the value from the previous test is stored in the sys variable. What a mess. Maybe someone else will see, maybe my eye is wet...
It's just that you forgot that the line
When the properties of the indicator are recalled, they will not be executed.
I haven't looked into it thoroughly, but maybe this will achieve the desired result?
You just forgot that the string
When the properties of the indicator are recalled, they will not be executed.
I haven't looked into it thoroughly, but maybe this will achieve the desired result?
The point is that the rest of the code is irrelevant. The essence of the error is described in this piece.
Generally I was afraid of scaring people away with a big post. So I bloated it.
In brief, it can be formulated as follows: If an indicator is calculated for a long time (more than one minute), IndicatorCounted() always returns 0.
That's not the point. Nobody needs your full secret code. Just write a complete test piece of code with that misunderstanding. And this way.
when did you clear the highlighted line? Telepaths won't help, mere mortals even less...
Then there's this part.
I don't know which programmer it came from, but there's something inadequately written... It's not your fault. You, like many others, just took the code and try to fix it...
If the counted_bars variable is equal to the number of bars remaining unchanged since the last indicator call (the first line)
How it can become less than zero that it is checked if(counted_bars < 0) I will never be able to understand...
The rest is also nonsense, but I'm too lazy to analyze it...
You just forgot that the string
the indicator properties will not be executed when the properties are recalled.
I haven't looked into it thoroughly, but maybe this will achieve the desired result?
I tried that... it doesn't work...
Generally an advisor. But HZ, no time to experiment. I have all EAs working in the way I have written. I will have to trace this shit in the tester. When I have enough time.
I tried that... it doesn't work...
I just recompiled the code in EA and ran it. When I change the Sys parameter in the comment this value changes.
That's probably not exactly how I tried it.
I just recompiled the code in EA and ran it. When I change the Sys parameter in the comment this value changes.
I tried changing to your version again... still doesn't work... It's in the EA, and it's visible as an EA...