NexusFi: Find Your Edge


Home Menu

 





set custom color


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 3 posts (5 thanks)
    2. looks_two puma with 3 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 NinjaTrader with 1 posts (3 thanks)
    1. trending_up 4,866 views
    2. thumb_up 8 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 1 attachments




 
Search this Thread

set custom color

  #1 (permalink)
 Blackburn 
Malchow (Meckl.)
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Trading: Stocks
Posts: 17 since Mar 2011
Thanks Given: 15
Thanks Received: 0

Hallo,

i want to set custom colors in my strategy like this:

BarColor = "106, 142, 236";
CandleOutlineColor = Color.CornflowerBlue;
BackColor = Color.MidnightBlue;

but i can´t compile this. I get this message:

An implicit conversion from type "string ", "System.Drawing.Color"is not possible.

Do you have any ideas?
Thx Blackburn

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #3 (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



Blackburn View Post
Hallo,

i want to set custom colors in my strategy like this:

BarColor = "106, 142, 236";
CandleOutlineColor = Color.CornflowerBlue;
BackColor = Color.MidnightBlue;

but i can´t compile this. I get this message:

An implicit conversion from type "string ", "System.Drawing.Color"is not possible.

Do you have any ideas?
Thx Blackburn

Try

 
Code
BarColor = Color.FromArgb(106,142,236);

Reply With Quote
Thanked by:
  #4 (permalink)
 
puma's Avatar
 puma 
zurich
 
Experience: Advanced
Platform: Sierra ahRrrr CQG ...
Trading: Bund, ES, ...
Posts: 964 since Aug 2010
Thanks Given: 7,273
Thanks Received: 1,507

Hi all

is it possible to use Color.FromArgb(...) in an indicator so that a user can choose the rgb values under the indicator parameters. ?

For me it only works with Color.Blue, Color.Yellow - not with Color.FromArgb(...)

Follow me on Twitter Reply With Quote
  #5 (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


puma View Post
Hi all

is it possible to use Color.FromArgb(...) in an indicator so that a user can choose the rgb values under the indicator parameters. ?

For me it only works with Color.Blue, Color.Yellow - not with Color.FromArgb(...)

Yes of course this is possible. You just need to declare the properties for three user selectable integers, which can then be used to create the color of your plot.

Reply With Quote
Thanked by:
  #6 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686


puma View Post
Hi all

is it possible to use Color.FromArgb(...) in an indicator so that a user can choose the rgb values under the indicator parameters. ?

For me it only works with Color.Blue, Color.Yellow - not with Color.FromArgb(...)

Users can just type the RGB values directly into the plot color property, no need to create three separate properties for each RGB value. Check out the NT8 wishlish thread, this was recently discussed there.

Follow me on Twitter Reply With Quote
Thanked by:
  #7 (permalink)
 
puma's Avatar
 puma 
zurich
 
Experience: Advanced
Platform: Sierra ahRrrr CQG ...
Trading: Bund, ES, ...
Posts: 964 since Aug 2010
Thanks Given: 7,273
Thanks Received: 1,507

here is the link to the post


TY all - will try that

Follow me on Twitter Reply With Quote
  #8 (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


NinjaTrader View Post
Users can just type the RGB values directly into the plot color property, no need to create three separate properties for each RGB value. Check out the NT8 wishlish thread, this was recently discussed there.

Did not know this, thank you for your answer.

The screenshot below shows how to enter that information. In line with the different signatures for ColorFromArgb(), you can enter 4 values (the first one is the alpha value for determining opacity) or 3 values, which is equivalent to alpha = 255 (full color).



Reply With Quote
  #9 (permalink)
 
puma's Avatar
 puma 
zurich
 
Experience: Advanced
Platform: Sierra ahRrrr CQG ...
Trading: Bund, ES, ...
Posts: 964 since Aug 2010
Thanks Given: 7,273
Thanks Received: 1,507

the separator ( ";" or "," ) depends on your country settings

Follow me on Twitter Reply With Quote




Last Updated on March 5, 2012


© 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