Hi Once again I would appreciate some help with conversion of the code below. I am unable to correctly translate the line starting with x5 (I think). Have tried ‘all’ the possible variations with little success. This is my attempt to create a True Slope Indicator as discussed in trading The Invisible by Kirk Northington. This code is for the lower band. The tandem indicator for the upper band I would be able to code myself. The graphic shows how the indicator plots in Metastock. Thanks in advance. x:= BBandBot(c,20, E,2) ; x1:=LinearReg(x,7); x2:=LinRegSlope(x,7); x3:=x1-x2; x4:=Min(x1,x3)/Max(x1,x3); x5:=(If(x1>x3,2-x4,x4)-1); If(x5<0,Atan(x5,1)-360, Atan(x5,1))