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

Current Range Bar possible High & Low Plot

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

    #61
    Those track the big lot size traders, small lot size traders and all size traders.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #62
      Originally posted by cclsys View Post
      Thanks again Danny. I have loaded it just onto one chart and it seems fine although once the plots 'stuck' for a bar or two as I was switching around. My old version had many multiple plots today so this seems definitely better and changing the font was good.

      As I changed indicators on the chart, they stuck again. So I changed the range bar number and it was fine. Then went back to the previous RB nr and it was still stuck on same bar where stuck before. So some little niggly thing is wrong and I suspect it has to do with what Josh or Bernard was saying that you can't unplot things once they are plotted even though in theory the code is telling it not to do that. And this is plotting something on a newly loaded chart on a previous bar, i.e. not the current bar. So something is being 'remembered' somewhere in the system and the code doesn't address this memory issue.

      But I think we've done all that can be done with this little aid. Most of the time it works great and sometimes it likes to get temperamental. Sort of like myself, come to think of it!
      Did you make all the changes from post #59? There are no plots anymore to stick.

      Edit: Downloaded your last posted version and made the changes. Seems ok for me. Here it is with a different name. The only issue I have seen is that when the bar fills it's size, sometimes the hash marks disappear right away, sometimes they stay for a bit, but never after the next bar starts. I think this happens if there is not a new tick in OnBarUpdate() to clear the marks.
      Attached Files
      Last edited by eDanny; 08-14-2009, 10:46 AM.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #63
        Also, as I noticed last night in a slow market, same is happening today in active market: sometimes (but not always), when the bar is complete, one of the plots 'hangs' in previous position 1 tick above/below the high/low. Even if there are several ticks or even trades at new price, that plot will hang there until a new bar is formed.

        My old Auto indicator never did that, but did have too many plotted in the past. That said, this indicator is only for use in live action, so perhaps the older one is better, except that I find those leftover plots very irritating to view on the chart.

        Comment


          #64
          Aha! from misunderstanding, had not erased:

          if ( High[0] == Low[0] + (Bars.Period.Value*TickSize) || (Low[0] == High[0] - (Bars.Period.Value*TickSize)) )
          return;

          Now I'll watch some more.

          I guess keeping that initial condition with return above was preventing it from removing the draw object once the bar was complete. Simple.

          Danny, very much appreciate your input. Hope that if ever I get good at Ninja coding I also will be generous in helping to solve problems for those with less skills. From my pov it is good learning for all involved to work through these things. That learning process is more important than the results of getting something to work as desired. So thanks again.

          PS: have noticed monitoring the Range Count indicator that it is not as good in that once the bar has formed and say you have a 4-tick range and the price is in the middle, it says that 2 ticks remain, or when 1 tick away from the high, it can say 1 tick remains even though from the possible low it is 3 ticks away - sort of confusing. Now with very small range bars of 2-4 ticks it's very easy to see where they will end. But if you have a 7 or 9 tick range bar, it gets much harder to know if you use them in any pattern-related way such as for entry or exit patterns. This new one is much clearer, requires no leap from looking at a number below and then calculating on the current bar, is chrystal clear when the bar is fully formed or not. I am still not sure I will use Range Bars regularly, but feel much better with this addition since one of the great advantages of a Range Bar over a Tick or Time bar is that you know, from the first tick, the maximum high or low that bar will have, so I think they have much merit to them.
          Last edited by cclsys; 08-14-2009, 01:29 PM.

          Comment


            #65
            It does still stick, even after a few trades once the bar is formed. rarely happens but happens. Why this is from the code cannot understand. Also how/why it then erases the previous draw object from the previous bar don't understand since the condition...return when the new bar forms presumably doesn't apply to previous bar only the current bar. It's a bit of the same problem as the previous version except yours definitely seems better despite rare anomalies that don't really matter since it always plots accurately now, even if it stays longer than desired.

            But I have yet to see a new bar form without the old bar plots disappearing, so that is great.

            Comment


              #66
              From post #62:

              I think this happens if there is not a new tick in OnBarUpdate() to clear the marks.

              That would explain why it is kind of rare. Once the bar is full size and price ticks again but a new bar is not created, the marks should disappear.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #67
                Originally posted by eDanny View Post
                From post #62:

                I think this happens if there is not a new tick in OnBarUpdate() to clear the marks.

                That would explain why it is kind of rare. Once the bar is full size and price ticks again but a new bar is not created, the marks should disappear.
                Well, no: like I said in previous post, several times I watched it 'sticking' and there were many ticks - not just ticks but also moves in price - within the already-formed bar. Most of the time as soon as the bar was formed the plots would disappear, but many times they didn't.

                However, even when that happened, they never stayed on the previous bar once a new one formed. Like I said, I don't understand how that can happen from the code since presumably if it is sticking during the current bar, the code won't be able to take it off the chart at the beginning of a new bar. But in any case, it seems to be working now. Again,thanks. Have good weekend!

                Comment


                  #68
                  Current Range Bar possible High & Low Plot

                  Just wondering if you can tell me where to get these little dots and if so, how to add them to my ninja charts? Thanks

                  Comment


                    #69
                    Originally posted by trish120 View Post
                    Just wondering if you can tell me where to get these little dots and if so, how to add them to my ninja charts? Thanks
                    Trish, if you mean the plots above-below the range bars by 'little dots' then here is the final code (thanks to Edanny!)

                    I have named it 'RangeBarHighLow' rather than 'targets'.
                    Attached Files

                    Comment


                      #70
                      Thanks CCLSYS

                      Thanks for that, but I cannot open them through Adobe. Any other suggestions for me so I can view them. Thanks. Trish120

                      Comment


                        #71
                        is it possible to help out make the RBHighlow avail for indicators?

                        Originally posted by cclsys View Post
                        Trish, if you mean the plots above-below the range bars by 'little dots' then here is the final code (thanks to Edanny!)

                        I have named it 'RangeBarHighLow' rather than 'targets'.
                        is it possible to help out make the RBHighlow avail for indicators? for example BBLines.
                        please advice how to start it.

                        Comment


                          #72
                          Originally posted by trish120 View Post
                          Thanks for that, but I cannot open them through Adobe. Any other suggestions for me so I can view them. Thanks. Trish120
                          Trish, I am not sure what you mean by 'them' but assuming you mean the zip file with the RBHighLow indicator, that is a NinjaScript file that you open by going through the import process.

                          To import into Ninja, take this zip file and save it somewhere you can find it. I have a folder in MyDocuments/Ninja6.5 where I keep all such zip files. Then during the import process you find that file and it will be imported and then you have it. You will find in your indicator menu the RBHighLow indicator. (Or maybe it's called RangeBarHighLow, can't remember). And there you go.

                          I am not sure why you would try to use Adobe for a zip file. Perhaps your computer is set up to automatically try to handle zips with Adobe? In which case, not so good.

                          Comment


                            #73
                            Originally posted by Elmi View Post
                            is it possible to help out make the RBHighlow avail for indicators? for example BBLines.
                            please advice how to start it.
                            Elmi, if you look at the code you will see that really it's only good for range bars since a range bar predetermines the maximum range that bar can possibly be so the code simply plots the Range (for example 6) + Low above the current low for the possible high of the bar and also the High - Range (6 again) for the possible low.

                            I don't know what BBlines are, but if you mean Bollinger Bands, what's wrong with just having them update on the current bar? Or maybe you are talking about something else.

                            Comment


                              #74
                              MACDBBLines and CCIma

                              Ok what I meea is to see projection of plots in the next bat of MACDBBLines and CCIma (attached)
                              Can you help tia
                              Attached Files

                              Comment


                                #75
                                Elmi,

                                I am sorry, but I just don't see how to apply the RBHighLow to indicators nor what you want exactly. In any case, as you can see from the beginning of the thread, I ain't exactly a good programmer! I suggest you start a thread clearly explaining what you want and then hopefully someone skilled in programming will be able to help.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by wzgy0920, 04-20-2024, 06:09 PM
                                2 responses
                                26 views
                                0 likes
                                Last Post wzgy0920  
                                Started by wzgy0920, 02-22-2024, 01:11 AM
                                5 responses
                                32 views
                                0 likes
                                Last Post wzgy0920  
                                Started by wzgy0920, Yesterday, 09:53 PM
                                2 responses
                                49 views
                                0 likes
                                Last Post wzgy0920  
                                Started by Kensonprib, 04-28-2021, 10:11 AM
                                5 responses
                                192 views
                                0 likes
                                Last Post Hasadafa  
                                Started by GussJ, 03-04-2020, 03:11 PM
                                11 responses
                                3,234 views
                                0 likes
                                Last Post xiinteractive  
                                Working...
                                X