Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PSAR Plot by strategy doesn't match plot when you add as an indicator

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

    PSAR Plot by strategy doesn't match plot when you add as an indicator

    That about sums it up. I'm hoping someone can explain why, when I add the PSAR to my chart via a strategy, it looks very different (differing signals) from the PSAR I add interactively to a chart. All of the parameters are the same in both cases. Thanks for your info/insights. I sure hope the PSAR isn't that variable depending on which bar the calculation starts with!

    #2
    Hello wwhalenc,

    Thanks for your post.

    To clarify, are you instantiating the ParabolicSAR indicator within the strategy using the exact same parameters as the ParabolicSAR indicator you are adding to the chart window?

    I have created a very simple test strategy that instantiates the ParabolicSAR and calls AddChartIndicator() to add the indicator to the chart. First, I added the ParabolicSAR indicator to the chart and it's plot is gold in color.

    Then, I add the test strategy which plots the ParabolicSAR on the chart in blue using the same parameters as the ParabolicSAR indicator added to the chart.

    When enabling the strategy, I am seeing the strategy's ParabolicSAR indicator plotting on the chart (in blue) and overlapping the same exact values as the ParabolicSAR indicator manually added on the chart (in gold).

    See this demonstration video showing the ParabolicSAR plotted from a NinjaScript strategy does match the ParabolicSAR indicator added to a chart when the parameters in the strategy are the same as the indicator on the chart: https://brandonh-ninjatrader.tinytak...N18yMjAwMjUwMA

    Note that the ParabolicSAR indicator uses Calculate.OnPriceChange so if you want your strategy to plot the ParabolicSAR up to the current bar, your strategy should be set to Calculate.OnPriceChange also.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks, Brandon. I sure would've expected to see exactly that when I toggle on/off the identical PSAR. In my case, sure enough, I was not using the Calculate mode between the interactive PSAR and that painted by the strategy (shame on me for not checking that first). Because of your post, I took a closer look at the strategy PSAR. The parameters were NOT the same after all (had a .2 where I should have had .02). Double shame on me for not checking more carefully before posting here. Call off the dogs! Thanks for your help confirming the right behavior.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      85 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      47 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      67 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X