• 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

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 mtamaku, Today, 09:19 AM
    0 responses
    12 views
    0 likes
    Last Post mtamaku
    by mtamaku
     
    Started by traderMNQ, Today, 09:00 AM
    2 responses
    9 views
    0 likes
    Last Post traderMNQ  
    Started by jransom, Today, 09:08 AM
    0 responses
    6 views
    0 likes
    Last Post jransom
    by jransom
     
    Started by Irukandji, Today, 08:27 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by brunoviveiros, Today, 08:18 AM
    0 responses
    5 views
    0 likes
    Last Post brunoviveiros  
    Working...
    X