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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          93 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          138 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          123 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          73 views
          0 likes
          Last Post PaulMohn  
          Working...
          X