| Index | Recent Threads | Who's Online | User List | Search |
|
|
![]() |
Portfolio123 » List all forums » Forum: Ranking Systems and Factors/Functions » Thread: What is the formula? |
|
Total posts in this thread: 3 |
[Request a Feature]
[Post new Thread] [Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Stittsville123
Advanced Member
|
What is the formula for the Weighted Moving Average WMA using the bars and offset parameter? For example: WMA(10,5,#Bench) Steve |
||
|
|
Capnpaul
Advanced Member
|
Steve I think your asking for the formula of the WMA function. A WMA is the summation of the price weighted by its offset position (bars offset) divided by the length ( total bars) . TradeStations' WMA function follows; Inputs: Price( numericseries ), Length( numericsimple ) ; variables: WtdSum( 0 ), CumWt( 0 ) ,Count(0); WtdSum = 0 ; for Count = 0 to Length - 1 begin WtdSum = WtdSum + ( Length - Count) * Price[Count] ; * note: squarebrackets denote the (bar) offset end ; CumWt = ( Length + 1 ) * Length * .5 ; WAverage = WtdSum / CumWt ; |
||
|
|
Stittsville123
Advanced Member
|
Thanks Capnpaul! |
||
|
| [Show Thread Printable Version] [Post new Thread] |