• 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

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.
        https://ninjatrader.com/support/help...n-us/value.htm
        https://ninjatrader.com/support/help...-us/values.htm
        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.
            https://ninjatrader.com/support/help...urrenttext.htm

            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.
            https://ninjatrader.com/support/help...ricemarker.htm
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tecmisc1, Today, 09:57 AM
            0 responses
            2 views
            0 likes
            Last Post tecmisc1  
            Started by mbesha, Today, 09:26 AM
            0 responses
            1 view
            0 likes
            Last Post mbesha
            by mbesha
             
            Started by Brillo, Today, 08:58 AM
            0 responses
            6 views
            0 likes
            Last Post Brillo
            by Brillo
             
            Started by avrege, Today, 01:48 AM
            2 responses
            13 views
            0 likes
            Last Post avrege
            by avrege
             
            Started by markbb10, Today, 07:14 AM
            0 responses
            7 views
            0 likes
            Last Post markbb10  
            Working...
            X