NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-16-2009, 06:22 AM   #1
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,829
Thanks: 12
Thanked 83 times in 67 posts
Default Daily data on intraday charts

With NT 6.5. when getting daily bars, usually OnBarUpdate() continues its way from the CurrentBar that triggers the Daily Bars loading until the last bar of the session. Then - once daily data loading is completed - OnbarUpdate() runs again a second time starting with the bar after the trigger bar.

This is funny behaviour, but it just needs neutralizing the first run by some return conditions.

For NT7 the logic has changed. Does anybody know how?
Harry is offline  
Reply With Quote
Old 12-16-2009, 06:26 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Are you referring to .GetBars() calls in OnBarUpdate()? If so then this is beyond what we provide support for.

If you are referring to a different setup, then please clarify on how daily bars would be loaded. Thanks
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-16-2009, 06:32 AM   #3
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,829
Thanks: 12
Thanked 83 times in 67 posts
Default

I am aware that you are not supporting this, but I just asked in case somebody else is interested.
Harry is offline  
Reply With Quote
Old 12-16-2009, 06:34 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Got it. Thanks
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-16-2009, 08:28 AM   #5
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,829
Thanks: 12
Thanked 83 times in 67 posts
Default Any help appreciated!

So again the question which is not supported (also may apply to NT native Pivots indicator): Let us say I ask for daily data when CurrentBar == 100.

Expected behaviour:

CurrentBar 0 ..... executed
.
CurrentBar 100 ..... Get Daily Bars initialized + initiliazation completed
.
CurrentBar 101 ..... executed, using DailyBar information
.
.
Last Bar ..... executed and OnBarUpdate() completed.


Also observed when connected

CurrentBar 0 ..... executed
.
CurrentBar 100 ..... Get Daily Bars initialized but not completed
.
CurrentBar 101 ..... executed before the remaining code of CurrentBar 100 was executed, DailyBars information not available
.
.
Last Bar ..... Remaining code of Bar 100 related to Initialization of Daily Bars executed, but it is useless here because it can no longer be used for the indicator.

So OnBarUpdate() puts a run aside, if it is not completed, continues its way through the chart data, and then loads the daily data within the last bar, when it is no longer needed.


NT 6.5. Correction not available for NT 7

NT 6.5. would correct this by restarting bar 101, and the second run would include daily data information as well, but NT 7 does not provide for this correction.

I am just interested to know, whether anybody has an idea how to tackle this! I cannot at this stage produce a reliable indicator using daily data, because I cannot make sure that the indicator actually catches the daily data. It may just use intraday data.

As a safeguard I am now editing a text on all indicators that use daily data, if the non-expected behaviour occurs: "Sorry, daily data could not be loaded, please try again or set indicator to intraday mode"....
Harry is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intraday data mballagan Miscellaneous Support 1 11-17-2009 12:11 PM
Import Data - intraday is available but Daily is not avihud Miscellaneous Support 1 10-30-2008 02:55 AM
How to access daily data series from an indicator running on intraday charts? clearpicks Indicator Development 3 04-21-2008 06:57 AM
No intraday data jobe00 Charting 8 04-20-2008 07:31 PM
Referencing daily data within an intraday script jonesr227 Strategy Development 2 08-20-2007 10:42 PM


All times are GMT -6. The time now is 08:07 PM.