Entry stop order stays active? EasyLanguage - Open E Cry | futures io social day trading
futures io futures trading


Entry stop order stays active? EasyLanguage
Updated: Views / Replies:2,758 / 6
Created: by alexfdv Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Entry stop order stays active? EasyLanguage

  #1 (permalink)
Trading Apprentice
Ocean City MD/USA
 
Futures Experience: Beginner
Platform: OEC
Favorite Futures: ES
 
Posts: 5 since Jan 2013
Thanks: 0 given, 0 received

Entry stop order stays active? EasyLanguage

Hi everybody,

Could you please help me with the next question? I am really stuck with it.

I have created an strategy in EasyLanguage and run it on my OEC Trading Platform. But the problem that my entry stop order stays active much longer then 1 bar. I do the next (cutted version):

 
Code
if (MarketPosition = 0 and TimeCondition = 1) then
begin

    if ( CanGoLong ) then
    begin
        Buy ("EntryLong") 1 contracts next bar at (high + 2*tickval) stop;
    end;

    if ( CanGoShort ) then
    begin
        SellShort ("EntryShort") 1 contracts next bar at (low - 2*tickval) on stop;
    end;
end;
As I understand, entry stop order should be canceled if it is not filled and new bar come? If it is not true, then how to cancel it?

I will be very obligated to you for help.

Thank you in advance.

Reply With Quote
 
  #2 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary

That is true, it should be cancelled if not filled on the bar in question.

BUT, here is a dumb question...

Are you sure that CanGoLong and the other conditions are still not true? You might want to debug it using the Print statement, just to make sure the condition is really false.

Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Ocean City MD/USA
 
Futures Experience: Beginner
Platform: OEC
Favorite Futures: ES
 
Posts: 5 since Jan 2013
Thanks: 0 given, 0 received



kevinkdog View Post
That is true, it should be cancelled if not filled on the bar in question.

BUT, here is a dumb question...

Are you sure that CanGoLong and the other conditions are still not true? You might want to debug it using the Print statement, just to make sure the condition is really false.

Yes, when I send order I print message:
"Entry Long/Short"

When position is flat, I print message:
" --- "

When MarketPosition <> 0, I print message:
"Try to exit"

So in the logs I see next situation:

Entry Long/Short
---
---
---
---
Try to exit



Reply With Quote
 
  #4 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary

What about TimeCondition and CanGoLong?

Try this before your code shown:

var: bl (" ");

print (date,bl,time,bl,Marketposition,bl,TimeCondition,bl,CanGoLong,bl,CangoShort);


and compare that to when the order is placed, and when it should be cancelled.

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Ocean City MD/USA
 
Futures Experience: Beginner
Platform: OEC
Favorite Futures: ES
 
Posts: 5 since Jan 2013
Thanks: 0 given, 0 received


kevinkdog View Post
What about TimeCondition and CanGoLong?

Try this before your code shown:

var: bl (" ");

print (date,bl,time,bl,Marketposition,bl,TimeCondition,bl,CanGoLong,bl,CangoShort);


and compare that to when the order is placed, and when it should be cancelled.

Ok, did it. Log is the next:

13:59:09.000;Entry Long at high + 2 ticks = 879,499987792969

13:59:09.000; 1130116 1359 0 1 True False

14:37:50.000; 1130116 1437 0 1 False False

15:10:11.000; 1130116 1509 0 1 False False

15:39:48.000; 1130116 1539 0 1 False False

16:13:42.000; 1130116 1613 1 1 False False

16:29:58.000; 1130116 1629 1 1 False False

16:31:04.000; 1130116 1631 1 1 False False

16:32:47.000; 1130116 1632 1 1 False False

Time in bold - it is when Market position is 0 and entry conditions is False. After that time we can see that MarketPosition is 1


Last edited by alexfdv; January 16th, 2013 at 05:14 PM.
Reply With Quote
 
  #6 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary

It looks like you are using a non-time based bar type. MAYBE that has something to do with it.

I looked on Tradestation forum, and found this (which confirms your thinking):

> What is the lifespan of the stop order? If I do not issue it on each bar, will it then cease to exist?

You need to issue built-in stop orders on each bar to provide entry bar protection ( to allow exits on the same bar as entry ), even if you are not in a position, or they will be cancelled the next bar after your strategy stops issuing them.




So, the way I see it, your order should have been cancelled when "CANGOLONG" turns to false.

If I find out anymore, I will post it. You might also try posting this on TS forum.

Sorry I could not fix this issue for you.

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Ocean City MD/USA
 
Futures Experience: Beginner
Platform: OEC
Favorite Futures: ES
 
Posts: 5 since Jan 2013
Thanks: 0 given, 0 received


kevinkdog View Post
It looks like you are using a non-time based bar type. MAYBE that has something to do with it.

I looked on Tradestation forum, and found this (which confirms your thinking):

> What is the lifespan of the stop order? If I do not issue it on each bar, will it then cease to exist?

You need to issue built-in stop orders on each bar to provide entry bar protection ( to allow exits on the same bar as entry ), even if you are not in a position, or they will be cancelled the next bar after your strategy stops issuing them.




So, the way I see it, your order should have been cancelled when "CANGOLONG" turns to false.

If I find out anymore, I will post it. You might also try posting this on TS forum.

Sorry I could not fix this issue for you.

Thank you for help I will continue looking for the solution...

Reply With Quote

Reply



futures io > > > > Entry stop order stays active? EasyLanguage

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
re coding for entry/exits in easylanguage baz111 EasyLanguage Programming 1 December 28th, 2011 07:17 AM
Quicker Order Entry RambleDog NinjaTrader 6 August 1st, 2011 02:59 AM
"Stop If Bid" command for entry's and stop loss arjfca EasyLanguage Programming 4 October 7th, 2010 06:05 PM
3 bar high/low entry maintain active order until 3 bar high/low in opposite direction mrticks NinjaTrader Programming 8 November 13th, 2009 08:44 PM


All times are GMT -4. The time now is 01:00 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-18 in 0.12 seconds with 19 queries on phoenix via your IP 54.196.201.241