Store the crossover in a variable(Pinescript question)

14 Views Asked by At

v20 = 0.0 ma20 = ta.sma(close,20) if crossover(close,ma) v20 := 100

  1. When ma20 crossover occurs, we want to store 100 in a variable.
  2. The ma20 crossover event occurs frequently.
  3. What should I do to save when the 3rd event from the most recent occurs?

What have you tried? Pinescript Coding Execution What did you expect to happen? Store 100 in a variable What are the actual results? can't save

0

There are 0 best solutions below