Color Gradient for Candles in NinjaTrader - NinjaTrader | futures io social day trading
futures io futures trading


Color Gradient for Candles in NinjaTrader
Updated: Views / Replies:6,925 / 29
Created: by aligator Attachments:13

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
 13  
 
Thread Tools Search this Thread
 

Color Gradient for Candles in NinjaTrader

  #21 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary

Gradient Color in Action...

T1 @ 91.23

Attached Thumbnails
Color Gradient for Candles in NinjaTrader-cl-07-12-12-range-5_22_2012-5.png  
Reply With Quote
The following user says Thank You to aligator for this post:
 
  #22 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received


aligator View Post
OK, I got more PMs. A copy of the basic working version is posted here:

https://futures.io/elite-circle/20413-gradient-color-bars.html#post223725

@aligator

Congratulations ... now you can start taking some of the custom indicator load off of @Fat Tails....

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following user says Thank You to ThatManFromTexas for this post:
 
  #23 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary



ThatManFromTexas View Post
@aligator

Congratulations ... now you can start taking some of the custom indicator load off of @Fat Tails....

@ThatManFromTexas,

I figured.... One problem though, I am color blind and my coloring indicators print only in braille. Also, it is too late to be alerted by anything and no longer can catch arrows in the air.

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,599 received
Forum Reputation: Legendary


aligator View Post
T1 @ 91.23


I think that you candles are quite confusing, and that you should add a feature. :


The problem is that your candles do not allow to differentiate between an upclose and a downclose. The solution has already been found for black and white candle sticks. The downcloses are filled (black) and the upcloses are hollow (white).

Depending on the the candle color and the background selected, it can be difficult to see a hollow candle on a chart. The solution is to use an opacity for the upcloses which is used to calculate the fill color from the outline color.

For the code you could have a look at the MACDBBLinesV3 indicator. It allows the selection of an opacity for upcloses.

 
Code
protected override void OnStartUp()
{
       .......
	if (ChartControl != null && ChartControl.ChartStyleType == ChartStyleType.CandleStick)
	{
		candles = true;
		alpha = 25*opacity; // opacity can be between 0 and 10
	}
	else
		candles = false;
        ......
}


protected override void OnBarUpdate()
{
        .......
	if(candles && Close[0] > Open[0])
		BarColor = Color.FromArgb(alpha, BarColor);
        ......
}

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #25 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary


Fat Tails View Post
I think that you candles are quite confusing, and that you should add a feature.

Thank you @Fat Tails.

I am more confused now than I ever was, I knew that task was out of my league.

I need to go back to my sand box and scoop up your script to make all the background/foreground color addicts (me included) happy .

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,599 received
Forum Reputation: Legendary


aligator View Post
Thank you @Fat Tails.

I am more confused now than I ever was, I knew that task was out of my league.

I need to go back to my sand box and scoop up your script to make all the background/foreground color addicts (me included) happy .


That's only a few lines. This is the logic.

(1) First check ChartControl for null. It is null, if your indicator is called from another indicator or strategy. In that case you are not allowed to check for Candlesticks (this would crash the indicator)

(2) Check Chart Control for Candlesticks, if it is not null. If your chart is a candlestick chart, set the boolean candles to true.
For OHLC bars there is nothing to be done, as you can differentiate between upclose and downclose bars without any colors.

(3) In case you have candles, use the candle color for
-> candle outline
-> candle fill color for downcloses

(4) For upcloses use a reduced alpha (somewhere between 0 and 100). As alpha range is 250 and users are used to 10 different values for the opacity, allow user to enter opacity and calculate alpha value from opacity. Use the modified color as fill color for upcandles.

Just an explanation in case that your response was serious. If it was not, somebody else will like the answer.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
  #27 (permalink)
Elite Member
Boston MA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG
Favorite Futures: ES, ZB, CL
 
Posts: 228 since Apr 2010
Thanks: 287 given, 104 received


aligator View Post
Anyone for a ride?

@aligator

Thanks for the indicator - just great.

It gave me an idea to to paint the bars per RSI (and remove RSI from the chart).
I am not much of a coder, but with the help of Ninja Script Wizard was able to do the need full.


Thanks for the inspiration.

Cheers,
Kumar

Reply With Quote
 
  #28 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary


renvik View Post
@aligator

Thanks for the indicator - just great.

It gave me an idea to to paint the bars per RSI (and remove RSI from the chart).
I am not much of a coder, but with the help of Ninja Script Wizard was able to do the need full.


Thanks for the inspiration.

Cheers,
Kumar

Thanks@Kumar

That was basically what I did. It makes a simple and elegant visual of an indicator without the clutter.

Cheers!

Reply With Quote
 
  #29 (permalink)
Elite Member
Boston MA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG
Favorite Futures: ES, ZB, CL
 
Posts: 228 since Apr 2010
Thanks: 287 given, 104 received


aligator View Post
Thanks@Kumar

That was basically what I did. It makes a simple and elegant visual of an indicator without the clutter.

Cheers!


Here is my version for RSI.

RSI-K period is selectable with an ability to reverse the gradient color scheme (some may not like up bars being painted red!).

Cheers,
Kumar

Attached Files
Register to download File Type: zip RSIGradientColorBars.zip (7.5 KB, 115 views)
Reply With Quote
The following 6 users say Thank You to renvik for this post:
 
  #30 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary



renvik View Post
Here is my version for RSI.

RSI-K period is selectable with an ability to reverse the gradient color scheme (some may not like up bars being painted red!).

Cheers,
Kumar

Very Nice!

The reason I had Red color for the upper limits was to indicate a selling opportunity and buying for the green at the bottom. Whatever, one's eye pleases. However, the concept makes visual sense for color divergence.

Cheers!

Reply With Quote

Reply



futures io > > > > Color Gradient for Candles in NinjaTrader

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
Better candles visually Hapster NinjaTrader 5 April 16th, 2011 01:46 PM
Message for MindSet regarding your gradient background indicator FBJS NinjaTrader Programming 12 December 16th, 2010 08:40 AM
Change Sharky Indicator to candles? c12345 NinjaTrader 1 September 16th, 2009 04:31 PM
ModHA2 Candles Fix? Dragon NinjaTrader 2 August 21st, 2009 01:24 PM
NinjaTrader chart tip for unlimited color options Big Mike NinjaTrader 0 June 11th, 2009 11:29 PM


All times are GMT -4. The time now is 05:11 PM.

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-11 in 0.12 seconds with 40 queries on phoenix via your IP 54.226.132.197