• 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

Display Instrument values on chart

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

    Display Instrument values on chart

    I like to display Instrument values on my chart. Is there a method I can call which returns a string ready to display on the chart?

    The returned string should have the correct # of decimals, and display fractions as appropriate.

    Something like High[0].ToDisplay() that returned
    "1.0045"
    "798.4"
    "115 16/32" or "115^16"
    "115 32/64" or "115'32"

    #2
    imported post

    Instrument.MasterInstrument.FormatPrice(High[0]) return a formated string
    DierkNinjaTrader Customer Service

    Comment


      #3
      imported post

      Dierk,
      I'm really struggling with C#, thanks for your patience. With PriceDisplay declared as a string variable. The statement

      PriceDisplay=Instrument.MasterInstrument.FormatPri ce(High[1]);

      produces this error

      The name "Instrument" does not exist in the current context

      I know this will eventually mean something to me, but for now I need more help.

      Comment


        #4
        imported post

        My apologies. Please try:
        PriceDisplay=Bars.Instrument.MasterInstrument.Form atPrice(High[1]);
        DierkNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by behindthewheel, Today, 10:39 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by Newtrader101, Today, 10:46 AM
        3 responses
        8 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by tecmisc1, Today, 10:42 AM
        1 response
        7 views
        0 likes
        Last Post tecmisc1  
        Started by ballboy11, Today, 10:35 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by fredfred, Today, 10:30 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Melissa  
        Working...
        X