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

Hybrid Custom BarType

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

    Hybrid Custom BarType

    I've done a lot of NT 6.5 programming but am running into a challenge that I haven't been able to solve. I am trying to create a hybrid bar that consists of time, volume, and the open to close range. For example, I want to set the time to 1 minute, open to close range of the bar to 4 ticks, and the volume to 400v. This combines the value of all 3 types of bars. A new bar will be started when either of those parameters is met. this prevents huge bars when you are using 1 minute or 400v charts. However, it also prevents a single bar taking forever to close when you are using 400v or 4 tick range bars or 4 tick renko bars. My belief is that by combining all 3 factors, you have a more accurate representation of volatility than either of the conventional bars provide.

    Any thoughts on the value of this type of bar and also is there anyone interested in helping me code this as a custom bar type?

    Mike Winfrey

    #2
    Hi Mike Winfrey,

    Sounds like quite the project! You may want to consider looking at the default loaded HiekenAshi indicator in 6.5 at "Tools>Edit NinjaScript>Indicators".

    Mostly unsupported stuff, but it may lend some ideas.
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks Tim...I'll take a look.

      Comment


        #4
        I know custom bartypes aren't supported. However, I'm wondering if you can offer one minor bit of information. In indicators, I use Print() to display messages in the output window. Print() within a cusom bartype isn't found within the current context. So, my question is, how can I print to the output screen from within a custom bartype?

        Thanks,
        Mike

        Comment


          #5
          Hi Mike Winfrey,

          Unfortunately, I am unable to say how Print() would/should react within a custom bar type.
          TimNinjaTrader Customer Service

          Comment


            #6
            oh well...just thought i'd ask.

            Comment


              #7
              Originally posted by NinjaTrader_Tim View Post
              Hi Mike Winfrey,

              Unfortunately, I am unable to say how Print() would/should react within a custom bar type.
              does this mean that it is possible to get information into the output window from custom bar type code but you are not allowed to explain how ?
              All I (we) want is to readout the value of a variable too verify the custom code.

              Is there someone who knows how to get information from custom-bar-type code to the output window ? Mike, did you resolve the issue ?

              Comment


                #8
                What we are saying is that custom bar code is outside the scope of what we can support and would not be able to comment on behavior of it. Any endeavor down this road is something you will have to take on on your own. Please feel free to ask other members who may have already done it as you have already done so though.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  The only way to debug a custom bar type is to connect to NT via Visual Studio while in debug mode. By doing this you can see the variables states and values.
                  mrlogik
                  NinjaTrader Ecosystem Vendor - Purelogik Trading

                  Comment


                    #10
                    Originally posted by Mike Winfrey View Post
                    I know custom bartypes aren't supported. However, I'm wondering if you can offer one minor bit of information. In indicators, I use Print() to display messages in the output window. Print() within a cusom bartype isn't found within the current context. So, my question is, how can I print to the output screen from within a custom bartype?

                    Thanks,
                    Mike
                    Hi Mike,

                    Like MrLogic, i have also created a couple of unique bar chart types. Print() is not available for chart types.

                    It Sucks!!! I have been requesting this function for years.

                    You could try moving the chart file to say the indicator or strategy folders and try it there???

                    Might work...


                    I do all my type file editing inside NT by creating an error in the file with visual studio.

                    Then, compile any indicator and NT will find the error in the type file. Double click error to open type file inside NT's editor.



                    RJay
                    RJay
                    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Haiasi, 04-25-2024, 06:53 PM
                    2 responses
                    17 views
                    0 likes
                    Last Post Massinisa  
                    Started by Creamers, Today, 05:32 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post Creamers  
                    Started by Segwin, 05-07-2018, 02:15 PM
                    12 responses
                    1,786 views
                    0 likes
                    Last Post Leafcutter  
                    Started by poplagelu, Today, 05:00 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post poplagelu  
                    Started by fx.practic, 10-15-2013, 12:53 AM
                    5 responses
                    5,408 views
                    0 likes
                    Last Post Bidder
                    by Bidder
                     
                    Working...
                    X