Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ToDay(Time[0]) Rounded Off to 20M?

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

    ToDay(Time[0]) Rounded Off to 20M?

    Hi,

    In the market analyzer, my indicator of that includes ToDay(Time[0]) is rounded off to 20M which is not very informative. Is there a way to display the whole integer like 20130101?

    Thanks.

    #2
    Hi Usuallywin,

    Thank you for posting.

    This is because the ToTime() returns an int of the date time structure. You can use the Time[0].ToString to return the full date time structure.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply. However, I believe that a string cannot be .set() as an indicator, therefore cannot be displayed in the market analyzer. Is that correct?

      Is there a way to display the full integer without rounding off?

      Comment


        #4
        Hi Usuallywin,

        You will need to override the price marker format to display a string -
        Code:
        public override string FormatPriceMarker(double price)
        		{
        			return DateTime.Now.ToString("MM/dd/yyyy H:mm:ss");
        		}
        http://www.ninjatrader.com/support/h...ricemarker.htm

        Let me know if I can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        574 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X