Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get low and high of over night Session (before CBOE US Index Futures RTH) of each day

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

    Get low and high of over night Session (before CBOE US Index Futures RTH) of each day

    Hi,

    I tried to use CurrentDayOhl to get high and low of today and i want to stop updating when the session if CBOE US Index Futures RTH starts ,
    also i think that's not a good idea to use CurrentDayOhl, do you have any suggestion on haw to get today's High and low for sessions before CBOE US Index Futures RTH of each day loaded in the chart, so i can draw zones for each day?

    Thank you in advance,
    Attached Files

    #2
    Hello pechtri,

    Thanks for your post.

    The CurrentDayOHL indicator that comes default with NinjaTrader will return the current day (session) Open, High, or Low price for the current session.

    CurrentDayOHL(): https://ninjatrader.com/support/help...nt_day_ohl.htm

    If you would like to get the CurrentDayOHL values for a different trading hour template, you could add an additional secondary series to the script using the AddDataSeries() method and specify the tradingHoursName you want to use within the AddDataSeries() method.

    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, string tradingHoursName)
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, string tradingHoursName, bool? isResetOnNewTradingDay)


    Then, you could instantiate the CurrentDayOHL indicator using the BarsArray of the added series, such as BarsArray[1], and then access the current Open, High, or Low price of that indicator calculating from the added series.

    AddDataSeries(): https://ninjatrader.com/support/help...=adddataseries

    Working with Multi-Timeframe/Multi-Instrument NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm

    If you want to get the CurrentDayOHL values at a certain time of day, you could create a Time Comparison condition that checks if the current time is equal to a specific time of day and then access the CurrentDayOHL values at that time of day.

    Creating Time Comparison: https://ninjatrader.com/support/help...arisons​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X