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

How to Discover/Display NinjaScript Strategy ID?

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

    How to Discover/Display NinjaScript Strategy ID?

    I'm running NinjaTrader 8.0.22.1 64-bit with several instances of a NinjaScript strategy via the Control Center Strategies tab. When I enable a strategy instance NinjaTrader assigns a "Strategy ID" to it; for example, when I enabled a strategy yesterday NinjaTrader wrote the following line to the Log file:

    2020-06-07 20:10:11:024|1|4|Enabling NinjaScript strategy 'MyStr/203040885' : On starting a real-time strategy - StartBehavior=AdoptAccountPosition EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=By strategy position ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=False SetOrderQuantityBy=Strategy ConnectionLossHandling=Keep running DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=True CancelExitsOnStrategyDisable=True Calculate=On each tick IsUnmanaged=True MaxRestarts=4 in 5 minutes

    The portion of this line that reads "203040885" is what I'm calling the Strategy ID.

    Q1. For a strategy instance that's listed on the Control Center Strategies tab, I'd like to be able to discover its Strategy ID. Is this possible and, if yes, then how?

    Q2. I'd like to be able to display the Strategy ID in a column on the Strategies tab for each listed strategy. Is this possible and, if yes, then how? If no, then might the NinjaTrader developers consider adding this as an enhancement?

    Thank you very much in advance for any assistance/response you might provide.

    #2
    Hello NtFan,

    Thanks for your question.

    You can print the Id property of a strategy to see the Strategy ID. I.E. Print(Id); This is not documented, but can be found using intellisense/intelliprompt.

    Intelliprompt - https://ninjatrader.com/support/help...elliprompt.htm

    For viewing the Strategy ID in a column on the Control Center, there is not any selection to add this field out of box, and we could not suggest a way to add your own column with this ID. We do have a feature request tracking interest behind making the Strategy ID viewable from other parts of the platform and I have noted your interest for the Strategies tab.

    The ticket ID is SFT-429. This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.

    Feature Request Disclaimer

    We receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing.

    When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number will be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm


    We look forward to assisting.

    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Skifree, Today, 03:41 AM
    1 response
    2 views
    0 likes
    Last Post Skifree
    by Skifree
     
    Started by usazencort, Today, 01:16 AM
    0 responses
    1 view
    0 likes
    Last Post usazencort  
    Started by kaywai, 09-01-2023, 08:44 PM
    5 responses
    603 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    6 responses
    23 views
    0 likes
    Last Post xiinteractive  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    23 views
    0 likes
    Last Post Pattontje  
    Working...
    X