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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    169 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    326 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    251 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    353 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    180 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X