Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi timeframe: Data mismatch between Dialog Box to Print statement

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

    Multi timeframe: Data mismatch between Dialog Box to Print statement

    Hi there

    I am trying to compare 5 EMA values from a 10 min chart on a 3 min chart using

    EMA(BarsArray[1], period)[0];


    However, I notice that I am getting different values from the dialog box (when I right click) compared to when I use the print command. This does not happen when I compare say EMA(5)[0].

    I've experimented with COBC = false also tried FirstTickOfBar but there is definitely a discrepancy between the dialog box and the print command. So am I missing something with this multi?

    The indicator displays correctly for me its just a matter of comparing what I see visually...

    Attached is the code with a screenshot of the right click and below is a print out:

    I am comparing at 9:48 AM. You can see from the chart it should be 2769.63 not 2777.07 as indicated below.

    2782.48 09/10/2012 9:39:00 AM
    2777.07 09/10/2012 9:42:00 AM
    2777.07 09/10/2012 9:45:00 AM
    2777.07 09/10/2012 9:48:00 AM
    2769.63 09/10/2012 9:51:00 AM
    2769.63 09/10/2012 9:54:00 AM
    2769.63 09/10/2012 9:57:00 AM
    Attached Files
    Last edited by ij001; 10-11-2012, 10:45 AM.

    #2
    What is the "myEMA" you're using? Does it use the same methods you're using in the test you sent?

    If you add the standard EMA to the chart manually to a 10 minute chart, do you get the sames results as your test method? Do you get the same results if you take out the rounding?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi Matthew

      Sorry for the long reply:

      myEMA is the standard EMA included in NT except I added colors when rising/falling. In my recent screenshot I removed it to avoid confusion because we are looking at multi's.

      Now, myEMAMulti is another standard EMA I created and it uses a 10 min 5 EMA. It is plotted using EMA(BarsArray[1], period)[0] as well. There is no other methods.

      Yes, I added the standard EMA(5) with no rounding on a 10 min chart and did get the same results below:

      2777.07156979909 09/10/2012 9:40:00 AM
      2769.63104653273 09/10/2012 9:50:00 AM

      I interpret it as: 9:48 would use the data from the 9:50 AM bar which is 2769.63.

      I also removed the rounding from MyMethodTest and got the same results:

      2777.07156979909 09/10/2012 9:42:00 AM
      2777.07156979909 09/10/2012 9:45:00 AM
      2777.07156979909 09/10/2012 9:48:00 AM
      2769.63104653273 09/10/2012 9:51:00 AM
      2769.63104653273 09/10/2012 9:54:00 AM

      Now since that didn't solve it, I added a plot so you can see both and notice the slight difference. Why? Both are based on EMA(BarsArray[1], period)[0]


      I attached the updated code with myEMAMulti and a screenshot.
      Attached Files

      Comment


        #4
        I figured it out.

        myEMAMulti does not have BIP == 0 but MyMethodTest does.

        I'm confused on the proper use. It appears from the previous tests I shouldn't include it?

        Comment


          #5
          BIP is just used for you to filter which bars object is called for your trading logic. Without using BIP, any event to BIP0 or BIP1 will be updated. If you're using just BIP0, you are filtering the updates to only update when the first object updates.
          MatthewNinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X