Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Previous Bar size (Need simple indicator)

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

    #16
    Originally posted by StealthM93 View Post
    You're welcome, Anna! You and anyone else, let me know if there are any issues.
    Hi Matt, I installed the 'AnnaBarSize' indicator but after changing the Font Color which is blank I get an error "Could not save indicator 'AnnaBarSize'. There was an error generating the XML document." when saving my Workspace. Now I need to add the indicator again to the chart which is a kind of hassle to do every day. I get an error as I try to save a template of the indicator as well. Hope you can help. I use NT version 8.1.3.1.​

    Best,
    Michel

    Comment


      #17
      Hi Mich62 and spiketrades9,

      It's nearly two years since I coded that, and I've done a fair amount of NT8 programming since. So, I just did a bit of troubleshooting and made it more efficient (not that it was a performance hog). Also, I have renamed it with a prefix of company (Jett Trading) I might start that does NT8 (and TradingView?) programming. It should no longer give you any errors or cause NT to freeze/crash.

      Please give it a try and let me know how it works for you.

      Thanks,
      Matt
      Attached Files

      Comment


        #18
        Originally posted by StealthM93 View Post
        Hi Mich62 and spiketrades9,

        It's nearly two years since I coded that, and I've done a fair amount of NT8 programming since. So, I just did a bit of troubleshooting and made it more efficient (not that it was a performance hog). Also, I have renamed it with a prefix of company (Jett Trading) I might start that does NT8 (and TradingView?) programming. It should no longer give you any errors or cause NT to freeze/crash.

        Please give it a try and let me know how it works for you.

        Thanks,
        Matt
        Thank you very much Matt! It works like a charm now and I am very happy with it.

        Best,
        -Michel

        Comment


          #19
          Excellent, Michel... Great to hear, thank you for letting me know.

          Comment


            #20
            Hello everyone, i downloaded the indicator and it works great!
            How can i change the counter position? i'd like to see it at xxx offset from the bar (on the right).
            I tried to look at the code without founding a solution.
            Best
            Francesco

            Comment


              #21
              Hi Fra12,

              If you could, please provide a screenshot, marking where you want the number to be. If you want this number to be to the right of the current bar, then I'm guessing you're only showing the current bar, correct?

              Kind regards,
              Matt

              Comment


                #22
                Yes, the number shows the current bar range. I0d like to see the number on the right, where i drawn a red circle. now it's just above the bar.
                In the code there is offset from high of the bar but not X Offset
                Attached Files
                Last edited by Fra12; 09-05-2024, 05:56 AM.

                Comment


                  #23
                  Hello Fra12,

                  Please see attached. Updated to include a horizontal offset in number of bar positions. Please give it go and let me know how it works for you.

                  Kind regards,
                  Matt
                  Last edited by StealthM93; 09-15-2024, 09:45 PM. Reason: Removed the attachment as it had a bug. See below for the latest version.

                  Comment


                    #24
                    Ninjatrader didn't like Display Ticks Offset - Horizontal = 0 as default: an error message appears if i don't modify the value (see attached 1). I modified 0 with 1 in the code and now it works perfectly.
                    Great Job!
                    So this problem is solved; but if I try to use it with 2 bars the 2 values overlap (see attached 2). I already have an indicator (hidden code) that shows me previous bar range, but the problem is that i need to see the value of previous bar range + 2 ticks (and the same for the most recent bar).
                    For most recent bar i modified the code you just sent me : double barSize = (0.5 + High[0] - Low[0]) / ptsOrTicksDivisor;
                    I can't modify the hidden code of the other indicator.
                    So, is it possible to have different x offset for bar 1 and bar 2? Or more space between the 2 values?
                    Attached Files

                    Comment


                      #25
                      Hello Fra12,

                      Here's the latest, with bug you mentioned fixed. If the horizontal offset is >= 1 and the Number of Bars > 1, it will now create a stacked list of bar sizes.

                      Click image for larger version  Name:	image.png Views:	0 Size:	7.4 KB ID:	1318218
                      In this example, Number of Bars is 4 and the horizontal offset is 1 bar (in front of the current bar). The current bar ("C") is 8 ticks, while the previous bars are 19, 8, and 4 respective Bars Ago fashion.

                      If the horizontal offset is 0, then the indicator works as it did previously.

                      Hope that helps!
                      Matt

                      Last edited by StealthM93; 09-16-2024, 12:07 PM.

                      Comment


                        #26
                        Hello Matt, your picture shows exactly what i'd like to have. Can't see link for download

                        Comment


                          #27
                          now i see it. Great job! Thank you very much!

                          Comment


                            #28
                            Hi Fra12,

                            Excellent, good to hear that it is working for you. Oddly, I didn't see the attachment in my post from last night. I just edited it and clicked insert next to the zip file. Hopefully, it is now showing for everyone, all the time.

                            Cheers,
                            Matt

                            Comment


                              #29
                              Hello StealthM93 , thank you for posting this indicator. Is there a way to make it show the values for bars already displayed on the chart? I wanted to use this for backtesting. Thank you \o

                              Comment


                                #30
                                Hi Cutstocks,

                                Just to clarify, you want the bar range on all the bars on the chart when you first apply the indicator? And then keep them on the entire time (that is, they are not removed)?

                                Kind regards,
                                Matt

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                558 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                324 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                101 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                546 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                547 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X