Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 03:53:00 +0000



Overlay economic dates as vertical lines on charts

View Count: 191

[2024-04-10 17:48:18]
User346364 - Posts: 14
Hi,

Is there a relatively straight forward way to add vertical lines on a daily chart for economic data dates? I have the dates in a csv and would like these represented on a daily chart.

Thank you
Dean
[2024-04-10 18:02:12]
John - SC Support - Posts: 36238
The most straightforward way to do this is to use the "Date Time Line" study. You would need one study for each date you want to enter.

A slightly more elegant solution would be to use the "Color Background Based on Alert Condition" study. Your Alert Condition would look like the following:
=OR(BARDATE = DATE(2024, 02, 05), BARDATE = DATE(2024, 01, 16))

Where you can extend the entries for the dates you want to highlight. Note that this will color the entire day in an Intraday chart.

You could also use the BARDATETIME() function in combination with the DATE() and TIME() functions to color a specific bar at a particular date and time.

Refer to the following:
Color Background Based on Alert Condition

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#DATE_Function

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#TIME_Function
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account