- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
In "Zero-Lag Data Smoothers" in this issue, John Ehlers introduces two new filters, the infinite impulse response (IIR) filter and finite impulse response (FIR) filter. These filters can be easily recreated in MetaStock 6.52 or higher. To create a filter in MetaStock, select Indicator Builder from the Tools menu, click New, enter the code for the filters, and then click OK. Repeat for the remaining filters. |
|
Zero-lag IIR Filter pds:=Input("number of periods",1,20,5); x:=2/(pds+1); xl:=LastValue((1/x)-1); (x*((2*C)-Ref(C,-xl))) +((1-x)*PREV) |
|
Zero-lag FIR Filter (C + (3.5*Ref(C,-1)) + (4.5*Ref(C,-2)) + (3*Ref(C,-3)) + (.5*Ref(C,-4)) - (.5*Ref(C,-5)) - (1.5*Ref(C,-6))) / 10.5 |
To plot the indicator, locate it in MetaStock's Indicator Quicklist, then click and drag it onto the desired chart. If you have questions creating an indicator, call us at 801 265-9998 or e-mail us at support@equis.com. --William Golson, Equis International, Inc. www.equis.com | |
| |
Source / From: |