Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Doing a calculation within N bars where N is an user

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

    #16
    Hello

    Thanks for your reply.

    I will answer your question however please help us keep the forum organized by creating a new topic when your question(s) no longer relates to the current topic, in this case, "Doing a calculation within N bars where N is an user"

    How to check if today's Sunday?
    You can generate the code for this in the Strategy Builder by left side Time>Date series (Bars ago of 0), Equals, right side Time>Day of week> Sunday.

    The code generated would be: if (Times[0][0].DayOfWeek == DayOfWeek.Sunday)

    The code is asking the question is the date of the current bar equal to Sunday.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    238 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    154 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    163 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    246 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    199 views
    0 likes
    Last Post CarlTrading  
    Working...
    X