Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error reflecting property 'MarketDataUpdate'

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

    Error reflecting property 'MarketDataUpdate'

    I am getting an error when running a strategy.

    The strategy is actually broken into a base strategy:

    public abstract class TradeBase : Strategy, INotifyPropertyChanged

    ... and a strategy calling the base....

    ​ public class StrategyExample : TradeBase

    Everything works fine (I have been using this for months). I tried to add a secondary data series to the base (same instrument, different time frame) and when I try to execute I get the following error:


    There was an error reflecting type 'NinjaTrader.NinjaScript.Strategies.xxxxxxxx'. ---> System.InvalidOperationException: There was an error reflecting property 'MarketDataUpdate'. ---> System.InvalidOperationException: There was an error reflecting type 'NinjaTrader.Data.MarketDataEventArgs'. ---> System.InvalidOperationException: There was an error reflecting property 'Instrument'. ---> System.InvalidOperationException: There was an error reflecting type 'NinjaTrader.Cbi.Instrument'. ---> System.InvalidOperationException: Cannot serialize member 'NinjaTrader.Cbi.Instrument.HistoricalData' of type 'NinjaTrader.Data.BarsBytes[]

    Do all the data series need to be defined in StrategyExample or is there another way to address this?

    #2
    Hello kenconcannon,

    Custom inheritance is not supported in NinjaScript so that is not something we can assist with. While you can use that C# feature it may cause problems with various parts of the platform. We suggest to only use the standard inheritance that the platform creates such as public class MyStrategy : Strategy

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X