Not retaining colors - futures io
futures io



Not retaining colors


Discussion in NinjaTrader

Updated
    1. trending_up 1,678 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Not retaining colors

(login for full post details)
  #1 (permalink)
 kashter 
Moving
 
Experience: Intermediate
Platform: NT
Broker: Mirus/Zen Fire
Trading: ES
 
Posts: 82 since May 2010
Thanks: 90 given, 44 received

Hi,
I am trying to code this volume counter to retain its colors but I seem to fail to achieve this. Not much of a programmer, but with the little knowledge I have thought serializing the colors in the property section would keep the colors. Any help appreciated.

Attached Files
Register to download File Type: cs AAVolCounter.cs (9.1 KB, 6 views)
Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(107 thanks from 17 posts)
looks_twoSalao's Journalby Salao
(33 thanks from 8 posts)
looks_3Deetee’s DAX Trading Journal (time based)by Deetee
(28 thanks from 11 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(14 thanks from 9 posts)
looks_5Maybe a little bit different journalby Malykubo
(9 thanks from 8 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Would You Sell Your System?
73 thanks
The Crude Dude Oil Trading System
44 thanks
Big Mike in Ecuador
42 thanks
The New Micro Contract - MICRO BITCOIN coming May 2021
25 thanks
futures io site changelog and issues/problem reporting
24 thanks
 
(login for full post details)
  #3 (permalink)
 Jigsaw Trading  Jigsaw Trading is an official Site Sponsor
Site Sponsor

Web: Jigsaw Trading
AMA: Ask Me Anything
Webinars: Jigsaw Trading Webinars
Elite offer: Click here
 
 
Jigsaw Trading's Avatar
 
Posts: 2,982 since Nov 2010
Thanks: 825 given, 10,323 received


Here's a snippet from my code that does save the colours....

 
Code
        [XmlIgnore()]
        [Description("At Ask For Color")]
        [GridCategory("Appearance")]
        public Color AtAskColor {
            get { return foreColor[(int)PriceType.AT_ASK]; }
            set { foreColor[(int)PriceType.AT_ASK] = value; }
        }
        
        [Browsable(false)]
        public string AtAskColorSerialize {
            get { return NinjaTrader.Gui.Design.SerializableColor.ToString(foreColor[(int)PriceType.AT_ASK]); }
            set { foreColor[(int)PriceType.AT_ASK] = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }
        }
Hope it helps.

Pete

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #4 (permalink)
 kashter 
Moving
 
Experience: Intermediate
Platform: NT
Broker: Mirus/Zen Fire
Trading: ES
 
Posts: 82 since May 2010
Thanks: 90 given, 44 received

Pete,
Tried out your snippet but getting all sorts of errors, not to mention your code seems sophisticated for my basic level!
Errors include "cannot convert Syste.Drawing.Color to 'int' for the bit "return foreColor[(int)..."

Will work on it, any more (simpler clues would be appreciated.


DionysusToast View Post
Here's a snippet from my code that does save the colours....

 
Code
        [XmlIgnore()]
        [Description("At Ask For Color")]
        [GridCategory("Appearance")]
        public Color AtAskColor {
            get { return foreColor[(int)PriceType.AT_ASK]; }
            set { foreColor[(int)PriceType.AT_ASK] = value; }
        }
        
        [Browsable(false)]
        public string AtAskColorSerialize {
            get { return NinjaTrader.Gui.Design.SerializableColor.ToString(foreColor[(int)PriceType.AT_ASK]); }
            set { foreColor[(int)PriceType.AT_ASK] = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }
        }
Hope it helps.

Pete


Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
 kashter 
Moving
 
Experience: Intermediate
Platform: NT
Broker: Mirus/Zen Fire
Trading: ES
 
Posts: 82 since May 2010
Thanks: 90 given, 44 received

Solved!

FWIW, applied the color code change within the DrawText and now works.

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Not retaining colors


Last Updated on March 6, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April

Seven Trading Mistakes Solved With Smart Trading Tools w/Brannigan Barrett

Elite only
     



Copyright © 2021 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