Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add new instrument to Instrument Manager through code

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

    Add new instrument to Instrument Manager through code

    I am backtesting a portfolio from a file of signals.

    The signals for several hundred instruments are in a file that is read into NT. NT identifies the unique instruments and then adds them, i.e. this.Add(WXYZ), in the Initialize() method.

    If the instrument is not already in Instrument Manager, I get ...

    The strategy 'MyStrategy' has called the Add() method with an invalid instrument. Either 'WXYZ does not exist in the Instrument Manager or the specified exchange has not been configured.
    If possible, I would like to handle this in the code by adding the instrument and moving on...

    Can this be done?

    #2
    Hello AnotherTrader,

    Thank you for your post.

    Unfortunately, there are no supported methods or functions to achieve this in NinjaScript. And I am unaware of any unsupported methods as well.

    Comment

    Latest Posts

    Collapse

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