Hello I am new to pine script and I am testing a strategy that has different entry conditions and exit conditions. The problem I am having is when an exit occurs, the entry conditions could still be met and is reentering into the same position as before. I never want to enter the same direction position, ie if I close a long I do not want to reenter a long again until I have encountered a short. Is there any way to ask the script to check if the last entered position was a long, to not enter into a long again unless a short has occurred first?