- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Al Dina <zebra7860[at]yahoo.ca> To: equismetastock[at]yahoogroups.com <equismetastock[at]yahoogroups.com> Date: Friday, October 20, 2006, 4:28:26 PM Subject: [EquisMetaStock Group] special moving averages Hello, I would like to get some help regarding coding some moving averages. Essentially, I wanted to duplicate the efforts of Mark Fisher's moving averages which are not typically plotted on either the High, low or close prices, but an average of ALL THREE values. In other words, if the current bar had a high of 1.20, low of 1.15 and a close of 1.18, the typical moving average would use either of those values, but I would like to take the average: 1.20 + 1.15 + 1.18/3 = 1.176 Then I can simply stipulate the usual " simple" or "exponential" or "weighted" etc, and stipulate the number of bars. Any help would be appreciated. Thanks, Al Lionel Issen <lissen[at]sbcglobal.net> wrote: Go to Metastock Help and look up detrend oscillator. It may give you most of what you want. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: taforme <taforme[at]yahoo.com> To: equismetastock[at]yahoogroups.com <equismetastock[at]yahoogroups.com> Date: Friday, October 20, 2006, 11:46:13 PM Subject: [EquisMetaStock Group] Re: special moving averages Hi, I believe that (H+L+C)/3 is provided in metastock as TYP(). Various types of weighting factors can be applied to it, e.g. MOV(typ (),P,F) where P is the number of periods to be used and F is selected as one of the predefined weighting factors available with the MOV function. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Jose Silva <josesilva22[at]yahoo.com> To: equismetastock[at]yahoogroups.com <equismetastock[at]yahoogroups.com> Date: Friday, October 20, 2006, 8:22:57 PM Subject: [EquisMetaStock Group] Re: special moving averages |
|
Moving Average - (H+L+C)/3 { (H+L+C)/3 Moving Average v1.0 CCopyright 2005-2006 Jose Silva For personal use only. http://www.metastocktools.com } { Data Array } x:=(H+L+C)/3; { User inputs } pds:=Input("Mov Avg periods",1,2600,21); type:=Input("[1]EMA [2]SMA [3]TmSr [4]Tri [5]Var [6]Vol [7]Wght",1,7,2); { Choose MovAvg type: 1 - Exponential MA 2 - Simple MA 3 - Time Series MA 4 - Triangular MA 5 - Variable MA 6 - Volume adjusted MA 7 - Weighted MA } ma:= If(type=1,Mov(x,pds,E), If(type=2,Mov(x,pds,S), If(type=3,Mov(x,pds,T), If(type=4,Mov(x,pds,TRI), If(type=5,Mov(x,pds,VAR), If(type=6,Mov(x,pds,VOL), Mov(x,pds,W))))))); { Plot MovAvg on price chart } ma |
jose '-) http://www.metastocktools.com | |
| |
Source / From: |