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 NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          61 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X