• 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

Market Analyzer Data Update at Close

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

    Market Analyzer Data Update at Close

    Dear Sir,
    I had been using NT v 6.5 since last 5 days integrated with MTPredictor
    and eSignal as my DataFeed. I am facing a serious problem while
    working on Market Analyzer. I have created a Market Analyzer with columns
    displaying data for LastClose & LastPrice with MTP (Day End) Indicator. I
    trade on Australian Stock Exchange and therefore I set the session time
    as local trading hours in Australia. Now when I load this market
    analyzer with selected instruments lets say on Wednesday in the evening
    after market closes, the column for LastClose shows me the Closing Price of
    one day before that is closing price on Tuesday. Similarly I tested it
    for FTSE (UK) stocks. Lets say when I checked the Market Analyser data
    valuse on Wednesday before the market opens, it is displaying the
    ClosePrice of Monday and not Tuesday. I made sure that i have specified the
    session times properly as per my PC time. I also checked with session
    time set as 12:00 AM to 12:00 AM, but I am still getiing incorret data
    that is one day delayed ClosePrice. I then checked for these values on
    the charts on NT and I found the charts to be accurately displaying the
    data at different time intervals. I am sure your expertise will be
    able to help me out.
    Awaiting your support and many thanks for your previous support on
    instrument list.
    Warm regards,
    Yusuf

    #2
    Hello Yusuf,

    I have sent you a response to the same message you emailed to support AT ninjatrader DOT com.
    JasonNinjaTrader Customer Service

    Comment


      #3
      NT doesn't recognize a bar as "closed" until the next bar opens. So in any case where there is a time gap between bars, then the last bar won't be considered closed while in the gap between bars (such as between day bars for index data).

      Compared to the behavior of other trading apps, and to the expectations of most traders, I think this is truly a BUG in the behavior of NT, and have commented on this elsewhere. There needs to be additional logic in NT that recognizes that an end-of-day bar is closed when its trading session has ended (as set by the user). The fix to set CalculateOnBarClose to false just wastes processing time, and is bad practice when you're trying to get NT to run as efficiently as possible. IMHO

      I don't have many complaints about NT, but this is one of them.

      Comment


        #4
        You could just run CalculateOnBarClose set to false and then filter it with an if statement with FirstTickOfBar then reference everything with [1] for the latest closed bar. Then when the end of the day arrives you switch for one final processing at the end of the session. This can be determined via DateTime.Now comparisons.

        This way any performance hit from CalculateOnBarClose will be negligible since you are neglecting all of them except for the ones at a new bar open (aka bar close).
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by Josh View Post
          You could just run CalculateOnBarClose set to false and then filter it with an if statement with FirstTickOfBar then reference everything with [1] for the latest closed bar. Then when the end of the day arrives you switch for one final processing at the end of the session. This can be determined via DateTime.Now comparisons.

          This way any performance hit from CalculateOnBarClose will be negligible since you are neglecting all of them except for the ones at a new bar open (aka bar close).
          It's great that NT has all this flexibility to fix even the dumbest things.

          If I were developing NT, however, I would be inclined to rework stuff like this that made the product look out-of-touch with trader's expectations. Setting CalculateOnBarClose = true should speed things up and make a trader's life simpler, not more difficult. And the corresponding chart should display results for the last bar after the session has closed.

          Comment


            #6
            This is not a bug since there is NO way to know that a bar is closed until the next tick. Let give you an example. What you suggest is to close the bar based on local PC time which is not correct. 50% of our data providers provide time stamp with each incoming tick. These time stamps are use to determine if the tick belongs to (for example) the 9:35 bar or the 9:40 bar. Its is very possible to get a tick for the 9:35 bar coming in a second delayed to to internet delay etc..., if we closed bars based on actual time, then this tick would not make it into the bar that its supposed to.
            RayNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Ray View Post
              This is not a bug since there is NO way to know that a bar is closed until the next tick. Let give you an example. What you suggest is to close the bar based on local PC time which is not correct. 50% of our data providers provide time stamp with each incoming tick. These time stamps are use to determine if the tick belongs to (for example) the 9:35 bar or the 9:40 bar. Its is very possible to get a tick for the 9:35 bar coming in a second delayed to to internet delay etc..., if we closed bars based on actual time, then this tick would not make it into the bar that its supposed to.
              Sorry to take so long to respond... I was converting more stuff to NT...

              NT's behavior is a "bug" because its charts do not reflect market reality (i.e., they are not showing end of session bars closed even though the rest of the real world knows they are closed).

              I understand the wisdom of using the opening of the next bar as an indication that the previous bar is closed, but this cannot be the only criteria for judging whether a bar is closed. For day bars, for example, we all know when the exchange has closed for the day, and the corresponding day bar should be closed. Displaying and treating the bar as still open after the session has closed is a bug.

              As you pointed out, it's a bit more complicated if the user has defined their own custom session limits. However, you're either getting trade data that has times associated with it, or you're not, and time-stamping the bars yourself. In either case, any custom session close time that occurs before the real market closes will be followed by another bar that will tell you that the previous bar has closed. So you'll know the bar should be closed, either by the next bar or by when the market closes.

              Again, I think the current behavior is more embarassing than clever, and would try to fix it so that the issue didn't keep coming up.

              Comment


                #8
                I agree with greentrader. For example, since I do not have the time to trade intraday, I am working on a strategy that uses only EOD data which is analyzed after the markets have closed to generate a signal on the last bar so that I then can place orders in the evening which will become active once the markets open the next morning.

                So the essential part in this strategy is the very last bar (the analysis of the past trading day). However, with CalculateOnBarClose enabled, this last bar will never be processed.

                But as also been mentioned before, the workaround for this is to set CalculateOnBarClose to false and then everything works as expected. If working only with daily data, then the trick with FirstTickOfBar is not even necessary since there is only one tick per day anyway.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ralett, Yesterday, 07:29 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Marco  
                Started by bboyle1234, Yesterday, 10:46 PM
                1 response
                3 views
                0 likes
                Last Post bltdavid  
                Started by swcooke, Yesterday, 04:29 PM
                0 responses
                5 views
                0 likes
                Last Post swcooke
                by swcooke
                 
                Started by bboyle1234, Yesterday, 04:27 PM
                0 responses
                2 views
                0 likes
                Last Post bboyle1234  
                Started by swcooke, Yesterday, 03:31 PM
                2 responses
                12 views
                0 likes
                Last Post swcooke
                by swcooke
                 
                Working...
                X