rrturtles2

Window Periods

// Work in progress.. visualize event windows

// to do:
// - assign sector relevance (add opec events and weight more to commodity typed instruments, whereas revenue forecasts of walmart won't be as relevant to commodities)
// - create weighting onto macro probability valuators
// - create means to store window weight/values in an accessible way so that additional scripts can access this data (post hidden text in window?) or maybe just duplicate arrays elsewhere in additional code (terrible option)
// - correct colors to scale within like types of events (opex the same, rebalancing periods the same, political and financial meeting the same color etc..)
// - find a way to make transfer the timestamps or date strings as const variables usable within functions. v5 sends as series and cannot be converted back making this an overly complicated case instead of a function/library
// - add dates back to 2017 for better referencing
// - convert a number of the variables to inputs so they can be controlled in-chart, such as transparancy, and color of each window period?

Tilden
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?