Help me write an EA, thanks in advance - page 18

 
Then the topic has worn itself out.
 
edikjefimov:

the difference is big, orders should be opened one by one, sell 0.01 buy 0.02 sell 0.04 buy 0.08 and so on

They are opened one by one, but the first order in the chain is always buy in my tester, then it is sell, then buy again and so on. Instead of the zigzag, the 3EMA slope should be processed, then the entries will be more diverse ;)
 
edikjefimov:

the difference is big, orders should be opened one by one, sell 0.01 buy 0.02 sell 0.04 buy 0.08 and so on
That is how they are opened after the 1st order with 0.01 lot
 
evillive:

They do open one by one, but the first one in the chain is always my buy, although I don't see anything wrong with that.
Yes!!! All right!!!!
 
The demo opens correctly
 
Lucas_SPb:
It opens properly on the demo.

I turned it on again on the demo. I don't know what could have gone wrong, maybe it was a glitch.
 

Hmm, could they be swapped (initial sell or buy) in case the last profit was a sell or buy, i.e. the next grid will start in the opposite direction?

 
There's just a buy condition in the code, there's no piece of code with a sell on the zigzag, that's all there is to buy )
 
emonh:

Hmm, could they be swapped (initial sell or buy) in case the last profit was a sell or buy, i.e. the next grid will start in the opposite direction?

You could try it!!!
 
Lucas_SPb:
You can try it!!!

Implement it please, I just don't know how to do it yet. (new to MQL)