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

count candle inside a chart

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

    count candle inside a chart

    Hello,

    In Quote Tracker you can see at the bottom of the chart in the scroll bar the number of candles (bars, period) inside a chart or the portion of a chart.

    Is there the equivalent in NT or anyone has made a code available to do so.

    Thank you

    #2
    Hello frankduc,

    Thank you for writing in.

    Would you be able to provide screen shots of what you are referring to, I’m unfamiliar with Quote Tracker?

    Is what you are trying to accomplish, to post the number of candles currently being displayed inside the chart window?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Unfortunately i do not have QuoteTracker install on this computer and i am unsure if the charting platform still exist.

      But here's an image i pick up from google image and you can see at the bottom of the chart in the scroll bar 1023b.

      That's the number of bars i am referring to. That way you can know how many bars you are scrolling back and put the number of periods 1023 in an SAM indicator for exemple.
      Attached Files

      Comment


        #4
        Hello frankduc,

        I have put together an indicator which will display in the upper left corner of a chart, how many bars over the slider is, from the current bar.

        To do this I used,

        ChartBars.ToIndex


        ChartBars.Count


        Which calculate how many bars are to the right, of the right most bar currently displayed.

        You would be able to modify the bar slider with this value however would be out of the scope of our support. I can provide you with the following link on getting the Automation ID for the purpose of pushing a value to what is displayed on the slider.



        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          error

          Thank you for the file Alan but there is a message error when i try to import ninjascript add-on.

          Was the file written in NT 7? I use Nt 8.

          It says: You have custom ninjacript files on your pc that have programming errors. These errors must be resolved before you can import a nt archive file.

          Comment


            #6
            my mistake

            It was an old file i was working on that created the message error.

            So it display the number of bars hidden in the chart when you slide the scrolling bar left?

            ingenious
            i never thought just to do that there was that many lines to write.


            It will help me understand then script and use it inside my indicator. If only i can find a programmer. You guys should really offer programming service. You could make money in that niche.

            thank you very much
            it will be useful.

            Comment


              #7
              Without coding, you could simply enable the "Show Bar Indexes" and "Show Bars Ago" properties of the Data Box as shown in the attached image.
              Attached Files

              Comment


                #8
                Interesting information thank you.

                Comment


                  #9
                  Hello Frankduc,

                  The indicator was written in NT8. You should resolve the compile errors before proceeding (instructions below).

                  Regarding a programmer, per your request I can have someone from business development reach out with a list of third parties who'd be interested in working with you.

                  Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.

                  For NinjaTrader 8:

                  Open NinjaTrader
                  From the Control Center select the New menu--> select NinjaScript Editor
                  Right click in the window and select Compile to compile all NinjaScript objects
                  At the bottom of the NinjaScript Editor window a new section will appear where you can find the error locations
                  You can exclude the file referenced in the editor by double clicking on the appropriate object type on the right of the NinjaScript Editor window. This will expand the object type folder. You can then select the file with a left click--> right click on the object--> then select Open to begin debugging the file, Exclude From Compilation, or Remove to delete the file.
                  If you are unsure as to what the error is indicating, please send me a screenshot of the NinjaScript File column and Error column fully visible (not to be confused with the Code column)

                  To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

                  Click here for instructions
                  Learn how to use Snipping Tool to capture a screenshot, or snip, of any object on your screen, and then annotate, save, or share the image.


                  Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

                  Click here for detailed instruction
                  How to take a screenshot on your smartphone, tablet, notebook or desktop computer


                  We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums - http://www.ninjatrader.com/support/f...ead.php?t=4678

                  Please let us know if you need further assistance.
                  Alan P.NinjaTrader Customer Service

                  Comment


                    #10
                    I have solved the compiling error.
                    I am already in contact with someone from ecosystem.

                    Thank you for your time.

                    Comment


                      #11
                      Originally posted by NinjaTrader_AlanP View Post
                      Hello frankduc,

                      I have put together an indicator which will display in the upper left corner of a chart, how many bars over the slider is, from the current bar.

                      To do this I used,

                      ChartBars.ToIndex


                      ChartBars.Count


                      Which calculate how many bars are to the right, of the right most bar currently displayed.

                      You would be able to modify the bar slider with this value however would be out of the scope of our support. I can provide you with the following link on getting the Automation ID for the purpose of pushing a value to what is displayed on the slider.



                      Please let us know if you need further assistance.
                      Hi there, I am looking for similar indicator that show for example the candle that close below the previous 20 candles. is this what you have created. if so, can you please share the link.

                      Regards

                      Comment


                        #12
                        Hello mkaraa, thanks for your post.

                        Alan no longer works on the support team. Unfortunately, It looks like Alan's upload was removed or was never added. I am not aware of an indicator that will do this.

                        Please let me know if you have any further questions.
                        Chris L.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by DynamicTest, Yesterday, 11:18 PM
                        1 response
                        5 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by Rogers101, 05-05-2024, 11:30 AM
                        6 responses
                        26 views
                        0 likes
                        Last Post Rogers101  
                        Started by llanqui, Yesterday, 03:51 PM
                        4 responses
                        22 views
                        0 likes
                        Last Post llanqui
                        by llanqui
                         
                        Started by smartromain, Yesterday, 10:50 PM
                        1 response
                        13 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by nleitman, Yesterday, 11:46 AM
                        11 responses
                        29 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X