Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8: Check for name of day

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

    NT8: Check for name of day

    Hello,

    I try to let my strategy check for the current day. My goal is I want to program my strategy so that it does not enter a trade on Monay's between 00:00 and 01:00AM. I can't figure out how to check if the current day is Monday with NT8 coding.

    Can somebody help me with this please?

    Thanks in advance.

    Dennis

    #2
    Hello,
    Thank you for your post.
    You can achieve this by using the DayOfWeek property of the Time series to check if it is Monday and check if the time is between 0:00 and 1:00.
    For exeample:
    Code:
    if(Time[0].DayOfWeek == DayOfWeek.Monday)
    For more information on time filters I would recommend to review our reference sample on creating time filters: http://ninjatrader.com/support/forum...ead.php?t=3226
    Cody B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X