NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 07-18-2007, 03:03 PM   #1
grd974
Senior Member
 
Join Date: Apr 2007
Location: , ,
Posts: 124
Thanks: 0
Thanked 0 times in 0 posts
Default What is the meaning of this error message ?

I took a doing well custom indicator and added these lines of code :

private DataSeries MMAskTot;
private DataSeries MMBidTot;
Add(new Plot(Color.DarkGreen, PlotStyle.Line, "MMAskTot"));
Add(new Plot(Color.DarkMagenta, PlotStyle.Line, "MMBidTot"));
MMAskTot = new DataSeries(this);
MMBidTot = new DataSeries(this);
MMAskTot.Set(SMA(AskTot, 20));
MMBidTot.Set(SMA(BidTot, 20));

When I compiled, I got this message :

The best overloaded method match for 'NinjaTrader.Data.DataSeries.Set(double)' has some invalid arguments
Argument '1': cannot convert from 'NinjaTrader.Indicator.SMA' to 'double'
The best overloaded method match for 'NinjaTrader.Data.DataSeries.Set(double)' has some invalid arguments
Argument '1': cannot convert from 'NinjaTrader.Indicator.SMA' to 'double'
grd974 is offline  
Reply With Quote
Old 07-18-2007, 03:21 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Issues like:

MMAskTot.Set(SMA(AskTot, 20));

should be

MMAskTot.Set(SMA(AskTot, 20)[0]);
NinjaTrader_Ray 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
Unexpected error -104 message muthaf Automated Trading 8 05-08-2008 01:20 AM
Error Message 10001 nelson Miscellaneous Support 5 06-02-2007 07:34 PM
Meaning of Message: Order was placed in incorrect 'BarsInProgress' context? plipa Strategy Development 9 04-22-2007 08:54 AM
Error Message ardenb Installation and Licensing 4 04-11-2007 05:09 PM
What does this error message mean? funk101 Strategy Development 1 04-05-2007 02:42 AM


All times are GMT -6. The time now is 12:06 PM.