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