Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access to NinjaTrader built-in functions from classes

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

    Access to NinjaTrader built-in functions from classes

    Is there any way through namespace constructs to access the built-in functions from my own class within a strategy? In other words, if you say "SubmitOrder(..." from within a function within the "Strategy" namespace it works just fine. But if you define a class and it has a method that calls "SubmitOrder(..." it gives an error. So then I tried the following:

    public class myOrderHandling: Strategy{
    public void enter(double limit){
    SubmitOrder(0, OrderAction.Buy, OrderType.Limit, 1, limit, 0, "", "1st entry");
    }
    }

    And this compiled. What I did was to inherit from "Strategy" in order to access "SubmitOrder." Will this work?

    #2
    tradetree, while it might be work for you, this inheritance is unfortunately not supported.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 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
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X