Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is the meaning of this error message ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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'

    #2
    Issues like:

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

    should be

    MMAskTot.Set(SMA(AskTot, 20)[0]);
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    256 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    165 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    169 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    252 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    203 views
    0 likes
    Last Post CarlTrading  
    Working...
    X