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 5,792 views
    2. thumb_up 8 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 1 attachments




 
Search this Thread
  #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?
TradingView Opens Volume Footprint Data to Pine Script - …
TradingView
Day 97: Israel-Lebanon Ceasefire Struck Overnight -- WTI …
Traders Hideout
The Confluence Meter: A Multi-Layered Signal Framework B …
The Elite Circle
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114



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 X Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


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,715 since May 2010
Thanks Given: 203
Thanks Received: 2,688


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 X 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 X Reply With Quote
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


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 X Reply With Quote




Last Updated on March 5, 2012


© 2026 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 - Downloads - Top
no new posts