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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    198 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    364 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    283 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X