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 The_Sec, Today, 02:29 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by jeronymite, 04-12-2024, 04:26 PM
            2 responses
            30 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by Mindset, 05-06-2023, 09:03 PM
            10 responses
            265 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by michi08, 10-05-2018, 09:31 AM
            5 responses
            743 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by tsantospinto, 04-12-2024, 07:04 PM
            4 responses
            63 views
            0 likes
            Last Post aligator  
            Working...
            X