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.
    BertrandNinjaTrader Customer Service

    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,
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by Harry, 05-02-2018, 01:54 PM
        10 responses
        3,203 views
        0 likes
        Last Post tharton3  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Working...
        X