Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 bortz, 11-06-2023, 08:04 AM
        47 responses
        1,602 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X