Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing NT position information from outside NT

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

    Accessing NT position information from outside NT

    Hi,

    I'm trying to write a plug-in that would allow my client to access some of his positions from outside NT. Essentially I'm looking for a kill-switch that would close all positions and cancel all working/pending orders, but need to do it from an independent UI. The client may be satisfied with having this UI available from within NT, however his requirements are to have a separate pop-up that would allow for this kill-switch.

    How can I make this happen (generally speaking)?

    thanks!

    #2
    Welcome to our forums HappyDev, you can take a look at the functions our AT interface would offer here - http://www.ninjatrader.com/support/h...ed_trading.htm

    Comment


      #3
      Bertrand,

      Thanks for the information. I imagine there is no problem using the DLL functions from within a Visual Studio.NET application, correct?

      thanks!

      Originally posted by NinjaTrader_Bertrand View Post
      Welcome to our forums HappyDev, you can take a look at the functions our AT interface would offer here - http://www.ninjatrader.com/support/h...ed_trading.htm

      http://www.ninjatrader.com/support/h...parameters.htm

      Comment


        #4
        Though not officially supported that should work - other customers for example have also found success adding a reference to the NinjaTrader Client dll in their C# project.

        Comment


          #5
          Bertrand,

          Thanks for the information. I do have another question regarding the DLL functions. I need to be aware of the account status. For example one requirement is to exit all trades when a certain number of PIPs/Ticks are made, therefore I'll need access to the unrealizedPnL.

          Currently in NinjaScript I can use a call like this:

          Position.GetProfitLoss(Close[0], PerformanceUnit.Currency)

          but how can I query NT for this information via the DLL interface?

          thanks!



          Originally posted by NinjaTrader_Bertrand View Post
          Though not officially supported that should work - other customers for example have also found success adding a reference to the NinjaTrader Client dll in their C# project.

          Comment


            #6
            There's unfortunately only a RealizedPnL function on the account level accessible here, you would need to monitor the specific open position PnL in your custom code (you can access the fill price for your order id though).

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            569 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X