• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What does this code do?

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

    What does this code do?

    Hi - I'm wondering what does the code in the screenshot do? I have 2 more additonal data series. It's generated by the builder. I'm not sure if they need to be changed or not.

    Thank you!

    #2
    Hello HiddenPhilosopher,

    This code will prevent the code from continuing if the primary series is not processing if there are multiple series added to a script, and will prevent the code from continuing if the first series (the primary series BarsInProgress 0) or the third series (BarsInProgress 2) do not have at least one bar to process in OnBarUpdate().

    https://ninjatrader.com/support/help...dataseries.htm
    https://ninjatrader.com/support/help...urrentbars.htm
    https://ninjatrader.com/support/help...inprogress.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello HiddenPhilosopher,

      This code will prevent the code from continuing if the primary series is not processing if there are multiple series added to a script, and will prevent the code from continuing if the first series (the primary series BarsInProgress 0) or the third series (BarsInProgress 2) do not have at least one bar to process in OnBarUpdate().

      https://ninjatrader.com/support/help...dataseries.htm
      https://ninjatrader.com/support/help...urrentbars.htm
      https://ninjatrader.com/support/help...inprogress.htm
      My primary series is 1 minute, and I added 30 minute additional data series. My strategy uses 200 EMA on 30 minute bar data. Apparently, to calculate 200 EMA, it needs to have 200 30 minute historical bars when strategy is started. How should I set properly to make it work? Please help me understand it. Thank you!

      Comment


        #4
        Hello HiddenPhilosopher,

        Are you having an error that you need assistance with?

        What is not working properly?

        Are you supplying the BarsArray[BarsInProgress index] as the input series to an indicator?

        Are there 3 series in the script or just 2?
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by irissoto, Today, 10:35 PM
        0 responses
        4 views
        0 likes
        Last Post irissoto  
        Started by hedgeplay, Today, 08:04 PM
        0 responses
        4 views
        0 likes
        Last Post hedgeplay  
        Started by DTSSTS, Today, 07:02 PM
        0 responses
        6 views
        0 likes
        Last Post DTSSTS
        by DTSSTS
         
        Started by arguru, Today, 04:07 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by lakersfan, Today, 06:02 PM
        0 responses
        13 views
        0 likes
        Last Post lakersfan  
        Working...
        X