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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    142 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    81 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    125 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    120 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    98 views
    0 likes
    Last Post CarlTrading  
    Working...
    X