The following, I believe, would give you the linear regression slope of the last five days of the 50-day simple moving average of the close. Substitute the indicator of your choice ... ;)
Slope50:=LinRegSlope(Mov(Close,50,S),5);