StdDev for trend filter

 
Hi, I'm new to this platform and I'm adapting to the programming logic.
i have been using amibroker and tradestaion these last two years
I want to make a trend filter:
mean = rate of change (close, periodTrend) / periodTrend
R = rate of change (close, period = 1)
sdofR = StdDev of R in Trend period
TREND = (Mean / SDofR) * (Squareroot (Trend period))

mean and R I don't have much trouble finding it, but the deviation of R I'm having trouble.
I have to calculate it manually (find the formula with loop etc)
or with iStDev could you?
 
Josmolpen:
Hi, I'm new to this platform and I'm adapting to the programming logic.
i have been using amibroker and tradestaion these last two years
I want to make a trend filter:
mean = rate of change (close, periodTrend) / periodTrend
R = rate of change (close, period = 1)
sdofR = StdDev of R in Trend period
TREND = (Mean / SDofR) * (Squareroot (Trend period))

mean and R I don't have much trouble finding it, but the deviation of R I'm having trouble.
I have to calculate it manually (find the formula with loop etc)
or with iStDev could you?

I've tried using StdDev as filter too but it may be a bit tricky. Can't help you.