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

[amibroker] Re: Problem with the ZIG


  • Date: Fri, 18 Dec 2009 00:21:35 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: Problem with the ZIG

PureBytes Links

Trading Reference Links

Yves,

I think that there may be a misunderstanding on how Zig works. The second parameter that you pass to the Zig function is the minimum percentage retracement before a new pivot will be recognized.

For example; If you said Zig(Close, 5), then a new peak can only occur once Close has climbed *at least* 5% above the last trough, it may ultimately climb to infinity, but it must be at least 5%. Similarly, a new trough can only occur once the Close has fallen by *at least* 5% since the last peak, it may ultimately fall as much as 100%.

Now, consider that when you have fixed the valid range to be between 900 and 1100, then the largest move possible is 200.

Note the following:

200/900 = 22.22% 
200/1100 = 18.18%

Therefore, if you try to pass any value greater than 22.22 to Zig, you will *never* get a new peak, since YL can never be greater than 1.2222 * 900 = 1100.

Similarly, if you try to pass any value greater than 18.18 to Zig, you will *never* get a new trough, since YL can never be less than (1 - 0.1818) * 1100 = 900.

Ignore Zig for a moment, and describe what it is that you want to happen.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, Yves <yltech@xxx> wrote:
>
> In this formula below
> I'm use a ZIG on CCI Indicator
> I'm change the value of the CCI because AB have a problem with 0 or negative value
> My New CCI have a value of 20 to 80
> I'm would have a ZIG who's give to me 20 and 80 ONLY.
> If I'm use a Zig(YL,70), i'm obtain a ZIG who's change from 20 to 78(It's no good)
> If I'm use a Zig(YL,71), i'm obtain NOTHING
> 
> WHY?
> How can have a ZIG who's give a value of 20 and 80 ONLY
> 
> Thank
> 
> YLTech
> 
> --------------------------------------------------------------------------------
> 
> _SECTION_BEGIN("CCI-MOD");
> 
> SetChartOptions(0,chartShowArrows|chartShowDates);
> 
> _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
> 
> // I'm change the value of the CCI because AB have a problem with 0 or negative value
> 
> Indic = ((CCI(14)+200)/5) ;
> 
> YL= IIf(Indic>80,80,IIf(Indic<20,20,Indic)) ;
> 
> ZYL= Zig(YL,70) ; //ZIG WITH PROBLEM ???????
> 
> //I'm have NOTHING IF the ZIG=71 WHY ??????????????????
> 
> Plot( YL,"Vague-CCI",colorBlue,styleLine ) ;
> 
> Plot( ZYL,"Zig-Vague-CCI",colorBlack,styleLine ) ;
> 
> _SECTION_END();
> 
> 
> --------------------------------------------------------------------------------
> 
> Merci
>  
> YLTech ( Yves L. )
>  
> Le présent message et les documents qui y sont joints sont réservés exclusivement au destinataire indiqué. Il est strictement interdit d'en utiliser ou d'en divulguer le contenu. Si vous recevez le présent message par erreur, veuillez le détruire S.V.P. et nous en aviser immédiatement afin que nous puissions corriger nos dossiers. Merci.
>  
> This message and the attached documents may contain privileged or confidential information that are intended to the addressee only. Any unauthorized disclosure is strictly prohibited. If you happen to receive this message by error, please delete it and notify us immediately so that we may correct our internal records. Thank you.
>  
> yltech@xxx
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/