Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 08-12-2010, 04:16 AM   #1

Join Date: Aug 2010
Posts: 1
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

How to Exit for or While Loop in Easylanguage?

anyone pls tell me this ,thanks a lot!
silverness is offline  
Reply With Quote
Old 08-13-2010, 05:15 AM   #2

Join Date: Jul 2010
Posts: 8
Ignore this user

Thanks: 3
Thanked 1 Time in 1 Post

Re: How to Exit for or While Loop in Easylanguage?

I didn't get your question exactly... i am sending you simple for loop program for
your notice..... pls make me clear about ur question. i will help you....


Var : Lowcnt(0);
for x = 1 to 10 begin
if Low < Low[x] then LowCnt = LowCnt + 1;
end;


thanks
Prabu
prabuc is offline  
Reply With Quote
Old 08-30-2010, 10:18 AM   #3

Join Date: Aug 2010
Posts: 1
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: How to Exit for or While Loop in Easylanguage?

Exiting while loops is simple....

inputs:
{your input variables}

variables:
done(false);

while (done = false)
begin
if (some condition is met) Then
done = true;
end;
DShawver is offline  
Reply With Quote
Old 08-31-2010, 05:31 AM   #4

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Exit for or While Loop in Easylanguage?

Quote:
Originally Posted by DShawver »
Exiting while loops is simple....

inputs:
{your input variables}

variables:
done(false);

while (done = false)
begin
if (some condition is met) Then
done = true;
end;
You can use something similar for for next loops to

for n = 1 to 10 begin
.........
.........
if jobdone = true then n = 10
end;

cheers.
BlowFish is offline  
Reply With Quote
The Following User Says Thank You to BlowFish For This Useful Post:
Tams (08-31-2010)
Old 08-31-2010, 07:52 AM   #5

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: How to Exit for or While Loop in Easylanguage?

Code:
variables:
counter(0);

   For counter = 1 to 100
      begin

          // instructions
          // instructions
          // instructions

          if job.done = true then
             break;
      end;
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 09-01-2010, 06:15 AM   #6

Join Date: Jul 2010
Posts: 60
Ignore this user

Thanks: 13
Thanked 15 Times in 13 Posts

Re: How to Exit for or While Loop in Easylanguage?

Hi,

To make it much more easier for debugging,

Create a new Indicator and Just copy and paste the following code and verify it and watch the Output window..

For i = 0 to 9

Begin

Print(i);

If (i=4) then Break;

End;


Then try the same code by commenting the line
//If (i=4) then Break;

Thanks,
EasyTrader_I is offline  
Reply With Quote
Old 09-02-2010, 06:52 AM   #7

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Exit for or While Loop in Easylanguage?

You live and learn - never realised that EL had a break statement, seem to recall early implementations did not though could very well be mistaken. What next a switch statement
BlowFish is offline  
Reply With Quote
Old 09-02-2010, 09:37 AM   #8

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: How to Exit for or While Loop in Easylanguage?

Quote:
Originally Posted by EasyTrader_I »
Hi,

To make it much more easier for debugging,

Create a new Indicator and Just copy and paste the following code and verify it and watch the Output window..
...,
To make it much more easier for reading,
the Code Tag is the # key at the top of the message window.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 09-02-2010 at 09:44 AM.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
EasyTrader_I (09-11-2010)

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wide Range Bodies or 'big' candles brownsfan019 Volume Spread Analysis 193 12-12-2011 07:52 AM
Intrabar Exit, Easylanguage skan Coding Forum 5 07-29-2010 12:30 PM
Loops (EasyLanguage) Tams Coding Forum 26 11-27-2009 07:23 PM
Switch/Case (EasyLanguage) Tams Coding Forum 2 11-03-2009 01:06 AM
Chandelier Exit Discussion brownsfan019 Technical Analysis 9 04-03-2009 12:47 PM

All times are GMT -4. The time now is 09:28 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.