Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sastrades, 01-31-2024, 10:19 PM
    12 responses
    186 views
    0 likes
    Last Post sastrades  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    8 responses
    863 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by giulyko00, 04-24-2024, 12:03 PM
    6 responses
    29 views
    0 likes
    Last Post giulyko00  
    Started by 00nevest, 04-27-2024, 02:27 PM
    3 responses
    27 views
    0 likes
    Last Post 00nevest  
    Started by Newtrader101, Today, 07:36 AM
    0 responses
    4 views
    0 likes
    Last Post Newtrader101  
    Working...
    X