title: Save var for later - Pine script
body: <p>noobie here...</p>
  <p>my strategy calculates entry position and I exit the trade with strategy.position_avg_price but I don't know how to save that value to be used in other cases (like e.g. plot). I'd like to save it with var, if that's the best option.</p>
  <p>This is is code snippet whose value I'd like to store:</p>
  <p>trigger_long = (close &lt; (entry * (1 - entry_below))) and (strategy.position_size[1] == 0)</p>
  <p>What would be the code that saves the value when this condition happened. The thing is I use process_orders_on_every_tick so I wouldn't want the value to change at a time when I open the chart as the TV calculates on ohcl. Many thanks!!!</p>