Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninja script context awerness

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

    Ninja script context awerness

    Hello,
    I want to add an additional time frame to my script based on the current context (time frame) it is called.
    So for example , if the script is called from a 10 min context I would like to add a 30 min time frame , if it is called from a 5 min context I would like to add a 15 min time frame.
    In order to this I need to have some indication on what is the main time frame or context the script was invoked., e.g 5 min, 10 min etc.
    Is there some kine of variable holding this information ?
    thanks

    #2
    Hi Leope, this would be given by BarsPeriod - https://www.ninjatrader.com/support/...barsperiod.htm

    However it could not be accessed in Initialize() where you would need to do your Add() calls.

    Best would be therefore to have for example a user input where the values needed are fed into the script.

    Comment


      #3
      Thanks a lot for the quick accurate and great reply !
      As usual your support is incredible !
      Thanks !!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      43 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      26 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      163 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      158 views
      2 likes
      Last Post CaptainJack  
      Working...
      X