Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Brandon H.NinjaTrader Customer Service

    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.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Thank you:-)

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by 00nevest, Today, 02:27 PM
          0 responses
          0 views
          0 likes
          Last Post 00nevest  
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Started by Fitspressorest, Today, 01:38 PM
          0 responses
          2 views
          0 likes
          Last Post Fitspressorest  
          Started by Jonker, Today, 01:19 PM
          0 responses
          2 views
          0 likes
          Last Post Jonker
          by Jonker
           
          Started by futtrader, Today, 01:16 PM
          0 responses
          9 views
          0 likes
          Last Post futtrader  
          Working...
          X