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 05-02-2010, 04:33 PM   #1
photog53
Senior Member
 
Join Date: Feb 2010
Location: Kansas
Posts: 142
Thanks: 4
Thanked 9 times in 5 posts
Default Changeable Color

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.
photog53 is offline  
Reply With Quote
Old 05-02-2010, 10:32 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

photog53,

Please see this tip here for creating custom color parameters: http://www.ninjatrader-support2.com/...ead.php?t=4977
NinjaTrader_Josh is offline  
Reply With Quote
Old 05-03-2010, 06:32 AM   #3
mountainclimber
Senior Member
 
Join Date: Jun 2008
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Skype™ to mountainclimber
Default

Hello,

I built a color change drawregion indicator:
http://www.ninjatrader-support2.com/...N&pp=15&page=2

Use that as an example and let me know if you have q's...
mountainclimber is offline  
Reply With Quote
Old 05-03-2010, 08:15 AM   #4
photog53
Senior Member
 
Join Date: Feb 2010
Location: Kansas
Posts: 142
Thanks: 4
Thanked 9 times in 5 posts
Default Thanks!!

Thanks for the prompt replies!! I'll take a look.
photog53 is offline  
Reply With Quote
Old 05-03-2010, 04:41 PM   #5
mountainclimber
Senior Member
 
Join Date: Jun 2008
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Skype™ to mountainclimber
Default

Did you get it figured out?
mountainclimber is offline  
Reply With Quote
Old 05-03-2010, 09:48 PM   #6
photog53
Senior Member
 
Join Date: Feb 2010
Location: Kansas
Posts: 142
Thanks: 4
Thanked 9 times in 5 posts
Default

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)
photog53 is offline  
Reply With Quote
Old 05-04-2010, 08:40 AM   #7
mountainclimber
Senior Member
 
Join Date: Jun 2008
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Skype™ to mountainclimber
Default

Sounds great!
mountainclimber is offline  
Reply With Quote
Old 05-05-2010, 09:31 PM   #8
photog53
Senior Member
 
Join Date: Feb 2010
Location: Kansas
Posts: 142
Thanks: 4
Thanked 9 times in 5 posts
Default

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.
photog53 is offline  
Reply With Quote
Reply

Tags
moving average channel

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
Change chart panel back color and bar color for a previous bar. ackchan General Programming 5 03-09-2010 08:44 AM
Color for bars... Alfred Version 7 Beta General Questions & Bug Reports 6 10-19-2009 03:14 PM
Color for background anmir55 General Programming 6 12-29-2008 02:42 PM
background color safetrading Indicator Development 2 12-19-2008 10:41 AM
Volume Color NinjaTrader_Josh NinjaScript File Sharing Discussion 6 12-19-2007 08:36 AM


All times are GMT -6. The time now is 10:27 AM.