NexusFi: Find Your Edge


Home Menu

 





Hide / Unhide Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Mindset with 14 posts (10 thanks)
    2. looks_two Richard with 5 posts (2 thanks)
    3. looks_3 Big Mike with 4 posts (1 thanks)
    4. looks_4 whuffo with 3 posts (0 thanks)
      Best Posters
    1. looks_one rt-trader with 5 thanks per post
    2. looks_two roonius with 3 thanks per post
    3. looks_3 Mindset with 0.7 thanks per post
    4. looks_4 Richard with 0.4 thanks per post
    1. trending_up 17,869 views
    2. thumb_up 23 thanks given
    3. group 12 followers
    1. forum 36 posts
    2. attach_file 18 attachments




 
Search this Thread

Hide / Unhide Indicator

  #11 (permalink)
 
TraderJesse's Avatar
 TraderJesse 
Denver
 
Experience: None
Platform: NinjaTrader
Posts: 85 since Aug 2009
Thanks Given: 51
Thanks Received: 95

johnthom - Project Hosting on Google Code

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #12 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


Mindset View Post
Wow that is some coding - I can't even find the source code let alone try and understand it!

FWIW I posted a tutorial on how to make hide/show panels here:

Move the Markets :: Customizing [AUTOLINK]Ninjatrader[/AUTOLINK] Toolbar/Panels/Etc.

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.

Reply With Quote
Thanked by:
  #13 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291


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.

Attached Thumbnails
Click image for larger version

Name:	ema line.png
Views:	312
Size:	87.7 KB
ID:	9643  
Started this thread Reply With Quote
  #14 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291

mmm ... it seems you can't repaint by all accounts.
You can set a dataseries to zero by using Reset() but of course it leaves history behind.

Even in NT7 there is still no way even to programmatically F5.

Started this thread Reply With Quote
  #15 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,662

[img]https://nexusfi.com/v/gcbr8y.gif[/img]

Send that to NT and tell them to get with the program.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #16 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291

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.

Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


Mindset View 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.

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:

 
Code
if(!showPlot) return;
Avg.Set(EMA(Input,len)[0]);
... where showPlot is a boolean input parameter to the indicator)

Attached Thumbnails
Click image for larger version

Name:	ES 06-10 (1 Min)  3_12_2010.jpg
Views:	306
Size:	71.5 KB
ID:	9679  
Attached Files
Elite Membership required to download: Z20100312HideShowEMA.zip
Reply With Quote
  #18 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291

Richard - appreciate the reply.
I should have shown my code and then you could see the issue.

I have got the showplot to change to false/true with my key code but the indicator doesn't plot? Beyond me.

In my original code I had the ema as 3 dataseries (flat,rising,falling) but I think that just confused things.

Anyway I have added my code to your code so see what you think.

Edit - should have changed CalculateOnBarClose to false btw.

Attached Files
Elite Membership required to download: Z20100312hideEma.zip
Started this thread Reply With Quote
  #19 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284

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.

Reply With Quote
  #20 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291


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.

Started this thread Reply With Quote




Last Updated on July 20, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts