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 TraderJesse with 3 posts (1 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,882 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

  #21 (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

Its only once you start using hotkeys and the keyboard you realise just how slow mouse clicking is.
Clearly your skill level is way beyond mine Richard but even if I make my own plot I still don't see how I can re write historical bars - sorry if it's simple but I just don't see it?
Are you referring to iterating through every bar on the chart each time I press the hotkey perhaps?

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
 
  #22 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


Mindset View Post
Clearly your skill level is way beyond mine Richard but even if I make my own plot I still don't see how I can re write historical bars - sorry if it's simple but I just don't see it?

When you make a custom plot() method, you paint the chart when asked to do so by ninja. So... you can just not paint anything if you don't want to. So, it's as simple as doing nothing. Look at indicators that have custom plot() for examples of how to do it, but beware it will be confusing if you don't have any windows.forms experience.

Reply With Quote
  #23 (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 here is a start anyway.
Life is just too short to spend too much time on such basic stuff.
This will turn the EMA indicator on/off using Shift+H(ide) or V(isible).

BUT It reloads Ninja Script so has very limited value but you know I am not a programmer.....

Attached Files
Elite Membership required to download: HideShowEma.zip
Started this thread Reply With Quote
  #24 (permalink)
 
roonius's Avatar
 roonius   is a Vendor
 
Posts: 131 since Jun 2009
Thanks Given: 20
Thanks Received: 295


Richard View Post
When you make a custom plot() method, you paint the chart when asked to do so by ninja. So... you can just not paint anything if you don't want to. So, it's as simple as doing nothing. Look at indicators that have custom plot() for examples of how to do it, but beware it will be confusing if you don't have any windows.forms experience.

if you want to override plot method to do nothing it should be fairly simple:

 
Code
 
public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
{
     if(!showPlots) return;
     base.Plot(graphics, bounds, min, max)
}

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


roonius View Post
if you want to override plot method to do nothing it should be fairly simple:

Ah, you're right. If he doesn't want to do anything unusual except not plot, then he can just let ninja take care of the rest. Now why didn't I think of that? I think my brain is hard-wired to equate custom plot() with pain.

Reply With Quote
  #26 (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

Actually it was the drawing of the EMA line I struggled with!
The minute I go near x and y I just simply get confused.

Started this thread Reply With Quote
  #27 (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

Hadn't looked at this in a while and didn't realise people had responded.

The issue remains that 'hiding' the ema line proves elusive.
It may be that a clone() is required but again this may be beyond me to resolve.

Ref No Plot - yes I get that but it doesn't hide existing plots does it? It just stops plotting

Started this thread Reply With Quote
  #28 (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

This doesn't seem very elegant - but then it gets the job done with the minimum of fuss.

I have only tidied the code up a little and there are 'other' working bits in it but hopefully it will be useful to some.
If somebody more capable than me can make it better please feel free.
It doesn't feel good enough to include as an indicator download but maybe one of the moderators could comment on that?
You can turn the Moving average plot 'On' or 'Off' via toolbar button or keycode (Shift + H)

NB NT7 version only.

Attached Thumbnails
Click image for larger version

Name:	ema on.png
Views:	362
Size:	62.0 KB
ID:	18636   Click image for larger version

Name:	ema off.png
Views:	296
Size:	53.0 KB
ID:	18637  
Attached Files
Elite Membership required to download: emaplay.zip
Started this thread Reply With Quote
  #29 (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

Still not entirely convinced by this indicator... but still this is an updated version - just some colour choices and a few minor code changes.
I find every now and again if you click the ema off and then add it say 20 bars later it doesn't update... if you keep the indicator as Calculate on Bar Close this doesn't seem to happen.
This should work in both 6.5 and 7 but I have NOT tested it on 6.5.

Attached Files
Elite Membership required to download: emaplay.zip
Started this thread Reply With Quote
Thanked by:
  #30 (permalink)
 rt-trader 
Australia
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 29 since Jun 2009
Thanks Given: 20
Thanks Received: 17


Here is a slightly updated version of Mindset's original.

Does the same stuff but I figured out how to refresh the chart after button toggle.

Thanks to Mindset.

Attached Files
Elite Membership required to download: MAToggle.zip
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