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

Custom PeriodType

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

    Custom PeriodType

    I have a custom PeriodType called Renko. I want to refer to it in a strategy just as I do other PeriodTypes that come with NT. However, PeriodType.Renko doesn't exist. So, how do I refer to a custom PeriodType?

    Thanks,
    Mike

    #2
    Mike, sorry this is unfortunately not supported currently - with NinjaTrader 7 Renko bars are supported then by default - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

    You can try working with, it would compile on mine...

    Add(PeriodType.Renko, 5);
    Last edited by NinjaTrader_Bertrand; 10-10-2009, 12:21 AM.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by Mike Winfrey View Post
      I have a custom PeriodType called Renko. I want to refer to it in a strategy just as I do other PeriodTypes that come with NT. However, PeriodType.Renko doesn't exist. So, how do I refer to a custom PeriodType?

      Thanks,
      Mike
      Hi Mike,

      Try this,

      Locate the cs file for the custom Renko bars.

      Open it in an editor.

      Search for PeriodType.

      you will find something like this...

      public RenkoBarsType() : base(PeriodType.Final4)

      When programming your strategy, Don't type in "Renko".

      Type in what is defined after PeriodType.

      In this case its "Final4".

      If it does say Renko in that field, You will need to create a unique bar type that uses a name other than Renko.

      Let me know if this works for you.

      Good Luck,

      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        Thanks to both of you for your help. I was using a Renko bartype that was an assembly as opposed to a .cs file that I could actually look at. So, I am using EdsRenko...I like that one because it has wicks and sticks. Cool... Also I can do exactly as as RJay says and it works.

        thanks again to both of you, RJay and Bertrand.

        Really looking forward to Version 7.

        Mike

        Comment


          #5
          Originally posted by RJay View Post
          Hi Mike,

          Try this,

          Locate the cs file for the custom Renko bars.

          Open it in an editor.

          Search for PeriodType.

          you will find something like this...

          public RenkoBarsType() : base(PeriodType.Final4)

          When programming your strategy, Don't type in "Renko".

          Type in what is defined after PeriodType.

          In this case its "Final4".

          If it does say Renko in that field, You will need to create a unique bar type that uses a name other than Renko.

          Let me know if this works for you.

          Good Luck,

          RJay
          I have the same problem with the Renko Wicks. How could add it into the strategy in the Initialize section of the code? I tried to find a line of code the same to this one public RenkoBarsType() : base(PeriodType.Final4) but I couldn't find it. Only this one ----public class RenkoWicks : BarsType. Please help..

          Thanks.

          Comment


            #6
            Originally posted by edward_bell View Post
            I have the same problem with the Renko Wicks. How could add it into the strategy in the Initialize section of the code? I tried to find a line of code the same to this one public RenkoBarsType() : base(PeriodType.Final4) but I couldn't find it. Only this one ----public class RenkoWicks : BarsType. Please help..

            Thanks.
            Hi Edward,

            To find the period type for a specific chart, right click on that chart and select data series.

            Right click in the data series pane and in the popup description will be the period type id for that chart.

            RJay
            RJay
            NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

            Comment


              #7
              I mean in the strategy Initialize () section of the code. Like we will add a periodtype.minute of 15 minutes as a secondary.

              Comment


                #8
                Have you tried via Add(PeriodType.Final4, 5) for example?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by edward_bell View Post
                  I mean in the strategy Initialize () section of the code. Like we will add a periodtype.minute of 15 minutes as a secondary.
                  Hi Edward,

                  I copy/pasted this from the "Help" section and made a few small changes.

                  ---------------------------------------------------------------------------------------------------------

                  protected override void Initialize()
                  {
                  // Add a 15 minute Bars object which is added to the BarArray
                  // which will take index 1 since the primary Bars object of the strategy
                  // will be index 0
                  Add(PeriodType.Minute, 15);
                  }

                  --------------------------------------------------------------------------------------------------------


                  RJay
                  RJay
                  NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                  Comment


                    #10
                    Originally posted by NinjaTrader_Bertrand View Post
                    Have you tried via Add(PeriodType.Final4, 5) for example?
                    PeriodType.Final4 what does it mean? Its a custom? I want to add the Renko Wicks that I have to the Initiatize() of the strategy.

                    Comment


                      #11
                      Edward, perhaps my understanding is incorrect, but I thought your custom type used the Final4 slot here in the types listing? For adding programmatically, you would need to use those generic collection fields instead of the displayed name (i.e. Renko Wicks). Do you have a link to the file perhaps so we could take a look in which collection slot it would be sorted?
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by RJay View Post
                        Hi Edward,

                        To find the period type for a specific chart, right click on that chart and select data series.

                        Right click in the data series pane and in the popup description will be the period type id for that chart.

                        RJay
                        Hi Edward,

                        Contact me directly if you like.

                        RJay
                        RJay
                        NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                        Comment


                          #13
                          I have a BarType program which is RenkoWicks. It displays well the renko wicks because I tried to use the built-in Renko indicator and it doesn't fit what I want on a renko bars. If we add a Renko in the Initialize() section is like this AddRenko("CL 03-13", 15, MarketDataType.Last); but now my question how about the RenkoWicks that is a custom BarType? How to add it in the Initialize() section of the code?

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by 00nevest, 04-27-2024, 02:27 PM
                          3 responses
                          27 views
                          0 likes
                          Last Post 00nevest  
                          Started by Newtrader101, Today, 07:36 AM
                          0 responses
                          1 view
                          0 likes
                          Last Post Newtrader101  
                          Started by 21laienoch, Today, 07:25 AM
                          0 responses
                          6 views
                          0 likes
                          Last Post 21laienoch  
                          Started by burtoninlondon, 04-28-2024, 12:38 AM
                          1 response
                          16 views
                          0 likes
                          Last Post burtoninlondon  
                          Started by MacDad, 02-25-2024, 11:48 PM
                          8 responses
                          175 views
                          0 likes
                          Last Post NinjaTrader_Erick  
                          Working...
                          X