• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to plot an indicator only on the current session

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

    How to plot an indicator only on the current session

    I'm new at programming in NT and probably this question was already answered but I couldn't find it.
    I would like to plot an indicator (for instance PriorDayOHLC) only for the current session (not for all previous days), can anyone tell me how to do it or indicate some example?

    Thanks in advance.

    #2
    imported post

    You would need to add some filtering logic to prevent a value for an indicator's dataseries to be set. Since NT sessions can only be defined within a calendarday, you could do something like:

    if (Time[0].Date == DateTime.Now.Date)
    Plot0.Set(yourValue);
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks it worked.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Teebone21, Today, 10:38 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by futurestrader7, Today, 11:31 AM
      0 responses
      3 views
      0 likes
      Last Post futurestrader7  
      Started by J_o_s, 03-30-2020, 12:29 AM
      2 responses
      16 views
      0 likes
      Last Post J_o_s
      by J_o_s
       
      Started by ptpatrader, Today, 10:27 AM
      0 responses
      6 views
      0 likes
      Last Post ptpatrader  
      Started by albertokeira, Today, 09:30 AM
      0 responses
      8 views
      0 likes
      Last Post albertokeira  
      Working...
      X