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

Re: [amibroker] 0 or NULL is not the SAME VALUE


  • Date: Sat, 16 Jan 2010 21:06:49 +0100
  • From: Tomasz Janeczko <groups@xxxxxxxxxxxxx>
  • Subject: Re: [amibroker] 0 or NULL is not the SAME VALUE

PureBytes Links

Trading Reference Links

Hello,

No, generally speaking in "informatic" Null is NOT zero.
Specifically in all databases NULL means "having NO VALUE" and is
different from zero (meaning "having numeric value of zero").
The same semantics (Null meaning "having no value") is used by AFL.
Null (or empty) value is used in AFL to mark bars where value is unknown.
For example if you calculate 10-bar simple moving average the moving averages
for first 9 bars are unknown (i.e. NULL).

Some languages use zero as internal representation of Null, but it is NOT general
rule and is NOT used by AFL.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-01-16 17:16, Yves wrote:
In Informatic 0 or NULL supposed have the same value.
With Amibroker is not true
 
In the formula Below
on the line 9 and 14
If I'm use a 0(zero), I'm obtain a graphe who have a PBC on 50% of the screen
If I'm use a NULL, I'm obtain a graphe who have a PBC on 100% of the screen
 
Made attention to that when you write a formula
 
YLTech
 
 
------------------------------------

_SECTION_BEGIN("BUG on 0 or NULL");

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 ) ) ));

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

Haut= IIf(Interval()==3600, Ref(HHV(C,20),-1),

IIf(Interval()==1800, Ref(HHV(C,40),-1),

IIf(Interval()==900, Ref(HHV(C,80),-1),

0 /* 0 or Null NOT THE SAME FOR THE GRAPHE */ ))) ;

Bas= IIf(Interval()==3600, Ref(LLV(C,10),-1),

IIf(Interval()==1800, Ref(LLV(C,20),-1),

IIf(Interval()==900, Ref(LLV(C,40),-1),

0 /* 0 or Null NOT THE SAME FOR THE GRAPHE */ ))) ;

Plot(Haut,"HautP",colorBlue,styleLine);

Plot(Bas,"BasP",colorRed,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@xxxxxxxxxxxx