Easylanguage OCO orders - EasyLanguage Programming | futures io social day trading
futures io futures trading


Easylanguage OCO orders
Updated: Views / Replies:12,663 / 20
Created: by chippy 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
 

Easylanguage OCO orders

  #11 (permalink)
Elite Member
London, England
 
Futures Experience: Intermediate
Platform: MC, TS, NT
Broker/Data: TradeStation
Favorite Futures: ES
 
Posts: 41 since Oct 2009
Thanks: 12 given, 18 received


RM99 View Post
In fairness, if you lose connection, even manually using the OCO from the matrix, the order(s) that are on the tradeserver still don't function properly. That is to say, if you enter and have a simple bracket placed out on the tradeserver, and you lose connection, whichever exit is triggered first, there's no way for the tradeserver to receive a cancellation order for the other end of the bracket.

Well, again, this is where TS actually scores well compared to most trade platforms, and this seems to be a much overlooked issue: with TS your OCO is held on their server and is NOT dependent on your connection being maintained. The same applies if you send a .placeorder from your strategy.

Reply With Quote
 
  #12 (permalink)
Elite Member
London, England
 
Futures Experience: Intermediate
Platform: MC, TS, NT
Broker/Data: TradeStation
Favorite Futures: ES
 
Posts: 41 since Oct 2009
Thanks: 12 given, 18 received

I was going to say, that it isn't all exactly perfect because I sometimes get severe slippage on ES using TradeStations OCO orders and guess what it happened just now. How about 10 ticks of slippage?! 10 mins after the open I was short with a stop around the open and in profit and then I am looking at a matix with the price 10 ticks above my stop. My position was only closed after pressing the cancel all. Just 1 contract. My conclusion: TS servers are not up to the job and I need to change broker asap.

Reply With Quote
 
  #13 (permalink)
Fortitudo et Honor
Austin, TX
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Futures
 
Posts: 882 since Mar 2011
Thanks: 128 given, 703 received



SPTrading View Post
I was going to say, that it isn't all exactly perfect because I sometimes get severe slippage on ES using TradeStations OCO orders and guess what it happened just now. How about 10 ticks of slippage?! 10 mins after the open I was short with a stop around the open and in profit and then I am looking at a matix with the price 10 ticks above my stop. My position was only closed after pressing the cancel all. Just 1 contract. My conclusion: TS servers are not up to the job and I need to change broker asap.

I've complained that the stop order convention isn't practical.

"Stop" in tradestation means at or better for entries and at or worse for exits.

I don't know why it's so difficult for them to craft a limit order stop feature. As it is, I craft my own custom stops using limit orders and therefore, I'm guaranteed no more than a tick or 2 of slippage.

I simply use current price +/- the current bid/ask with a pricegap (input variable) to ensure the order doesn't get jumped in high velocity conditions.

I'm not nearly as concerned about partial fill issues with exits on my "stops" because my trails are always on the leeward side. So if price runs into my stop and fills completely, that's what it's supposed to do. If price runs into my stop and partially fills and continues on, then I continue making profit (just not the full positionsize).

Reply With Quote
 
  #14 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received

 
Thread Moved


Moved to EasyLanguage Programming



When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading



Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #15 (permalink)
Elite Member
Singapore
 
Futures Experience: Beginner
Platform: Multicharts, R
Favorite Futures: EUR / USD
 
Posts: 185 since Feb 2010
Thanks: 106 given, 98 received

straddle orders

Has anyone tried to program straddle orders, where you place into the market a buy and sell at the same time, cancelling one when the other order gets filled?

This is typically used for news trading.

Edit - I've found an answer from RM99 on another thread https://futures.io/tradestation-multicharts-easylanguage-programming/12263-intra...ned-time.html#post136668

Reply With Quote
 
  #16 (permalink)
Elite Member
Singapore
 
Futures Experience: Beginner
Platform: Multicharts, R
Favorite Futures: EUR / USD
 
Posts: 185 since Feb 2010
Thanks: 106 given, 98 received


RM99 View Post
Keep in mind that when you have more than one pending order (like a typical bracket) that it violates TS's 15 second rule, so your orders will not be maintained on the tradeserver in the event of a loss of connection. if you use a single trailing stop, without IOG=True, then your trailing stop will only update every 15 seconds by default (unless of course you turn on IOG and then it will be tick/tick). Any exit code, with IOG on violates the 15 second rule.

Does anyone know whether MC has a "15 second rule" like TS?

Reply With Quote
 
  #17 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received


diverdan View Post
Does anyone know whether MC has a "15 second rule" like TS?

It does not.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #18 (permalink)
Fortitudo et Honor
Austin, TX
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Futures
 
Posts: 882 since Mar 2011
Thanks: 128 given, 703 received


Big Mike View Post
It does not.

Mike

Yes, but to be fair and thorough, MC is not a broker. It's up to the broker as to their limits/requirements as to how often you can send an order.

The reason that TS has the 15 second rule is to prevent MASSIVE amounts of orders being generated and cancelled (all with an order confirmation number and a cancellation confirmation) with respect to strategies that update on a tick/tick basis.

Now, having said that, I think TS is one of the few brokers that will actually maintain your orders natively at the their tradeserver.

What would be an IMPROVEMENT is rather than have a 15 second rule (and violation default) would be if TS had a happy medium, where the native/permanently held stop is only updated every 15 seconds.

As it stands now, if you have a strategy that either A) has more than one static exit stop, the strategy toggles back and forth and this violtes the 15 second rule or B) has a trailing stop or a stop that moves/adjusts tick/tick.....

Then TS violates you and your orders are simply not maintained on the tradesever. In essence, you are now flying blind in the event you lose workstation connectivity.

What would be an awesome adaptation, is for TS to update the stop location every 15 seconds (just the location information) and in the event that you lose connection, use the last update. That way, you could continue to operate tick/tick but in the loss of a connection, you at least have some stop on the server.

Another idea would be to simply establish a worse case scenario ("doomsday") stop and in the event you lose connection, that stop would be in effect.

Either way, it doesn't seem to me that TS is very concerned about any of this. I think TS is so large and has so many subscribers who are perfectly content with very basic operation, that they view these advanced features as more trouble than they're worth. In essence, TS isn't really concerned about these types of modifications or upgrades, because they have 10x as many people who will continue to use TS, without them.

"A dumb man never learns. A smart man learns from his own failure and success. But a wise man learns from the failure and success of others."
Reply With Quote
 
  #19 (permalink)
Trading Apprentice
New Orleans, Louisiana, USA
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: ES
 
Posts: 1 since Oct 2011
Thanks: 1 given, 0 received


RM99 View Post
Just generally speaking?

It's "inherent."

For example...
/////////////////////////////////////////////////////////////////////////////////////////////
Inputs: StopProfit(100), StopLoss(100);

If MarketPosition <> 0 then begin

setstopcontract;
setprofittarget(StopProfit);
setstopcontract;
setstoploss(StopLoss);

end;
////////////////////////////////////////////////////////////////////////////////////////////

In the above example, setstopcontract (or setstopshare) sets the following code on a "per contract" or "per share" basis. If you want to set based on the overall position basis use "setstopposition;"

You can also combine profit targets with trailing stops (there's a variety on TS).

The OSO (supplemental) order is inherent as well. You simply code for your entry and then use the if MP then.....statement to ensure you immediately enact a "supplemental" order to cover your exit.

Keep in mind that when you have more than one pending order (like a typical bracket) that it violates TS's 15 second rule, so your orders will not be maintained on the tradeserver in the event of a loss of connection. if you use a single trailing stop, without IOG=True, then your trailing stop will only update every 15 seconds by default (unless of course you turn on IOG and then it will be tick/tick). Any exit code, with IOG on violates the 15 second rule.

Hope this helps.


Does the above work in TS2000i? I'm just starting out and I get conflicting story's about OCO orders in EasyLanguage. I just want to use this for end of day testing. I'm trying to do something along the lines of "Close trade OCO: a) 3 point profit or b) MOC Friday"

Reply With Quote
 
  #20 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received



dcraw999 View Post
Does the above work in TS2000i? I'm just starting out and I get conflicting story's about OCO orders in EasyLanguage. I just want to use this for end of day testing. I'm trying to do something along the lines of "Close trade OCO: a) 3 point profit or b) MOC Friday"

To best of my knowledge, TradeStation does not have IntrabarOrderGeneration capabilities. But you should be able to run your test without that.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote

Reply



futures io > > > > > Easylanguage OCO orders

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server side synthetic orders (OCO, trailing stops) GentleTrader NinjaTrader 20 March 8th, 2014 10:40 PM
EasyLanguage, Mulitcharts and Limit Orders nismo EasyLanguage Programming 28 April 4th, 2013 06:47 AM
OCO orders from easylanguage? skan EasyLanguage Programming 2 August 13th, 2011 10:10 PM
Catching breakouts using OCO stop limit bracket orders for entries dennho Traders Hideout 4 October 1st, 2010 09:51 AM
OCO Entry Order from Strategy decs0057 NinjaTrader Programming 1 March 24th, 2010 03:48 PM


All times are GMT -4. The time now is 05:55 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-12 in 0.17 seconds with 19 queries on phoenix via your IP 54.167.44.32