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

Multiple Time Frame Labels

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

    Multiple Time Frame Labels

    Hello, I have multiple time frame label indicator from TOS, I want to achieve something similar in NinjaTrader.

    As you see, on the main chart in the middle, on the upper left there are 1 5 15 30 60 D W M Q Y in conditional backgrounds -

    red/pink, if respective timeframe's current live bar is forming red;
    green/light green, if respective timeframe's current live bar is forming green;
    gray - if respective timeframe's currrent live bar is forming as doji (last price = open)

    I need your help recreating this indicator on NinjaTrader.

    #2
    Hello UltraNIX,

    Thanks for the post.

    What about the indicator you pictured did you need help with specifically?

    You can read about using multiple timeframes and see some examples in the following link: https://ninjatrader.com/support/help...lightsub=multi

    For coloring bars you can use BarBrush https://ninjatrader.com/support/help...htsub=BarBrush

    You would otherwise need to look at the code for the existing indicator to get a better idea of what conditions you would need to form here.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse, the main idea is to display the color of current (live) bar from various additional data series.

      Like if Close[0] of 1 min > Open[0] of 1 min, then it's green, if Close [0] = Open[0], then it's gray, if Close[0] < Open[0] then it's red.

      However, there are various considerations. In order to reflect changes real time, I suppose Calculate OnEachTick or OnPriceChange should be used, right?

      Another consideration: if the primary data series on the chart is higher than, e.g. 1 minute, I still want 1 minute color to update correctly. It is applicable to all other timeframes. Lets say chart displays 60 min candles, and I still want correct 1, 5, 15, 30 min (i.e. lowe timeframes) colors to be displayed.

      Then it comes to display. How to place all those labels into upper left corner and have the conditional background of each label based on calculations I talked about previously?

      Comment


        #4
        Hello UltraNIX,

        Thanks for the post.

        However, there are various considerations. In order to reflect changes real time, I suppose Calculate OnEachTick or OnPriceChange should be used, right?
        Yes if you want to do something based on ticks or price changes you would need to use one of those modes. OnBarClose is reserved for simply calling the code once per bar.

        Another consideration: if the primary data series on the chart is higher than, e.g. 1 minute, I still want 1 minute color to update correctly. It is applicable to all other timeframes. Lets say chart displays 60 min candles, and I still want correct 1, 5, 15, 30 min (i.e. lowe timeframes) colors to be displayed.
        That would need to be accomplished in your logic. If you need to calculate something for a different period you could use the BarsInProgress to do that. How you determine what bars to paint would be delegated by the logic you use. Being that this exists in the other platform you can likely use that to gather ideas how to approach this in a similar way.

        Then it comes to display. How to place all those labels into upper left corner and have the conditional background of each label based on calculations I talked about previously?
        You could use OnRender to do that. The indicator SampleCustomRender shows how to custom render text, you could do that for each timeframe and position it where needed in the chart.


        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          UltraNIX Hello was wondering if you ever got the mult time frame bars figured out. I am looking for something to that exact also. If so could you please advise on where or how i can accomplish this. I am no coder but i can try. thanks

          Comment


            #6
            No, I was not able to figure this out, sadly.

            Comment


              #7
              we really need to try and get this figured out it would be a BIG help for me. I think it's crazy that they dont have these labels for NT when most other platforms i've seen have them. there are coders out there that can be paid to right the code for it and i'm thinking of doing it depending on how much it cost. i assume you may trade the STRAT. have you figured out an alternative method? i'm pretty diligent when it comes to trying to get things done. if you like maybe we can try to figure this out or maybe you really don't need them which is cool also. let me know either way. thanks for the reply.

              Comment


                #8
                Not sure if it's worth effort as I'm so busy right now, but if you come up with a solution, please share.

                Comment


                  #9
                  You guys still looking for a Strat Indicator? I am working on one right now. Just started it yesterday.


                  Click image for larger version

Name:	thestrat.jpg
Views:	294
Size:	152.4 KB
ID:	1172281
                  Intelligent Trader Inc.
                  NinjaTrader Ecosystem Vendor - Artificial Intelligence Based Indicators

                  Comment


                    #10
                    Originally posted by intelligenttrader View Post
                    You guys still looking for a Strat Indicator? I am working on one right now. Just started it yesterday.


                    Click image for larger version

Name:	thestrat.jpg
Views:	294
Size:	152.4 KB
ID:	1172281
                    Great! Whenever you are finished, please, share. This could end our suffering

                    Comment


                      #11
                      Ahhh this would be AWESOME! hopefully some type of labels that will/can tell us if we are green or red on each timeframe. Which i can see from the image looks like you have. You must be a a pretty smart guy or gal. Please update us once you've completed. Again thank you very much for your time. If I can assist in anyway just let me know. Although i know nothing about coding. haha!

                      Comment


                        #12
                        If you guys can put together a wish list, I will look at each item and see what the complexity is and start with the easier first.
                        Intelligent Trader Inc.
                        NinjaTrader Ecosystem Vendor - Artificial Intelligence Based Indicators

                        Comment


                          #13
                          For me it's mainly just being able to have the labels that tell you if you are green or red on the particular time frame located on one chart. As of right now i'm having to have multiple charts open which sucks. I can't really think of anything else. I don't think there is much else to it. I do see you have the numbers which tells you if it's a 1,2 or 3 which is great. Thanks again for doing this. It's much appreciated.

                          Comment


                            #14
                            For me, if those values could be used in a strategy (referring to an indicator), there I see the most value. For example, Value5min[0], Value15min[0] and if 5 min candle is currently green, it would return = 1, if doji = 0 (close==open), if red = -1.

                            Comment


                              #15
                              it appears you already have this on the chart above. it's just confirmation for me of what's going on on the larger time frames as i generally trade off of a 5min chart. not necessarily using it in a strategy but it is a major component to trading the STRAT.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by RubenCazorla, Today, 09:07 AM
                              2 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by i019945nj, 12-14-2023, 06:41 AM
                              7 responses
                              81 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by timmbbo, 07-05-2023, 10:21 PM
                              4 responses
                              158 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by tkaboris, Today, 08:01 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by Lumbeezl, 01-11-2022, 06:50 PM
                              31 responses
                              819 views
                              1 like
                              Last Post NinjaTrader_Adrian  
                              Working...
                              X