OPEN-SOURCE SCRIPT
Atualizado TDI - (Crossover Visual Upgrade)

TDI - (Crossover Visual Upgrade) - Enhanced Momentum Tracking
This script is an optimized version of the classic Traders Dynamic Index (TDI). While keeping the original calculation logic, I have introduced visual enhancements and alert features to help traders react faster to market momentum changes.
Why this version is useful:
The original TDI can sometimes be difficult to read during fast-moving markets. This version features a dynamic RSI line that changes color based on its position relative to the Bollinger Band midline. This allows traders to instantly spot trend reversals and crossovers without needing to squint at the screen.
Key Features:
Dynamic Color-Coding: The Fast MA line automatically shifts color when crossing the Bollinger Band midline, providing an immediate visual cue for potential entry or exit points.
Smart Alert System: Integrated alerts for bullish and bearish crossovers, ensuring you never miss a critical setup.
On-Chart Labeling: Option to display crossover labels directly on the main chart for better price-action context (with customizable settings).
Configurable Limits: Adjustable label history to keep your chart clean.
How to use:
Add the indicator to your chart.
The RSI line will turn green when above the midline and red when below, signaling the immediate momentum bias.
Configure alerts via the standard TradingView "Alert" menu by selecting the crossover conditions.
Credits:
This script is based on the original Traders Dynamic Index logic by LazyBear.
Author's Note:
I developed this version of the TDI to improve visual clarity because I personally trade at a fast pace. I wanted to eliminate the need to spend extra time and mental energy double-checking whether the RSI has crossed the Bollinger Band midline.
Since I built this for my own workflow, I decided to share it with the community in case others are facing the same issue. Big thanks to Gemini for helping me craft this description. I hope you find this indicator useful for your trading!
This script is an optimized version of the classic Traders Dynamic Index (TDI). While keeping the original calculation logic, I have introduced visual enhancements and alert features to help traders react faster to market momentum changes.
Why this version is useful:
The original TDI can sometimes be difficult to read during fast-moving markets. This version features a dynamic RSI line that changes color based on its position relative to the Bollinger Band midline. This allows traders to instantly spot trend reversals and crossovers without needing to squint at the screen.
Key Features:
Dynamic Color-Coding: The Fast MA line automatically shifts color when crossing the Bollinger Band midline, providing an immediate visual cue for potential entry or exit points.
Smart Alert System: Integrated alerts for bullish and bearish crossovers, ensuring you never miss a critical setup.
On-Chart Labeling: Option to display crossover labels directly on the main chart for better price-action context (with customizable settings).
Configurable Limits: Adjustable label history to keep your chart clean.
How to use:
Add the indicator to your chart.
The RSI line will turn green when above the midline and red when below, signaling the immediate momentum bias.
Configure alerts via the standard TradingView "Alert" menu by selecting the crossover conditions.
Credits:
This script is based on the original Traders Dynamic Index logic by LazyBear.
Author's Note:
I developed this version of the TDI to improve visual clarity because I personally trade at a fast pace. I wanted to eliminate the need to spend extra time and mental energy double-checking whether the RSI has crossed the Bollinger Band midline.
Since I built this for my own workflow, I decided to share it with the community in case others are facing the same issue. Big thanks to Gemini for helping me craft this description. I hope you find this indicator useful for your trading!
Notas de Lançamento
What's New in v1.1 (or latest update):Background Color Feature: Added a customizable background color feature for both the TDI sub-chart and the main chart to easily visualize market trends.
Trend Condition Modes: Introduced a settings option for the background color, allowing you to switch between RSI Level 50 (Default) and Middle Band Crossover.
Display Controls: Added toggle options so you can freely turn the background colors on or off for both the sub-chart and main chart independently.
รายละเอียดการอัปเดต:
เพิ่มฟีเจอร์สีพื้นหลัง (Background Color): สามารถแสดงสีพื้นหลังเขียว/แดงเพื่อช่วยดูเทรนด์ได้ทั้งในหน้าต่าง TDI และกราฟหลัก
เลือกเงื่อนไขการเปลี่ยนสีได้: เพิ่มเมนูให้เลือกได้ว่าจะใช้เกณฑ์ ระดับ RSI 50 (ค่าเริ่มต้น) หรือจะใช้จังหวะ เส้น Fast MA ตัด Middle Band
ปุ่มเปิด/ปิดอิสระ: เพิ่มปุ่มตั้งค่าให้สามารถเปิด/ปิดการแสดงผลพื้นหลังของหน้าต่าง TDI และกราฟหลักได้ตามต้องการ
Notas de Lançamento
Release Notes / What's New:Added Extreme Zone Feature: Introduced toggleable Extreme Zone settings (Overbought/Oversold thresholds) with dotted level lines and custom background colors.
Independent Background Controls: Separated the toggle switches for Standard Trend Backgrounds and Extreme Zone Backgrounds on both the TDI sub-chart and the main chart for fully customizable visuals.
Added "I'm out." Exit Label: Integrated an exit warning label when leaving the extreme zones (enabled by default). Note: Recommended for closing positions only, not for opening new positions, as it may counter the main trend.
Code & UI Clean-up: Standardized input groups and updated all script comments to English for better readability and structure.
=======================================================================
รายการอัปเดตเวอร์ชันใหม่ (What's New):
เพิ่มฟีเจอร์ Extreme Zone: เพิ่มตัวเลือกเปิด/ปิดโซน Extreme (Overbought/Oversold) พร้อมเส้นขอบแบบจุด (Dotted Lines) และการตั้งค่าระดับสีพื้นหลังเฉพาะสำหรับ Extreme Zone
แยกการควบคุมพื้นหลัง (Background Customization): แยกปุ่มเปิด/ปิดพื้นหลังระหว่าง Standard Trend Background กับ Extreme Zone Background ออกจากกันอย่างอิสระ ทั้งบนหน้าต่าง TDI Sub-chart และ Main Chart
เพิ่มป้ายเตือน "I'm out.": เพิ่มป้ายเตือนเมื่อออกจากโซน Extreme (ตั้งค่าเริ่มต้นเป็นเปิดใช้งาน) พร้อมคำแนะนำว่าควรใช้สำหรับการปิดสถานะ (Close Position) เท่านั้น และระวังเรื่องการสวนแนวโน้มหลัก (Counter-trend)
ปรับปรุงความเป็นระเบียบของโค้ด: จัดระเบียบกลุ่มตั้งค่า (Input Groups) และคอมเมนต์ทั้งหมดเป็นภาษาอังกฤษเพื่อความสะอาดและเข้าใจง่ายขึ้น
Notas de Lançamento
Update:Multi-Timeframe Support: Calculate and display TDI data from a custom target timeframe.
Flexible Background Modes: Added choice of background color conditions: RSI Level 50, Middle Band Cross, or Fast MA vs Slow MA.
Extreme Zones & Exit Labels: Integrated extreme high/low threshold detection with smart real-time and confirmed exit warning labels ("Maybe I'm out" / "I'm out.").
Expanded Alerts: Added new alert conditions for exiting Extreme zones.
อัพเดท:
รองรับ Multi-Timeframe: เลือกดูค่า TDI จากไทม์เฟรมอื่นได้ทันที
โหมดสีพื้นหลังใหม่: เพิ่มตัวเลือกเปลี่ยนสีพื้นหลัง (ทั้งซับชาร์ตและชาร์ตหลัก) ระหว่าง RSI Level 50, Middle Band Cross และ Fast MA vs Slow MA
Extreme Zones & Exit Labels: เพิ่มระบบตรวจจับโซน Extreme สูง/ต่ำ พร้อมป้ายเตือนการออกจากโซนแบบ Real-time และแบบคอนเฟิร์ม ("Maybe I'm out" / "I'm out.")
Expanded Alerts: เพิ่มระบบแจ้งเตือน (Alert) สำหรับการออกจากโซน Extreme
Notas de Lançamento
Update:Multi-Condition Background Modes: Introduced four new combined background condition options (RSI 50 & Middle Band, RSI 50 & Fast/Slow MA, Middle Band & Fast/Slow MA, and All Combined (AND)) for advanced trend filtering.
Default Settings & Opt-in Features: All base values and standard calculations remain faithful to the original TDI. Any added enhancements and visual upgrades must be manually enabled via input toggles.
อัพเดท:
โหมดสีพื้นหลังแบบผสมเงื่อนไข: เพิ่มตัวเลือกเงื่อนไขการเปลี่ยนสีพื้นหลังแบบผสม 4 รูปแบบใหม่ (RSI 50 & Middle Band, RSI 50 & Fast/Slow MA, Middle Band & Fast/Slow MA และ All Combined (AND)) เพื่อการกรองเทรนด์ขั้นสูง
ค่าพื้นฐานและฟีเจอร์เสริม: ค่าพื้นฐานทั้งหมดจะยังคงยึดตามรูปแบบ TDI ดั้งเดิม ส่วนฟีเจอร์และส่วนเสริมทั้งหมดจะต้องกดเปิดใช้งานผ่านปุ่มติ๊กถูก (Toggle) ในเมนูตั้งค่าเท่านั้น
Notas de Lançamento
Update:Extreme Calculation Modes: Added three flexible options for extreme zone detection: Level 75/25 Only, BB Bands Only (when RSI breaches the TDI volatility bands), and Both (BB & Levels) (requiring both conditions simultaneously).
*** Default Settings & Opt-in Features: All base values and standard calculations remain faithful to the original TDI, with any added enhancements and visual upgrades requiring manual toggles to activate.
อัพเดท:
โหมดคำนวณโซน Extreme: เพิ่ม 3 ตัวเลือกยืดหยุ่นสำหรับการตรวจจับโซน Extreme ได้แก่ Level 75/25 Only, BB Bands Only (เมื่อ RSI ทะลุขอบบน/ล่างของ Volatility Bands) และ Both (BB & Levels) (ต้องผ่านทั้งขอบ BB และระดับตัวเลขพร้อมกัน)
*** ค่าพื้นฐานและฟีเจอร์เสริม: ค่าพื้นฐานทั้งหมดจะยังคงยึดตามรูปแบบ TDI ดั้งเดิม ส่วนฟีเจอร์และส่วนเสริมทั้งหมดจะต้องกดเปิดใช้งานผ่านปุ่มติ๊กถูก (Toggle) ในเมนูตั้งค่าเท่านั้น
Notas de Lançamento
The previous update accidentally removed the color settings for various sections. They are now adjustable again, but have been moved from the Style section to the Data section.การอัพเดทก่อนหน้านี้ทำให้การตั้งค่าสีของส่วนต่างๆถูกลบออกไปโดยไม่ได้ตั้งใจตอนนี้ปรับให้กลับมาตั้งค่าได้แล้ว แต่จะไปอยู่ในส่วนของ Data(ข้อมูล) แทน Style(รูปแบบ)
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.