Want to back test the code for supertrend for 7 day ATR, and 3 multiplier

Want to back test the code for supertrend for  7 day ATR , and 3 multiplier FOR Pi . 

Super Trend is not available in pi as of now, and it is not possible to code with tradescript.

i know its not available on pi as an indicator (study) . but cant we seriously code it in tradescript ??

super trend can not be coded in tradescript

close = ((high+low)/2) + 3sma(ATR,7) for positive signal
close = ((high+low)/2) - 3
sma(ATR,7) for negative signal