- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: tan ming <reminiscenostalgia [at] hotmail [dot] com> To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com> Date: Monday, February 13, 2006, 10:24:07 AM Subject: [EquisMetaStock Group] ZigZag Using Pivot =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Hi is there any indicator which can show zigzag using pivot instead percentage change? The up pivot definition is Ref(L,-1) < Ref(L,-2) AND Ref(L,-1) < L and vice verse for down pivot. And how to code a indicator showing 1 if the tough is less than previous tough and 0 if tough is more than previous tough? Regards. Adrian =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Jose Silva <josesilva22 [at] yahoo [dot] com> To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com> Date: Monday, February 13, 2006, 11:40:09 AM Subject: [EquisMetaStock Group] Re: ZigZag Using Pivot =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adrian, try this basic code: |
|
ZigZag - Using Pivot { Basic trough } tr:=Ref(L,-1)<Ref(L,-2) AND Ref(L,-1)<L; { Trough 1 & 2 values } trValue1:=ValueWhen(1,tr,Ref(L,-1)); trValue2:=ValueWhen(2,tr,Ref(L,-1)); { Higher/Lower troughs } trHi:=trValue1>trValue2; trLo:=trValue1<trValue2; { Plot in own window } trHi-trLo |
jose '-) http://www.metastocktools.com | |
| |
Source / From: |