DateOfNextTradingDay returns the DateTime of the next trading day with respect to the bar number or date passed to the function. You can use this function to determine if the next trading day (U.S. Stock Market only) is a specific DayOfWeek (like DayOfWeek.Friday). This information can be used to trigger an Alert for a trading action on the next day, i.e., bar + 1. DateOfNextTradingDay accounts for weekends and U.S. market holidays.
In this example, the strategy simply buys on Thursdays and sells on the first trading session of the following week, usually Monday.