Help with a code in pine script for TradingView strategy

Job ID: 30981152

Budget: $10 – $30 USD

Hi, I am working on a strategy in tradingview ... I just have a very quick question and I need help with it ... I am trying to execute a long and/or short order based on the previous candle high/low price ... and I want the order to be executed once the current candle pass the previous candle high or low price but the executed order so far is based on the current closed candle

can you help?
Related categories: Pine Script