• 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

Column Format

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

    Column Format

    Hello,

    Please see attached snapshot.

    How can I change the format of the highlighted column from doubles to integers?

    Thank you,

    Stopped
    Attached Files

    #2
    Stopped,

    I am happy to assist you.

    How are you defining "Days Ago"? Is this a custom indicator?

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Hi AdamP,

      Thanks for your help.

      Yes, it is a DataSeries from one of my custom indicators. It looks as if Market Analyzer uses the same number format as the one that is applied to the price of the instrument. Ideally, I would like to transform those numbers to integers, as they are easier to read.

      Let me know if you need more details.

      Stopped

      Comment


        #4
        Originally posted by Stopped View Post
        Hi AdamP,

        Thanks for your help.

        Yes, it is a DataSeries from one of my custom indicators. It looks as if Market Analyzer uses the same number format as the one that is applied to the price of the instrument. Ideally, I would like to transform those numbers to integers, as they are easier to read.

        Let me know if you need more details.

        Stopped
        Math.Round??

        Comment


          #5
          Hi sledge,

          Thank you for your contribution.

          I have changed the code in my custom indicator, using the Math.Round method that you suggested, but still do not get the results in Market Analyzer:

          // Momentum

          bool downArrow = false;
          bool upArrow = false;

          if (ndConfirmed || (momentum[1] >= 0 && (pdReversed || lPrice[0] < sLine[1])))
          {
          momentum.Set(-
          1);
          momSince.Set(Math.Round((
          double) 1, 0));
          downArrow =
          true;
          }
          elseif (pdConfirmed || (momentum[1] <= 0 && (ndReversed || hPrice[0] > rLine[1])))
          {
          momentum.Set(
          1);
          momSince.Set(Math.Round((
          double) 1, 0));
          upArrow =
          true;
          }
          else
          {
          momentum.Set(momentum[
          1]);
          momSince.Set(Math.Round(momSince[
          1] + 1, 0));
          }

          Any more ideas from you, AdamP or anyone else? Perhaps I am using the Math.Round method in the wrong place of the code?

          Thanks in advance,

          Stopped

          Comment


            #6
            Hello again,

            I just found a way around to solve this problem by creating a new custom indicator (myDaysAgo) which basically calls my original custom indicator containing the momSince dataseries and then transforms its 'price' format using the FormatPriceMarker() method.

            Is there, however, a simple, more elegant way to achieve this same results??

            I felt I had to resort to creating a new indicator because the original one had several plots, whose number formats I did not want to modify.

            Thanks in advance,

            Stopped
            Attached Files
            Last edited by Stopped; 01-29-2012, 04:54 AM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ct, Today, 05:31 AM
            1 response
            2 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by pstrusi, Today, 02:21 AM
            0 responses
            6 views
            0 likes
            Last Post pstrusi
            by pstrusi
             
            Started by indy73, Yesterday, 10:52 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_EricB  
            Started by priceisking, 05-13-2019, 08:30 AM
            6 responses
            40 views
            0 likes
            Last Post Harry
            by Harry
             
            Started by pjsmith, Today, 12:43 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Working...
            X