Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check name of the primary instrument

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

    Check name of the primary instrument

    Is it possible to check the name of the primary instrument within the strategy script?

    I want to check the chart of the upper time frame for generating signals within the chart of the lower time frame.

    To do this I need to add an instrument of the upper time frame within Initialize().

    Because the primary instrument can vary the added instrument has to vary as well.
    Therefore I need to somehow check the name of the primary instrument
    for being able to add it in a higher time frame.

    Using "this" only comes up with the input parameters of the strategy, but not with the primary instrument. Therefor that isn't the way to do that.

    Thanks in advance for any tips.

    Stephan

    #2
    You have done very deep analisys, but its not so. You don't need to know the name.
    To add a new TF just: Add(PeriodType.... , X).
    If you stil need a name: Instrument.FullName.

    Comment


      #3
      Stephan123, please try Baurch's suggestion and let us know if you have any other questions. His answer is spot on.
      AustinNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      368 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X