I need to combine two indicators into one. One necessarily compute on tick by tick basis. Another larger codes only need to compute on bar close. While it can be done, I do not want the bigger indicator to be processed tick by tick, as to avoid wasting so much CPU cycles. The issue is the variable FirstTickOfBar indicate a new bar is starting and another has just been closed, but at that point the BarsAgo index 0 is on the new bar which is just starting.
If I do this using FirstTickOfBar on the larger codes, I would need to change all indexing +1 and take care non-existent yet bars. Which is going to be rather unwieldy, not to mention having two different branch of codes.
Do you have another variable, perhaps called AfterCloseBeforeOpen ?
What is your recommended way of doing it?
Thanks.
Regards.
EdwardK.
Comment