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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    50 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X