Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

currentDayOHL

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

    currentDayOHL

    Back again,

    I'm having a problem calculating the daily open for my bar array object at index 2 which is a 5 minute interval, is it possible to get the daily open with the CurrentDayOHL function? Trying to minimize the amount of dataseries objects I add to the script.


    Add(PeriodType.Minute,30);
    Add("SPY",PeriodType.Minute,5);
    .
    .
    .
    CurrentDayOHL(BarsArray[2]).CurrentHigh[0]);


    Thanks Again!

    #2
    slocumtrader, why are you requesting the .CurrentHigh if you're interested in the .CurrentOpen for the instrument?



    Current and Prior Day OHL((C) methods are tied to the session template hours used.

    Comment


      #3
      Sorry about that, I am using
      Print("SPY OPEN: " + CurrentDayOHL(BarsArray[2]).CurrentOpen[0]);

      I see what the problem is now. its using the open data from AH trading (early morning hours) so instead of using 9:30NY open time its using 6AM open/low/high data for my SPY values. Strange that when I use:

      Print("THIS OPEN: " + CurrentDayOHL().CurrentOpen[0]);

      for the open of the primary bar it uses regular 9:30NY open as its starting point and then for bar[2] it begins from premarket..

      possibly using a different session template? Thanks!

      Comment


        #4
        What session template is assigned then to your SPY master instrument under Tools > Instrument Manager? Can you try assigned the 'US Equities RTH' for example to it and then rechecking?

        Thanks,

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        65 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        23 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        26 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        52 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X