![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#16 | |
|
Senior Member
Join Date: Dec 2009
Location: Netherlands
Posts: 179
Thanks: 15
Thanked 72 times in 51 posts
|
cmaxb is referring to the RangeCounter with CoutnDown = false. Most replies I read assume CountDown = true which is not the case !
Quote:
whichever is largest. What you want to do is create an indicator which does the following : ( High[0]-Low[0] ) / TickSize Marco
Last edited by marcow; 08-17-2012 at 07:52 PM.
|
|
|
|
|
|
|
#17 | |
|
Senior Member
Join Date: Jun 2011
Location: Ireland
Posts: 184
Thanks: 32
Thanked 20 times in 19 posts
|
Quote:
You know - the one that comes after PriorDayOHLC but before RangeCOUNTER in the indicator list !! |
|
|
|
|
|
|
#18 | |
|
Senior Member
Join Date: Dec 2009
Location: Netherlands
Posts: 179
Thanks: 15
Thanked 72 times in 51 posts
|
Quote:
you know the difference between those two ? |
|
|
|
|
|
|
#19 | |
|
Senior Member
Join Date: Jun 2011
Location: Ireland
Posts: 184
Thanks: 32
Thanked 20 times in 19 posts
|
Quote:
Value.Set(High[0] - Low[0]); So fine - it gives you a value that directly relates to the instruments price - if you are unable to determine how many ticks that is of the instrument you trade - imo you shouldn't be trading !! My point was that Mr CmaxB has all he needs to get the answer he wants with out necessarily coding his own indicator. As he seems to be unable to grasp the concept of a range bar and the range counter - he is unlikely to be coding his own indicators, irrespective of how simple that may be in this example. If you feel that I was rude to you I apologise. |
|
|
|
|
|
|
#20 | ||
|
Senior Member
Join Date: Dec 2009
Location: Netherlands
Posts: 179
Thanks: 15
Thanked 72 times in 51 posts
|
not pedantic at all. That's what this discussion is all about. I cannot come up with an answer more transparant than this.
I'm answering cmaxb's initial question why the counter is going down when it is set to count up. Cmaxb is assuming the counter indicates the range of the current bar - which is high[0] - low[0], but instead the RangeCounter is displaying the distance in ticks between Close[0] and Low[0] , or Close[0] and High[0] , whichever is the largest. Quote:
Quote:
![]() ps. updated post#16 to match the explanation above in this post. Marco |
||
|
|
|
|
|
#21 | |
|
Senior Member
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,189
Thanks: 180
Thanked 302 times in 260 posts
|
I'm lost, so does this thread, "Range bar counter" have nothing to do with Range Bars?
![]() Quote:
|
|
|
|
|
|
|
#22 |
|
Senior Member
Join Date: Dec 2009
Location: Netherlands
Posts: 179
Thanks: 15
Thanked 72 times in 51 posts
|
no, this thread is about the RangeCounter indicator, with Count down set to false.
Cmaxb's initial question was about -for him- unexpected behaviour of the RangeCounter indicator. The whole range bar thing was introduced by repliers implying it was sort of a dumb question and that he had to study the principles of Range Bars. |
|
|
|
|
The following user says thank you to marcow for this post: |
|
|
|
#23 |
|
Member
Join Date: Mar 2008
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
|
Can somebody tell me, how the range counter could show 4, in this chart ?
http://i.imgur.com/w9zrT.png |
|
|
|
|
|
#24 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,792
Thanks: 160
Thanked 568 times in 559 posts
|
So we can better analyze your chart, can you please put the "range" indicator on your chart and put this on CalculateOnBarClose = false.
This should show us exactly what the range of the current bar is vs what the range counter is reporting.
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#25 |
|
Senior Member
Join Date: Dec 2009
Location: Netherlands
Posts: 179
Thanks: 15
Thanked 72 times in 51 posts
|
Why is that second last bar so small, that is nowhere 10 ticks long, was this the last bar of a session ? And is the last bar the first bar of a new session ? I can imagine that there was a price spike at session open, which caused the last bar to complete, but the indicator needs a new incoming tick to update ?
|
|
|
|
|
The following user says thank you to marcow for this post: |
|
|
|
#26 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,792
Thanks: 160
Thanked 568 times in 559 posts
|
The one bar is this size due to it being the end of session
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#27 | |
|
Member
Join Date: Mar 2008
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
1) yes 2) yes 3) this bar started at the new session, and was one tick away (down) from starting the next bar, the range was actually ten at that point. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| range bar tick counter | upsndowns | Indicator Development | 3 | 08-01-2010 08:20 AM |
| bar counter | agd108 | Indicator Development | 1 | 05-19-2009 05:23 AM |
| Bar counter | pgabriel | General Programming | 1 | 09-27-2008 09:55 AM |
| Range Counter Bug? | blinker | Historical NinjaTrader 6.5 Beta Threads | 3 | 02-12-2008 10:59 AM |
| Range counter - request | ggloor | Historical NinjaTrader 6.5 Beta Threads | 1 | 01-20-2008 08:32 AM |