How to stop a buy or sell order when the condition is met with one per tick?
-
I've put a time filter to minimize one per tick .
But as you can see in the picture, there are sometimes several consecutive long positions and several short positions.
I want every each buy each followed by sell .
I have used NO TRADE ., but I found that sometimes it doesn't apply the terms well, as it doesn't work on some repetitive points.
Is there any solution؟
-
@khalids222 Is it necessary to work only on current candle? I think the x> x< function will not work propperly on candle ID0.
Is it a must that a sell follows a buy and vice versa?
-
@trader-philipps said in How to stop a buy or sell order when the condition is met with one per tick?:
Is it necessary to work only on current candle? I think the x> x< function will not work propperly on candle ID0.
Is it a must that a sell follows a buy and vice versa?What I specifically want in the event of a sale condition opens only one sale, and in the case of a BUY condition is opened only one BUY.
I don't want to repeat the same BUY or repeat the same sale successively
The candle does not matter but prefer to be current -
@khalids222 Okay. Can there be sell and buy at the same time?
-
@trader-philipps said in How to stop a buy or sell order when the condition is met with one per tick?:
Okay. Can there be sell and buy at the same time?
Preferably one direction,SELL OR BUY
-
@khalids222 Okay, here you go. But I'd really advice to go for candle ID1 on conditions and replace the pass block by a once per bar block. But up to you and your strategy.

-
I appreciate your efforts, I am very grateful to you for helping me
-
With extreme regret did not work well, and when working the condition was exceeded.
Where there was a purchase and did not open, and there was a sale and did not open either.
I see that handling NO TRADE is not good .
I have tried ONE PER BAR BUT NOT GOOD .
Best choice ONE PER TICK . but I need only one TICK and not tens or hundreds.
Is there help give better results, and I thank you in advance -
@khalids222 The pass block is run once per tick in my example. so that block wouldn't make a difference!?!
-
@khalids222 I have used the "No trade" block for 5 years now and 100% of the time it has worked just as expected.
Why do you think it causes a problem? -
@roar
When I place no trade, the condition is met and is not bought or sold . -
@khalids222 I think the error is somewhere else. Can you make a very simplified example?
-
@roar said in How to stop a buy or sell order when the condition is met with one per tick?:
I think the error is somewhere else. Can you make a very simplified example?

There is a cross pass: it is not bought and sold
-
@khalids222 said in How to stop a buy or sell order when the condition is met with one per tick?:
@roar said in How to stop a buy or sell order when the condition is met with one per tick?:
I think the error is somewhere else. Can you make a very simplified example?

There is a cross pass: it is not bought and sold
But you have buy and sell trades open. You don't want multiple open buys or sells, right? Or do you want it?
Should the EA close the first buy and now open new buy? Just pay commission?
-
@roar said in How to stop a buy or sell order when the condition is met with one per tick?:
But you have buy and sell trades open. You don't want multiple open buys or sells, right? Or do you want it?
i want multiple buys and sells, and i want each every a cross sell or buy
-
Let me explain the subject in more detail and in the pictures so that I understand what I want and how it works
-
Wait a second, I give a solution!
-
@khalids222
Here:
https://fxdreema.com/shared/lB9xQQUVd
This example checks the cross condition, and opens buy if there are no buys.
If there ARE buy trades, it still opens new, IF last opened trade was a sell.


-
Does it work for your purpose?
-
Thank you very much, I'll try it.
I appreciate your efforts and your response, and thank you