EA bug fix and request upgrades

 

Hi,

This EA used to open positions in the oposite of the last "x" previous candles.

I change to open position in the same direction.

But it have a problem. If the candle is longer than the SL and you lose a position. It opens it in the same candle. So you lose many times in one long candle.

So need to wait until the condition "x" candle in same direction ("x" short or "x" longs candles) again to open. Not open in the same candle just lost.

So it need to be fixed.

The upgrades is if you lose the previus orders (hit SL). Double the next order lot.

Do it until you win (hit TP). Than the next order will be with initial lot size.

Need to choose how many times you can double or max lot size (may be you a really bad luck and lose 190810198)

If the order is closed manually. The lot size for the next one will be initial lot size.

Add TrailingStop could be good too.

Thanks for your time.

Sorry my bad english

PS:Just attached the chart with the bug

Files:
bodyguard.mq4  5 kb
thebug.gif  28 kb
 

This is the worst problem.

"But it have a problem. If the candle is longer than the SL and you lose a position. It opens it in the same candle. So you lose many times in one long candle.

So need to wait until the condition "x" candle in same direction ("x" short or "x" longs candles) again to open. Not open in the same candle just lost."

I ano can help me?

No need to do the full EA. But can say to me what i could use to prevent it?

I am not a programer but i am trying hehe