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

Remaining time on current bar

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

    Remaining time on current bar

    I found an indicator that shows the remaining current bar time but it displays lower right hand corner only.
    Is there an indicator that does the same job but displays right next to the current bar's price?
    Please look at the attached picture which I created. I would like to see the remaining time right next to the current price.

    I would appreciate any comments or help.

    Thank you.

    #2
    Hello jjanguda,

    The BarTimer indicator included with NinjaTrader can be used as an example as you develop your custom indicator.

    Draw.TextFixed() can use TextPosition.BottomLeft, TextPosition.BottomRight, TextPosition.Center, TextPosition.TopLeft, or TextPosition.TopRight.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello jjanguda,

      The BarTimer indicator included with NinjaTrader can be used as an example as you develop your custom indicator.

      Draw.TextFixed() can use TextPosition.BottomLeft, TextPosition.BottomRight, TextPosition.Center, TextPosition.TopLeft, or TextPosition.TopRight.
      Hi, ChelseaB , NinjaTrader_PatrickH :

      Currently the Bar Timer Flash coded by Patrick here: https://ninjatraderecosystem.com/use...sound-alert-2/

      renders the two values for the clock timer and the remaining time with the same brush.

      Is it possible to ask rendering the clock and the remining timer with two different optional brushes to provide better visibility for alarm purposes? If not, maybe provide a code snippet or point to some example to accomplish this.

      Many thanks.

      Comment


        #4
        Hello aligator,

        The indicator you have linked is open source. You can make any changes you would like. I recommend making a copy of the script first and changing any enum names.

        The text is custom rendered with RenderTarget.DrawTextLayout() on lines 159, 198 and 202 using the textLayout1 holding the text and textBrushDx the brush of the text.

        textLayout1 is created from the timeLeft string variable set when the timer ticks on lines 237 through 246. You can create two strings, one for the current time, one for the timeLeft, create two textLayout objects using each string, and render the two objects, with one setting the x to include the width of the first.

        textBrushDx is created from the TextBrush input on line 153. You can create two brush inputs, and use two variables for each brush when generating a SharpDX brush, and use these for each DrawTextLayout() call.


        Below are links to some examples that simplify what is needed for rendering.
        https://ninjatrader.com/support/foru...606#post789606
        https://ninjatraderecosystem.com/use...bol-watermark/
        Last edited by NinjaTrader_ChelseaB; 01-19-2021, 03:27 PM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          You may find this example, from Big Mike's futures.io site, of interest. I have not used it (nor even installed it), but looking at the documentation and the code it seems to have some useful features and informative code. Worth a look, at least.

          And with no purpose other than to promote worthwhile resources for enhancing one's ability to use NinjaTrader 8, I recommend becoming familiar with Big Mike's excellent forum and resources. He's had a great friendship with NinjaTrader for a long time, and I've found many useful things on his site. There's a lot that's free and open-source. There's also his Elite Traders group (a small once-off fee to join) that provides access to some additional very useful code. Purely FYI. I have no association with BM or the site other than as a satisfied user.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment


            #6
            Originally posted by jeronymite View Post
            You may find this example, from Big Mike's futures.io site, of interest. I have not used it (nor even installed it), but looking at the documentation and the code it seems to have some useful features and informative code. Worth a look, at least.

            And with no purpose other than to promote worthwhile resources for enhancing one's ability to use NinjaTrader 8, I recommend becoming familiar with Big Mike's excellent forum and resources. He's had a great friendship with NinjaTrader for a long time, and I've found many useful things on his site. There's a lot that's free and open-source. There's also his Elite Traders group (a small once-off fee to join) that provides access to some additional very useful code. Purely FYI. I have no association with BM or the site other than as a satisfied user.
            Thanks. Elite member there for many years with so much contributions as "aligator". You just can't get the same level of NT support there as with knowledgeable people here.

            Comment


              #7
              I agree, aligator. And thanks for your contributions there and here. (Was merely pointing to a potential source of additional information for you.)
              Multi-Dimensional Managed Trading
              jeronymite
              NinjaTrader Ecosystem Vendor - Mizpah Software

              Comment


                #8
                aligator Any luck with finding a bar timer that goes right next to the current developing bar?

                Cheers

                Comment


                  #9
                  Originally posted by DanDaMan View Post
                  aligator Any luck with finding a bar timer that goes right next to the current developing bar?

                  Cheers
                  I used to have one for NT7 that I can dig out and send it to you, but have not converted that for NT8 since I switched to NT8 long ago.. However, if you know a bit of NT8 editing, it is very easy to modify the timer to print next to the current bar.

                  Cheers!
                  Last edited by aligator; 03-05-2021, 09:33 AM.

                  Comment


                    #10
                    Originally posted by aligator View Post

                    I used to have one for NT7 that I can dig out and send it to you, but have not converted that for NT8 since I switched to NT8 long ago.. However, if you know a bit of NT8 editing, it is very easy to modify the timer to print next to the current bar.

                    Cheers!
                    I am interested, i hope you still read this forum

                    Comment


                      #11
                      bump for a counter next to the close of the candle

                      Comment


                        #12
                        any luck with this? I use Volume Timer and would love to have it shown next to the current bar

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Pattontje, Yesterday, 02:10 PM
                        2 responses
                        14 views
                        0 likes
                        Last Post Pattontje  
                        Started by flybuzz, 04-21-2024, 04:07 PM
                        17 responses
                        229 views
                        0 likes
                        Last Post TradingLoss  
                        Started by agclub, 04-21-2024, 08:57 PM
                        3 responses
                        17 views
                        0 likes
                        Last Post TradingLoss  
                        Started by TradingLoss, 04-21-2024, 04:32 PM
                        4 responses
                        43 views
                        2 likes
                        Last Post TradingLoss  
                        Started by cre8able, 04-17-2024, 04:16 PM
                        6 responses
                        56 views
                        0 likes
                        Last Post cre8able  
                        Working...
                        X