NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 08-20-2012, 03:17 AM   #1
Camron
Junior Member
 
Join Date: Apr 2012
Posts: 16
Thanks: 0
Thanked 0 times in 0 posts
Default OCO order?

Hello my question is about a bracket OCO order. I want to set one order to cancel only after a certain condition is met on the other open order. For example if im trading Forex. I set buy and sell entry points at 60 and 30. I enter buy at 60 but dont want the other sell order to cancel until I reach price of 75. How would i go about setting this up? thanks in advance
Camron is offline  
Reply With Quote
Old 08-20-2012, 03:23 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Camron, you could set this up in unmanaged order submission approach, the SubmitOrder methods offer an inbuild OCO tag, however for your task you would then want to provide the OCO cancel logic in your code yourself so you can monitor price for your cancellation condition and then send the CancelOrder() for part of the bracket - http://www.ninjatrader.com/support/h...d_approach.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 08-20-2012, 11:46 AM   #3
Camron
Junior Member
 
Join Date: Apr 2012
Posts: 16
Thanks: 0
Thanked 0 times in 0 posts
Default

how to i go about setting up an unmanaged order? where do i go to do this? how do i set up the code, Is this a ninja script strategy?
Camron is offline  
Reply With Quote
Old 08-20-2012, 04:26 PM   #4
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,770
Thanks: 158
Thanked 562 times in 553 posts
Default

Hello,

Yes, you would set this up through your NinjaScript Strategy.

You can find more information on the unmanged order methods from the following link.

Getting Started with Unmanaged Order Methods

Please note that these order methods have been reserved for more experienced programmers as it does require to program your order handling rules:
NinjaTrader_Matthew is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OCO Order Romulan Version 7 Beta General Questions & Bug Reports 4 11-10-2010 05:27 AM
can you designate an OCO after you've placed an order crmcwi ATM Strategies (Discretionary Trading) 4 05-21-2010 08:37 AM
Is it possible to attach an OCO order pair to a limit order? clearpicks Automated Trading 1 09-17-2009 12:22 PM
OCO Entry Order Klaus Hengher Strategy Development 1 09-01-2009 07:20 AM
OCO order error cesas Automated Trading 58 06-26-2009 10:49 AM


All times are GMT -6. The time now is 02:59 PM.