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

Treasury Notes Price Conversion

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

    Treasury Notes Price Conversion

    2 Year Treasury Notes
    Bars.Instrument = ZT 03-11 Globex
    Close[0] = 109.3203125
    FormatPrice(Close[0]) = 109'102

    5 Year Treasury Notes
    Bars.Instrument = ZF 03-11 Globex
    Close[0] = 117.609375
    FormatPrice(Close[0]) = 117'195

    What is the formula / math to convert the FormatPrice(Close[0]) to Close[0]? Or put another way, convert the string/label price to the decimal price.

    Thanks

    #2
    Hello TajTrades,

    Best is to look at contract specifications for these to see how they format their prices:


    Points ($2,000) and quarters of 1/32 of a point. For example, 109-16 represents 109 16/32, 109-162 represents 109 16.25/32, 109-165 represents 109 16.5/32, and 109-167 represents 109 16.75/32. Par is on the basis of 100 points.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan,

      I am assuming that within NT there will always be 3 characters/digits following the " ' " character separating the whole number from the fractional part in all treasury quotes. In other words you guys do not leave off the zero anywhere as in 109'120.

      Is this a correct assumption?

      Comment


        #4
        Hi Taj,

        That's correct. All prices for these instruments are formatted for 3 digits after the ^.

        109 ^120 = 109 ^ 12/32 = 109.375
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mgco4you, Today, 09:46 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by wzgy0920, Today, 09:53 PM
        0 responses
        3 views
        0 likes
        Last Post wzgy0920  
        Started by Rapine Heihei, Today, 08:19 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by Rapine Heihei, Today, 08:25 PM
        0 responses
        6 views
        0 likes
        Last Post Rapine Heihei  
        Started by f.saeidi, Today, 08:01 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X