I didn't check all your code's details, but just some thoughts :
do 1, 2, 3 and keep looping in 4.
- You don't have a loop in your code, don't expect "keep looping in 4".
- PositionSelect() is a function which returns a value, you have to check this value.
- Wrong if conditions, should be '==' :
if ( Target = OrderGetString(ORDER_SYMBOL) )
if (ans = false)
- I suggest you to read the documentation of OrderSend(), you didn't check the returned code.
...
thanks for the feedback I'll check these out.
about " keep looping", what i mean is that every time a tick is received, the codes will be executed, right? so in essence, these codes will keep looping.
not checking the return code for OrderSend() means the EA will stop processing and not proceed even after a tick is received ?
thanks for the feedback I'll check these out.
about " keep looping", what i mean is that every time a tick is received, the codes will be executed, right? so in essence, these codes will keep looping.
not checking the return code for OrderSend() means the EA will stop processing and not proceed even after a tick is received ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
what happens is that is stops somewhere in the middle after a while. even if i intervene and remove the stop order after 3 is executed, i expect it to loop and start from 1 and place another stop order at 3.
please help.