Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer column to Integer

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

    Market Analyzer column to Integer

    Hello,

    Is it possible to change a Market Analyzer column to integer, or to round the number or format decimal count?

    Thanks
    Ulises
    ulisesguerrero
    NinjaTrader Ecosystem Vendor - Thrifty Coders

    #2
    Hello ulisesguerrero,

    Thanks for writing in.

    This kind of formatting for the columns would not be available unless you created your own custom Market Analyzer column via NinjaScript and restricted the output values to what you would like.

    Please let me know if I may be of any further assistance.
    Alan S.NinjaTrader Customer Service

    Comment


      #3
      Thank you,

      I have tried to convert a double to int in my indicator output:

      temp = Convert.ToInt32(Math.Abs(Close[0]-Values[0][0])/(TickSize*10));
      Values[3][0] = temp;

      But the Market Analyzer still gives a double number: 1.0000

      Then I notice that within "Ninjascript generated code" it is still double, but when I change it to int, it automatically resets to double when I compile.

      What should I do?
      ulisesguerrero
      NinjaTrader Ecosystem Vendor - Thrifty Coders

      Comment


        #4
        Hello ulisesguerrero,

        The Values collection is a collection of double series that are used for plots.

        It will not be possible to change this.

        Below are public links to Value and Values.

        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok, so how can I send an Integer to the Market Analyzer if not through the Values collection?
          ulisesguerrero
          NinjaTrader Ecosystem Vendor - Thrifty Coders

          Comment


            #6
            Hello ulisesguerrero,

            If you must be using an actual integer, you would need to make a MarketAnalyzerColumn script and set the CurrentText value from the <integer>.ToString() instead of using an indicator column.
            Below is a public link to the help guide.


            If you are just wanting 0 decimal places from a plot in an indicator you can use FormatPriceMarker() and set the ToString to use "N0".
            Below is a public link to the guide.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Sparkyboy, Today, 10:57 AM
            0 responses
            2 views
            0 likes
            Last Post Sparkyboy  
            Started by TheMarlin801, 10-13-2020, 01:40 AM
            21 responses
            3,917 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by timmbbo, 07-05-2023, 10:21 PM
            3 responses
            152 views
            0 likes
            Last Post grayfrog  
            Started by Lumbeezl, 01-11-2022, 06:50 PM
            30 responses
            810 views
            1 like
            Last Post grayfrog  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            3 responses
            11 views
            0 likes
            Last Post NinjaTrader_Erick  
            Working...
            X