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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 08-09-2009, 11:24 AM   #1
velocity
Senior Member
 
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
Default DataSeries

I am trying to create a custom data series.

Indicator4_data.Set(Myindicator(
true,10,1,long.wav,1,13,short.wav,false,true,3,true).Signal[0]);

Everything is ok except for long.wav and short.wav. NT is giving me an error that says:

"long does not contain a definition for 'wav'"
"short does not contain a definition for 'wav'"


What do I need to do here?
velocity is offline  
Reply With Quote
Old 08-10-2009, 12:20 AM   #2
whself beginner
Member
 
Join Date: Dec 2008
Posts: 80
Thanks: 0
Thanked 1 time in 1 post
Default

the problem is the " . ". you must create an enum for long and short or
you will use the "long.wav" as a string in your series.
whself beginner is offline  
Reply With Quote
Old 08-10-2009, 04:13 AM   #3
velocity
Senior Member
 
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
Default

placing quotes around "long.wav" and "short.wave" did the trick, thanks.
velocity 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
Dataseries velocity Miscellaneous Support 3 08-17-2010 02:11 PM
DataSeries of Colors SystemTrading General Programming 1 01-23-2009 12:03 PM
How to copy DataSeries to another DataSeries xewoox General Programming 8 12-02-2008 07:53 AM
Indicator on a DataSeries jriverac Strategy Development 17 06-09-2008 11:42 AM
DataSeries objects geoMEAN General Programming 5 04-22-2008 08:06 AM


All times are GMT -6. The time now is 07:10 PM.