OPEN-SOURCE SCRIPT
Aktualisiert TFEX_INDICATOR_SET13

This Indicator use the calculated RSI of the top 13 stocks that have the highest market capitalization in
SET50 where suitable for TFEX trading(
S501!).
Conducted with 2 RSI period as follow:
How to use:
1) Use this Indicator by Crossover
2) Use this Indicator by Divergence of RSI Main
3) The combination of Divergence and Crossover
Preferred Timeframe
Conducted with 2 RSI period as follow:
- RSI Main (14)
- RSI Average (100)
How to use:
1) Use this Indicator by Crossover
- If the RSI Main Cross UP the RSI Average can assume as BUY SIGNAL
- If the RSI Main Cross DOWN the RSI Average can assume as SELL SIGNAL
2) Use this Indicator by Divergence of RSI Main
- If the RSI Main got any Regular Bullish or Hidden Bullish can assume as BUY SIGNAL
- If the RSI Main got any Regular Bearish or Hidden Bearish can assume as SELL SIGNAL
3) The combination of Divergence and Crossover
- If the RSI Main got any Regular Bullish or Hidden Bullish then pending for the RSI Main Cross UP the RSI Average which can assume as BUY SIGNAL
- If the RSI Main got any Regular Bearish or Hidden Bearish then pending for the RSI Main Cross DOWN the RSI Average which can assume as SELL SIGNAL
Preferred Timeframe
- 4H
- 2H
- 1H
Versionshinweise
Update name of the RSI appearance settingVersionshinweise
Add Alert ConditionsVersionshinweise
Change Calculation from SCB to EA as SCB delisted in SETVersionshinweise
Update Alert condition to have Overbought and OversoldEdit last description: Change Calculation from SCB to CPN as SCB delisted in SET
Versionshinweise
Update ChartVersionshinweise
Update NEW SET13 List- AOT
- PTT
- DELTA
- PTTEP
- BCP
- CPALL
- KBANK
- DTAC
- BBL
- BDMS
- ESSO
- KTB
- GULF
Versionshinweise
Update new stock listVersionshinweise
═══════════════════════════════════════════ENGLISH
═══════════════════════════════════════════
Major update — signals, multi-timeframe confirmation, live edge tracking, per-stock heatmap.
NEW
• BUY/SELL signals with 3 modes: Crossover, Divergence, Combined (default). Labels on the candle pane. New alerts: "BUY", "SELL".
• Combined mode: divergence arms the direction; matching RSI cross fires the signal. Faint green/red background shows when armed.
• HTF Confirmation: see higher-timeframe composite RSI + regime at a glance (default 4H, configurable).
• Basket heatmap: per-stock RSI sorted descending, color-coded by zone — see which heavyweights drive the composite.
• Stats table on the candle pane: composite, slow, regime, HTF, breadth counts, last BUY/SELL price & time, rolling win-rate.
• Regime-aware background: 30–70 band tints green when fast > slow, red when fast < slow.
• Zone-colored fast line (lime >70, red <30, yellow middle). Cross triangles on every cross.
• Divergence strength: "BULL"/"BEAR" uppercase when pivot delta exceeds Strong Price Move % and Strong RSI Move thresholds; lowercase otherwise.
BASKET
• 13 basket tickers now editable in Settings — no code change needed. Defaults = SET50 top-13 by market cap (reviewed 2026-04-18): ADVANC, KTB, KBANK, SCB, PTTEP, GULF, DELTA, SCC, TRUE, PTT, AOT, TTB, PTTGC.
• SET50 rebalances ~every 6 months — review your basket regularly.
CHANGES
• Settings organized into groups: RSI, Divergence, Display, Signals, Basket.
• Slow RSI line red → orange (avoids clashing with bearish signaling).
• Hidden divergence opacity 80% → 50%.
USAGE
• Preferred timeframes: 1H, 2H, 4H. Apply to TFEX:S50!.
• All existing alerts preserved. Uses 39 request.security calls — under the 40-call limit.
═══════════════════════════════════════════
ภาษาไทย
═══════════════════════════════════════════
อัปเดตใหญ่ — เพิ่มสัญญาณซื้อ/ขาย, ยืนยันจาก Timeframe ใหญ่, ติดตาม Win Rate แบบสด, และ Heatmap รายหุ้น
ฟีเจอร์ใหม่
• สัญญาณ BUY/SELL พร้อม 3 โหมดให้เลือก: Crossover, Divergence, Combined (ค่าเริ่มต้น) แสดงบน pane แท่งเทียน แจ้งเตือนใหม่: "BUY", "SELL"
• Combined mode: Divergence จะ arm ทิศทางไว้ก่อน แล้วรอ RSI cross ในทิศเดียวกันจึงจะส่งสัญญาณ มีพื้นหลังสีเขียว/แดงจางๆ เมื่ออยู่ในสถานะรอ
• HTF Confirmation: ดูค่า RSI รวมและ Regime ของ Timeframe ใหญ่ได้ทันที (ค่าเริ่มต้น 4H ปรับได้)
• Basket heatmap: RSI รายหุ้น เรียงจากมากไปน้อย สีตาม zone สามารถเห็นได้ทันทีว่าหุ้นตัวไหนขับเคลื่อน RSI รวม
• ตารางสถิติบน pane แท่งเทียน: RSI รวม, RSI ช้า, Regime, HTF, จำนวนหุ้นเหนือ 50/70 และใต้ 30, ราคา+เวลาของ BUY/SELL ล่าสุด, Win Rate
• พื้นหลังตาม Regime: แถบ 30–70 เปลี่ยนเป็นเขียวเมื่อ RSI เร็ว > ช้า, เป็นแดงเมื่อกลับกัน
• เส้น RSI เร็วเปลี่ยนสีตาม zone (เขียวมะนาว >70, แดง <30, เหลืองตรงกลาง) + สามเหลี่ยมแสดงจุด Cross
• จำแนก Divergence แรง/อ่อน: "BULL"/"BEAR" ตัวใหญ่เมื่อ pivot มีระยะห่างเกินเกณฑ์ Strong Price Move % และ Strong RSI Move; ตัวเล็กเมื่อไม่เกิน
ตะกร้าหุ้น (Basket)
• แก้ไข 13 หุ้นในตะกร้าได้จาก Settings โดยไม่ต้องแก้โค้ด ค่าเริ่มต้น = SET50 Top 13 ตาม Market Cap (ทบทวนเมื่อ 2026-04-18): ADVANC, KTB, KBANK, SCB, PTTEP, GULF, DELTA, SCC, TRUE, PTT, AOT, TTB, PTTGC
• SET50 มีการปรับทุก ~6 เดือน ควรตรวจตะกร้าเป็นระยะ
สิ่งที่เปลี่ยน
• จัดกลุ่ม Settings: RSI, Divergence, Display, Signals, Basket
• เปลี่ยนสีเส้น RSI ช้าจากแดง → ส้ม (ป้องกันสับสนกับสัญญาณขาลง)
• ความทึบของ Hidden Divergence 80% → 50% (เห็นชัดขึ้น)
การใช้งาน
• Timeframe ที่แนะนำ: 1H, 2H, 4H ใช้กับ TFEX:S50!
• Alert เดิมทั้งหมดยังใช้ได้ ใช้ request.security 39 ครั้ง (ไม่เกินลิมิต 40)
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.