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
        http://www.ninjatrader.com/support/h...nstruments.htm
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by felixolmo, Today, 09:35 PM
        0 responses
        6 views
        0 likes
        Last Post felixolmo  
        Started by nandhumca, Today, 08:47 PM
        0 responses
        7 views
        0 likes
        Last Post nandhumca  
        Started by BullyWig Trader, Today, 07:15 PM
        0 responses
        6 views
        0 likes
        Last Post BullyWig Trader  
        Started by ezrollin, Today, 05:13 PM
        1 response
        15 views
        0 likes
        Last Post ezrollin  
        Started by ineuron, Today, 04:29 PM
        0 responses
        8 views
        0 likes
        Last Post ineuron
        by ineuron
         
        Working...
        X