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 mattbsea, Today, 05:44 PM
          0 responses
          3 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          31 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          2 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Started by WHICKED, Today, 12:45 PM
          2 responses
          20 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Working...
          X