I'm new at this

 

Hi, everyone!

I just started programming ea in MQL4 and I've been trying to make a simple robot that opens the order when the market reaches a specific price. That is simple enough, however I want it to open the order again at the same price when the stop loss of the order is reached.

But I can't find the way to make that happen. When the stop loss is reached the order is closed and doesn't open again. So it would be great if someone could give some advice about how to code that or send me a link with a tutorial.

Thanks! 

 

you can put sellstop / buystop when price almost hit stoploss.

if stoploss does not hit, delete the pending order.

Reason: