Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

vanyok

EasyLanguage - Extending the Order to More Thatn One Bar

Recommended Posts

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.

:pc guru:

Share this post


Link to post
Share on other sites

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;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.