Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by fitspressoburnfat, Today, 04:25 AM
          0 responses
          2 views
          0 likes
          Last Post fitspressoburnfat  
          Started by Skifree, Today, 03:41 AM
          1 response
          4 views
          0 likes
          Last Post Skifree
          by Skifree
           
          Started by usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          604 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          23 views
          0 likes
          Last Post xiinteractive  
          Working...
          X