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

Select/Add renko/custom time frame to strategy

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

    Select/Add renko/custom time frame to strategy

    Hi,

    Is it possible to select custom time frame from strategy parameter

    I tried

    [Description("longer timeframe chart to ensure correct direction")]
    [GridCategory("TimeFrame")]
    [Gui.Design.DisplayName("3. LongerPeriod")]
    [TypeConverter(typeof(ExpandableObjectConverter))]
    public Period LongerPeriod {
    get { return longerPeriod; }
    set { longerPeriod = value; }
    }

    this shows all properties of Period. This is confusing for user.

    Is it possible to use Type converter from dataseries selection (see screenshot)

    And how to add custom period to strategy
    Startegy has no accessable method Add( Period p ).
    Attached Files

    #2
    Hello Klaus Hengher,

    Using a Period type like this is unfortunately not supported. We support only hard coding additional series with exactly the interval and type you would like to add. Some users report success with user defined inputs for added series. This would be an integer for the interval value and PeriodType would need to be hard coded.

    For Renko, there is dedicated method:
    AddRenko()

    Adding more flexibility for custom bar types is on our list for future consideration.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan:

      SOme improvement on this issue? I have a Custom bar type and would like to Add it to an strategy as second timeframe.

      Is there any way to do it?

      Comment


        #4
        Hello pakrichard,

        Using a dynamic Add() method is still unsupported, but if you have custom bar type that you would like to use in the Add() method you would call the Custom type that it is using for example:

        Code:
        Add(PeriodType.Custom0, 1);
        JCNinjaTrader Customer Service

        Comment


          #5
          It is possible, see screenshot
          Attached Files

          Comment


            #6
            Originally posted by Klaus Hengher View Post
            It is possible, see screenshot
            Hi Klaus
            How did you get that....

            Comment


              #7
              I'am developer for NinjaTrader and needed this undocumented feature in some projects.
              Send me PM if your are interested in the code

              Comment


                #8
                Originally posted by Klaus Hengher View Post
                I'am developer for NinjaTrader and needed this undocumented feature in some projects.
                Send me PM if your are interested in the code
                Hi Klaus,

                Have you ever tried the UniRenk bar type that was posted in this Forum last year?

                If you have, did you notice when starting MarketReplay, the chart alway drops a few ticks before midnight if session template is set to <Use instrument defaults>? However, if set to <Default 24/7> every tick is captured. Either case, the chart is messed up when MarketReplay starts playing back.

                I read the code so many times and cannot figure out what caused this. And this issues, of course, is unsupported.

                If you get a chance, can you please take a look?

                Regards,

                Comment


                  #9
                  Originally posted by NinjaTrader_JC View Post
                  Hello pakrichard,

                  Using a dynamic Add() method is still unsupported, but if you have custom bar type that you would like to use in the Add() method you would call the Custom type that it is using for example:

                  Code:
                  Add(PeriodType.Custom0, 1);
                  Would that work for a custom Renko, too?

                  Comment


                    #10
                    Hello AnotherTrader,

                    Thank you for your post.

                    It will work but you need to call the correct number for the custom bar type. Add(PeriodType.Custom0, 1); uses the PeriodType or Custom0, yours may be Custom1 or even Custom9. If the custom bar type is unprotected you can view it's code by going to the following directory on your PC and opening the .cs file in a notepad: (My) Documents\NinjaTrader 7\bin\Custom\Type

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by tkaboris, Today, 08:01 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post tkaboris  
                    Started by BarzTrading, Today, 07:25 AM
                    1 response
                    10 views
                    1 like
                    Last Post NinjaTrader_Clayton  
                    Started by EB Worx, 04-04-2023, 02:34 AM
                    7 responses
                    161 views
                    0 likes
                    Last Post VFI26
                    by VFI26
                     
                    Started by Mizzouman1, Today, 07:35 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Started by Radano, 06-10-2021, 01:40 AM
                    20 responses
                    616 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Working...
                    X