PureBytes Links
Trading Reference Links
|
It just occurred to me - maybe they are on the same level
(like multiplication and division), so it does the negation first because it
comes to it first?
Steve
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Steve Dugas
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, April 29, 2002 9:08
PM
Subject: Re: [amibroker] Re: Are your
Composites accurate???
Hi DT,
I must be missing something. I tried your plot, and
-1^10 did evaluate to 1, like you say. But, if exponentiation takes
precedence over negation (as shown in your table), how come it doesnt evaluate
to -1, like this? :
-1^10 = -(1^10) = -(1) =
-1
Steve
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
dtsokakis
To: <A title=amibroker@xxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, April 29, 2002 12:16
PM
Subject: [amibroker] Re: Are your
Composites accurate???
Herman,I really don´t know how do you realise
things.Well, -1^10 is equal to 1.[It acts like (-1)^10 because of
priorities in operators**[try Plot(-1^10,"",1,1);]-1*10^10 is ahuge
negative numberAnother Amibroker expression is -1e10, also negative
enough.Your formula was not correct, because it was excuding stockswith
open==1 from counting.[see previous mails to you]DT**Operator
precedence and the parenthesesAFL supports parentheses in formulas.
Parentheses can be used to control the operation precedence (the
order in which the operators are calculated). AmiBroker always does
operations within the innermost parentheses first. When parentheses
are not used, the precedence is as follows (higher precedence listed
first): No Symbol Meaning 1 ^ Exponentiation 2 -
Negation - Unary minus 3 * Multiplication 4 / Division
5 + Addition 6 - Subtraction 7 < Less than 8
> Greater than 9 <= Less than or equal to 10 >=
Greater than or equal to 11 == Equal to 12 != Not equal to 13
NOT Logical "Not" 14 AND Logical "And" 15 OR Logical
"Or" 16 = Variable assignment operator The expression H
+ L / 2; (without parenthesis) would be calculated by AmiBroker as "L /
2" plus "H", since division has a higher precedence. This would result
in a much different value than (H + L)/2; --- In
amibroker@xxxx, "Herman van den Bergen" <psytek@xxxx> wrote:>
> -----Original Message-----> > From: dtsokakis
[mailto:TSOKAKIS@xxxx]> > Sent: Sunday, April 28, 2002 11:13
AM> > To: amibroker@xxxx> > Subject: [amibroker] Re: Are
your Composites accurate???> >> >> >
Herman,> > I just noticed that your EMPTY is -1^10, ie equal to
1.> > So, your equivalent formula is> > EMPTY =
1;> > Just realized that -1^10 is not equal to 1 but is -1 *
10^10> > perhaps my code was OK anyway?> > Take
care,> Herman.> > > > > >
AddToComposite(IIf(Open == 1,0,1),"~DataPresent","v",3);> > Do you
have in the group of your gif some stocks with open==1 ?> > This
would give some explanation.> > DT> > PS The huge
negative symbol in AFL is -1e10> > --- In amibroker@xxxx,
"dtsokakis" <TSOKAKIS@xxxx> wrote:> > > Of course I
receive an identical result list with your> > > EMPTY =
-1^10;> > > AddToComposite(IIf(Open ==
EMPTY,0,1),"~DataPresent","v",3);> > > Buy= 0;> >
> f=Foreign("~datapresent","v");> > > Filter=f!=101;>
> > AddColumn(f,"");> > > EXACTLY the same
results.> > > To avoid any misuderstanding :your formula works,
I just think> > > Amibroker does not use the open==EMPTY
hypothesis, because if the> > > ADLAC is not present on
16/4/2002, there is no reference for ADLAC> > > this
date.> > > My opinion is from experience, Tomasz knows how
AddToComposite()> > > works.> > > DT> >
> --- In amibroker@xxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx>
wrote:> > > > I respectfully disagree. If you are not
concerned about bar-by-> > bar> > >
accuracy> > > > than you are correct. In that case the "1"
method works fine. As> > > long as you> > >
> know that this method will pick up holes of several days but
that> > > it will> > > > not pick up single
bar holes.> > > >> > > >> > >
> Herman,> > > > Of course we speak for daily search,
bar-by-bar.> > > > I have in my ^NDX 4 experimental holes
on> > > > 6/1/2000 [1], 15/2/2000 [1] and
1/3/2000[2]> > > > plus the missing ADLAC after
15/4/2002.> > > > As you see from the exploration, the
population> > > > is different from 101 exactly these
dates.> > > > I do not understand the conditions of your
graph.> > > > The> > > >
AddToComposite(1,"~count","v");> > > > Buy=0;>>
> > scans bar-by-bar every stock for each date.> > >>
If the stock is present, it adds an 1 and moves to the next
stock.> > > > If ADLAC is not present on 16/4/2002,then
the sum will be 100> > > > for the certain date.>
> > > It is impossible to have a 20% error, there should be
another> > > > reason for your results.> > >
> Dimitris Tsokakis> >> >> >>
>> >> > Your use of Yahoo! Groups is subject to
<A
href="">http://docs.yahoo.com/info/terms/>
>> >Your use of Yahoo! Groups is subject
to the Yahoo! Terms of
Service. Your
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
|