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)
But that's not really what you originally asked for. I agree with others that just putting a boolean in your parameters is the easiest way to go. If you need to avoid recalculation, though you can make a custom Plot() with an opacity level... then add a button or slider to your toolbar that lets you make the indicator transparent when you don't want to see it, in realtime.
Nice work!
I shall look into splitting panels for another project but for now I would like to complete this one.
I am almost there but how do you force a plot to repaint?
I can get the plot to stop plotting at will but it still leaves the prior values ( in this case an EMA line) .
Seems easy but nothing seems to work.
Now you're just teasing!!
On a serious note - I shall persist in this but it does look like it's beyond my capabilities and of course NT doesn't support it so if anyone else would like to pick up the baton please feel free.
If you change a parameter, NT will recalc the indicator. So, just opting not to plot (or calling Value.Reset() on every bar) when your hide/show parameter is set to false will do the trick. This is what Big Mike and others had suggested. I've attached an example indicator, and a screenshot showing that you can't see a line when the parameter is set to false.
hope this helps.
(it's an NT7 indicator, so if you aren't on 7 here's the entire OnBarUpdate method:
... where showPlot is a boolean input parameter to the indicator)
It's one of those situations where you have to be really fancy or not fancy at all. Halfway fancy won't work.
If you are going to use hotkeys, then either make your own Plot() method, or go and Reset() your plot across all bars when the plot is turned off (and when you turn the plot back on, go and Set() the plot across all bars). But, it's far easier to forego the hotkeys and just change the input via the indicator properties.
Ok Richard - thanks. All seems very complicated for what should be very simple and easy.
I can't understand why NT haven't thrown this feature in to v7.