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

DrawLines only in today´s session

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

    DrawLines only in today´s session

    Hi

    In an indicator, can you give me a code snippet that enables my drawlines to only draw in today´s session?

    thanks

    #2
    Sniffy,

    To do this you need to run a check comparing today's date with the date of the data.

    Untested code:
    Code:
    if (ToDay(Time[0]) == ToDay(DateTime.Now))
    {
         // Do something;
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks

      Thanks for fast response Josh.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by nleitman, Yesterday, 11:46 AM
      13 responses
      33 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by MSerag, Yesterday, 11:52 PM
      3 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by dcriador, Yesterday, 01:43 AM
      6 responses
      27 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by James650, Today, 08:25 AM
      1 response
      2 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by Rogers101, 05-05-2024, 11:30 AM
      14 responses
      40 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X