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

[amibroker] Re: How to solve in AFL.....



PureBytes Links

Trading Reference Links

Tomasz,
then we speak for a ValueWhen(Cond,a*b), right ?
DT
PS: I think ValueWhen(Cond,Array) is equivalent to AMA(Array,Cond), 
we have discussed it in the past [I was suggesting AMA and you 
suggested Valuewhen this time...], but I do not know if above 
equivalence is ALWAYS true. Do you see any exception perhaps?
--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Dimitris,
> 
> There is "third possibility" - {EMPTY} or Null value
> but this possibility is handled automatically by AB 
> so indeed single IIF is perfectly enough.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, May 08, 2003 2:45 PM
> Subject: [amibroker] Re: How to solve in AFL.....
> 
> 
> > Tomasz,
> > Let us look at the question first :
> > Your code is [I suppose] for the question
> > x = IIF(Condition is TRUE, a * b, Ref(x,-1));
> > Keith question was
> > x = IIF(Condition is TRUE, a * b,
> >      IIF(Condition is FALSE, Ref(x,-1),NULL));
> > I think it does not make sense because Condition is TRUE OR FALSE 
> > without 3rd possibility
> > DT
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" 
<amibroker@xxxx> 
> > wrote:
> > > Hello,
> > > 
> > > Using AMA/AMA2:
> > > 
> > > x = AMA( a * b, Condition == True );
> > > 
> > > Using loops:
> > > 
> > > for( i = 1; i < BarCount; i++ )
> > > {
> > >    if( Condition[ i ] )
> > >    {
> > >     x[ i ] = a * b;
> > >    }
> > >    else
> > >    {
> > >     x[ i ] = x[ i - 1 ];
> > >   }
> > > }
> > >  
> > > 
> > > Best regards,
> > > Tomasz Janeczko
> > > amibroker.com
> > > ----- Original Message ----- 
> > > From: "Keith Bennett" <kbennett@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Thursday, May 08, 2003 12:33 PM
> > > Subject: [amibroker] How to solve in AFL.....
> > > 
> > > 
> > > > 
> > > > Hi,
> > > > 
> > > > The following situation frequently occurs, but it doesn't 
seem 
> > > > possible to solve directly due to the self reference.
> > > > 
> > > > How do you tackle this in AFL:
> > > > 
> > > > x = IIF(Condition is TRUE, a * b,
> > > >     IIF(Condition is FALSE, Ref(x,-1),NULL));
> > > > 
> > > > Thanks
> > > > Keith
> > > > 
> > > > 
> > > > 
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx 
> > > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > > --------------------------------------------
> > > > Check group FAQ at: 
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > > > 
> > > > Your use of Yahoo! Groups is subject to 
> > http://docs.yahoo.com/info/terms/ 
> > > > 
> > > > 
> > > >
> > 
> > 
> > 
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > 
> > Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/ 
> > 
> > 
> >


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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