StockFetcher Forums · Filter Exchange · Triangular Moving Averages<< >>Post Follow-up
chessrhyme
2 posts
msg #131401
Ignore chessrhyme
modified
9/22/2016 10:13:34 AM

Hi,

I have searched the site thoroughly but I find that there is no default indicator for Triangular Moving Average (TMA). It is similar to WMA but more weighted to the recent price.

The formula of a period n TMA is given by:
TMA(n) = [SMA(1) + SMA(2) + SMA(3) + ... + SMA(n)] / n

TMA is important in cycle analysis because it is found to bear some relationship with Hurst's DMA, see here: http://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=108037#p108037

So, if I have to do a TMA in SF, I will have to add them all up by myself. Like here is TMA(50):

Fetcher[set{avg2,MA(1)+MA(2)}
set{avg3,avg2+MA(3)}
set{avg4,avg3+MA(4)}
set{avg5,avg4+MA(5)}
set{avg6,avg5+MA(6)}
set{avg7,avg6+MA(7)}
set{avg8,avg7+MA(8)}
set{avg9,avg8+MA(9)}
set{avg10,avg9+MA(10)}
set{avg11,avg10+MA(11)}
set{avg12,avg11+MA(12)}
set{avg13,avg12+MA(13)}
set{avg14,avg13+MA(14)}
set{avg15,avg14+MA(15)}
set{avg16,avg15+MA(16)}
set{avg17,avg16+MA(17)}
set{avg18,avg17+MA(18)}
set{avg19,avg18+MA(19)}
set{avg20,avg19+MA(20)}
set{avg21,avg20+MA(21)}
set{avg22,avg21+MA(22)}
set{avg23,avg22+MA(23)}
set{avg24,avg23+MA(24)}
set{avg25,avg24+MA(25)}
set{avg26,avg25+MA(26)}
set{avg27,avg26+MA(27)}
set{avg28,avg27+MA(28)}
set{avg29,avg28+MA(29)}
set{avg30,avg29+MA(30)}
set{avg31,avg30+MA(31)}
set{avg32,avg31+MA(32)}
set{avg33,avg32+MA(33)}
set{avg34,avg33+MA(34)}
set{avg35,avg34+MA(35)}
set{avg36,avg35+MA(36)}
set{avg37,avg36+MA(37)}
set{avg38,avg37+MA(38)}
set{avg39,avg38+MA(39)}
set{avg40,avg39+MA(40)}
set{avg41,avg40+MA(41)}
set{avg42,avg41+MA(42)}
set{avg43,avg42+MA(43)}
set{avg44,avg43+MA(44)}
set{avg45,avg44+MA(45)}
set{avg46,avg45+MA(46)}
set{avg47,avg46+MA(47)}
set{avg48,avg47+MA(48)}
set{avg49,avg48+MA(49)}
set{avg50,avg49+MA(50)}
set{TMA50,avg50/50}

Draw MA(50)
Draw TMA50 on plot price

Chart-time is 1 year
Chart-size is huge

Apply to symlist(SPY,QQQ,DIA)
]



Is there any smarter idea to do it?

StockFetcher Forums · Filter Exchange · Triangular Moving Averages<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.