Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access Strategy and Bars objects for custom analysis class

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

    Access Strategy and Bars objects for custom analysis class

    Brief explanation:

    I'm trying to create an analysis class to generate test data and access strategies to test the generated data.
    I don't know of anywhere that has full documentation about the Bars and Strategy classes so I'd be able to fill the Bars object with generated data and then enable the strategy for testing on the generated data.

    I'd love to further explain if necessary for any guidance.

    Thanks for any response.

    #2
    Hi Lumbeezlk thanks for posting. There is no supported way of generating a custom Bars object. The Series<T> is the data structure to use if you need to fill in custom data for each bar in the series the strategy is running on:


    Kind regards,
    -ChrisL

    Comment


      #3
      NinjaTrader_ChrisL If I do this, is it possible to enable the strategy to use the data in the Series<T> data structure and simulate trades?

      Comment


        #4
        Hi Lumbeezl, You can calculate trade signals based on the values of the Series<t> array. e.g. Most indicators, like the SMA object can take any Series<double> as input:

        var x = SMA(MySeries, 14)[0] //latest average of the custom Series object.

        All strategies run off an underlying data series i.e. the BarsArray[] object, so the strategy needs to be attached to a data series either through a Chart, the Strategies tab of the Control Center, or the Strategy Analyzer.

        Kind regards,
        -ChrisL

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        29 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        46 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X