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

ParabolicSAR

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

    ParabolicSAR

    Hello,
    If I use several different settings for the 3 parameters of the ParabolicSAR indicator, does this create more than a single series?

    #2

    Hello ronaldgreene828,

    Thank you for the post.

    This question did not seem to relate to the thread you originally posted in so I created a new thread for your questions.

    Are you asking if changing the parameters adds some kind of secondary data when using this indicator?

    What series are you referring to here?



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I'm using the parabolicSARS indicator using 5 different settings combinations in one strategy for entries and exits. I noticed that the following was created at the start of OnBarUpdate:

      if (BarsInProgress != 0)
      return;

      if (CurrentBars[0] < 5)
      return;

      I searched for information and after reading the other thread, I wondered if this is necessary or incorrect.

      Comment


        #4
        deleted by user
        Last edited by bltdavid; 09-09-2020, 12:25 PM. Reason: useless answer

        Comment


          #5
          Hello ronaldgreene828,

          Thank you for your post.

          The Strategy Builder correctly adds the checks for BarsInProgress and CurrentBars to prevent the script from calling more than 5 bars ago until there are at least 5 bars of data processed, to prevent an index error.

          In a multi-bars script, the OnBarUpdate() method is called for each Bars object of a script. For a single Bars script, this property will always return an index value of 0 representing the primary Bars and instrument the script is running on.

          Here is a help guide link with more information about BarsInProgress - https://ninjatrader.com/support/help...inprogress.htm

          CurrentBars contains the values representing the number of the current bars in a Bars object. The CurrentBars check is used to make sure that there are enough bars processed before executing the rest of your script. For example, if(CurrentBars[0] < 5) return; checks to see if there are at least 5 bars processed for the primary bars series. If there are less than 5 bars, the script will return (end).

          Here is a help guide link with more information about CurrentBars - https://ninjatrader.com/support/help...urrentbars.htm

          Please let us know if we may assist further.
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by agclub, 04-21-2024, 08:57 PM
          5 responses
          32 views
          0 likes
          Last Post agclub
          by agclub
           
          Started by ESHunter, Today, 08:06 PM
          2 responses
          13 views
          0 likes
          Last Post ESHunter  
          Started by ETFVoyageur, 05-07-2024, 07:05 PM
          19 responses
          150 views
          0 likes
          Last Post ETFVoyageur  
          Started by ETFVoyageur, Yesterday, 10:13 PM
          3 responses
          26 views
          0 likes
          Last Post ETFVoyageur  
          Started by ETFVoyageur, Yesterday, 12:52 AM
          3 responses
          33 views
          0 likes
          Last Post ETFVoyageur  
          Working...
          X