Coding needed for Buy @20 days high,and buy exit @10 days low?

Coding needed for Buy @20 days high,and buy exit @10 days low?

for Backtesting on Pi.

Buy:

HIGH = HHV(20)

Sell:

LOW = LLV(10)
1 Like