How to take one of several buys orders?
-
In this example here are several buys orders that occurred.
I only need one.
How do I make an EA before opening a second buy order . i need to make sure of the last open order?
If the same thing do not open anything. If it disagreed and there was a sell open it

-
You should use a 'No trade' block on top of your launching conditions. That way every time a buy is open, no more buys will until it's closed.
-
@l-andorrà said in How to take one of several buys orders?:
You should use a 'No trade' block on top of your launching conditions. That way every time a buy is open, no more buys will until it's closed.
But it also does not open a sell in the event of a loss, can I make it open a sell in the event of a buys loss? if i changed group number
-
That depends on the circumstances. Could you please share your project?
-
@khalids222 If you want the sequence buy -sell - buy, you need to count the sell and buy orders and compare them. If you want sells and buys separate, you can use no trade block and limit one for buys and another one for sell types.
-
@trader-philipps said in How to take one of several buys orders?:
If you want the sequence buy -sell - buy, you need to count the sell and buy orders and compare them. If you want sells and buys separate, you can use no trade block and limit one for buys and another one for sell types.
No, I did not mean this.
I mean if it was a previous buy, and there was another buy order on the second candle now. Do not buy
Suffice it to the past only. .
Meaning, if the buy is repeated, only the first.
If the sell is repeated, only the first is sufficient.
In order not to consume the balance,
-
@l-andorrà This EA makes very good profits, but volumes are a problem
https://fxdreema.com/shared/YqcZPNE1d -
@khalids222 I mean a volumes of buys and sells, in the same direction, and at the same time I cannot use no trade .
-
Before opening any deal, make sure of the previous order if the same order exceeded the condition, if different, open
This is the only addition
The same sizes of current EA .

-
@khalids222 If you just want 1 buy at a time, use No trade block and linit it to Bues only. Do the same for Sells.
If you want to allow multiple trades in the same direction but not on the same "signal condition" switch off the eg Buy block (or better path) and switch it on somewhere else again if your entry condition is over.
Here an example of what I mean with sitch off / on:

- MACD crosses 0 line up. -> Open Buy -> Switch OFF Buy path
- MACD crosses signal line down -> switch ON Buy path
- MACD crosses signal line up -> open Buy -> switch OFF Buy path
- MACD crosses signal line down -> switch ON Buy path
- MACD crosses signal line up -> open Buy -> switch OFF Buy path
- MACD crosses signal line down -> switch ON Buy path
- MACD crosses 0 down - you may again switch ON/OFF Buy as it fits to your strategy.
Does that make sense?
-
@trader-philipps said in How to take one of several buys orders?:
If you just want 1 buy at a time, use No trade block and linit it to Bues only. Do the same for Sells.
If you want to allow multiple trades in the same direction but not on the same "signal condition" switch off the eg Buy block (or better path) and switch it on somewhere else again if your entry condition is over.
Here an example of what I mean with sitch off / on:Is it possible to give an example of the two cases as well
-
@trader-philipps
Is it possible to apply it directly to the project, please
I am not an expert on that -
@khalids222 Not sure if I met the conditions right as they were a bit messy on the shared projects. So check this for principle and adjust to your need. Btw. MACD 1,30,5 flips around the signal line a hell so there will be lots of trades in any way.

-
@trader-philipps said in How to take one of several buys orders?:
Not sure if I met the conditions right as they were a bit messy on the shared projects. So check this for principle and adjust to your need. Btw. MACD 1,30,5 flips around the signal line a hell so there will be lots of trades in any way.
thank you very much ,
We are always impressed with your creativity -
Nothing has changed. Several purchase orders have occurred
-
@khalids222 Could you reshare your version of the project please if you made any changes to mine?
-
@trader-philipps said in How to take one of several buys orders?:
Could you reshare your version of the project please if you made any changes to mine?
-
@khalids222 Okay, you didn't set the Switch ON condition right!

Left side is your switch ON condition and right side is your entry condition. Like this you no need the Switch ON/OFF blocks.
The idea is that you switch on the corresponding block only if the entry condition is not met anymore.
Simple example with Moving average (easier to demonstrate):
- Price x> MA --> Switch on Buy blocks
- Buy order gets triggerd -> Buy path gets switched OFF
- Price <x MA (below MA) -> Buy blocks switch ON
Does that make sense?
In your example I guessed that your Sell entry condition (or at least the most stricted one of them) is the trigger to switch ON the Buy blocks again.
-
@trader-philipps
I'm sorry, but I didn't understand it explicitly.
Is it possible to amend it on the project and I will try to understand it in practice?
Thanks for your efforts -
@khalids222 I needed to change the block names BUY and SELL back to numbers as the Switch OFF didn't work. No idea why it works with switch ON but not switch FF - maybe a bug.
Further I simply copied your Sell entry blocks to the Buy control and the Buy entry blocks to the Sell control side,Check this out 0_1579284526893_TEST3.mq4
Now it takes 1 entry per direction, which may not be your intention, but maybe a point to start from.
