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)
Override Plot - how to do FillRectangle in different panel
This Indicator draws MTF Supply and Demand Zones based on the NinjaTrader Swing Indicator.
In addition to drawing the zones, it shows a strength value on the right side of each zone.
The strength value corresponds with the number of bars to the left …
I'm using the graphics context here, not using Ninja's Draw methods. So setting "DrawOnPricePanel" to true doesn't work when using a graphics.FillRectangle call.
The sample indicator used in the video is attached to this message...if you want something to experiment on.
Again, thanks for your responses...looking for more input from you.
Here's a crude method that I think will work, although it is not very elegant.
Let's say your indicator is meant to draw the rectangle on the price panel when condition x exists -- maybe you have a plot in the lower panel, and when x is true, it should draw the rectangle on the price panel.
I've gotten around this kind of problem in the past by writing two indicators. They both perform the same calculation and both know when condition x is true; one of them runs in the lower panel and plots whatever you want to plot there; the second does not do any plotting on the lower panel, but does draw the rectangle (or whatever else you want to see) on the price panel.
So you're doing the same amount of processing work twice, and it's pretty crude, and you've basically just duplicated the same code, but I think it will get you what you want in terms of the final result.
It's also pretty easy and you won't tear your hair out. Hope this works for you.
Bob.
When one door closes, another opens.
-- Cervantes, Don Quixote
Thanks for the input, Bob. I've done the same "2-inidicator approach" in the past. I'm just trying to find the "right" way to get around this issue. Afterall, NinjaTrader does it inherently int their Draw methods, so there's got to be a way.
I believe the issue is how to grab the graphics context of the price panel...because it's a different context than the subpanels. One way to do that is to have a price indicator place the Graphics context in a static class, but then again, we're not getting around the 2-indicator coordinated system.
Yeah, it seems that there has to be a way. NT doesn't provide much documentation, unfortunately, and this is the kind of thing they don't support.... Maybe in NT8.
When one door closes, another opens.
-- Cervantes, Don Quixote