OPEN-SOURCE SCRIPT

Open/High/Low/Close (OHLC) Lines with Configurable Timeframe

Updated
This script draws open/high/low/close (OHLC) lines for the previous bar from the configured timeframe. This enables you to use higher timeframes, like a daily chart and OHLC lines of the previous week.
Release Notes
Bug fix.
Release Notes
Getting the OHLC values from another timeframe with security() results in inaccurate results in the chart. This update includes a complete rewrite of the calculation logic to make the OHLC lines work correctly.
Release Notes
Update to Pine script version 5 and added option to show configurable mid level.
Candlestick Analysis

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer