Am I misunderstanding something? Shouldn't strats started in the chart or the tab run exactly the same? Or is there some sort of fundamental difference I'm not aware of?
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!
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
NinjaTrader
Not always getting Fisher Values correctly
Collapse
X
-
Since this problem only occurs on the strat tab and works fine when loading it on a chart... and I had a similar problem in the 7 beta... I'm starting to wonder if I'm the only one that uses the strat tab.
Am I misunderstanding something? Shouldn't strats started in the chart or the tab run exactly the same? Or is there some sort of fundamental difference I'm not aware of?
-
I think I just found out what exactly is wrong...
If you run this strategy from the Chart, it works fine. But, as you know, I couldn't get it to work using the strat tab.
But, this morning, I ran it again and it worked fine through the strat tab. That led me to play around to find out why it was working now.. And now I know.
1) Go to strat tab
2) Right click for "new strategy"
3) select the strat I put in a previous post.
4) change the time from the default of 12 am to 12 am to 6:30am to 1:00pm (I'm PST)
Whammo, it doesn't work. Changing the session begin and session end time from the default is what is causing this to fail!!!Last edited by lookOutBelow; 08-04-2010, 09:24 AM.
Comment
-
Originally posted by NinjaTrader_Austin View PostlookOutBelow, if your charts start at a different time, then the values would be different as well - it isn't failing, it is just using different data.
And if they are using "different data" , why would the data sync up after an hour or so?
Comment
-
That is exactly what 'session begins' and 'session ends' are for. It's just that if you have your chart starting at a different time than your strategy, especially if your strategy has CalculateOnBarClose = false (as seen in your code), then the values would definitely not match up because the indicator is using different data (including the intra-bar data when the bar is still building for the charts).AustinNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Austin View PostThat is exactly what 'session begins' and 'session ends' are for. It's just that if you have your chart starting at a different time than your strategy, especially if your strategy has CalculateOnBarClose = false (as seen in your code), then the values would definitely not match up because the indicator is using different data (including the intra-bar data when the bar is still building for the charts).
I've tried with CalculateOnBarClose = true and I get the same incorrect results.
And if the timestamps are the same and the prices are the same, why would the fisher values be different if I run it from the chart than when I run it through the tab (with session begin/end set other than default)? FWIW, I've changed the settings for the chart indicators to Calculate on Close to both true and false.
Comment
-
lookOutBelow, can you please tell me every exact step you're taking that leads to these mis-matched values?
Your values could be different depending on the time of day because if the session starts early and ends early, the indicator would look at data "wrapping" around to the previous day.
I just created another strategy, ran it, compared the results to the chart, and everything is behaving as expected. The chart and strategy are set to 24 hour session, and calculate on bar close is set to true.
Please take a look at the attached screenshot, as everything is working fine here.AustinNinjaTrader Customer Service
Comment
-
Something to remember is that it doesn't happen all the time. For instance, if I run it right now, things are fine. I only noticed this problem when using Market Replay data. And even then, it didn't last but an hour or so throughout a whole day.
Since I cannot attach a 5meg file. Is there a place I can upload or email you my Replay data for 7/20? Perhaps if you run your script from 6:30 - 8am (PST) on 7/20's replay you'll get different results?
Comment
-
lookOutBelow, I will run your replay data. Can you please upload it to sendspace.com or an equivalent and then send me the link? I just took a look back at the first picture you posted and it shows your chart going back past 6:30AM, which means the indicator is using data from before 6:30AM, but if you don't have your strategy starting until 6:30AM, then the strategy would go back and use as many bars as necessary from before the previous close (1PM). I have a feeling this is where the discrepancy creeps in.AustinNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Austin View PostI just took a look back at the first picture you posted and it shows your chart going back past 6:30AM, which means the indicator is using data from before 6:30AM, but if you don't have your strategy starting until 6:30AM, then the strategy would go back and use as many bars as necessary from before the previous close (1PM). I have a feeling this is where the discrepancy creeps in.
And if they are not using the same source material, wouldn't everything be caught up in 35 1-min bars (using 35 period fisher)? As is, they seem to catch up about an hour in.
Anyhow.. Here is the file..
Thanks for helping me understand all of this.
Comment
-
Originally posted by lookOutBelow View PostI'm a little confused. But that sounds like a reasonable explanation. However, wouldn't the strategy at 6:31am be using the same data/bars as the indicator is at 6:31am? I'm not sure how things are working under the hood.
And if they are not using the same source material, wouldn't everything be caught up in 35 1-min bars (using 35 period fisher)? As is, they seem to catch up about an hour in.
Thanks for helping me understand all of this.AustinNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,603 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
12 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment