Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SubmitOrderUnamaged

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

    SubmitOrderUnamaged

    Hi,
    I try to transform code from NT7 to NT8. And I receive this error message: The name "SubmitOrderUnmanaged" does not exist in the current context

    public void TB_buy_market()
    {
    entryOrder = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Market, 1, 0, 0, "", "Long entry");
    NinjaTrader.Code.Output.Process(entryOrder.ToStrin g(), PrintTo.OutputTab1);

    }

    I searched on internet, but without success.
    Best regards
    Tom​

    #2
    Hello Tom,

    Thanks for your post and welcome to the NinjaTrader Forums!

    SubmitOrderUnmanaged() is a documented NinjaScript method in NinjaTrader 8.

    SubmitOrderUnmanaged(): https://ninjatrader.com/support/help...runmanaged.htm

    To clarify are you creating a NinjaScript strategy script?

    It could be that you are missing a Using statement in your script which is causing the error.

    Please share the .cs file of the script so we may investigate this matter further.

    NinjaTrader strategy files could be found in the Documents\NinjaTrader 8\bin\Custom\Strategies folder.

    We look forward to assisting further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi,
      yes I did strategie that works under NT7 and I try to translate it to NT8 .
      In attachement is version for NT7 and for NT8.
      Tom 211210_TB_kontrola.cs 240314_NT8_TB_kontrola.cs

      Comment


        #4
        Hello Tom,

        Thanks for your notes.

        The namespace in the NinjaTrader 8 script you shared is incorred and the partial class is also incorrect.

        namespace NinjaTrader.Strategy should be changed to the code below.

        namespace NinjaTrader.NinjaScript.Strategies

        The "partial class Strategy" should include the name of the script. For example, see below.

        partial class Kontrola : Strategy

        You could view the SampleMACrossover strategy that comes with NinjaTrader 8 to get an idea of how a NinjaScript strategy is structured. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleMACrossover file.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Thank you:-)

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          89 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          135 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          119 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          69 views
          0 likes
          Last Post PaulMohn  
          Working...
          X