{ Downloaded From https://www.WiseStockTrader.com } Prd1:=Input("ATR Period",5,20,5); Prd2:=Input("Period for Highest High Value",5,20,10); Prd3:=Input("Period for Lowest Low Value",5,20,10); {Upper Band} (HHV(LLV(L,Prd1)+ATR(Prd1),Prd2)); {Lower Band} (LLV(HHV(H,Prd1)-ATR(Prd1),Prd3)); {HHV = Highest High Value; LLV = Lowest Low Value; Prd1 is a variable that takes the ATR period as well as Lowest Low value period in Upper Band while it takes the Highest High Value for the lower band, Prd2 variable is self explanatory.}