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

Re: [amibroker] while statement



PureBytes Links

Trading Reference Links

Hello,

Ref() gives array so you can't use it with while() 
but you can write such statement this way:

for( bar = 1; bar < BarCount; bar++ )
{
   if( High[ bar ]  < High[ bar - 1 ] )
   {
     // 'execute your conditions'
   }
}

or use

barcolor = IIF( H < Ref( H, -1 ), colorRed, colorGreen );

/* in this sample colorRed constant is assigned to bar color 
as long as H is lower than previous bar H, otherwise green color is
assigned */

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "epintoem" <epintoem@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, May 07, 2003 12:35 AM
Subject: [amibroker] while statement


> How would you write while h<ref(h,-1) execute some conditions.
> 
> 
> TIA
> 
> 
> 
> 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/ 
> 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/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/