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)
-> between two plots
-> or between a plot and a horizontal line
For your purpose, which is filling the space between two horizontal lines, I would suggest to use the NinjaScript method DrawRectangle(). The only problem with DrawRectangle() is that it plots on top of the lines plotted by the same indicator, while DrawRegion() is well behaved and draws behind.
In case that you want to fill the area behind all indicator plots and lines, which is impossible to achieve with DrawRectangle() you have two options
-> add a transparent plot which takes the constant value 30 (or 70) and then apply DrawRegion() to that plot and the other fixed line
-> add a custom plot to the indicator, which simply fills the area between the two lines
The last option is the most elegant one. You just need to code a few lines to achieve it. Below is a code snippet that you can use or modify for a custom plot.
I have just written this down to explain the approach, I have not tested the code for bugs.