TradingView
vitvlkv
Jul 11, 2016 5:16 AM

Root Mean Square 

Microsoft CorporationNASDAQ

Description

Example of loop usage: calculation of Root Mean Square (en.wikipedia.org/wiki/Root_mean_square).
Comments
StockSwinger
Thanks! Vitvlkv:

In the July issue of Technical Analysis of Stocks and Commodities, John Ehlers published an article titled: "The Super Pass Band Filter." The bands utilized to trigger entry and exits are produced using Root Mean Square of the Pass Band result. Here is a link: traders.com/Documentation/FEEDbk_docs/2016/07/TradersTips.html
TradeScout99
for anyone using this script:

It is incorrect.

The script as it is results in a RMS that is offset from the right place. line 7 should read:

for i = 1 to len

with this change this is correct. Good luck!!
vitvlkv
Oops, I guess line 9 should be: res = sqrt(sum/(len+1))
TradeScout99
@vitvlkv, I just noticed this. thanks!!
TheYangGuizi
How could this be used for trading? Standard deviations from the mean?
John_Winkelman
Where is this loop thing documented in the reference manual?
sudhir.mehta
Thanks for sharing!!!!!
MarxBabu
How to use this ?
More