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

RE: [amibroker] Re: Backtest using equity curve



PureBytes Links

Trading Reference Links

sounds like you guys are on the same page...but if not, here is another way
to break out of a loop(per TJ):

    Just press and hold down SHIFT + CTRL + BREAK.

(BTW: by default AmiBRoker detects infinite loops by
itself - the threshold of the detection is set via Tools->Preferences->AFL)


-john

----- Original Message ----- 
From: dingo
To: amibroker@xxxxxxxxxxxxxxx
Sent: Monday, January 26, 2004 11:08 AM
Subject: RE: [amibroker] Re: Breaking out of a loop...


Here's an example on the while:

add a variable ie quit

and then modify your while to something like:

quit = false;
while ((the stuff already in your while) and (! quit)) {
    .
    .
    // when you want to stop "whiling"
    quit = true;



}


here's an example  on the for loop:

For ( i = 1; i < 10; i++)
{

    // when you eant out of the for loop
    i = 99;   // you could assign an value as long its => 10

}


HTH

d




From: Ron Krebs [mailto:rkrebs@xxxxxxxxxxxxx]
Sent: Monday, January 26, 2004 1:13 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [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@x...]
> 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@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 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.



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.



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 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:
 http://docs.yahoo.com/info/terms/