• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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?

    http://www.ninjatrader.com/support/h...nt_day_ohl.htm

    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 ajay8000, Yesterday, 11:31 PM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by simjs, Yesterday, 11:23 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by akuntysh, Yesterday, 10:41 PM
        0 responses
        4 views
        0 likes
        Last Post akuntysh  
        Started by Wolf1, Yesterday, 08:26 PM
        0 responses
        7 views
        0 likes
        Last Post Wolf1
        by Wolf1
         
        Started by pparmley, Yesterday, 04:30 PM
        0 responses
        9 views
        0 likes
        Last Post pparmley  
        Working...
        X