Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple dataseries

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

    Multiple dataseries

    hello,

    is there a rule regarding if primary data series has to be greater/less than the secondary data series?

    example 1) say my primary is 1 minute and secondary is daily. I am evaluating market on daily and then executing on 1 minute;

    my output is:

    daily value from close of 8/13/2018;0.72738;8/14/2018 12:00:00 AM
    daily value from close of 8/13/2018;0.72725;8/14/2018 1:00:00 AM
    daily value from close of 8/13/2018;0.72703;8/14/2018 2:00:00 AM
    daily value from close of 8/13/2018;0.72695;8/14/2018 3:00:00 AM

    vs

    example 2) say my primary is daily and secondary is 1 minute. i am evaluating market on daily an

    my output is:

    78.19;0.74032;7/30/2018 5:00:00 PM
    73.82;0.7425;7/31/2018 5:00:00 PM
    76.44;0.74039;8/1/2018 5:00:00 PM
    81.38;0.7361;8/2/2018 5:00:00 PM
    81.63;0.73951;8/3/2018 5:00:00 PM

    my question is: what is the best practice for adding data series with multiple timeframes. should primary be greater than secondary?

    #2
    i guess the pros of having primary greaters than secondary are:

    if i can add tick level secondary data series, i won't have to manually change the code and i can just change the period for primary in strategy analyzer and it would find the appropriate value for the timeframe on my secondary..

    Comment


      #3
      Originally posted by calhawk01 View Post
      i guess the pros of having primary greaters than secondary are:

      if i can add tick level secondary data series, i won't have to manually change the code and i can just change the period for primary in strategy analyzer and it would find the appropriate value for the timeframe on my secondary..
      another question:

      say i

      1) load 1 min data for secondary
      2) add a plot based off secondary data series as an indicator in State.Dataload

      then

      3) run strategy analyzer 60 min on primary bar

      how can i make sure the indicator plots are based off 60 minute marks? as of right now.. it's plotting based on 1 minute but executing based on 60 minute. my exeuctions are correct but plot is misaligned with time

      Comment


        #4
        Hello calhawk01,

        Thank you for your note.

        There would be no advantage to one series being a primary and another as a secondary and vis versa, assuming you’ve considered this in your logic.

        If you wanted your plot to show in the strategy analyzer chart based off a series other than the primary, you could set the value of the plot in OnBarUpdate. Using AddChartIndicator will not work as detailed in the third note at the following page.



        I have attached a sample indicator which will correctly plot a SMA on the strategy analyzer chart, which is based off the secondary series added.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_AlanP View Post
          Hello calhawk01,

          Thank you for your note.

          There would be no advantage to one series being a primary and another as a secondary and vis versa, assuming you’ve considered this in your logic.

          If you wanted your plot to show in the strategy analyzer chart based off a series other than the primary, you could set the value of the plot in OnBarUpdate. Using AddChartIndicator will not work as detailed in the third note at the following page.



          I have attached a sample indicator which will correctly plot a SMA on the strategy analyzer chart, which is based off the secondary series added.

          Please let us know if you need further assistance.
          yea i had seen this method on the forum. thanks for posting it.

          unfortunately, it plots the variable as a overlay on the chart. i wanted it on the panel. i'm fiddling around with another example where you have to create an external indicator that can plot in a different panel..

          Comment


            #6
            Hello calhawk01,

            Plotting in a separate panel in the Strategy Analyzer is not supported however I will add your vote to this feature request.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_AlanP View Post
              Hello calhawk01,

              Thank you for your note.

              There would be no advantage to one series being a primary and another as a secondary and vis versa, assuming youve considered this in your logic.

              If you wanted your plot to show in the strategy analyzer chart based off a series other than the primary, you could set the value of the plot in OnBarUpdate. Using AddChartIndicator will not work as detailed in the third note at the following page.



              I have attached a sample indicator which will correctly plot a SMA on the strategy analyzer chart, which is based off the secondary series added.

              Please let us know if you need further assistance.
              Hello, How can the stairstep plotting of the indicator be avoided?

              BobPerez

              Comment


                #8
                Hello BobPerez,

                The stair stepping are the actual values. Since the secondary instrument does not update as often, there are bars on the primary series that have the same value as the previous bar.

                I am not aware of a way to avoid this when using plots.

                You could try custom rendering your own plot line in OnRender() if you want to render a line that is different from the actual values provided to the plot.

                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  This may be a duplicate of https://forum.ninjatrader.com/forum/...frame-strategy
                  Bruce DeVault
                  QuantKey Trading Vendor Services
                  NinjaTrader Ecosystem Vendor - QuantKey

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  38 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  124 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  64 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  41 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  46 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X