Access Chart Color property? - NinjaTrader Programming | futures io social day trading
futures io futures trading


Access Chart Color property?
Updated: Views / Replies:1,021 / 9
Created: by vantojo Attachments:3

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

Access Chart Color property?

  #1 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

Access Chart Color property?

I would like to set the chart background color in code....

For example, when I want to print or save the chart, I want the background to be White. Otherwise, I use a darker color, which does not print well, to ease the brightness of the chart on my eyes.

Now I have to go through multiple steps, right mouse click, pop up box....et cetera

If I can access the Chart property directly and change the color with code then I can just make a button.

Actually when I think about it...wouldn't it be great to have a button for Print, and a button for Save, that would do the whole thing with one click...change the chart background to white, print/save, and then revert the chart back to the original color...better yet, to do this in the background.

any ideas guys?

(it would be better even yet, if Ninja would provide this feature...when Printing or Saving to have a default color for background)

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received


@vantojo

It is actually quite straight forward - to get current chart background, change it, then revert to original use:

 
Code
Color originalColor = ChartControl.BackColor;

// change color to green:
ChartControl.BackColor = Color.Green;

// revert back to original color:
ChartControl.BackColor = originalColor;


Last edited by gregid; March 27th, 2015 at 09:11 PM.
Reply With Quote
 
  #4 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received

As to your other requests, look into following threads and solution for enhanced Print/Save functionality:
@ratfink's journaling tool:
https://futures.io/elite-circle/32667-chartminder-chart-trade-journaling.html
@vvhg's screenshot utility and some other tools by him:
https://futures.io/elite-circle/23967-screenshot-utility-ninjatrader-vvscreenshot.html
https://futures.io/elite-circle/24373-vvhg-s-little-helpers-keeping-them-one-place.html

Reply With Quote
The following user says Thank You to gregid for this post:
 
  #5 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

:-)

Way cool, thank you!!

Reply With Quote
 
  #6 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

too easy -- thank you

private void ColorButton_Click(object sender, EventArgs e)
{
Color MyGreen = Color.FromArgb (0,192,0);

if (ChartControl.BackColor == MyGreen)
ChartControl.BackColor = Color.Yellow;
else
if (ChartControl.BackColor == Color.Yellow)
ChartControl.BackColor = Color.White;
else
if (ChartControl.BackColor == Color.White)
ChartControl.BackColor = MyGreen;
}

Reply With Quote
 
  #7 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received

You could also add a dropdown field that would change the "theme" on selection.

BTW, once you are done with the indicator, if you can, post it here so others (less programmatically inclined can benefit.

Reply With Quote
 
  #8 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

ok

Ok, sample TEST code attached. This will put a button on ChartTrader that allows clicks to toggle through a hard coded group of colors....see ColorButton_Click(...) to add or delete colors.

I don't like using drop downs because they require multiple mouse movements...for me they are too complicated when I want to keep my focus on the charts.

So, I prefer to click through the short list rather than do the drop down.

A single click advances through the list.

The list could be in an array or other structure.

For it to work, the initial chart color must be one in the list.

Attached Files
Register to download File Type: cs BMTColorButton.cs (2.6 KB, 9 views)
Reply With Quote
The following user says Thank You to vantojo for this post:
 
  #9 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received

@vantojo,
As a reward for sharing with the community here is updated version which doesn't hard code Colors, instead it lets you select new colors from the collection editor.

For those trying it out - the button is located on the Chart Trader.

Attached Files
Register to download File Type: zip BMTColorButton.zip (1.5 KB, 20 views)
Reply With Quote
The following 2 users say Thank You to gregid for this post:
 
  #10 (permalink)
Elite Member
Mother Earth
 
Futures Experience: None
Platform: Ninja Trader 7, MT 4
Favorite Futures: Forex
 
jupikseliga's Avatar
 
Posts: 158 since Feb 2012
Thanks: 110 given, 86 received



gregid View Post
@vantojo,
As a reward for sharing with the community here is updated version which doesn't hard code Colors, instead it lets you select new colors from the collection editor.

For those trying it out - the button is located on the Chart Trader.

Its Perfect !! Thank you for this# !!! @gregid

Would u think, that you can add chart button for change background color exactly like in vvScreenShot ?

Share your experience , it always returns back to you
Attached Thumbnails
Access Chart Color property?-vv.jpg  

Last edited by jupikseliga; August 17th, 2015 at 08:28 PM.
Reply With Quote

Reply



futures io > > > > > Access Chart Color property?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart trader PnL font color shipolito NinjaTrader Programming 1 May 4th, 2013 12:00 PM
Sierra Chart TPO RTH color ETH color GaryD Sierra Chart 2 April 26th, 2013 05:02 AM
How to access any Account information for display on a chart steve2222 NinjaTrader Programming 1 May 29th, 2011 05:19 AM
IQFeed for chart data then Zenfire to access account??? tdaman Reviews of Brokers and Data Feeds 2 April 27th, 2011 10:26 AM
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 06:53 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-13 in 0.12 seconds with 20 queries on phoenix via your IP 54.90.92.204