My strategy requires a qualification bar, which can be qualified intrabar, but it MUST be qualified on bar close for an order to be submitted on the next bar.
My approach was to use if barstatus(1)=2 on the qualification bar, and then issue a buy order to go Long.
Her is some pseudocode:
The problem is that the "next bar" makes it skip a bar. So if setupbar is bar number 1, then I want to be able to enter the market if price reaches a certain point in bar number 2. However, the order only seems to be firing 2 bars after the setup bar, not the next bar.
So what do I do to make this work? Any ideas?
Can you help answer these questions from other members on futures io?
You are complicating things.
Keep your logic simple. Do only things that are tried and proven. The more tricks you try to pull, the more trouble you will get into down the road. It is the things that you don't know that can hurt you. I might sound negative and discouraging, but I am talking reality: I have seen enough naive people wasting years of their lives trying to do something that they could have do without.
Once a qualified setup bar is found (determined on close), i then use some of the information from the closed bar to determine entry price for next bar.