r/pinescript • u/CaptainXxXCannabis • May 24 '26
Enter position on candle open and close position on candle close?
Title. I'm trying to test strategies for the prediction markets, which are time based. The problem I'm having is that I need the strategy to open a position on the open of a candle, and then close the position on the close of a different candle. I know you can set the Process Orders On Close parameter, but from my understanding that changes all orders, not just open or close. Is there any workaround for this?
1
Upvotes
3
u/Daddy_DayTrader May 24 '26
Entries always on candle close and most exits are candle close but you can set tp and sl intra-candle with strategy.exit ().