Indicator · Pine Script v6 · On the chart

Worldwide Events

by piecioshka

Worldwide Events is an overlay indicator that marks historical world events on the price chart, from the 1930s to recent years.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code244
Settings4inputs
LicenceCustom licencefile: MPL-2.0
Last update11 days ago18 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

244 lines of Pine Script v6 from worldwide-events.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

worldwide-events.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Piotr Kowalski "piecioshka"

//@version=6
indicator("Worldwide Events", overlay=true, max_lines_count=500, max_labels_count=500)

COLOR_HIGH_PRIORITY   = color.rgb(166, 28, 28, 50)
COLOR_MEDIUM_PRIORITY = color.rgb(223, 134, 0, 50)
COLOR_LOW_PRIORITY    = color.rgb(255, 235, 59, 50)

// @generated lang-input
lang                 = input.string("EN", "Language", options=["EN", "PL"], group="Settings")
// @end-generated
show_high_priority   = input.bool(true,  "🔴 High priority",   group="Display events")
show_medium_priority = input.bool(true,  "🟠 Medium priority", group="Display events")
show_low_priority    = input.bool(false, "🟡 Low priority",    group="Display events")

var times     = array.new_int()
// @generated lang-arrays
var labels_en = array.new_string()
var labels_pl = array.new_string()
// @end-generated
var colors    = array.new_color()

// @generated new-event-func
new_event(int t, string l_en, string l_pl, color c = na) =>
    array.push(times, t)
    array.push(labels_en, l_en)
    array.push(labels_pl, l_pl)
    array.push(colors, na(c) ? COLOR_LOW_PRIORITY : c)
// @end-generated

// Events are pinned to UTC by the generator, so the tooltip must read them back
// in UTC too - year()/month()/dayofmonth() default to the chart's timezone and
// would show a different day than the date in data/events-*.md.
pad2(int v) =>
    v < 10 ? "0" + str.tostring(v) : str.tostring(v)

date_to_string(int t) =>
    Y = year(t, "UTC")
    M = month(t, "UTC")
    D = dayofmonth(t, "UTC")
    h = hour(t, "UTC")
    m = minute(t, "UTC")
    s = second(t, "UTC")

    ymd = str.tostring(Y) + "-" + pad2(M) + "-" + pad2(D)
    ymd + (h == 0 and m == 0 and s == 0 ? "" : " " + pad2(h) + ":" + pad2(m) + (s == 0 ? "" : ":" + pad2(s)))

// DO NOT EDIT THIS SECTION MANUALLY
// Events are maintained in data/events-*.md files
// It is generated by the script generate-events.py
if barstate.isfirst
    new_event(timestamp("2026-09-08T00:00:00+00:00"), "Houthi attack on Saudi energy infrastructure - Brent nears $100", "Atak Huti na saudyjską infrastrukturę energetyczną - Brent blisko 100 USD", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-09-05T00:00:00+00:00"), "US destroys three Iranian shadow-fleet tankers after IRGC fires at US warships", "USA niszczą trzy irańskie tankowce floty cieni po ostrzale okrętów USA przez IRGC", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-09-01T00:00:00+00:00"), "US resumes strikes on Iran after tanker attacks in Hormuz - Brent tops $94", "USA wznawiają uderzenia w Iran po atakach na tankowce w Ormuz - Brent powyżej 94 USD", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-08-28T00:00:00+00:00"), "Warsh's first Jackson Hole speech - inflation too high, hikes back on the table", "Pierwsze wystąpienie Warsha w Jackson Hole - inflacja za wysoka, możliwe podwyżki stóp")
    new_event(timestamp("2026-08-13T00:00:00+00:00"), "S&P 500 record close (7,799) on soft PPI - Fed hike bets fade", "S&P 500 na rekordowym zamknięciu (7799) po słabym PPI - maleją szanse na podwyżkę Fed", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-07-29T00:00:00+00:00"), "Fed holds rates at 3.50-3.75% - three dissents in favor of a hike", "Fed utrzymuje stopy 3,50-3,75% - trzech członków za podwyżką")
    new_event(timestamp("2026-07-20T00:00:00+00:00"), "Andy Burnham becomes UK Prime Minister after Starmer resigns", "Andy Burnham premierem Wielkiej Brytanii po rezygnacji Starmera")
    new_event(timestamp("2026-07-19T00:00:00+00:00"), "US hits Darkhovin nuclear plant - Iran strikes US bases in Kuwait, Bahrain, Jordan", "USA uderzają w elektrownię atomową Darkhovin - Iran ostrzeliwuje bazy USA w Zatoce", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-07-13T00:00:00+00:00"), "Trump reinstates naval blockade of Iran + 20% transit fee on Hormuz cargo", "Trump przywraca blokadę morską Iranu + 20% opłaty od ładunków przez Ormuz", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-07-08T00:00:00+00:00"), "US-Iran deal collapses - Iran hits Hormuz tankers, US strikes 80+ targets, oil up", "Upadek porozumienia USA-Iran - Iran atakuje tankowce w Ormuz, USA uderzają w 80+ celów", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-06-17T00:00:00+00:00"), "US-Iran Islamabad Memorandum ends the war - Hormuz reopens, blockade lifted", "Memorandum Islamabadzkie USA-Iran kończy wojnę - otwarcie Ormuz, koniec blokady", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-06-15T00:00:00+00:00"), "G7 summit - Évian-les-Bains, France", "Szczyt G7 - Évian-les-Bains, Francja")
    new_event(timestamp("2026-04-24T00:00:00+00:00"), "S&P 500 hits record high (7,165) as oil shock eases", "S&P 500 na rekordowym szczycie (7165) po złagodzeniu szoku naftowego", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-04-08T00:00:00+00:00"), "US-Iran ceasefire ends the 2026 Iran war (mediated by Pakistan)", "Rozejm USA-Iran kończy wojnę z Iranem 2026 (mediacja Pakistanu)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-03-31T00:00:00+00:00"), "OpenAI closes record $122B funding round at $852B valuation", "OpenAI zamyka rekordową rundę 122 mld USD przy wycenie 852 mld USD", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-03-04T00:00:00+00:00"), "Iran closes the Strait of Hormuz - Brent crude surges past $120", "Iran zamyka cieśninę Ormuz - ropa Brent przebija 120 USD", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-02-28T00:00:00+00:00"), "USA & Israel attack Iran", "USA & Izrael atakują Iran", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-02-23T00:00:00+00:00"), "Anthropic announced Claude Code with COBOL migration - IBM lost 13% in one day", "Anthropic ogłosiło Claude Code z migracją COBOL - IBM stracił 13% w jeden dzień", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2026-01-30T00:00:00+00:00"), "Warsh nominated as Fed Chair + CME silver margin hike (Silver -30%)", "Nominacja Warsha na szefa Fed + podwyżka depozytów CME na srebro (Silver -30%)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2026-01-22T00:00:00+00:00"), "US President at the World Economic Forum in Davos", "Prezydent USA na Forum Ekonomicznym w Davos")
    new_event(timestamp("2026-01-17T00:00:00+00:00"), "USA announced the purchase of Greenland", "USA ogłosił zakup Grenlandii")
    new_event(timestamp("2026-01-03T00:00:00+00:00"), "Removal of Nicolás Maduro from power in Venezuela", "Usunięcie Nicolása Maduro z władzy w Wenezueli", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2025-06-22T00:00:00+00:00"), "US bombing of Iranian nuclear facilities", "Bombardowanie irańskich obiektów nuklearnych przez USA", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2025-06-16T00:00:00+00:00"), "G7 summit - Kananaskis, Alberta, Canada", "Szczyt G7 - Kananaskis, Alberta, Kanada")
    new_event(timestamp("2025-04-04T00:00:00+00:00"), "USA and China announced tariffs", "USA i Chiny ogłosiły cła", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2025-04-02T00:00:00+00:00"), "Liberation Day", "Dzień Wyzwolenia (Liberation Day)")
    new_event(timestamp("2025-01-20T00:00:00+00:00"), "Trump - 2nd term", "Trump - 2. kadencja")
    new_event(timestamp("2024-11-05T00:00:00+00:00"), "Trump wins US presidential election (2024)", "Trump wygrywa wybory prezydenckie w USA (2024)")
    new_event(timestamp("2024-09-18T00:00:00+00:00"), "Fed began cutting interest rates", "Fed zaczął obniżać stopy procentowe")
    new_event(timestamp("2024-08-05T00:00:00+00:00"), "Yen carry trade collapse triggered by BoJ rate hike (Nikkei -12%)", "Krach carry trade jena po podwyżce stóp przez BoJ (Nikkei -12%)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2024-07-13T00:00:00+00:00"), "Assassination attempt on Trump (Butler, Pennsylvania)", "Zamach na Trumpa (Butler, Pensylwania)", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2024-06-13T00:00:00+00:00"), "G7 summit - Fasano, Apulia, Italy", "Szczyt G7 - Fasano, Apulia, Włochy")
    new_event(timestamp("2024-04-13T00:00:00+00:00"), "Iranian attack on Israel", "Irański atak na Izrael", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2024-01-10T00:00:00+00:00"), "SEC approved spot Bitcoin ETF", "SEC zatwierdził spot Bitcoin ETF")
    new_event(timestamp("2023-11-17T00:00:00+00:00"), "Sam Altman fired and reinstated as OpenAI CEO", "Sam Altman zwolniony i przywrócony jako CEO OpenAI")
    new_event(timestamp("2023-10-07T00:00:00+00:00"), "Hamas attack on Israel", "Atak Hamasu na Izrael", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2023-05-19T00:00:00+00:00"), "G7 summit - Hiroshima, Japan", "Szczyt G7 - Hiroszima, Japonia")
    new_event(timestamp("2023-03-19T00:00:00+00:00"), "UBS acquired Credit Suisse for $3.2B (emergency takeover)", "UBS przejął Credit Suisse za $3.2 mld (ratunkowe przejęcie)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2023-03-10T00:00:00+00:00"), "Collapse of Silicon Valley Bank", "Upadek Silicon Valley Bank", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2022-11-30T00:00:00+00:00"), "ChatGPT launch - beginning of AI market boom", "Premiera ChatGPT - początek boomu AI na rynkach", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2022-11-11T00:00:00+00:00"), "Collapse of FTX", "Upadek FTX")
    new_event(timestamp("2022-09-26T00:00:00+00:00"), "Sabotage of Nord Stream 1 and 2", "Sabotaż Nord Stream 1 i 2")
    new_event(timestamp("2022-07-21T00:00:00+00:00"), "ECB raised rates for the first time in 11 years", "EBC podniósł stopy po raz pierwszy od 11 lat")
    new_event(timestamp("2022-06-26T00:00:00+00:00"), "G7 summit - Schloss Elmau, Bavaria, Germany", "Szczyt G7 - Schloss Elmau, Bawaria, Niemcy")
    new_event(timestamp("2022-03-16T00:00:00+00:00"), "Fed began raising interest rates", "Fed zaczął podnosić stopy procentowe")
    new_event(timestamp("2022-02-24T00:00:00+00:00"), "Russia invades Ukraine", "Rosja atakuje Ukrainę", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2021-11-10T00:00:00+00:00"), "Bitcoin reached ATH ~$69,000", "Bitcoin osiągnął ATH ~69 000 USD")
    new_event(timestamp("2021-08-30T00:00:00+00:00"), "US military withdrawal from Afghanistan", "Wycofanie wojsk USA z Afganistanu")
    new_event(timestamp("2021-06-11T00:00:00+00:00"), "G7 summit - Carbis Bay, Cornwall, United Kingdom", "Szczyt G7 - Carbis Bay, Kornwalia, Wielka Brytania")
    new_event(timestamp("2021-01-28T00:00:00+00:00"), "GameStop short squeeze - Reddit vs Wall Street (GME x25)", "Short squeeze GameStop - Reddit vs Wall Street (GME x25)", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2021-01-20T00:00:00+00:00"), "Biden - 1st term", "Biden - 1. kadencja")
    new_event(timestamp("2021-01-06T00:00:00+00:00"), "Attack on the Capitol", "Atak na Kapitol")
    new_event(timestamp("2020-11-07T00:00:00+00:00"), "Biden declared winner of US presidential election", "Biden zostaje ogłoszony zwycięzcą wyborów prezydenckich w USA")
    new_event(timestamp("2020-11-03T00:00:00+00:00"), "US presidential election", "Wybory prezydenckie w USA")
    new_event(timestamp("2020-03-23T00:00:00+00:00"), "Fed launched unlimited QE", "Fed uruchomił nieograniczony QE", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2020-03-13T00:00:00+00:00"), "COVID - stock market crash", "COVID - krach na giełdach", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2020-03-11T00:00:00+00:00"), "WHO declared COVID-19 pandemic", "WHO ogłosiło pandemię COVID-19", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2020-01-31T00:00:00+00:00"), "Brexit - United Kingdom leaves the European Union", "Brexit - Wielka Brytania opuszcza Unię Europejską")
    new_event(timestamp("2020-01-03T00:00:00+00:00"), "Killing of Iranian General Qasem Soleimani (US airstrike)", "Zabicie irańskiego generała Qasema Solejmaniego (atak lotniczy USA)")
    new_event(timestamp("2019-09-14T00:00:00+00:00"), "Drone attack on Saudi Aramco facilities", "Atak dronowy na instalacje Saudi Aramco")
    new_event(timestamp("2019-08-24T00:00:00+00:00"), "G7 summit - Biarritz, France", "Szczyt G7 - Biarritz, Francja")
    new_event(timestamp("2019-01-15T00:00:00+00:00"), "Brexit - UK Parliament rejects Theresa May's deal", "Brexit - odrzucenie umowy Theresy May przez parlament")
    new_event(timestamp("2018-06-12T00:00:00+00:00"), "Trump meets Kim Jong-un", "Spotkanie Trumpa z Kim Dzong Unem")
    new_event(timestamp("2018-06-08T00:00:00+00:00"), "G7 summit - La Malbaie, Quebec, Canada", "Szczyt G7 - La Malbaie, Quebec, Kanada")
    new_event(timestamp("2018-04-06T00:00:00+00:00"), "USA announced tariffs on China", "USA ogłosiły cła na Chiny", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2018-03-22T00:00:00+00:00"), "USA announced tariffs on steel and aluminum", "USA ogłosiły cła na stal i aluminium", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2017-07-28T00:00:00+00:00"), "North Korea missile crisis", "Kryzys rakietowy z Koreą Północną")
    new_event(timestamp("2017-05-26T00:00:00+00:00"), "G7 summit - Taormina, Sicily, Italy", "Szczyt G7 - Taormina, Sycylia, Włochy")
    new_event(timestamp("2017-04-07T00:00:00+00:00"), "US bombing of Syria", "Bombardowanie Syrii przez USA", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2017-01-20T00:00:00+00:00"), "Trump - 1st term", "Trump - 1. kadencja")
    new_event(timestamp("2016-11-08T00:00:00+00:00"), "Trump wins US presidential election", "Trump wygrywa wybory prezydenckie w USA")
    new_event(timestamp("2016-06-24T00:00:00+00:00"), "Brexit (UK referendum)", "Brexit (referendum w Wielkiej Brytanii)", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2016-05-26T00:00:00+00:00"), "G7 summit - Shima, Mie Prefecture, Japan", "Szczyt G7 - Shima, prefektura Mie, Japonia")
    new_event(timestamp("2016-01-18T00:00:00+00:00"), "Brent bottoms near $27 - oil glut plus Iran sanctions relief end the 2014-16 crash", "Dno Brent blisko 27 USD - nadpodaż i zniesienie sankcji na Iran kończą krach", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2015-06-07T00:00:00+00:00"), "G7 summit - Schloss Elmau, Bavaria, Germany", "Szczyt G7 - Schloss Elmau, Bawaria, Niemcy")
    new_event(timestamp("2014-11-27T00:00:00+00:00"), "OPEC refuses to cut output - price war against US shale, Brent falls under $70", "OPEC nie tnie wydobycia - wojna cenowa z łupkami z USA, Brent poniżej 70 USD", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2014-09-16T00:00:00+00:00"), "Houthi rebels seize power in Yemen", "Rebelianci Huti przejmują władzę w Jemenie")
    new_event(timestamp("2014-06-04T00:00:00+00:00"), "G7 summit - Brussels, Belgium", "Szczyt G7 - Bruksela, Belgia")
    new_event(timestamp("2014-02-20T00:00:00+00:00"), "Annexation of Crimea by Russia", "Aneksja Krymu przez Rosję", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2013-12-30T00:00:00+00:00"), "ISIS launches offensive in Iraq", "ISIS rozpoczyna ofensywę w Iraku", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2013-06-17T00:00:00+00:00"), "G8 summit - Lough Erne, Northern Ireland, United Kingdom", "Szczyt G8 - Lough Erne, Irlandia Północna, Wielka Brytania")
    new_event(timestamp("2013-04-15T00:00:00+00:00"), "Boston Marathon bombing", "Zamach podczas maratonu w Bostonie")
    new_event(timestamp("2013-03-16T00:00:00+00:00"), "Cyprus bail-in (first bank deposit seizure in the EU)", "Bail-in na Cyprze (pierwsze zajęcie depozytów bankowych w UE)")
    new_event(timestamp("2012-05-18T00:00:00+00:00"), "G8 summit - Camp David, Maryland, United States", "Szczyt G8 - Camp David, Maryland, USA")
    new_event(timestamp("2012-01-23T00:00:00+00:00"), "EU embargo on Iranian oil plus central bank asset freeze - Brent back above $110", "Embargo UE na ropę z Iranu i zamrożenie aktywów banku centralnego - Brent ponad 110 USD", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2011-05-26T00:00:00+00:00"), "G8 summit - Deauville, France", "Szczyt G8 - Deauville, Francja")
    new_event(timestamp("2011-03-15T00:00:00+00:00"), "Assad regime suppresses uprising in Syria", "Reżim Asada tłumi powstanie w Syrii", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2011-02-15T00:00:00+00:00"), "Libyan uprising cuts 1.6 mb/d of supply - Arab Spring pushes Brent over $100", "Powstanie w Libii wycina 1,6 mln baryłek dziennie - Brent ponad 100 USD", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2010-06-25T00:00:00+00:00"), "G8 summit - Huntsville, Ontario, Canada", "Szczyt G8 - Huntsville, Ontario, Kanada")
    new_event(timestamp("2010-05-02T00:00:00+00:00"), "First Greek bailout (eurozone debt crisis)", "Pierwszy bailout Grecji (kryzys strefy euro)")
    new_event(timestamp("2009-07-08T00:00:00+00:00"), "G8 summit - L'Aquila, Italy", "Szczyt G8 - L'Aquila, Włochy")
    new_event(timestamp("2008-12-22T00:00:00+00:00"), "Oil collapses to near $32 - demand destruction after the financial crisis", "Ropa spada w okolice 32 USD - załamanie popytu po kryzysie finansowym", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2008-09-15T00:00:00+00:00"), "Collapse of Lehman Brothers (global financial crisis)", "Upadek Lehman Brothers (globalny kryzys finansowy)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2008-09-07T00:00:00+00:00"), "US government takeover of Fannie Mae and Freddie Mac", "Przejęcie Fannie Mae i Freddie Mac przez rząd USA")
    new_event(timestamp("2008-07-11T00:00:00+00:00"), "Oil peaks at an all-time high of $147.27 - Asian demand, weak dollar, Iran fears", "Rekord wszech czasów ropy - 147,27 USD, popyt Azji, słaby dolar, obawy o Iran", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2008-07-07T00:00:00+00:00"), "G8 summit - Tōyako, Hokkaidō, Japan", "Szczyt G8 - Tōyako, Hokkaido, Japonia")
    new_event(timestamp("2008-03-14T00:00:00+00:00"), "Collapse of Bear Stearns", "Upadek Bear Stearns")
    new_event(timestamp("2007-06-06T00:00:00+00:00"), "G8 summit - Heiligendamm, Germany", "Szczyt G8 - Heiligendamm, Niemcy")
    new_event(timestamp("2006-07-15T00:00:00+00:00"), "G8 summit - Strelna, Saint Petersburg, Russia", "Szczyt G8 - Strielna, Sankt Petersburg, Rosja")
    new_event(timestamp("2005-07-06T00:00:00+00:00"), "G8 summit - Gleneagles, Scotland, United Kingdom", "Szczyt G8 - Gleneagles, Szkocja, Wielka Brytania")
    new_event(timestamp("2005-07-05T00:00:00+00:00"), "London Underground bombings", "Zamachy w londyńskim metrze")
    new_event(timestamp("2004-06-08T00:00:00+00:00"), "G8 summit - Sea Island, Georgia, United States", "Szczyt G8 - Sea Island, Georgia, USA")
    new_event(timestamp("2004-03-11T00:00:00+00:00"), "Madrid bombings", "Zamachy w Madrycie")
    new_event(timestamp("2003-06-01T00:00:00+00:00"), "G8 summit - Évian-les-Bains, France", "Szczyt G8 - Évian-les-Bains, Francja")
    new_event(timestamp("2003-03-20T00:00:00+00:00"), "Start of the Iraq War", "Początek wojny w Iraku", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2002-06-26T00:00:00+00:00"), "G8 summit - Kananaskis, Alberta, Canada", "Szczyt G8 - Kananaskis, Alberta, Kanada")
    new_event(timestamp("2001-10-07T00:00:00+00:00"), "USA attacks Taliban in Afghanistan", "USA atakują talibów w Afganistanie", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("2001-09-11T00:00:00+00:00"), "Terrorist attacks in the USA (September 11)", "Zamachy terrorystyczne w USA (11 września)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("2001-07-20T00:00:00+00:00"), "G8 summit - Genoa, Italy", "Szczyt G8 - Genua, Włochy")
    new_event(timestamp("2000-10-12T00:00:00+00:00"), "Attack on USS Cole in Yemen", "Zamach na USS Cole w Jemenie")
    new_event(timestamp("2000-07-21T00:00:00+00:00"), "G8 summit - Nago, Okinawa, Japan", "Szczyt G8 - Nago, Okinawa, Japonia")
    new_event(timestamp("1999-06-18T00:00:00+00:00"), "G8 summit - Cologne, Germany", "Szczyt G8 - Kolonia, Niemcy")
    new_event(timestamp("1998-05-15T00:00:00+00:00"), "G8 summit - Birmingham, United Kingdom", "Szczyt G8 - Birmingham, Wielka Brytania")
    new_event(timestamp("1998-02-28T00:00:00+00:00"), "Serbia attacks Albanian separatists in Kosovo", "Serbia atakuje albańskich separatystów w Kosowie")
    new_event(timestamp("1997-10-08T00:00:00+00:00"), "Asian financial crisis", "Azjatycki kryzys finansowy", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1997-06-20T00:00:00+00:00"), "G8 summit - Denver, Colorado, United States", "Szczyt G8 - Denver, Kolorado, USA")
    new_event(timestamp("1996-06-27T00:00:00+00:00"), "G7 summit - Lyon, France", "Szczyt G7 - Lyon, Francja")
    new_event(timestamp("1995-06-15T00:00:00+00:00"), "G7 summit - Halifax, Nova Scotia, Canada", "Szczyt G7 - Halifax, Nowa Szkocja, Kanada")
    new_event(timestamp("1994-07-08T00:00:00+00:00"), "G7 summit - Naples, Italy", "Szczyt G7 - Neapol, Włochy")
    new_event(timestamp("1993-07-07T00:00:00+00:00"), "G7 summit - Tokyo, Japan", "Szczyt G7 - Tokio, Japonia")
    new_event(timestamp("1993-02-26T00:00:00+00:00"), "First World Trade Center bombing", "Pierwszy zamach na World Trade Center")
    new_event(timestamp("1992-09-16T00:00:00+00:00"), "Soros breaks the Bank of England", "Soros łamie Bank Anglii")
    new_event(timestamp("1992-07-06T00:00:00+00:00"), "G7 summit - Munich, Bavaria, Germany", "Szczyt G7 - Monachium, Bawaria, Niemcy")
    new_event(timestamp("1992-04-06T00:00:00+00:00"), "Bosnian Serbs attack Bosnia & Herzegovina", "Serbowie bośniaccy atakują Bośnię & Hercegowinę", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1991-07-15T00:00:00+00:00"), "G7 summit - London, United Kingdom", "Szczyt G7 - Londyn, Wielka Brytania")
    new_event(timestamp("1990-08-02T00:00:00+00:00"), "Iraqi invasion of Kuwait", "Inwazja Iraku na Kuwejt", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1990-07-09T00:00:00+00:00"), "G7 summit - Houston, Texas, United States", "Szczyt G7 - Houston, Teksas, USA")
    new_event(timestamp("1989-07-14T00:00:00+00:00"), "G7 summit - Paris, France", "Szczyt G7 - Paryż, Francja")
    new_event(timestamp("1988-06-19T00:00:00+00:00"), "G7 summit - Toronto, Ontario, Canada", "Szczyt G7 - Toronto, Ontario, Kanada")
    new_event(timestamp("1987-10-19T00:00:00+00:00"), "Stock market crash of 1987 (Black Monday)", "Krach giełdowy z 1987 roku (Czarny Poniedziałek)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1987-06-08T00:00:00+00:00"), "G7 summit - Venice, Italy", "Szczyt G7 - Wenecja, Włochy")
    new_event(timestamp("1986-05-04T00:00:00+00:00"), "G7 summit - Tokyo, Japan", "Szczyt G7 - Tokio, Japonia")
    new_event(timestamp("1985-05-02T00:00:00+00:00"), "G7 summit - Bonn, West Germany", "Szczyt G7 - Bonn, Niemcy Zachodnie")
    new_event(timestamp("1984-06-07T00:00:00+00:00"), "G7 summit - London, United Kingdom", "Szczyt G7 - Londyn, Wielka Brytania")
    new_event(timestamp("1984-05-09T00:00:00+00:00"), "Continental Illinois bailout", "Ratunek (bailout) Continental Illinois")
    new_event(timestamp("1983-05-28T00:00:00+00:00"), "G7 summit - Williamsburg, Virginia, United States", "Szczyt G7 - Williamsburg, Wirginia, USA")
    new_event(timestamp("1982-06-06T00:00:00+00:00"), "Israel enters Lebanon against PLO", "Izrael wkracza do Libanu przeciw OWP")
    new_event(timestamp("1982-06-04T00:00:00+00:00"), "G7 summit - Versailles, France", "Szczyt G7 - Wersal, Francja")
    new_event(timestamp("1982-04-02T00:00:00+00:00"), "Argentina captures British Falklands", "Argentyna zajmuje Falklandy Wielkiej Brytanii")
    new_event(timestamp("1981-07-20T00:00:00+00:00"), "G7 summit - Montebello, Quebec, Canada", "Szczyt G7 - Montebello, Quebec, Kanada")
    new_event(timestamp("1981-03-30T00:00:00+00:00"), "Assassination attempt on Ronald Reagan", "Zamach na Ronalda Reagana")
    new_event(timestamp("1980-09-22T00:00:00+00:00"), "Iraq attacks Iran (Iran-Iraq War)", "Irak atakuje Iran (Wojna Iracko-Irańska)", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1980-06-22T00:00:00+00:00"), "G7 summit - Venice, Italy", "Szczyt G7 - Wenecja, Włochy")
    new_event(timestamp("1979-06-28T00:00:00+00:00"), "G7 summit - Tokyo, Japan", "Szczyt G7 - Tokio, Japonia")
    new_event(timestamp("1978-07-16T00:00:00+00:00"), "G7 summit - Bonn, West Germany", "Szczyt G7 - Bonn, Niemcy Zachodnie")
    new_event(timestamp("1978-04-27T00:00:00+00:00"), "Communists seize power in Afghanistan", "Komuniści przejmują władzę w Afganistanie")
    new_event(timestamp("1977-05-07T00:00:00+00:00"), "G7 summit - London, United Kingdom", "Szczyt G7 - Londyn, Wielka Brytania")
    new_event(timestamp("1976-06-27T00:00:00+00:00"), "G7 summit - Dorado, Puerto Rico, United States", "Szczyt G7 - Dorado, Portoryko, USA")
    new_event(timestamp("1976-03-24T00:00:00+00:00"), "Military junta seizes power in Argentina", "Junta wojskowa przejmuje władzę w Argentynie")
    new_event(timestamp("1975-11-15T00:00:00+00:00"), "G6 summit - Château de Rambouillet, France (first summit)", "Szczyt G6 - Château de Rambouillet, Francja (pierwszy szczyt)")
    new_event(timestamp("1974-08-09T00:00:00+00:00"), "Resignation of Richard Nixon", "Rezygnacja Richarda Nixona")
    new_event(timestamp("1973-10-16T00:00:00+00:00"), "OPEC oil embargo", "Embargo naftowe OPEC", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1973-10-06T00:00:00+00:00"), "Yom Kippur War", "Wojna Jom Kipur")
    new_event(timestamp("1972-09-05T00:00:00+00:00"), "Munich Olympics massacre", "Zamach podczas igrzysk w Monachium")
    new_event(timestamp("1970-06-21T00:00:00+00:00"), "Penn Central bankruptcy", "Bankructwo Penn Central")
    new_event(timestamp("1968-01-30T00:00:00+00:00"), "Tet Offensive", "Ofensywa Tết")
    new_event(timestamp("1967-07-01T00:00:00+00:00"), "Egypt starts shelling Israel (War of Attrition)", "Egipt rozpoczyna ostrzał pozycji Izraela (Wojna na Wyczerpanie)")
    new_event(timestamp("1967-06-05T00:00:00+00:00"), "Six-Day War", "Wojna sześciodniowa")
    new_event(timestamp("1964-08-02T00:00:00+00:00"), "Gulf of Tonkin incident", "Incydent w Zatoce Tonkińskiej")
    new_event(timestamp("1963-11-22T00:00:00+00:00"), "Assassination of John F. Kennedy", "Zamach na Johna F. Kennedy'ego")
    new_event(timestamp("1962-10-16T00:00:00+00:00"), "Cuban Missile Crisis", "Kryzys kubański (kryzys rakietowy)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1956-10-29T00:00:00+00:00"), "Suez Crisis", "Kryzys sueski", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1956-10-23T00:00:00+00:00"), "Hungarian Revolution", "Powstanie węgierskie", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1955-11-01T00:00:00+00:00"), "North Vietnam fights South Vietnam", "Wietnam Północny walczy z Wietnamem Południowym", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1954-11-01T00:00:00+00:00"), "Algerian FLN starts uprising against France", "Algierski FLN rozpoczyna powstanie przeciw Francji")
    new_event(timestamp("1950-06-25T00:00:00+00:00"), "North Korea attacks South Korea", "Korea Północna atakuje Koreę Południową", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1948-05-15T00:00:00+00:00"), "Egypt & Syria & Jordan & Iraq attack Israel", "Egipt & Syria & Jordania & Irak atakują Izrael", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1946-03-30T00:00:00+00:00"), "Communists start civil war against Greek government", "Komuniści rozpoczynają wojnę domową z rządem Grecji")
    new_event(timestamp("1941-12-07T00:00:00+00:00"), "Attack on Pearl Harbor", "Atak na Pearl Harbor", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1940-05-10T00:00:00+00:00"), "Germany attacks France", "Niemcy atakują Francję", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1939-11-30T00:00:00+00:00"), "USSR attacks Finland (Winter War)", "ZSRR atakuje Finlandię (Wojna Zimowa)", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1939-09-01T00:00:00+00:00"), "Germany attacks Poland (start of World War II)", "Niemcy atakują Polskę (początek II Wojny Światowej)", COLOR_HIGH_PRIORITY)
    new_event(timestamp("1937-07-07T00:00:00+00:00"), "Japan attacks China", "Japonia atakuje Chiny", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1936-07-17T00:00:00+00:00"), "Franco starts uprising against Spanish government", "Franco rozpoczyna powstanie przeciw rządowi Hiszpanii", COLOR_MEDIUM_PRIORITY)
    new_event(timestamp("1935-10-03T00:00:00+00:00"), "Italy attacks Ethiopia", "Włochy atakują Etiopię")
    new_event(timestamp("1932-06-15T00:00:00+00:00"), "Bolivia attacks Paraguay (Chaco War)", "Boliwia atakuje Paragwaj (Wojna o Chaco)")

if barstate.islast
    for i = 0 to array.size(times) - 1
        t = array.get(times, i)
        // @generated label-lookup
        l = lang == "EN" ? array.get(labels_en, i) : array.get(labels_pl, i)
        // @end-generated
        date = date_to_string(t)
        c = array.get(colors, i)
        visible = (c == COLOR_HIGH_PRIORITY   and show_high_priority  ) or
                  (c == COLOR_MEDIUM_PRIORITY and show_medium_priority) or
                  (c == COLOR_LOW_PRIORITY    and show_low_priority   )
        if visible
            line.new(t, low, t, high, xloc=xloc.bar_time, extend=extend.both, color=c)
            label.new(t, 0, l, xloc=xloc.bar_time, yloc=yloc.belowbar, color=c, textcolor=color.white, style=label.style_label_center, size=size.normal, tooltip=date)

Overview

Events cover wars, financial crises, monetary policy decisions and trade measures. Each is shown at its date, with the date available in a tooltip, and sorted into high, medium and low priority groups that can be shown or hidden. Descriptions can be shown in English or Polish. It is a reference overlay and gives no trading signals.

Details

Published by

piecioshka on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

H4 and above

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

tradingtradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
LanguagestringENlang
🔴 High prioritybooltrueshow_high_priority
🟠 Medium prioritybooltrueshow_medium_priority
🟡 Low priorityboolfalseshow_low_priority
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

947 stars

The Adaptive Laguerre Filter calculates a smoothed, dynamically adjusted trendline plotted directly on the main price chart. It dynamically adjusts its damping factor (alpha) based on recent price range variations and median percentile calculations over a spec

Indicator v4 TrendMoving averages
Updated 11 days ago · GPL-3.0 GitHub repository of Adaptive Laguerre Filter
575 stars

The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Indicator
330 stars

This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab

Indicator v4 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of 3 EMA/SMA + Cross [Alorse]
318 stars

This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos

Indicator v5 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of ATR Trailing Stoploss

1833 Tracker

by Allen1212
303 stars

1833 Tracker is an overlay indicator that visualizes historical buy and sell transactions executed by ARK Invest ETFs for the stock on the main price chart. It displays trade dates using green buy and red sell labels positioned relative to price bars, indicati

Indicator v4
Updated 2 years ago · None stated GitHub repository of 1833 Tracker

More indicators

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers