Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 16:21:13 +0000



Post From: Draw vertical line on last bar of the week. Color Background Based On Alert Condition

[2021-07-21 13:27:39]
Sawtooth - Posts: 3976
Try this:
=AND(WEEKDAY(BARDATE)=6,WEEKDAY(BARDATE[1])=1)

The first half of the formula finds the Fridays.
The second half of the formula finds the Sundays after the Fridays.
When both are TRUE, it finds the last bar on Friday.

WEEKDAY =6 is Friday
WEEKDAY =1 is Sunday
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function

BARDATE is the Date of the Serial DateTime, counting the days from Dec 31, 1899.
Spreadsheet Functions: Serial DateTime Values