NexusFi: Find Your Edge


Home Menu

 





Add Background Color function to an indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one michaelf with 12 posts (2 thanks)
    2. looks_two redratsal with 8 posts (12 thanks)
    3. looks_3 Fat Tails with 7 posts (19 thanks)
    4. looks_4 Mindset with 3 posts (0 thanks)
    1. trending_up 20,488 views
    2. thumb_up 33 thanks given
    3. group 7 followers
    1. forum 33 posts
    2. attach_file 11 attachments




 
Search this Thread

Add Background Color function to an indicator

  #21 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


trs3042 View Post
Hello@ Fat Tails,

I know this may be redundant, but I would like to be able to choose between color background (stochastic panel only), color background (price panel only), or color all background (both panels).

Please consider making these adjustments.

Thank You Harry,

Rick

This is virtually impossible with NinjaTrader. You can easily

-> color the background of the indicator panel
-> or alternatively color the background of all panels

But adding an alternative just to color the price panel does not work without accessing chart controls. If you just want to change the color of the price panel it is easier to code a second indicator than adding an option to the first.

I attach an indicator which allows you to color indicator panels or all panels.

Attached Files
Elite Membership required to download: StochasticsColorBackGround.zip
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Tao te Trade: way of the WLD
23 thanks
Diary of a simple price action trader
22 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
9 thanks
  #22 (permalink)
 
trs3042's Avatar
 trs3042 
Holland, Michigan
 
Experience: None
Platform: ninjatrader
Broker: CQG
Trading: Acoustic Guitar
Posts: 1,617 since Jun 2009
Thanks Given: 23,764
Thanks Received: 5,616


Fat Tails View Post
This is virtually impossible with NinjaTrader. You can easily

-> color the background of the indicator panel
-> or alternatively color the background of all panels

But adding an alternative just to color the price panel does not work without accessing chart controls. If you just want to change the color of the price panel it is easier to code a second indicator than adding an option to the first.

I attach an indicator which allows you to color indicator panels or all panels.

This is perfect. Thank you Harry,

Rick

Reply With Quote
  #23 (permalink)
 
michaelf's Avatar
 michaelf 
Mérida, Mexico
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: NinjaTrader Brokerage
Trading: MNQ
Frequency: Daily
Duration: Minutes
Posts: 559 since Mar 2011
Thanks Given: 1,434
Thanks Received: 581


I worked now a few days with this indicator and I have a small question. Why does it paint the background in the panel, ones after a closed candle and ones before a closed candle. The D + K cross occurs both time in the middle of a candle.

thank's for any explanation

michael

Attached Thumbnails
Click image for larger version

Name:	3 min eurusd.JPG
Views:	367
Size:	130.8 KB
ID:	42796  
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #24 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


michaelf View Post
I worked now a few days with this indicator and I have a small question. Why does it paint the background in the panel, ones after a closed candle and ones before a closed candle. The D + K cross occurs both time in the middle of a candle.

thank's for any explanation

michael

The color changes, when the fast line has reached or crossed the slow line. The color change always includes the actual cross, as the color is drawn back to the position of the previous candle. Example shown below.

You first vertical line was drawn before the cross, the second vertical line after the cross.

Attached Thumbnails
Click image for larger version

Name:	Stoch Chart 1.jpg
Views:	314
Size:	83.4 KB
ID:	42797   Click image for larger version

Name:	Stoch Chart 2.jpg
Views:	270
Size:	72.7 KB
ID:	42798   Click image for larger version

Name:	Stoch Chart 3.jpg
Views:	251
Size:	75.4 KB
ID:	42799  
Reply With Quote
Thanked by:
  #25 (permalink)
 
michaelf's Avatar
 michaelf 
Mérida, Mexico
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: NinjaTrader Brokerage
Trading: MNQ
Frequency: Daily
Duration: Minutes
Posts: 559 since Mar 2011
Thanks Given: 1,434
Thanks Received: 581

Fat Tails
Thank you for you reply, now I understand, in other words the middle of a candle makes the change, other before or after a bar

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #26 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


michaelf View Post
Fat Tails
Thank you for you reply, now I understand, in other words the middle of a candle makes the change, other before or after a bar

Let us say that the indicator value for that bar is decisive, and that indicator value is aligned to the middle of the bar.

Everything which is not middle of the bar is just interpolation, because the eye of the beholder prefers a smooth line to a step function.

Reply With Quote
Thanked by:
  #27 (permalink)
 
michaelf's Avatar
 michaelf 
Mérida, Mexico
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: NinjaTrader Brokerage
Trading: MNQ
Frequency: Daily
Duration: Minutes
Posts: 559 since Mar 2011
Thanks Given: 1,434
Thanks Received: 581

I’m trying something out and I’m really will appreciate it when somebody can add a Background color function to an RSI indicator. I’m tried it, but actually I’m miles away from understand programing.

I would like only the RSI panel to background color it, like the Stochastic in the previous posts.
This is my idea:
When RSI is going up and it is below the 50 line = Background color LIME (for example)
When RSI is going up and it is above the 50 line = Background color GREEN (for example)
When RSI is going down and it is above the 50 line = Background color ORANGE (for example)
When RSI is going down and it is below the 50 line = Background color RED (for example)

I hope someone can help me with that.
Thanks a lot
michael

Follow me on Twitter Visit my NexusFi Trade Journal 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

I wonder if FatTails or redratsal can solve this one.
I use a linear gradientbrush to paint my background. How can I either
a) convert this to a rgb color code so that I can use BackColorAll or
b) Back Color the whole of the form - all Panels, axis areas,etc

It's part of Making Charts Pretty but thought I would hop over here to see if someone knows the answer(s).

Reply With Quote
  #29 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090


Mindset View Post
I wonder if FatTails or redratsal can solve this one.
I use a linear gradientbrush to paint my background. How can I either
a) convert this to a rgb color code so that I can use BackColorAll or
b) Back Color the whole of the form - all Panels, axis areas,etc

It's part of Making Charts Pretty but thought I would hop over here to see if someone knows the answer(s).

@Mindset

Don't know if it can help but have you tried HSL to a string .net - How would I represent an HSL and an RGB color as a class in C#? - Stack Overflow

Visit my NexusFi Trade Journal Reply With Quote
  #30 (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 so I went to NT support - and they can't reveal the BackColorAll method to the users and apparently you can't convert a brush to a color. All very frustrating. For something that seems to simple.

What I find intensely frustrating is that I have exposed the following

ChartControl.Bounds
ChartControl.BackColor and BackColorAll
ChartControl.Canvas points
Even Rectangle screenRectangle = Screen.PrimaryScreen.Bounds

NONE of which will give the bounds of the whole form on which the chart is made- maddening.

Reply With Quote




Last Updated on October 15, 2014


© 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