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 CarlTrading, Yesterday, 11:51 AM
        0 responses
        17 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, Yesterday, 11:48 AM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-25-2026, 09:53 PM
        0 responses
        17 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 03-25-2026, 09:51 PM
        0 responses
        13 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 03-23-2026, 11:13 AM
        0 responses
        20 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X