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

Reply
Old 05-27-2009, 03: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, 03: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, 04:01 PM   #3
zdo

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

Thanks: 317
Thanked 355 Times in 256 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
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


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

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