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

Parabolic SAR

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

    Parabolic SAR

    This might seem like an odd or impossible request. When using the Parabolic SAR on a chart (try it on the 1 min), it prints the point before the bar finishes. Therefore, I already know if it will be a bullish or bearish signal before the bar finishes. Anyway, of identifying that before the bar finishes? I feel like I am 1 bar too late since the dot has already been determined - I want to take some action once that point is printed, and not have to wait until that bar closes
    Last edited by szayedoud; 07-12-2022, 03:03 PM.

    #2
    Hello szayedoud,

    Sorry I'm not quite sure if I understand. The 'Calculate' setting in the Indicator menu determines how the indicator is calculated.

    •On Bar Close - Run calculations once on the close of each bar of the Input Series
    •On Each Tick - Run calculations on each incoming tick of price data (CPU intensive)
    •On Price Change - Runs calculations on each change in price

    If you select 'On bar close', it will not show the indicator for the current price bar. If you select the other 2 options, it will show the indicator on the current price bar.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply.. I think you might see what I am talking about if you run a 1 min chart, with a Parabolic SAR (use the defaults). You'll see the Parabolic SAR marker (the dot), at the start of a newly forming bar when it opens. The dot shows a bullish signal (below the bar) OR a bearish signal (above the bar) but technically in the script I don't have access to that until the bar closes. Visually, I can see it, but in the script I have to wait until the bar closes. Make sense?
      Last edited by szayedoud; 07-14-2022, 02:17 PM.

      Comment


        #4
        Hello szayedoud,

        Thank you for your reply.

        I'm not seeing the same on my end, if the script is running On Price Change or On Each Tick I'm able to get the correct location and price of the dot for the currently forming bar. I'm attaching a simple example indicator that you can place on a chart along with a parabolic SAR using the default acceleration values that will give the price and location (above or below current price) of the ParabolicSAR for the currently forming bar.

        Please let us know if we may be of further assistance to you.
        Attached Files
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Ok, I think I see what you are doing. I used Calculate.OnBarClose. Since you are using Calculate.OnPriceChange, OnBarUpdate is being called when the price change - correct?. What I don't get is what is Close[0] in that context - the bar is still forming, so we don't have a close yet. I will try some things on my end later, and experiment with it, but I don't have access to my NinjaTrader at the moment, thanks!

          Comment


            #6
            I ran a test on a 1 min series, using Calculate.OnPriceChange and printed the values of the Parabolic SAR[0] and Close[0]. I saw the Parabolic SAR exactly where it should be on the forming bar (not changing, as expected), but the Close values kept changing. Does that mean that the Close in this case is the last price change? I only need to know the Parabolic SAR location on a forming bar only once, at the beginning. I guess I could the CurrentBar counter, and check when that changes to identify the first bar, and only do my thing then, and ignore when that counter hasn't change. Do you think this is the best way?

            Comment


              #7
              Hello szayedoud,

              Thank you for your reply.

              Yes, Close[0] will be the current last price when running on price change or on each tick.

              You could certainly use a check of the CurrentBar and see when that changes and access the ParabolicSar value at that point, yes.

              Please let us know if we may be of further assistance to you.
              Kate W.NinjaTrader Customer Service

              Comment


                #8
                Thanks for your responses. They've been helpful!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Philippe56140, Today, 02:35 PM
                0 responses
                1 view
                0 likes
                Last Post Philippe56140  
                Started by 00nevest, Today, 02:27 PM
                0 responses
                1 view
                0 likes
                Last Post 00nevest  
                Started by Jonafare, 12-06-2012, 03:48 PM
                5 responses
                3,986 views
                0 likes
                Last Post rene69851  
                Started by Fitspressorest, Today, 01:38 PM
                0 responses
                2 views
                0 likes
                Last Post Fitspressorest  
                Started by Jonker, Today, 01:19 PM
                0 responses
                2 views
                0 likes
                Last Post Jonker
                by Jonker
                 
                Working...
                X