Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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 Nicholewatkinsi, Today, 10:53 PM
          0 responses
          6 views
          0 likes
          Last Post Nicholewatkinsi  
          Started by dward123, 01-02-2024, 09:59 PM
          4 responses
          175 views
          0 likes
          Last Post Lancer
          by Lancer
           
          Started by ETFVoyageur, Today, 04:00 PM
          2 responses
          19 views
          0 likes
          Last Post ETFVoyageur  
          Started by AaronKTradingForum, Today, 03:44 PM
          1 response
          14 views
          0 likes
          Last Post AaronKTradingForum  
          Started by Felix Reichert, 04-26-2024, 02:12 PM
          11 responses
          80 views
          0 likes
          Last Post Felix Reichert  
          Working...
          X