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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        82 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        43 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        56 views
        0 likes
        Last Post CarlTrading  
        Working...
        X