Close position at candle close
-
Hi guys, can anyone show me how to close an open position at candle close?
-
@mesmerist Not 100% sure but if you close on candle open will mostly be same, once per bar will work on the 1st tick of a new candle.
-
@jstap said in Close position at candle close:
@mesmerist Not 100% sure but if you close on candle open will mostly be same, once per bar will work on the 1st tick of a new candle.
Yes, close on candle open will do the trick but how do I that? I know how to open a trade once per bar, just don't know how to close on the next candle open. I tried connecting once per bar to the close block and it closes immediately after opening a trade.
-
@mesmerist The once per bar with a close block beneath in a separate tree, try this and see what happens.
-
@jstap said in Close position at candle close:
@mesmerist The once per bar with a close block beneath in a separate tree, try this and see what happens.
Yes this is what I did and it closes immediately after opening a trade.

-
@mesmerist the pink blocks only go underneath dark pink blocks, change it for blue, add a shared project instead of a picture.
-
@jstap said in Close position at candle close:
@mesmerist the pink blocks only go underneath dark pink blocks, change it for blue, add a shared project instead of a picture.
Changed to blue and got the same result. Here's the project: https://fxdreema.com/shared/14pyITaUc
-
@mesmerist Have you tried using this block?

-
@jstap said in Close position at candle close:
@mesmerist Have you tried using this block?

Just tested that, same thing, open and close at the same time.
-
@mesmerist Ok add some logic to stop blocks working at the same point of time, pink for each trade->pink check age->your condition and close block.
-
@jstap said in Close position at candle close:
@mesmerist Ok add some logic to stop blocks working at the same point of time, pink for each trade->pink check age->your condition and close block.
This works exactly like what I wanted! You're awesome, thank you so much!
-
@mesmerist your welcome
-
@mesmerist Can you show me about your solved.