close running trades on new candle open
-
Hi,
I will appreciate the effort of any fellow here who can suggest how to close running trades and pending orders on a new candle open.
and open new pending orders instantly -
@forexbob-0 in sequence : once per bar=>close trades=>delete pending orders=>no pending orders=>no trades=place pending orders
-
@ambrogio Thank you for responding, let me check this please be online
-
@ambrogio Thank you, Problem solved.

-
@forexbob-0 you're welcome!
-
@ambrogio I want to know one more thing regarding current candle that is it possible if candle 0 open bullish it open buy, and as soon if it become bearish then it open sell, again, if this happen n times then it open/close buy/sell trades on current running candle.
If yes which blocks will be used to that -
@forexbob-0 candle 0 opens at a specific price level, we cannot know if it is bullish or bearish. You can decide if the price rises by n pips opens a buy and vice versa for a sell. But I warn you that it is not a good approach, you will find yourself with hundreds of trades in a few seconds.
-
@ambrogio Something going into my head I want to try that thing, the thing I ask is just a part of it.
I appreciate you if please continue further, we can use bull or bear candle for opening on a specific movement and closing the opened trade when it went opposite right ? -
yes. If you want to trade bull or bear candle, you can do it on candle ID1.
If you want trade on candle ID0, try this way : ask>= candle ID0 open +1 pips buy now, viceversa for sell. Then on "on trade" tab : trade buy created >>>close sell and viceversa