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.
The following 2 users say Thank You to Richard for this post:
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.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Send that to NT and tell them to get with the program.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following user says Thank You to Big Mike for this post:
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.
Last edited by Mindset; March 12th, 2010 at 11:07 AM.
The following user says Thank You to Mindset for this post:
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.