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

Retrieving data from specific bars from the previous day

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

    #16
    I am certain we are getting very close. Thank you so much for the specific help!

    I just applied the strategy you provided to a chart when running Playback Connection with the start/end spanning three consecutive days. During playback, a gold dot was generated on the first bar of each new day.

    A blue dot was not generated on the last bar of session within the start/end duration of the Playback Connection. (The blue dots do appear on the days before the Playback start/end time frame.)

    A tweak that would allow "First Bar of Session" and "Last Bar of Session" dots to be appear during Playback would get me almost to my goal.

    One more clarification. Being that I need to "Last Bar of Session" info for multi-time frames, is the following code correct when trying to differentiate the “Last Bar” of a specific time frame?

    (BarsInProgress == 2 && Bars.IsLastBarOfSession && CurrentBars[2] != Bars.Count-1)
    (BarsInProgress == 3 && Bars.IsLastBarOfSession && CurrentBars[3] != Bars.Count-1)

    Thanks in advance.

    Comment


      #17
      Hello ArmKnuckle,

      Thanks for your reply.

      Let's take another approach here that would be simpler.

      If the code has detected the first bar of the session, then the previous bar to that would be the end of the previous session.


      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AveryFlynn, Today, 04:57 AM
      0 responses
      3 views
      0 likes
      Last Post AveryFlynn  
      Started by RubenCazorla, 08-30-2022, 06:36 AM
      3 responses
      77 views
      0 likes
      Last Post PaulMohn  
      Started by f.saeidi, Yesterday, 12:14 PM
      9 responses
      23 views
      0 likes
      Last Post f.saeidi  
      Started by Tim-c, Today, 03:54 AM
      0 responses
      3 views
      0 likes
      Last Post Tim-c
      by Tim-c
       
      Started by FrancisMorro, Today, 03:24 AM
      0 responses
      5 views
      0 likes
      Last Post FrancisMorro  
      Working...
      X