Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Three Period Strategy with DataSeries

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

    Three Period Strategy with DataSeries

    Hello,

    I'm setting up a strategy with several DataSeries on three time-frames.

    I've looked at the SampleDataSeries and the SampleMultiTimeFrameOrders for ideas. I don't want to overload my script but I'm using this quantity of DataSeries for three time periods
    Code:
    [FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]
    [SIZE=2][FONT=Courier New][COLOR=#0000ff]private[/COLOR][/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DataSeries primaryLRHigh;[/SIZE][/FONT]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DataSeries secondaryLRHigh;[/SIZE][/FONT]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DataSeries tertiaryLRHigh;[/SIZE][/FONT]
     
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]...[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DataSeries primaryPrevMidpoint;[/SIZE][/FONT]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DataSeries secondaryPrevMidpoint;[/SIZE][/FONT]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DataSeries tertiaryPrevMidpoint;[/SIZE][/FONT]
     
    [/SIZE][/FONT]
    Am I trying to get too much data? or do I need to filter out some data somehow or ??? I really only need for the past 3 or 4 bars anyway.

    I may be missing some required lines to go further. I tried it so far with an attempt to print data to the output window and it does'nt go too far.

    Thanks for any direction you can send me...

    Kirk
    Attached Files

    #2
    Sorry. Not sure I follow. What is the problem you are having? You have a lot of DataSeries here, but let us just keep it simple. Please describe your issue in relation to 1 DataSeries. All the rest are done in exactly the same way.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I've tried to follow the samples per each dataseries. The samples are only showing 1 SMA and 1 rangevalue close-open. My project is using three time frames and nine or more indicators. Is this too many?

      I'm not sure why I can't get the more of the current bar's data on the printout to the output window even though the first few print lines work.

      If I'm overloading the strategy with too many dataseries, I want to know that. I have to use several of them but can eliminate some of them if need be. If I'm missing one key ingredient because I didn't understand where it says regarding the SMA:

      /* Syncs another DataSeries object to the secondary bar object.
      We use an arbitrary indicator overloaded with an IDataSeries input to achieve the sync.
      The indicator can be any indicator. The DataSeries will be synced to whatever the
      BarsArray[] is provided.*/

      Comment


        #4
        Kirk,

        There is no hard coded limit as to how many you can use. I still fail to understand what issue you are having. I suggest you just start with one set and work up from there. Look in Control Center for errors. If no errors then you will need to debug with Print().
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh,

          thanks for your reply,

          I've gone ahead and added one at a time and I saw my missing line items.

          I think I can move ahead now.

          Thanks,

          kz

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          602 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 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
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X