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
MTF in an Indicator
Collapse
X
-
Originally posted by NinjaTrader_Josh View PostHarry,
Thank you for your efforts. It is appreciated. I have been testing it on my end as well to no avail just yet either.
I think it might be related to the amount of real-time data temporarily stored.
Comment
-
Hi Josh,
I have now been able to reproduce this, I think it depends on the indicator and the number of incoming ticks. I used your code snippet in the first line of OnBarUpdate().
First finding: There are really problems with the first real-time bar, the real-time ticks are blended into the historical ticks in a very strange fashion. This may also explain the spike problem :
True 24.03.2011 20:15:52 0 True
False 24.03.2011 20:15:55 0 True DOUBLE BIP
False 24.03.2011 20:16:00 1 True
True 24.03.2011 20:13:53 0 True
True 24.03.2011 20:14:00 1 True
True 24.03.2011 20:14:14 0 True
True 24.03.2011 20:14:30 0 True
True 24.03.2011 20:14:53 0 True
True 24.03.2011 20:15:00 1 True
True 24.03.2011 20:15:02 0 True
True 24.03.2011 20:15:12 0 True
True 24.03.2011 20:15:26 0 True
True 24.03.2011 20:15:33 0 True
True 24.03.2011 20:15:42 0 True
True 24.03.2011 20:15:46 0 True
True 24.03.2011 20:15:52 0 True
False 24.03.2011 20:15:55 0 True DOUBLE BIP
False 24.03.2011 20:16:00 1 True
True 24.03.2011 20:13:53 0 True
True 24.03.2011 20:14:00 1 True
True 24.03.2011 20:14:14 0 True
True 24.03.2011 20:14:30 0 True
True 24.03.2011 20:14:53 0 True
True 24.03.2011 20:15:00 1 True
True 24.03.2011 20:15:02 0 True
True 24.03.2011 20:15:12 0 True
True 24.03.2011 20:15:26 0 True
True 24.03.2011 20:15:33 0 True
True 24.03.2011 20:15:42 0 True
True 24.03.2011 20:15:46 0 True
True 24.03.2011 20:15:52 0 True
False 24.03.2011 20:15:55 0 True DOUBLE BIP
False 24.03.2011 20:16:00 1 True
False 24.03.2011 20:15:55 0 False
False 24.03.2011 20:16:00 1 False
False 24.03.2011 20:16:00 1 False
False 24.03.2011 20:15:56 0 False
False 24.03.2011 20:15:56 0 True DOUBLE BIP
False 24.03.2011 20:16:00 1 False
False 24.03.2011 20:15:56 0 False
False 24.03.2011 20:15:56 0 True DOUBLE BIP
False 24.03.2011 20:16:00 1 False
False 24.03.2011 20:15:56 0 False
False 24.03.2011 20:15:56 0 True DOUBLE BIP
False 24.03.2011 20:16:00 1 False
False 24.03.2011 20:15:56 0 FalseFalse 24.03.2011 20:17:00 1 False
False 24.03.2011 20:16:03 0 False
False 24.03.2011 20:16:04 0 True DOUBLE BIP
False 24.03.2011 20:17:00 1 False
False 24.03.2011 20:16:03 0 False
False 24.03.2011 20:16:04 0 True DOUBLE BIP
False 24.03.2011 20:17:00 1 False
False 24.03.2011 20:16:03 0 False
False 24.03.2011 20:16:04 0 True DOUBLE BIP
False 24.03.2011 20:17:00 1 False
False 24.03.2011 20:16:05 0 False
False 24.03.2011 20:17:00 1 FalseLast edited by Harry; 03-24-2011, 01:41 PM.
Comment
-
Harry,
How do you achieve it to go from Historical to real-time back to historical in finding #1? That would likely be the critical piece to this puzzle.
After loading 20 times in a row I have never once ran into such a scenario and would need to reproduce that to continue.Josh P.NinjaTrader Customer Service
Comment
-
Hi Josh,
I have just added this to my indicator. The indicator is work in progress, not terminated. I can send you a copy, if you treat it confidentially. I think you will be able to reproduce the problem, if you connect to Interactive Brokers. Problem may depend on tick speed.
The problem arises, when I press F5. Real-time data then becomes historical data and you have
-> historical data in the historical data base
-> historical data (collected real-time data), which is not in the historical data base but somewhere in a cache (I do not save real-time data as historical)
-> real real-time data
You can also connect to my machine and watch during RTH.
Comment
-
Another test with EURUSD during the after hours:
True 24.03.2011 22:57:00 1 True
True 24.03.2011 22:57:08 0 True
True 24.03.2011 22:57:13 0 True
False 24.03.2011 22:57:13 0 True DOUBLE BIP
False 24.03.2011 22:58:00 1 True
True 24.03.2011 22:54:20 0 True
True 24.03.2011 22:54:34 0 True
True 24.03.2011 22:54:42 0 True
True 24.03.2011 22:54:58 0 True
True 24.03.2011 22:55:00 1 True
True 24.03.2011 22:55:09 0 True
True 24.03.2011 22:55:25 0 True
True 24.03.2011 22:56:00 1 True
True 24.03.2011 22:56:31 0 True
True 24.03.2011 22:57:00 1 True
True 24.03.2011 22:57:08 0 True
True 24.03.2011 22:57:13 0 True
False 24.03.2011 22:57:13 0 True DOUBLE BIP
False 24.03.2011 22:58:00 1 True
True 24.03.2011 22:54:20 0 True
True 24.03.2011 22:54:34 0 True
True 24.03.2011 22:54:42 0 True
True 24.03.2011 22:54:58 0 True
True 24.03.2011 22:55:00 1 True
True 24.03.2011 22:55:09 0 True
True 24.03.2011 22:55:25 0 True
True 24.03.2011 22:56:00 1 True
True 24.03.2011 22:56:31 0 True
True 24.03.2011 22:57:00 1 True
True 24.03.2011 22:57:08 0 True
True 24.03.2011 22:57:13 0 True
False 24.03.2011 22:57:13 0 True DOUBLE BIP
False 24.03.2011 22:58:00 1 True
False 24.03.2011 22:57:16 0 False
False 24.03.2011 22:58:00 1 False
False 24.03.2011 22:57:16 0 False
False 24.03.2011 22:58:00 1 False
Comment
-
Originally posted by NinjaTrader_Josh View PostHarry,
Please send in your file and we will use it in confidence. Please send to support [at] ninjatrader [dot] com with Attn: Josh in the subject line and mention this thread. Thank you.
The first finding of post # 35 below is actually nothing special. I had three instances of the same indicator running on my chart, so they switched from historical to real-time one by one at different times. This is not unexpected.
This also explains, why when a Double BIP (BarsInProgress) occurred, there were always three consecutive Double BIPs. This was because the problem occured on all three instances of the indicator consecutively. I have now modified your code to show, which of three instances is called by OnBarUpdate(), and I am further testing.
I had some Double BIP bars again, but not sure what are the conditions required to cause them. I will come back once I have finished testing on my side.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ETFVoyageur, Today, 07:55 PM
|
0 responses
6 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:55 PM
|
||
Started by janio973, Today, 07:24 PM
|
1 response
7 views
0 likes
|
Last Post Today, 07:35 PM | ||
Started by aligator, 01-06-2022, 12:14 PM
|
4 responses
242 views
0 likes
|
Last Post
by john_44573
Today, 06:11 PM
|
||
Started by reynoldsn, Today, 05:56 PM
|
0 responses
13 views
0 likes
|
Last Post
by reynoldsn
Today, 05:56 PM
|
||
Started by bortz, 11-06-2023, 08:04 AM
|
51 responses
1,996 views
0 likes
|
Last Post
by aligator
Today, 05:50 PM
|
Comment