I am absolutely new to Pine Script, and for now I am trying to write a simple strategy.
However, I guess I am stupid, but I cannot get the following strategy done: