Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

wrong date?

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

    wrong date?

    Hi,

    I really have no idea with this and would appreciate if someone can help. I enter wrong trades because my strategy thinks were january 2nd ???

    I had a strategy on ES running all of mai. The strategy basically trades around monthly hinghs. This morning i turned in on for the first time in the september contract, and there were trades. I had no idea why, since we're far form the monthly highs. I printed the highs and dates along with entry:
    Code:
    Print(Highs[1][0] +"     "+ Time[0].ToString("dd/MM/yyyy"));
    and in the output I saw that the high was the december 2012 high and date was 01.02.2013.

    My pc clock is correct, I have Kinetick+IB connection and data is loaded for the instrument.

    Thanks,

    Marco

    #2
    Hello Marco,

    Thank you for your post.

    Is this on real-time data, Market Replay, or backtesting?

    Can you provide your strategy code or a toy version? If you prefer you can send the file to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 860701' in the subject line and a reference to this thread in the body of the e-mail: http://www.ninjatrader.com/support/f...ad.php?t=58324

    Please let me know if I may be of further assistance.

    Comment


      #3
      Just sent in a slightly modified version of the strategy that produces the same trades and output.

      Thanks

      Comment


        #4
        Hello Marco,

        Thank you for your response.

        I have responded to your note via e-mail.

        Comment


          #5
          Hello Marco,

          Thank you for your time yesterday.

          Concerning your question on Live data versus Historical data; the difference is how the calculations are processed and the use of the option CalculateOnBarClose.

          In backtesting and historical (backtesting is done on historical data) the data is only the Open, High, Low, and Close of the selected Bar Type and interval. So a 1 Minute bar is only the OHLC of that one minute.
          In real-time data you will see tick by tick data when connected to a real-time data feed provider that supplies data for the market you are viewing. However, you can still set your Indicator or Strategy to process on the close of the bar (essentially as it would on historical data) by setting CalculateOnBarClose to True.
          If CalculateOnBarClose if set to false, your Indicator or Strategy will process tick by tick rather than on the close of the bar.

          For information on discrepancies between backtesting and real-time testing of your strategy please visit the following link: http://www.ninjatrader.com/support/h...ime_vs_bac.htm

          Please let me know if you have any questions.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          111 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          59 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          38 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          41 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          78 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X