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 don't want or need for bar 0 to update every tick, that's why I insert NewBar().
Well ok but now you are recalculating the entire indicator history on every new bar too is that what you wanted ?
There is no need to check for new bars in indicators. It is handled by the indicatorCounted and the for loop. Then don't count down to zero (count down to one)
Thanks. I wasn't sure if there is much of an unnecessary hit on performance to constantly update bar 0 with each tick when the indy is used just for end of bar signals. Counting just to 1 makes perfect sense and is of course more elegant than my NewBar() idea.
This is how the count is now coded.
No you are not. Bars -1 -counted will be 1 ONLY on a new bar Bars -1 -counted will normally be zero. Only initially or new history will Bars -1 -Counted be Bars-1
Yes, you are right, I misread the OP's code