![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2007
Posts: 1,829
Thanks: 12
Thanked 83 times in 67 posts
|
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? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
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
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2007
Posts: 1,829
Thanks: 12
Thanked 83 times in 67 posts
|
I am aware that you are not supporting this, but I just asked in case somebody else is interested.
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Got it. Thanks
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2007
Posts: 1,829
Thanks: 12
Thanked 83 times in 67 posts
|
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".... |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |