Re: Coding Help

1607
Hi !

This is an EA that opens a sell order when a bearish candle closes and opens a buy order when a bullish candle closes.

The problem I find is that when it opens a new operation it does not close the previous one, but keeps it open.

I would like, please, if possible, to modify the code so that when opening a new buy or sell order, the previous order is closed, regardless of whether there is a profit or loss.

The take profit and stop loss could be eliminated, since in this case it would not be necessary.

Thanks

Re: Coding Help

1608
pin12 wrote: Fri Aug 09, 2024 3:04 am Hi !

This is an EA that opens a sell order when a bearish candle closes and opens a buy order when a bullish candle closes.

The problem I find is that when it opens a new operation it does not close the previous one, but keeps it open.

I would like, please, if possible, to modify the code so that when opening a new buy or sell order, the previous order is closed, regardless of whether there is a profit or loss.

The take profit and stop loss could be eliminated, since in this case it would not be necessary.

Thanks
Maybe this will work for you.
These users thanked the author mrtools for the post:
pin12