Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PSAR Plot by strategy doesn't match plot when you add as an indicator
Collapse
X
-
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!Tags: None
-
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.Brandon H.NinjaTrader Customer Service
- Likes 1
-
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 | ||
---|---|---|---|---|
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
1 response
11 views
0 likes
|
Last Post
by bltdavid
Today, 02:44 PM
|
||
Started by port119, Today, 02:43 PM
|
0 responses
1 view
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
||
Started by Philippe56140, Today, 02:35 PM
|
0 responses
3 views
0 likes
|
Last Post Today, 02:35 PM | ||
Started by 00nevest, Today, 02:27 PM
|
0 responses
2 views
0 likes
|
Last Post
by 00nevest
Today, 02:27 PM
|
||
Started by Jonafare, 12-06-2012, 03:48 PM
|
5 responses
3,986 views
0 likes
|
Last Post
by rene69851
Today, 01:44 PM
|
Comment