NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 08-16-2011, 04:46 PM   #1
richtobey
Member
 
Join Date: Oct 2009
Posts: 35
Thanks: 0
Thanked 1 time in 1 post
Default Saving defaults sets colors to empty upon reload

I have three indicators that have are public variables of type Color. I set them to Color.Black, Color.Orange, and Color.DarkGreen privately. Upon loading the indicator before I set any defaults all is fine -- the colors show up in the indicator configuration as how I set them privately.

After right clicking in the indicator configuration and saving defaults, upon reload those colors are set to Color.[Empty] which the system treats as transparent.

How can I change things so the defaults don't load as Color.Empty?

Rich
richtobey is offline  
Reply With Quote
Old 08-16-2011, 04:50 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi Rich,

You need to serialize the color inputs so they can saved properly in an xml file. Help for serializing color inputs is available here:
http://www.ninjatrader.com/support/f...ead.php?t=4977
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving chart data (not defaults) sesplin Charting 1 03-20-2011 07:24 PM
Saving chart data (not defaults) sesplin ATM Strategies (Discretionary Trading) 1 03-20-2011 07:22 PM
Saving fib defaults gg80108 Miscellaneous Support 1 10-21-2010 08:29 AM
Permantly saving changed defaults BradB Charting 1 11-08-2008 11:03 PM
Plotted colors dont refresh when you reload ninjascript dojara General Programming 1 03-07-2008 10:24 PM


All times are GMT -6. The time now is 08:47 PM.