Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check validity of InstrumentName/Access Strategy Name

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

    Check validity of InstrumentName/Access Strategy Name

    Hi Ninja team,

    In NT7 is there a way to check the validity of an instrument name? For example, if an indicator or strategy is expecting user input of an instrument for a second data series?

    Second, is there a way to programatically access the name of a strategy from within that strategy? For example;

    if (something happens)
    {
    PrintWithTimeStamp(MyStrategyName+" halted due to P&L rules");
    }

    Thanks!

    #2
    Hi MXASJ, are you referring to checking if an instrument with this name exists in the database? This is unfortunately not possible.

    For your second request, I believe you could set the Name to a custom string in the Initialize() and then use this to Print it to the output window.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    244 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    157 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    165 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    249 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    200 views
    0 likes
    Last Post CarlTrading  
    Working...
    X