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

Reply
Old 08-12-2010, 05: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, 06:15 AM   #2

Join Date: Jul 2010
Posts: 4
Ignore this user

Thanks: 1
Thanked 0 Times in 0 Posts



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, 11: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, 06:31 AM   #4

BlowFish's Avatar

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

Thanks: 129
Thanked 1,038 Times in 694 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, 08:52 AM   #5

Tams's Avatar

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

Thanks: 2,027
Thanked 1,402 Times in 862 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;
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 09-01-2010, 07:15 AM   #6

Join Date: Jul 2010
Posts: 58
Ignore this user

Thanks: 12
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, 07:52 AM   #7

BlowFish's Avatar

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

Thanks: 129
Thanked 1,038 Times in 694 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, 10:37 AM   #8

Tams's Avatar

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

Thanks: 2,027
Thanked 1,402 Times in 862 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.
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...

Last edited by Tams; 09-02-2010 at 10: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 Search this Thread
Search this Thread:

Advanced Search
Display Modes


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

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