title: Pinescript preventing duplicate signals
body: <p>I am writing an indicator in Pinescript to give me long and short signals.  How do I prevent it from giving me the same signal twice?  In other words, if I am already long, I don't want another long signal.</p>
  
  <p>I am using the long_cond function.  Essentially, I want the code to operate like this:</p>
  
  <p>long_cond = condition1 and condition2 and "don't enter if already long"</p>
  
  <p>Thanks for the help!</p>