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

[amibroker] Re: if else else else



PureBytes Links

Trading Reference Links

thanks for your reply.

I just wanted to write a message I found it myself..... It was just a 
matter of writing the code write (sorry about that). My stuff had to 
be written like:

if (condition) 
{
}
else if (condition)
{
}
else if (condition)
{
}

etc. ..... 

but thanks for your reply. I will study your suggestions

regards, Ed




--- In amibroker@xxxxxxxxxxxxxxx, "mrdavis9" <mrdavis9@xxxx> wrote:
> Ed, this is a system that I use that works quite well.  The code 
below requires that three different conditions have to be met, before 
a buy signal is generated.    Cond1 ,of course, must happen today.  
The other conditions could also be happening today, but you can also 
require that they happen on prior days.  I created this      iif(    
system  so I could check sequential conditions going back in time 
starting with today, and then continuing to look  back in time one 
day at a time.  So I make cond2 like this:
> 
> cond2=ref(whatever),-1).  Hope this helps.  Ron D
> 
> 
> 
> 
> 
> 
> 
> 
> 
> PAST3=IIf(cond4is met, PAST4,1);
> 
> PAST2=IIf(cond3is met, PAST3,0) ;
> 
> PAST1=IIf(cond2is met, PAST2 ,0);
> 
> today=IIf(cond1is met, past1 ,0);
> 
> Buy=Filter AND today;
> 
> 
> 
> 
> 
>   ----- Original Message ----- 
>   From: ed2000nl 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Sunday, October 05, 2003 3:13 PM
>   Subject: [amibroker] if else else else
> 
> 
>   hi,
> 
>   because I can't jump directly out of a loop in AFL I want to make 
use 
>   of a construction (I think it is called nesting if statements):
> 
>   if (condition) {
> 
>   } else {
> 
>   if (condition) {
>   }
> 
>   } else {
> 
>   if (condition) {
>   }
>    
>   } else {
> 
>   if (condition) {
>   }
> 
>   }
> 
>   is this possible in AFL?
> 
>   thanks, Ed
> 
> 
> 
> 
>   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/ 
> 
> 
> 
>   ---
>   Outgoing mail is certified Virus Free.
>   Checked by AVG anti-virus system (http://www.grisoft.com).
>   Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/