Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

error Marketdataeventargs could not be found

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

    error Marketdataeventargs could not be found

    I am trying to add this to my code in Ninja8 and when I hit compile I get

    Marketdataeventargs could not be found (are you missing using a directive or an assembly????????????????????????????







    protected override void OnMarketData(MarketDataEventArgs e)
    {
    if (e.MarketDataType == MarketDataType.Ask)
    {
    //askPrice = e.Price;
    }
    }



    here are my declarations

    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Windows.Media;
    using System.Xml.Serialization;
    #endregion












    #2
    Hello marluv,

    It looks like you are missing the standard using statements that you need for most NinjaScript related classes. Please do the following:
    Open any indicator, for example the ADL
    Copy the using statements from the top
    If you have at this point manually added any using statements, take those statements out and place them a few lines below the top.
    Paste the using statements from the ADL at the top of the file.

    The using statements that you see in other files and also when you generate new NinjaScript files are required to avoid this type of error.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    602 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    347 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    559 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    558 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X