Code this strategy for Pi

Buy When price closes below Lower STARC Band and Exit when Price closes below BBT (20,2,Simple)
Sell When price closes above Upper STARC band and exit when price close above BBB (20,2,Simple)

STARC Band
Upper STARC band = SMA + ATR*
Lower STARC band = SMA - ATR*

  • The average true range (ATR) is generally multiplied by a user-specific multiplier factor before being added/subtracted from the SMA.