Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

XAUCHF MasterInstrument Data Error?

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

    XAUCHF MasterInstrument Data Error?

    Looking at the MasterInstrument Data for XAUCHF, it seems at variance with other similar MasterInstrument Data; e.g. XAUEUR.

    For example, MasterInstrument.FormatPrice(5.55555) for XAUCHF and XAUEUR is, respectively, 5.0555'6 and 5.5555'5.

    It would seem that XAUCHF has a rounding and/or format error in FormatPrice? It may warrant a check of the entire MasterInstrument for XAUCHF?

    Edit: Looking at XAUUSD, it too seems to have the same issue? Strangely, they also both seem to have an unexpected TickSize: 0.0001

    Thanks.
    Last edited by jeronymite; 04-04-2021, 09:54 PM.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    Thank you for the post.

    Can you detail why you think the tick size is unexpected for these instruments? Also what data provider is being used when seeing this?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, Jesse.

      Using Free NinjaTrader Forex data. If you look at the MasterInstruments for all the XAU Forex instruments, these two are the odd ones out; the rest have TickSize 0.00001, and their FormatPrice is as expected, as noted above. Definitely both seem anomalous. Can you advise what they should be and if there is an error in the MasterInstrument data for them, please?

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Hello jeronymite,

        Thank you for the additional details.

        I provided this information to development for further review. If I have more information that I can provide here I will update this post when I have that information.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks, Jesse. I look forward to the response from Development.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment


            #6
            Hello jeronymite,

            I heard back from development, If you use Close[0] with FormatPrice, you get the same thing you get on the price scale which would be what we should expect using FormatPrice.

            The symbols do not have to have the same ticksize so using a number that formats nicely with XAUEUR may not format nicely for XAUUSD.

            If you have more details on why you believe these should be the same tick size or why the sample value used should be the same between those instruments I can pass that back to development for more context. It otherwise would appear everything is working as expected/defined as expected.

            I look forward to being of further assistance.

            JesseNinjaTrader Customer Service

            Comment


              #7
              Thanks, Jesse.

              The TickSize of any Instrument should be fixed, as defined by the market, if I understand that correctly. In fact, having taken this opportunity to explore the market for the accepted TickSize of the XAU instruments, I find that none of the TickSizes for the XAU Instruments in NinjaTrader appear to be aligned with the market. For just one example, see here: https://dtrex.com/en/specification/ It seems that all XAU Instruments should have a TickSize of 0.01. There are many other market sources that have this same value. I suspect they are all CFD though, so that raises the question of XAU Instruments as Forex, and what that really means in the market. I have not found a source of XAU instruments that are considered Forex with any other TickSize, although it may be available somewhere.

              Also, using a specific source for a price value should not be required to determine if formatting is correct. The whole point of MasterInstrument.FormatPrice is to be able to supply a double value and have it formatted correctly. So, to have a value of 5.55555 formatted as 5.0555'6 is not correct. The zero is wrong, as is the 6, which implies some attempt to round a value. And if the TickSize used is 0.0001, as defined in NinjaTrader, there should not be a '6 at all, I would have thought.

              I would appreciate your further comments on this, and I suggest a review of these matters, to ensure the "accepted" market values are used, and that formatting produces consistent, correct results.

              Thanks.
              Multi-Dimensional Managed Trading
              jeronymite
              NinjaTrader Ecosystem Vendor - Mizpah Software

              Comment


                #8
                Hello jeronymite,

                I passed this information to Quality Assurance and they are not convinced that the tick sizes given in the link are correct as there would not be a standard for the ticksizes They noted that changes will not be made at this time to the overall database. You can certainly change all of the ticksizes on your end to get the formatting on the price scale to match what you want though. If you use the same tick sizes in those instruments then you would get the same results with FormatPrice.

                I look forward to being of further assistance.

                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Thanks, Jesse.

                  Specifying TickSizes aside, FormatPrice does not produce what would be expected from the database TickSize for the two highlighted Instruments. For the database TickSize of 0.0001 and a price of 5.55555, it should produce 5.5556. It does not, as illustrated above. Please review this, as it is not consistent with Forex FormatPrice output for any other Forex pairs, and mathematically is plain wrong.

                  Thanks.
                  Multi-Dimensional Managed Trading
                  jeronymite
                  NinjaTrader Ecosystem Vendor - Mizpah Software

                  Comment


                    #10
                    Hello jeronymite,

                    We got a second opinion with Product Management and looked further into. FormatPrice is not showing as expected with FOREX instruments with a TickSize of 0.0001. The internal ticket has moved to the development team's desk with the ticket ID NTEIGHT-14897. The number for this ID will be noted in the Release Notes page of the Help Guide when a new release comes out which addresses this.

                    The two instruments you mention would be the only two FOREX instruments in our database that have this TickSize. For the time being you may change the TickSize on your end so it is more consistent with other FOREX instruments with TickSize 0.00001. Because the TickSize is not standard, I cannot say if we will end up updating the instrument definitions for those two instruments.

                    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

                    We look forward to assisting.
                    JimNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks, Jim. I appreciate the analysis and recognition of the issue, and your update here. I look forward to seeing this rectified.

                      Thanks.
                      Multi-Dimensional Managed Trading
                      jeronymite
                      NinjaTrader Ecosystem Vendor - Mizpah Software

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Barry Milan, Yesterday, 10:35 PM
                      5 responses
                      16 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by DanielSanMartin, Yesterday, 02:37 PM
                      2 responses
                      13 views
                      0 likes
                      Last Post DanielSanMartin  
                      Started by DJ888, 04-16-2024, 06:09 PM
                      4 responses
                      13 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by terofs, Today, 04:18 PM
                      0 responses
                      12 views
                      0 likes
                      Last Post terofs
                      by terofs
                       
                      Started by nandhumca, Today, 03:41 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post nandhumca  
                      Working...
                      X