- You are placing the nth order into the nth bar. Meaningless. Place the nth Order into the bar corresponding to the time of the Order.
- Don't use integers for True or false. Just if(condition) or if(!condition)
- Don't hard code numbers for Ordertype. Just use the appropriate symbol (OP_BUY).
- You will never see your error message because you remove it on the next line.
whroeder1:
- You are placing the nth order into the nth bar. Meaningless. Place the nth Order into the bar corresponding to the time of the Order.
- Don't use integers for True or false. Just if(condition) or if(!condition)
- Don't hard code numbers for Ordertype. Just use the appropriate symbol (OP_BUY).
- You will never see your error message because you remove it on the next line.
whroeder1:
- You are placing the nth order into the nth bar. Meaningless. Place the nth Order into the bar corresponding to the time of the Order.
- Don't use integers for True or false. Just if(condition) or if(!condition)
- Don't hard code numbers for Ordertype. Just use the appropriate symbol (OP_BUY).
- You will never see your error message because you remove it on the next line.
I saw that SetIndexBuffer only offers one dimensional array to be bound. How can I define time there? I guess I need another array to store iBarShift also?
Thank you for your reply :)
kei41202: I saw that SetIndexBuffer only offers one dimensional array to be bound. How can I define time there? I guess I need another array to store iBarShift also?
- Correct.
- You don't.
- Why do you need to store a shift? Why do you need time. What part of "Place the nth Order into the bar corresponding to the time" was unclear?
BOpen_Price[n]=OrderOpenPrice();
N is wrong. Find the bar index X corresponding to the time the order was open and store there.

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
Hey guys, I wrote this code but really have no idea why it won't work. It is my first indicator. I have had experience with experts but really could use a helping hand here: