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 FrancisMorro, Today, 03:24 AM
        0 responses
        1 view
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,770 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        31 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        944 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        11 views
        0 likes
        Last Post Max238
        by Max238
         
        Working...
        X