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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        598 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        557 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X