PDA

View Full Version : Changeable Color


photog53
05-02-2010, 04:33 PM
I have succeed in creating a Ninja 7 indicator that creates a "moving average channel" (using DrawRegion) with semi-opaque gray channel between the SMA High and SMA Low. (thanks to the forum threads!!!)
I cannot however, seem to create a place in 'Parameters' or 'Plots' for a way to change the color of the channel. I tried creating a public entry to return a System.Drawing.Color value....but that has not worked. Can you point me to an example of code where someone has created a way to select color from the "Indicators Screen" for the channel??

NOTE: I did successfully create upper and lower 'Plots" for line colors.

NinjaTrader_Josh
05-02-2010, 10:32 PM
photog53,

Please see this tip here for creating custom color parameters: http://www.ninjatrader-support2.com/vb/showthread.php?t=4977

mountainclimber
05-03-2010, 06:32 AM
Hello,

I built a color change drawregion indicator:
http://www.ninjatrader-support2.com/vb/local_links.php?catid=1&sort=N&pp=15&page=2

Use that as an example and let me know if you have q's...

photog53
05-03-2010, 08:15 AM
Thanks for the prompt replies!! I'll take a look.

mountainclimber
05-03-2010, 04:41 PM
Did you get it figured out?

photog53
05-03-2010, 09:48 PM
Yes...(thanks so much!!!) It works well.
I am now adding code so the indicator can select a variety of "moving averages" and paint a High/Low channel for each of them depending on selection. After it is tested, I will upload the indicator to the Ninja forum for anyone who wants it can use it.
(This indicator may have been done before, but I'd like to offer it in return for all the info I've received over the last several months from this site)

mountainclimber
05-04-2010, 08:40 AM
Sounds great!

photog53
05-05-2010, 09:31 PM
I posted the completed Ninja 7 version of this indicator on the "sharing" portion of this forum. I will put a Ninja 6.5 version out later as well. Thanks again for all the help.