Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314
I'd like some assistance to get me started with an indicator.
I use range bars and would like an indicator that would draw a box whenever X number of bars form with less than Y range(ticks). COBC=true. I would like it to update as more bars meet the criteria.
I would like X & Y to be user selectable.
That's it.
Attached is an example where X=6 and Y=6.
Can you help answer these questions from other members on NexusFi?
To draw the box you can use the NinjaScript method DrawRectangle(). DrawRectangle() has a fill color, but you can set that to transparent.
For the box you need to enter
(1) a tag
(2) start and end position as defined by the bars
(3) high and low
(1) For the tag use any combination of letter + an integer startBar, for example "tag"+startBar. As you want to update the box, when the number of bars increases, the integer startBar should not change, but contain the CurrentBar value for the first bar of the pattern.
(2) Depends on your condition.
(3) I would use MAX and MIN over the lookback period and add a margin to draw the box a little above the high and below the low. The margin can be defined as a multiple of ATR(14). This way it will autoadjust to the bar volatility.