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

Display OHLC For Specific Time Bar

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

    Display OHLC For Specific Time Bar

    Is it possible to write an indicator that will display on the bar the OPEN or HIGH or LOW or CLOSE for a specific time bar?

    For example, display OPEN of 9:30 bar.

    If it's simple, would someone be kind enough to post the code?

    #2
    I am new here. But. Ii came across an indicator that might help you. search PriorWeekOHLC. Also look under indicator and see CurrenDayOHL.

    Comment


      #3
      Originally posted by ScorpioTravis View Post
      Is it possible to write an indicator that will display on the bar the OPEN or HIGH or LOW or CLOSE for a specific time bar?

      For example, display OPEN of 9:30 bar.

      If it's simple, would someone be kind enough to post the code?
      Code:
      [FONT=Courier New]
      [/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]double[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New] barOpen = Open[GetBar(DateTime.Today.Add([/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]new[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New] TimeSpan([/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]9[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New],[/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]30[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New],[/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]00[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New])))];
      Print([/FONT][FONT=Courier New][COLOR=#800000][FONT=Courier New][COLOR=#800000]"Open of 9:30 bar: "[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New] + barOpen); //so you can verify it in the Output Window.
      [/FONT]

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NM_eFe, Today, 10:13 AM
      0 responses
      3 views
      0 likes
      Last Post NM_eFe
      by NM_eFe
       
      Started by hdge4u, Yesterday, 12:23 PM
      1 response
      10 views
      0 likes
      Last Post hdge4u
      by hdge4u
       
      Started by 1001111, Today, 09:45 AM
      0 responses
      12 views
      0 likes
      Last Post 1001111
      by 1001111
       
      Started by DTSSTS, 01-28-2024, 12:07 PM
      11 responses
      559 views
      0 likes
      Last Post bmo111
      by bmo111
       
      Started by Torontobluejays, Today, 08:43 AM
      0 responses
      3 views
      0 likes
      Last Post Torontobluejays  
      Working...
      X