Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Order Submission

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unmanaged Order Submission

    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
    RayNinjaTrader Customer Service

    #2
    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.

    Comment


      #3
      Please try the .ChangeOrder() method.

      Comment


        #4
        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.

        Comment


          #5
          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 P.NinjaTrader Customer Service

          Comment


            #6
            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.

            Comment


              #7
              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,

              Comment


                #8
                Originally posted by trend View Post
                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,
                No, any value put in I believe is just ignored. Just pass in zero's and empty string for OCO.
                RayNinjaTrader Customer Service

                Comment


                  #9
                  "Unmanaged = true" gives an error in initialize. What is the correct spelling?

                  Regards,
                  Chris

                  Originally posted by NinjaTrader_Ray View Post
                  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

                  Comment


                    #10
                    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;

                    Comment


                      #11
                      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;
                      Many thanks for your help,
                      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?


                      Originally posted by NinjaTrader_Dierk View Post
                      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;
                      Last edited by Chris_M; 10-25-2009, 05:43 AM.

                      Comment


                        #12
                        >> possible to use unmanaged code with this version?
                        No

                        Comment


                          #13
                          Unmanaged orders query

                          Originally posted by NinjaTrader_Ray View Post
                          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
                          Please advise with NT7B2 when Unmanaged=true and therfore internal order handling rules are disabled, whether the SetStopLoss() method is also disabled.

                          Thanks.

                          Comment


                            #14
                            The SetStopLoss/SetTrailStop/SetProfitTarget methods won't work when your strategy is in Unmanaged=true mode.

                            Comment


                              #15
                              Unmanaged=false mode

                              Originally posted by NinjaTrader_Dierk View Post
                              The SetStopLoss/SetTrailStop/SetProfitTarget methods won't work when your strategy is in Unmanaged=true mode.
                              Thanks for this Dierk,

                              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, 05:52 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              607 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              353 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              560 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              561 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X