Perhaps if you could elaborate a bit more what you are trying to do and what code you have been using? Thank you.
Most of the time bar i=1 does not need to be updated. There are cases when it does, but its the indicator code that would decide that. For instance, if setting an indicator for when two other indicators cross, most crosses can be checked using two bars. However, if a cross occurs exactly on a bar, both the prior and following bars need to be verified its a cross and not a bounce. This means if it is a cross, then bar i=1 indicator value needs to be set for the cross (assuming its the bar where the exact cross occurred).
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
The Start subroutine is called by the system every tick.
If I count limit=Bars-counted_bars then limit is usually i0 to i2, or i0 to i1. which is repeated for a period of time frame, in my case M1.
I do understand updating and building of the current bar i0 however, why is it necessary to update prior bar i1, i2?...... 2 3 minutes after I have placed an order based on i0 info.
Are there any important changes in i1, i2 can I ignore them?
I would like to use bar i1 to start my order and i0 and i2, i3..... for calculation.
-Stan