![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Member
Join Date: Jul 2007
Posts: 93
Thanks: 0
Thanked 0 times in 0 posts
|
I have some indicators that change the back color upon certain conditions. I'd like to allow the user to select the color as a variable but can't find a way to provide that as an input (like you can for lines). Can anyone tell me how to do that?
Also some indicators only are active during certain time windows. Similarly, is there a way to allow the user to input times as variables? Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello Richard,
Thank you for your post. Please see the article below on creating user definable Color Inputs: http://www.ninjatrader-support2.com/...ead.php?t=4977 There isn't an equivalent guide on user definable custom times. Working with DateTime properties is more C# related than NinjaScript. The article below provides advice on working with Date/Time objects in NinjaScript, but you may need to look at some of the C# reference samples to achieve what you want. http://www.ninjatrader-support2.com/...ad.php?t=19292 http://msdn.microsoft.com/en-us/libr...me(VS.71).aspx
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jul 2007
Posts: 93
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks for the posts. I've downloaded them and am working on it.
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jul 2007
Posts: 93
Thanks: 0
Thanked 0 times in 0 posts
|
I got the color inputs going fine. Thanks so much.
I think I am following how to manipulate times from the sample you attached, but not sure how to imput a time from the user. Any help? |
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi Richard,
Unfortunately this is outside the scope of support we provide. May be easier to accept an INT representing time and work with that.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jul 2008
Posts: 527
Thanks: 0
Thanked 9 times in 6 posts
|
Hi Richard,
you could try to define a property as DateTime or TimeSpan and test how the result would look like. Regards Ralph |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The maximum of two variables | Shansen | Indicator Development | 3 | 07-13-2009 04:45 AM |
| How to sum 2 time variables | pmaglio | General Programming | 10 | 02-11-2009 10:29 AM |
| Using variables | eswap0 | General Programming | 2 | 06-07-2008 05:56 PM |
| Chart background color change - defined time intervals | astra | Indicator Development | 1 | 03-12-2008 08:38 PM |
| Limited use of variables | andy2001 | General Programming | 5 | 03-04-2008 03:47 PM |