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

Reply
Old 03-31-2009, 08:28 PM   #1

Join Date: Mar 2009
Location: LA
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Question EasyLanguage - Extending the Order to More Thatn One Bar

Hello everyone. I'm new to the forum.
Nice little community you guys have here

Can someone help me out with this problem? I can't figure out how to extend the order to more than one candle...Is it possible ?

By default Strategy orders look something like:

IF blah then BUY THIS CANDLE MARKET;
or
IF blah then BUY 1 CONTRACT AT blah NEXT BAR LIMIT

IF that next candle doesn''t meet my criteria the order gets canceled.

I would like my order to look something like this instead:
IF "blah" then BUY 1 CONTRACT AT blah NEXT 3 BAR LIMIT

So basically I would like my limit order to stay active for next 3 bars ( or whatever amount of bars I specify) unless filled.

Is it possible ? How can I achieve this?

THank you.
vanyok is offline  
Reply With Quote
Old 03-31-2009, 10:49 PM   #2

Tams's Avatar

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

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

Re: EasyLanguage - Extending the Order to More Thatn One Bar

try this:

condition = blah;

if condition then buy...

if condition[1] then buy...
if condition[2] then buy...
Tams is offline  
Reply With Quote
Old 04-01-2009, 04:30 AM   #3

momentom's Avatar

Join Date: Jan 2007
Location: ldn
Posts: 145
Ignore this user

Thanks: 13
Thanked 15 Times in 13 Posts

Re: EasyLanguage - Extending the Order to More Thatn One Bar

You could also break the conditions into setup and trigger. For example;

If Condition1 then begin
If Condition11 then Buy this bar at close
momentom is offline  
Reply With Quote
Old 04-01-2009, 01:38 PM   #4

Join Date: Mar 2009
Location: LA
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Thumbs up Re: EasyLanguage - Extending the Order to More Thatn One Bar

So to make my order last 5 bars I have to have 5 separate conditions ?
Kinda sucks but I guess it makes sense.

Thanks guys.
vanyok is offline  
Reply With Quote
Old 04-01-2009, 03:34 PM   #5

Join Date: Nov 2006
Location: N/A
Posts: 612
Ignore this user

Thanks: 62
Thanked 294 Times in 177 Posts

Re: EasyLanguage - Extending the Order to More Thatn One Bar

You can use a counter along these lines...


vars: counter(10), num_bars(5);

condition = whatever;

if condition then counter = 0;

Counter = Counter + 1;

If counter <= num_bars then buy next bar a low limit;
sevensa 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
Stop Order or Logical Order ? abam Trading and the Markets 4 04-06-2009 04:19 AM
Order Imbalances?? MRW Stock Trading Laboratory 0 05-29-2008 07:29 PM
Reading An Order anupdodia Stock Trading Laboratory 3 04-02-2008 08:05 AM
Order spoofing notouch Market Analysis 12 03-20-2007 08:07 AM

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