Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Yearly Bars

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

    Yearly Bars

    I'm looking for a solution for Yearly Bars indicator which I can use as input series for another indicator.
    Is there a ready solution? Please advise who knows. Thanks.
    Igor

    #2
    Welcome to our forums Igor - could you please clarify a bit more for us what you're looking to do? You can right now create a so called MultiSeries chart in NT, which could add yearly bars as well and then you could specify this to be used as Input Series for your indicators.

    Comment


      #3
      Yearly Bars

      Bertrand,
      I'm an option trader, very aggressive one. I buy when the end of the world is coming. So, I need visualize market levels for particular instruments when extreme moves are done. So, using previous YearlyBars I want calculate and visualized ATR and StdDev fixed levels lines for the current year on daily charts. I want to use this YearlyBar Indicator as input serias in Bollinger Band, Keltner Channel like indicators.
      In the future I will like to have option expiration Monthly (not calendar month) bars Indicator as well.
      I would greatly appreciate your advise how I can achieve my task.
      Igor

      Comment


        #4
        Hello,

        You can first Add() the yearly bar to the Initialize() method of your code:

        Code:
        		protected override void Initialize()
        			{
        				Add(PeriodType.Year, 1);	
        			}
        With this added, you can now get any value from that bars series by using BarsArray[1]

        Code:
        			protected override void OnBarUpdate()
        			{
        
        				double yearADX = ADX(BarsArray[1], 14)[0];
        				
        			}
        I would suggest reading through the following link on multi-series indicators which covers a few key points on this type of script:

        MatthewNinjaTrader Product Management

        Comment


          #5
          I will. Thank you very much for your help.
          Igor

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          82 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          43 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          68 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          56 views
          0 likes
          Last Post CarlTrading  
          Working...
          X