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
In my opinion it's bad practice to use a function for this . . . you can only use it once per tick within start() if you call it a second time on the same tick, the same tick that is the start of a new bar, it will return false . . .
I agree with you, I wouldn't use a function for this, but in the above code, the start function is exited if it is false.
That means that all subsequent code depends on the condition being true and so there would be no reason to call the function again in the same tick.
In my opinion it's bad practice to use a function for this . . . you can only use it once per tick within start() if you call it a second time on the same tick, the same tick that is the start of a new bar, it will return false . . .
And in my opinion function is ok, because then code becomes more complicated in "start ()" section its much easier to read it and test with function's calls not code. It's just my opinion. Yes this function can be called once in tick, but why it should be called twice?
edit:
and if you need more bar open conditions with iTime(), you can edit and pass some parameters :) with mirror modifications and use it much more times :)