OPEN-SOURCE SCRIPT
Updated HTF Books Lines for LTF Charts

⸻
📜 日本語説明文
HTF Books Lines for LTF Charts
このインジケーターは、ゴールドの5分足に1時間足のBooksラインを表示するために作成しました。
ドルストレートの通貨ペアであれば同様に利用可能だと思います。
上位足で検出したBooksライン(買い/売り)を下位足チャートに重ねて表示し、ラインが有効である間は強調表示、無効化された際には無効化ラインとして残すことも可能です。
いずれの時間足でも使用できるため、ご自身のトレードスタイルに合わせて設定を切り替えて検証してみてください。
⸻
📜 English Description
HTF Books Lines for LTF Charts
This indicator was originally created to display 1-hour Books lines on the 5-minute chart of Gold (XAUUSD).
It should also work on other USD-related pairs (major dollar crosses).
The indicator plots higher-timeframe Books lines (buy/sell) directly onto a lower-timeframe chart. Active lines are displayed with strong emphasis, and once invalidated they can optionally remain as inactive lines.
It can be applied to any timeframe combination, so please test and adjust it according to your own trading style.
⸻
Release Notes
📘 インジケーター説明 (日本語 / Japanese)
名称: HTF Books Lines for LTF Charts
⸻
✅ 概要
このインジケーターは 上位足(HTF)のローソク足パターンに基づいて水平方向のBooksラインを生成し、下位足(LTF)のチャート上に表示するツール です。
特定の買い/売りパターンを検出し、その価格水準にラインを引きます。ラインは上位足の確定バーでのみ生成・無効化されるため、リプレイやリアルタイムで一貫した挙動を示します。
⸻
🔎 主な機能
1. HTFローソク足認識
• 指定した上位足(例: 1時間足)を下位足チャートに投影。
2. Booksラインの生成
• 買い・売りのパターン検出に基づいてラインを作成。
3. 無効化処理
• 上位足の終値がラインを実体でブレイクした場合のみ無効化。
• 無効化時は「削除」または「色を変えて残す」設定が可能。
4. アラート
• ライン生成時、無効化時にアラートを発火可能。
⸻
⚙️ パラメータ
• HTF設定: 上位足の時間足を指定(例: 60 = 1時間足)
• Booksライン設定: 買い/売りラインの色・太さ・スタイル
• 無効化ライン設定: 無効化ラインの表示有無・スタイル
⸻
📢 注意点
• ラインの生成・無効化は 上位足確定バーの終値でのみ 行われます。
• 進行中のバーではラインは変動せず、確定後にのみ確定的な動作をします。
• リプレイでも同じように「確定場面のみ」で描画されるため、過去検証がしやすいです。
⸻
📘 Indicator Description (English)
Name: HTF Books Lines for LTF Charts
⸻
✅ Overview
This indicator detects specific candlestick patterns on a higher timeframe (HTF) and projects horizontal “Books Lines” onto a lower timeframe (LTF) chart.
It helps traders visualize key HTF levels directly on lower timeframe charts, while ensuring that line creation and invalidation happen only on confirmed HTF bars.
⸻
🔎 Key Features
1. HTF Candle Recognition
• Projects a higher timeframe (e.g., 1H) onto a lower timeframe chart (e.g., 5M).
2. Books Line Generation
• Creates Buy/Sell lines based on specific HTF candlestick patterns.
3. Invalidation Logic
• Lines are invalidated only if the HTF closing price breaks through them.
• Invalidation can either delete the line or change its color to indicate deactivation.
4. Alerts
• Alerts can be triggered when a Books Line is generated or invalidated.
⸻
⚙️ Parameters
• HTF Settings: Choose the higher timeframe (e.g., 60 = 1 hour).
• Books Line Settings: Configure colors, thickness, and styles of Buy/Sell lines.
• Inactive Line Settings: Choose whether inactive lines remain visible and define their style.
⸻
📢 Notes
• Line creation and invalidation are based only on confirmed HTF closes.
• No premature or repainting behavior: lines are generated strictly after HTF confirmation.
• Works consistently in replay mode as well as in real-time.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.