![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2009
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I can add a second datastream to an indicator OK. Code:
protected override void Initialize()
{
Add("^TICK", PeriodType.Tick, 150);
}
It says specifically in the documentation that I shouldn't use variables in the Initialize() section, so how do I achieve this? Thanks
Last edited by bubblegum; 06-02-2010 at 07:21 AM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
Thank you for your first forum post! Unfortunately though this is not supported, as there are no bar objects in the Initialize to pull from at that point. What you can do is add user defined inputs when you add the strategy to set these manually when you first add the strategy. Let me know if you need further information on how to do this if this is what you want to do. http://www.ninjatrader.com/support/f...ead.php?t=5782 Let me know if I can be of further assistance.
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2009
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you.
Can this be added as an Enhancement Suggestion somewhere? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
Absolutely, I will get this sent to development for their consideration. Thank You.
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2009
Posts: 429
Thanks: 27
Thanked 11 times in 10 posts
|
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Thanks for the suggestion, Molecool.
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Add additional Periods and Plots to TRIX? | JSBatch | Indicator Development | 9 | 06-01-2010 12:25 PM |
| Lastprice stays fixed on real-time datastream. | ModularMix | Version 7 Beta General Questions & Bug Reports | 9 | 02-13-2010 03:44 PM |
| Accessing variable from a 5min Indicator and 15min Indicator | mefTrader | Market Analyzer | 8 | 01-12-2010 09:14 AM |
| indicator as variable | e-man | Version 7 Beta General Questions & Bug Reports | 3 | 10-20-2009 03:38 PM |
| ERROR: Failed to call 'Add' method for period type 'Tick' | RK_trader | Miscellaneous Support | 24 | 06-04-2009 05:49 AM |