• 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 NinjaCustomer, Today, 12:14 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by U0000999, Yesterday, 11:49 PM
    0 responses
    4 views
    0 likes
    Last Post U0000999  
    Started by ahadari28, Yesterday, 04:01 PM
    0 responses
    5 views
    0 likes
    Last Post ahadari28  
    Started by TazoTodua, Yesterday, 06:00 AM
    2 responses
    19 views
    0 likes
    Last Post TazoTodua  
    Started by TazoTodua, Yesterday, 09:06 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X