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

Re: [amibroker] Re: The old divergences thread (for DT)



PureBytes Links

Trading Reference Links




<FONT face=Arial 
color=#0000ff size=2>Here's an example on the while:
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>add a variable ie quit
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>and then modify your while to something 
like:
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>quit = false;
<FONT face=Arial 
color=#0000ff size=2>while ((the stuff already in your while) and (! quit)) 
{
<FONT face=Arial 
color=#0000ff size=2>    .
<FONT face=Arial 
color=#0000ff size=2>    .
<FONT face=Arial 
color=#0000ff size=2>    // when you want to stop 
"whiling"
<FONT face=Arial 
color=#0000ff size=2>    quit = true;
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>}
 
 
here's 
an example  on the for loop:
 
For ( 
i = 1; i < 10; i++)
<FONT face=Arial color=#0000ff 
size=2>{
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>    // when you eant out of the for 
loop
<FONT face=Arial color=#0000ff 
size=2>    i = 99;   // you could assign an value as 
long its => 10
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>}
 
 
<FONT face=Arial color=#0000ff 
size=2>HTH
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>d



From: Ron Krebs [mailto:rkrebs@xxxxxxxxxxxxx] 
Sent: Monday, January 26, 2004 1:13 PMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: Breaking out of a 
loop...
Thanks for the hints Dingo,Setting the FOR variable 
doesn't help, because we don't know at what level to escape until the 
variable we want to test has been accomplished.Setting the WHILE loop 
variable so we stop 'WHILING' gives an error no matter how I try to 
accomplish it!!  If you can do this, please share your 
technique.Ron--- In amibroker@xxxxxxxxxxxxxxx, "dingo" 
<dingo@xxxx> wrote:> in the for loop set the variable you are using 
to control the loop to a> value that will satisfy the maximum 
value.>  > in the while loop set the variable you are using 
to determine if the while> is still "whiling" so that it 
isn't.>  > d> >   _____  
> > From: Ron Krebs [mailto:rkrebs@xxxx] > Sent: Monday, 
January 26, 2004 12:16 PM> To: amibroker@xxxxxxxxxxxxxxx> Subject: 
[amibroker] Breaking out of a loop...> > > Does anyone know 
how you can break out of a FOR, DO WHILE or WHILE > loop depending on the 
results of a variable test.> Thanks,> Ron> 
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 
SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 


Yahoo! Groups Links
  To visit your group on the web, go to:<A 
  href="">http://groups.yahoo.com/group/amibroker/  

  To unsubscribe from this group, send an email to:<A 
  href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 



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








Yahoo! Groups Sponsor


  ADVERTISEMENT 









Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.