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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    57 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    78 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    39 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    61 views
    0 likes
    Last Post PaulMohn  
    Working...
    X