Welcome to the Traders Laboratory Forums.
Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Reply
Old 05-27-2009, 04:03 PM   #1

Join Date: Feb 2009
Location: Burnaby
Posts: 2
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



TradeStation Easy Language Reutrn Statement

Dear all,

I am currently working on a tradestation function which requires early return. Please find an example attached below:

if (x=y) then
return

if(y>3) then
return

y=y+1;

Note that there seems to be no return statement for easy langauge. It would be really nice if someone can provide me with some advice. Thanks in advance
tcyue1984 is offline  
Reply With Quote
Old 05-27-2009, 04:16 PM   #2

HAL9000's Avatar

Join Date: Feb 2008
Location: There is no place like home!
Posts: 249
Ignore this user

Thanks: 235
Thanked 160 Times in 86 Posts
Blog Entries: 20



Re: TradeStation Easy Language Reutrn Statement

I don't know EL (so its pseudo code) but what about:

if (x <> y) and (y <= 3) then
y = y + 1;

???
__________________
As no two people see the same view along the Way,
all trips from here to there are imaginary;
all truth is a tale I am telling myself.

--- Brion Gysin, "The Process"
HAL9000 is offline  
Reply With Quote
Old 05-27-2009, 05:01 PM   #3
zdo

Join Date: Nov 2007
Location: boonies
Posts: 1,178
Ignore this user

Thanks: 299
Thanked 299 Times in 213 Posts
Blog Entries: 104



Re: TradeStation Easy Language Reutrn Statement

no return like in the c languages, etc.
One solution is
within the function dim a variable and set it via your various conditions
then at the end of your code
set functionname = the variable you used. like…

vars:
yvariable (...
;

if (x=yvariable ) or (yvariable >3) then
yvariable = 0 // assign a 'unusable' value here
else
yvariable = yvariable +1;

functionname = yvariable;

then test in object calling the function if it returned 'unusable' value else use it...
clunky but...

hth
zdo is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Language Help JKLM Automated Trading 7 02-11-2009 12:17 AM
Easy Language - Question ephi144 Coding Forum 1 01-25-2009 11:15 PM
Help with Easy Language BrianA Coding Forum 29 01-13-2009 04:32 PM
Easy Language in OEC, Help with Channel Indicator popstocks Coding Forum 10 11-07-2008 07:09 PM
Easy Language Strategy Help Marc33139 Automated Trading 3 07-28-2008 12:35 PM

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