Pending order need help
-
Please how to delete a pending order created on bar id 1 if we pass to the next bar (id 0) if no sell or buy
-
-
@nacim as you can see the pending order did not respect the distance of 5 pips from the MA(red line) once the price crosse it above .
The first pending order is ok distance respected.
The second pending order did not respect the distance ? Please I need your help to fix it -
@l-andorrà please I need your help
-
I guess you already know this block:

But I also guess you already tried it and didn't work. Could you please share your project to see what conditions are applied?
-
@l-andorrà thank you for your response I found the way to delete the pending order but the real problem now is the pending order do not respect the distance I set as we can see it on the picture I shared above please take a look and tell me what do you think
-
I can't imagine the problem just by seeing your tester. I need to see the project to guess why that distance is not respected.
-
@l-andorrà Here is the link to my project . First of all it does not respect the distance and it does not take all the opportunities . https://fxdreema.com/shared/za7PDNWCd
-
Yor block 4 is working on candle ID 0. That's problematic when combined withs ticks, as is your case. Notice that your are asking for the bid to cross at this precise moment on and indicator that changes its value on every tick and with a spread that add smore difficulties on the executions.
I suggest you to consider the possibility of substitutung your tik condition by a M1 bar condition. That will avoid most of those problems.
-
@l-andorrà thank you for your response. how i can substitute tick by M1 one bar ?
-
This is one possible way, but not the only one. Substitute block 4 for this:

-
@l-andorrà thank you for your response but it does not work at all did you try it your solution ?
-
Honestly not. Buth that is weird, because thats the way to execute the crossing. Did you change any other part of the EA?
-
@l-andorrà no I did not change anything but it does not work please can you try it in your side ?
-
Tested and it works:
https://fxdreema.com/shared/121J8Z8Q
I had to remove the delete pending block. You will need to separate it from its current position.
-
@l-andorrà thank you a lot you are more helpful then the support of fxdreema .I will test it and I will take you loud
-
@l-andorrà I tested it and iy does work like I excpected it . I want it whene the bar cross above the red line (ma)it set a pending order with a distance of 5 pips for example but if we pass to the next bar the pending order should be deleted . Because the goal is to sell in the hight level of the candle witch crosses the line not in the next bar . Thank you for your support
-
If I understand you correctly you want to launch a pending order now and if at the opening of the next day it is not an open trade, it should be immediately deleted. Correct?
-
@l-andorrà no I want to lunch a pending order now if the bar crosses the line and if we pass to the next bar and the pending order has not been activated we delete the pending order
-
@l-andorrà the pending order should be activated in the same bar otherwise we must delete it
