i need help
-
hello every one
i have a good strategy ( for MT5)
and i build half of this strategy and i have no idea how build the other half
this is my strategy
when ema 5 crouss above ema 20 and ema 10 open a buy order (i build this part and its ok ) and when ema 5 crouss below ema 10 and ema 20 close the order ( i dont know how build this part )
please help me
thanks a lot -
@sssorsss Does the cross of both ema have to take place during same candle?
-
-
-
@trader-philipps
thanks i let you know if its work -
@trader-philipps
i try
but it's not work
its open orders but its not close them
check this link :
https://fxdreema.com/shared/DLBkcLP6 -
@sssorsss You specified the crossing again .. That will be a rare case that you hit both of them crossed.
Also check your candle ID settings. They should be equal unless you want them to be different!
-
@trader-philipps
thanks
its ok for open trades
my problem is the expert cant close open orders
do you have any idea what is the problem ? -
Blocks 32 and 42 are specified for candle ID 0. I recommend you to change both of them to candle ID 1 on both operands.
-
@l-andorrà At the moment the 2 conditions of crossing have to take place in the same tick (Candle ID:0) as @l-andorrà mentioned, you may change it to ID:1. But that wouldn't solve your issue.

See where I marked (1) and (2). At the moment the order close can just happen if at the same time both conditions (crossing of emas) take place at the same time!
You need to find a better condition that is not as strict as it is now. You may specify that only 5 x< 20 and 5 < 10 for instance. Or forget the cross and just look if ema 5 is smaler than ema10 and smaler than ema 20.
If it's smaler, the cross have happened anyway! -
Well seen trader.philipps

-
@l-andorrà Have eagle ears

-
@sssorsss I assume you want the buy to open at the point where the EMA5 crosses above both the EMA10 and the EMA 20, and to close the buy when the EMA5 crosses below both the EMA10 and EMA20? I can't think what else you could mean.
If my understanding is correct, I have built a project last night that opens and closes on those conditions.

