Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Secondary Data Series

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

    Secondary Data Series

    I am having some issues with having my strategy completely reference a secondary data series. It appears to be taking both data series into account as if they are one. I am using the code if (BarsInProgress !=1) return; in order to ignore the primary data series completely but this does not seem to be doing the trick.

    Any thoughts on to completely ignore the primary data series?

    Thanks.

    #2
    Originally posted by ejmatz View Post
    I am having some issues with having my strategy completely reference a secondary data series. It appears to be taking both data series into account as if they are one. I am using the code if (BarsInProgress !=1) return; in order to ignore the primary data series completely but this does not seem to be doing the trick.

    Any thoughts on to completely ignore the primary data series?

    Thanks.
    Needed to use BarsArray. Leaving this post in case anyone else needs the solution and has the same problem.

    Comment


      #3
      Originally posted by ejmatz View Post
      I am having some issues with having my strategy completely reference a secondary data series. It appears to be taking both data series into account as if they are one. I am using the code if (BarsInProgress !=1) return; in order to ignore the primary data series completely but this does not seem to be doing the trick.

      Any thoughts on to completely ignore the primary data series?

      Thanks.

      BIP!=1 means BIP=0,2,3,4,5.... so it is IGNORING your 2nd series, not the 1st.


      Comment


        #4
        Originally posted by sledge View Post
        BIP!=1 means BIP=0,2,3,4,5.... so it is IGNORING your 2nd series, not the 1st.


        https://ninjatrader.com/support/help...inprogress.htm
        But wouldn't the "return" line indicate that if it isn't =1 then return and if it is =1 then continue?
        Thanks for your help.

        Comment


          #5
          Hello,

          Thank you for the reply.

          Yes the syntax you have now should be ignoring the primary BIP 0 series.

          (!= 1) return; would allow for only BIP 1 to process beyond that point.

          From your provided syntax it is not really clear what may be happening in your logic, what I could suggest would be to use Prints to identify how the script is being run.

          For example:
          Code:
          Print("BIP: " + BarsInProgress + " CurrentBar: " + CurrentBar);
          If you place this at the top of OBU, you could see how all series process, if you place this after your return statement this could confirm only BIP 1 is being called.

          I look forward to being of further assistance.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          62 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X