Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enhance FILE API to include atm strategy status

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

    Enhance FILE API to include atm strategy status

    I've been using FILE API to open new positions with a named atm strategy for a couple years. I'm also able to close them completely and reverse with the position info files.
    I'm now interested in adding the ability to scale out partial positions via FILE API. Algo gets me in via API but I monitor positions for optimum exits.

    This works to scale out if I already know the exact strategy ID assigned at entry.

    Entry: PLACE;<ACCT-REDACTED>;NQ 09-24;SELL;3;MARKET;;;GTC;;;NQ-22;My-ATM-STRAGETY-ID

    Scale Out: PLACE;<ACCT-REDACTED>;NQ 09-24;BUY;1;MARKET;;;GTC;;;;My-ATM-STRAGETY-ID

    I occasionally enter multiple concurrent longs/shorts so I can't bake a static strategy ID into my entries. So i need to let Ninja assign unique ids for strategy-id.

    But there's no way to know via file api what they are named for open positions so I can target them in partial closes.

    If you were to add ATM Strategy position info similar to the general position info.txt I could do that.

    My locations for taking partials are different per trade. So can't bake a static number of ticks into TARGET1 in the ATM Strategy itself.

    Thanks.

    #2
    Hello defwoodfl,

    Thank you for your suggestion.

    Are you perhaps looking for strategyPosition?

    int StrategyPosition(string strategyId) - Gets the position for a strategy. Returns 0 for flat, negative value for short and positive value for long.




    If not, please use the link below to submit this request to our product team for consideration to implement in future releases:

    NinjaTrader Feature Request Form

    You can use this link for future feedback or features you'd like to see as well.

    Thank you again for your feedback on this item!

    Comment


      #3
      Gaby, I am looking for the info you suggested from the DLL API functions but since I can only use FILE API I'm asking for that same info to be presented via FILE API.

      Comment

      Latest Posts

      Collapse

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