Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Plot Formating Help

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

    Indicator Plot Formating Help

    I'm having trouble matching my variable (a double) when ploted on a chart.

    ZB is charted as "116 8/32"

    my variable charts as "116.25000"

    How and where should i convert my variable to display in fractions as well?

    #2
    Unfortunately there is no way to format a plot's value based on the display formatting of the underlying price.
    RayNinjaTrader Customer Service

    Comment


      #3
      Since I can't match the formating of the underlying, is the formating of ZN exposed so I can hard code the same?

      In an older post I seen -
      PriceDisplay=Bars.Instrument.MasterInstrument.Form atPrice(High[1]);

      Not sure if this applies nor could I get it to work.

      Comment


        #4
        There is a method that will format a price to a string for use with the Print() method or any other custom drawing you might do.

        Instrument.MasterInstrument.FormatPrice(double priceValue)

        Something like this would work for example:

        double myCustomCalculation = // Some price
        Print("Formatted price is " + Instrument.MasterInstrument.FormatPrice(myCustomCa lculation));
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X