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 NullPointStrategies, Today, 05:17 AM
        0 responses
        52 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        70 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        48 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X