OPEN-SOURCE SCRIPT

US Presidents 1789–1916

51
Description:
This indicator displays all U.S. presidential elections from 1789 to 1916 on your chart.

Features:

Vertical lines at the date of each presidential election.

Line color by party:

Red = Republican

Blue = Democrat

Gray = Other/None

Labels showing the name of each president.

Historical flag style: All presidents before 1900 are considered historical, providing visual distinction.

Fully overlayed on the price chart for timeline context.

Customizable: Label position (above/below bar) and line width.

Use case: Great for studying historical market behavior around elections or for general reference of U.S. presidents during the early history of the country.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.