• 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 manugarc, Today, 01:15 PM
        0 responses
        3 views
        0 likes
        Last Post manugarc  
        Started by JMont1, Today, 11:42 AM
        0 responses
        4 views
        0 likes
        Last Post JMont1
        by JMont1
         
        Started by Steve L, Yesterday, 10:04 PM
        0 responses
        4 views
        0 likes
        Last Post Steve L
        by Steve L
         
        Started by marianfed, Yesterday, 09:47 PM
        0 responses
        5 views
        0 likes
        Last Post marianfed  
        Started by hir04068, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post hir04068  
        Working...
        X