the EA opens several positions at once and if I add the "no trade" the EA breaks down. Help me please.
-
I am creating an EA of coverage.the algorithm has two conditionsYes (MM 20> MM200) is met. It will open positions in the form of an example hedge every time the market moves 10 pips against a new order with different lots. "Cycles"order Example: 1 buy 0.01Order 2 Buy 0.01,Order 3 Buy 0.02, Order 4 Buy 0.05, Order 5 Buy 0.8 Lot, ect) Now if the condition is contrary (MM20 <MM200) it will only open a single order with a profit of 10 Pips (0.01 Lots)The problem is that the EA opens several operations at once and opening hundreds of operations driving the MT4 crazy.and if I add the "No trade" when the condition that opens the coverage is fulfilled. only one trade remains and does not continue with the cycle ..
Backtesting

FxDreema configuration

-
That's a weird behaviour considering there is a 'once per bar' block on top. No more than two buys should be open per bar. Could you please share your project?
-
@l-andorrà said in the EA opens several positions at once and if I add the "no trade" the EA breaks down. Help me please.:
That's a weird behaviour considering there is a 'once per bar' block on top. No more than two buys should be open per bar. Could you please share your project?
https://fxdreema.com/shared/v4Nn1dGoc
What I am looking for is simple. What happens is that I am a newbie on this platform. What I am looking for is that when the moving average of 20 exceeds that of 200, open the transactions in coverage and that every 18 pips in the opposite direction to the market. open a new cycle operation, for example:
order 1 = 0.01 lot
order 2 = 0.01 lot
order 3 = 0.02 lot
order 4 = 0.03 lot
order 5 = 0.05 lot
order 6 = 0.08 lots
Order 7 = 0.14 lots , etc.
But you must make the decision that if the condition changes and there is an open cycle. The cycle continues to run and the other condition is canceled. When the cycle takes the benefits and the moving average of 20 is less than that of 200, open a normal operation without a cycle. With a stop loss of 6 pips every time the market reaches profits, continue to open operations ... until the condition changes ... Postscript: Sorry, my English is that it is not my native language.
-
Ok. Let's do one step at a time. Firstly I recommend you to specify candle ID 0 on both operand in blocks 6 and 10. That will decrease a lot the number of open trades. Try it and then let me know.
-
@l-andorrà You can make a graphic example of what you say. I'm still a newbie and I don't understand those concepts much
-
Just write a number one on both condition blocks here:

-
@l-andorrà brot has already solved the infinite orders, but still orders that are opened at once. not like before, but still spoils the ea
-
@l-andorrà brother has already solved the problem thank you very much. now the problem is that when the condiction changes another cycle is created over another. I want if there's an open cycle this will be maintained no matter if the moving average crosses against..
and cycles open randomly, I want orders to be 15 pips away
It's possible?
-
I'm not completely sure I understand it. Could you please add some screenshots?
-
@l-andorrà It's a little tricky for me to explain.
you have a more private social network where I can send you an investor account and at the same time explain my vision?
-
@lnx28 Hi, after your conditions add no trade nearby and then you can do pips away bit, you can select buys and sells or seperate them in the block. In the buy and sell blocks change it to sequence on loss and add the sequence you want. ps. you might need to change your condition above or equals / below or equals.
make it look something like that. -
@lnx28 said in the EA opens several positions at once and if I add the "no trade" the EA breaks down. Help me please.:
@l-andorrà It's a little tricky for me to explain.
you have a more private social network where I can send you an investor account and at the same time explain my vision?
Sure. You can send me a PM if you want.