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!
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
NinjaTrader
Current Range Bar possible High & Low Plot
Collapse
X
-
Originally posted by cclsys View PostThanks 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!
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 FilesLast edited by eDanny; 08-14-2009, 10:46 AM.
Comment
-
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
-
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
-
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
-
Originally posted by eDanny View PostFrom 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.
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
-
Originally posted by trish120 View PostJust wondering if you can tell me where to get these little dots and if so, how to add them to my ninja charts? Thanks
I have named it 'RangeBarHighLow' rather than 'targets'.Attached Files
Comment
-
is it possible to help out make the RBHighlow avail for indicators?
Originally posted by cclsys View PostTrish, 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'.
please advice how to start it.
Comment
-
Originally posted by trish120 View PostThanks for that, but I cannot open them through Adobe. Any other suggestions for me so I can view them. Thanks. Trish120
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
-
Originally posted by Elmi View Postis it possible to help out make the RBHighlow avail for indicators? for example BBLines.
please advice how to start it.
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
-
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 tiaAttached Files
Comment
-
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 LiamTwine, Today, 08:10 AM
|
0 responses
2 views
0 likes
|
Last Post
by LiamTwine
Today, 08:10 AM
|
||
Started by Balage0922, Today, 07:38 AM
|
0 responses
5 views
0 likes
|
Last Post
by Balage0922
Today, 07:38 AM
|
||
Started by JoMoon2024, Today, 06:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by JoMoon2024
Today, 06:56 AM
|
||
Started by Haiasi, 04-25-2024, 06:53 PM
|
2 responses
19 views
0 likes
|
Last Post
by Massinisa
Today, 05:32 AM
|
||
Started by Creamers, Today, 05:32 AM
|
0 responses
6 views
0 likes
|
Last Post
by Creamers
Today, 05:32 AM
|
Comment