[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

prev snip form ms



PureBytes Links

Trading Reference Links


For those who are wondering what the discussion re 
prev is here a snip from the meta stocks guide ...
 
The PREV constant allows you to create 
self-referencing formulas.  A self referencing formula is one that is able 
to reference the “previous” period’s value of itself.For example, the 
following is an example of a self referencing formula:((H+L+C)/3) + 
PREVThis simple formula divides the high, low, and closing prices by 3 and 
then adds this value to yesterday’s value of the ((H+L+C)/3).The calculation 
of the popular indicator On Balance Volume illustrates the use of the PREV 
function.
 
(if(c>ref(c,-1),1,-1)*volume)+PREVAlthough 
On Balance Volume can be calculated without the use of the PREV function, an 
exponential moving average cannot (other than using the mov() function).  
The following formula shows how a 18% exponential moving average (approximately 
10-periods) is calculated using the PREV 
function.(close*0.18)+(PREV*0.82)
 
 
Regards David 
 
hmm maybe it needs a copyright disclaimer or some 
thing ?