![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Hi All,
As of this post, we have yet to document the new unmanaged order handling in strategies. This is a quick pointer. - In Initialize() set "Unmanaged" to a value of "True" - This will disable all internal order handling rules - You now "can and must" place orders using the new SubmitOrder() method, all other order entry methods will be ignored
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Nov 2007
Location: Michigan, USA
Posts: 116
Thanks: 1
Thanked 0 times in 0 posts
|
With unmanged order submission, what is the best way to modify an existing order? Say I want to change the limit price of an existing limit order.
Thanks. |
|
|
|
|
|
#3 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Please try the .ChangeOrder() method.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Nov 2007
Location: Michigan, USA
Posts: 116
Thanks: 1
Thanked 0 times in 0 posts
|
Ah, that makes sense. I looked for a ModifyOrder (that's what I call it in my code), never thought to look for ChangeOrder. Thanks Dierk.
|
|
|
|
|
|
#5 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Just another pointer, the familiar CancelOrder() method is also used for Unmanaged since unmanaged orders will not auto cancel/expire and will need to be done by your code when desired.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Nov 2007
Location: Michigan, USA
Posts: 116
Thanks: 1
Thanked 0 times in 0 posts
|
Thanks for the pointer Josh.
The unmanaged order submission methods (SubmitOrder() and ChangeOrder()) seem to working nicely. Good job. Also, thanks for removing the popup dialog at the end of a compile. Greatly appreciated. |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Jan 2009
Posts: 221
Thanks: 0
Thanked 0 times in 0 posts
|
Hi is there any special overload on SubmitOrder() for Market Orders?
So that you don't have to post anything for Limit/Stop Prices and "OCO" L0=SubmitOrder(0,OrderAction.Buy,OrderType.Market,1,100000,0,"OCO", "L0"); thanks, |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
No, any value put in I believe is just ignored. Just pass in zero's and empty string for OCO.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
"Unmanaged = true" gives an error in initialize. What is the correct spelling?
Regards, Chris Quote:
|
|
|
|
|
|
|
#10 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
It always helps saving time you and us if you provided error description as exact (!) as possible. Not sure what you mean by "gives an error". Compile error? Runtime error? else?
Anyway: I added this line of a code to a blank strategy compiled it and enabled it on a chart. Worked no problem. No compile nor runtime error. Code:
Unmanaged = true;
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#11 | |
|
Junior Member
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
I'm receiving compile error CS0103 (Unmanaged unknown), when I call it in the Initialize()-method. Do I have to manually add an include? Mine are
Code:
using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Data; using NinjaTrader.Indicator; using NinjaTrader.Gui.Chart; using NinjaTrader.Strategy; Christian Edit: Oh, I see this is the bug report thread for version 7, but I'm using 6.5.1000.14. Is it possible to use unmanaged code with this version? Quote:
Last edited by Chris_M; 10-25-2009 at 05:43 AM.
|
|
|
|
|
|
|
#12 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> possible to use unmanaged code with this version?
No
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#13 | |
|
Member
Join Date: Oct 2007
Location: Sydney
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Thanks. |
|
|
|
|
|
|
#14 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
The SetStopLoss/SetTrailStop/SetProfitTarget methods won't work when your strategy is in Unmanaged=true mode.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#15 | |
|
Member
Join Date: Oct 2007
Location: Sydney
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Would you also confirm about the converse in NT7B2 . Namely will SubmitOrder() or ChangeOrder()work when in the Unmanaged=false mode?
Last edited by Aussie2; 10-26-2009 at 05:52 AM.
|
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| oco order submission thru oif | Mindset | ATM Strategies (Discretionary Trading) | 13 | 09-29-2009 09:17 AM |
| NT7: New Unmanaged Order Submission | BillCh | Suggestions And Feedback | 1 | 06-26-2009 08:30 AM |
| stop and target order submission | mdm72 | Strategy Development | 3 | 02-26-2009 07:08 AM |
| Require market data for order submission / Why? | BCA | Connecting | 33 | 02-25-2009 09:29 AM |
| Order submission error in NT6b6 | nip | Automated Trading | 2 | 02-11-2007 09:13 AM |