Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

get current periodtype and period

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

    get current periodtype and period

    Hello,

    I need to ask you something..
    I would like to create new strategy and in the Initialize() add another chart but with the same timeframe as the default chart..

    you know what I mean...
    you will run my strategy on EURUSD Minute-30 timeframe.
    And my strategy have to count some data from GBPUSD chart with the same timeframe as the default, so in this example it means Minute-30 timeframe.

    So how can I get PeriodType instance of the current default timeframe where the stratedy is running? And also the "period" integer?

    Thank you

    #2
    Hello Zooinek,

    Thank you for your post.

    Unfortunately you will have to hard code this. There is no way to dynamically change the period or interval type used. The properties you would need to use can't be accessed from within the Initialize() method.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 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
    574 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X