Add Background Color function to an indicator - NinjaTrader Programming | futures io social day trading
futures io futures trading


Add Background Color function to an indicator
Updated: Views / Replies:9,644 / 33
Created: by michaelf Attachments:11

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 11  
 
Thread Tools Search this Thread
 

Add Background Color function to an indicator

  #21 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


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
Register to download File Type: zip StochasticsColorBackGround.zip (10.0 KB, 190 views)
Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
  #22 (permalink)
Elite Member
Holland, Michigan
 
Futures Experience: None
Platform: ninjatrader
Broker/Data: CQG
Favorite Futures: Acoustic Guitar
 
trs3042's Avatar
 
Posts: 1,802 since Jun 2009
Thanks: 23,771 given, 5,600 received


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)
Elite Member
Mérida, Mexico
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: looking
Favorite Futures: CL
 
michaelf's Avatar
 
Posts: 508 since Mar 2011
Thanks: 1,153 given, 512 received


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
Add Background Color function to an indicator-3-min-eurusd.jpg  
Reply With Quote
 
  #24 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


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
Add Background Color function to an indicator-stoch-chart-1.jpg   Add Background Color function to an indicator-stoch-chart-2.jpg   Add Background Color function to an indicator-stoch-chart-3.jpg  
Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #25 (permalink)
Elite Member
Mérida, Mexico
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: looking
Favorite Futures: CL
 
michaelf's Avatar
 
Posts: 508 since Mar 2011
Thanks: 1,153 given, 512 received

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

Reply With Quote
 
  #26 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


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
The following user says Thank You to Fat Tails for this post:
 
  #27 (permalink)
Elite Member
Mérida, Mexico
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: looking
Favorite Futures: CL
 
michaelf's Avatar
 
Posts: 508 since Mar 2011
Thanks: 1,153 given, 512 received

RSI with background color

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

Reply With Quote
 
  #28 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

Twist

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)
Elite Member
Milan (I)
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Kinetick
Favorite Futures: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,217 given, 2,067 received


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

Reply With Quote
 
  #30 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

BackColor


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

Reply



futures io > > > > > Add Background Color function to an indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background color neilzep NinjaTrader 4 May 17th, 2011 11:58 PM
Calling Indicator in Wrapper Function? serac NinjaTrader Programming 2 February 9th, 2011 04:54 PM
ninja background colour dependant on indicator kiwihsv NinjaTrader 9 January 6th, 2011 03:57 AM
Message for MindSet regarding your gradient background indicator FBJS NinjaTrader Programming 12 December 16th, 2010 08:40 AM
Set Background Color in EasyLanguage Big Mike EasyLanguage Programming 5 October 27th, 2010 01:45 PM


All times are GMT -4. The time now is 03:30 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.15 seconds with 20 queries on phoenix via your IP 54.226.132.197