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!
See more
See less

Partner 728x90

Collapse

Daily data on intraday charts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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

    Comment


      #3
      I am aware that you are not supporting this, but I just asked in case somebody else is interested.

      Comment


        #4
        Got it. Thanks

        Comment


          #5
          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"....

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bmartz, 03-12-2024, 06:12 AM
          5 responses
          32 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          12 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by cls71, Today, 04:45 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X