Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart data is not the same as in Print(...)

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

    #16
    OK, AGAIN, I need to get current trade day open price and previous trade day prices (high/low/close).
    I do it like this: (in OnBarUpdate() when (Bars.FirstBarOfSession) is true):
    CurrentDayOHL().CurrentOpen[0]
    Bars.GetDayBar(1).Low, etc.

    During backtest I use template "CME US Index Futures RTH". Data I get DOES NOT correspond to data box from the chart of daily prices with the SAME template "CME US Index Futures RTH".
    Why? What am I doing wrong?

    Comment


      #17
      I use DAILY (i.e. interval = 1 day) chart with template "CME US Index Futures RTH". It shows 1483.50 open on 1/21/2013 in databox - not what you get. Why?

      Comment


        #18
        Hello MarkZ,
        If you try adding a day bar series and then refer to that price series then are you getting the correct values.

        //in Initialize section of the code
        Code:
        Add(PeriodType.Day, 1);
        //in OnBarUpdate
        Code:
        if (BarsInProgress == 0)
        {
         Print(Time[0].Date.ToString("d") + " " + CurrentDayOHL().CurrentOpen[0] + " " +
        Lows[1][1] + " " + Hghs[1][1]);
        }
        Please refer to our help guide to know more about it
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pibrew, Today, 06:37 AM
        0 responses
        1 view
        0 likes
        Last Post pibrew
        by pibrew
         
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        11 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        16 views
        0 likes
        Last Post AaronKoRn  
        Working...
        X