title: how to enter a strategy long/short at the bar open price in pine script?
body: <p>how to enter a strategy at the bar open price?</p>
  <p>when i use &quot;process_orders_on_close=true&quot;, the strategy entry happens on the close of current bar,
  When I use &quot;process_orders_on_close=false&quot; then getting one bar delay to enter the strategy.</p>
  <p>I have tried everything following changes but nothing worked</p>
  <p>1.using &quot;&gt;=&quot; or &quot;&lt;=&quot; when the price goes above or below certain level instead of crossovers or crossunder</p>
  <p>2.&quot;process_orders_on_close=true&quot; removes the delay but the short entry/ long entry happens at the close of the bar but i need it at the open of the bar.</p>
  <p>My problem is same as below mentioned link but none of the suggestions are working which are mentioned in the link.
  <a href="https://www.tradingview.com/script/Bi3j0E8Q-Help-needed-with-strategy-Entry-is-off-by-2-candles/" rel="nofollow noreferrer">https://www.tradingview.com/script/Bi3j0E8Q-Help-needed-with-strategy-Entry-is-off-by-2-candles/</a></p>