Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Decimal precision of a column

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

    Decimal precision of a column

    How do I change the decimal precision of a column in Market Analyzer?
    The output value is a DataSeries and has this code:

    public DataSeries Status
    {
    get { return Values[0]; }
    }

    Thanks,
    Gary

    #2
    Unfortunately this is beyond what we provide support for.

    However, here is a hint: please take a look at the method
    >> protected override string Format(double value)
    .. in the file MarketAnalyer/@AskPrice.cs

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      Unfortunately this is beyond what we provide support for.

      However, here is a hint: please take a look at the method
      >> protected override string Format(double value)
      .. in the file MarketAnalyer/@AskPrice.cs
      Ah interesting. I understand that NinjaTrader Support can't provide support for such methods, but because the default NetChange in the Market Analyzer doesn't work on EOD data (when there is no connection to a data provider), I'm struggling to find a work around for this. So, I hope that perhaps other forum users can help me find the error in the following code in my indicator:

      Code:
      [COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]protected[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]override[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]void[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]OnBarUpdate[/SIZE][/FONT][B][COLOR=black]()[/COLOR][/B]
      [B][COLOR=black]{[/COLOR][/B]
      [/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]double[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]percChange=[B] (([/B]Close[B][[/B]0[B]] [/B]-Close[B][[/B]1[B]]) [/B]/Close[B][[/B]1[B]]) [/B]*100[/SIZE][/FONT][B][COLOR=black];[/COLOR][/B]
      [COLOR=black]DailyPercChange.Set[B]([/B]percChange[/COLOR][B][COLOR=black]);[/COLOR][/B]
      [B][COLOR=black]}[/COLOR][/B]
      [/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]protected[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]override[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]string[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]Format[B]([/B][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]double[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]value[/SIZE][/FONT][B][COLOR=black])[/COLOR][/B]
      [B][COLOR=black]{[/COLOR][/B]
      [/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]return[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]value.ToString[B]([/B][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]"0.00"[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]) [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]+[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black]"%"[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black];[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
      [B][SIZE=2][FONT=Consolas][COLOR=black]}[/COLOR][/FONT][/SIZE][/B]
      [/SIZE][/FONT][/SIZE][/FONT]
      If there is another way to let the Market Analyzer work with Historical data (instead of the OnMarketData method) I would love to hear about this.

      Regards,

      Comment


        #4


        You likely miss this check above - do you see any errors in the log tab of the Control Center when trying to load this snippet you've created?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          http://www.ninjatrader.com/support/f...ead.php?t=3170

          You likely miss this check above - do you see any errors in the log tab of the Control Center when trying to load this snippet you've created?
          Thanks Bertrand.

          The error I receive is (translated from Dutch so on an English Windows version it might look somewhat different):
          Code:
          NinjaTrader.Indicator.MANetChange.Format(double): not founded a suitable method to overwrite - CS0115
          If I need to guess, I'd say that it doesn't work because with an custom indicator you use a DataSeries, whereas the default Market Analyzer indicators only use one value (the most recent OnMarketData value).

          Regards,

          Comment


            #6
            The code snippet you picked is for a MA column, not an indicator I believe...
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rtwave, 04-12-2024, 09:30 AM
            4 responses
            29 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Started by yertle, Yesterday, 08:38 AM
            7 responses
            28 views
            0 likes
            Last Post yertle
            by yertle
             
            Started by bmartz, 03-12-2024, 06:12 AM
            2 responses
            21 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by funk10101, Today, 12:02 AM
            0 responses
            6 views
            0 likes
            Last Post funk10101  
            Started by gravdigaz6, Yesterday, 11:40 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X