OPEN-SOURCE SCRIPT
ที่อัปเดต: CRT - Samusdtt

CRT - Samusdtt (based on sam1.1)
Overview
Pine Script v5 indicator that renders Higher Timeframe (HTF) candles, separators and liquidity levels on a lower timeframe chart.
Displays a small HTF candle panel (panel 1) and an optional user-selected HTF panel (panel 2).
Key features
Auto-mapping of HTF based on the chart timeframe (configurable via the Extras toggles).
HTF candle drawings using box and line objects, with wick and body colouring.
Range high/low and midline drawing options.
HTF candle countdown label.
Period separators that follow the auto-mapped or manually selected timeframe.
Liquidity level detection with options to display as lines or boxes, mitigation handling, and alerts.
Important inputs (from sam1.1)
Timeframe (tf): manual HTF selection (default "60").
Amount of Candles (numb): number of HTF candles shown (plus one in code logic).
Enable All New Features + Auto-change HTF & Separators (in Extras): when both enabled, the script uses the auto_map_tf function to select HTF automatically.
Range High/Low, Range Mid: toggles for drawing range lines.
Separator style/color/width and manual override timeframe.
Auto-map behavior
The script contains auto_map_tf(chart_tf) which maps chart timeframes to HTF values. The current mapping (as modified in sam1.1) maps:
1m => 15m
3m => 30m (changed to map 3m -> 30m)
5m => 60m
15m => 4h
30m => 4h
60m => D
4h => W
D => 1M
How to make a 3-minute chart show 30-minute HTF candles
Keep Enable All New Features and Auto-change HTF & Separators enabled (default), then open a 3-minute chart — HTF will be auto-mapped to 30m.
Alternatively, disable either toggle and set Timeframe to 30 manually.
How to revert the 3m mapping
Edit auto_map_tf in sam1.1 and change the 180 => "30" line back to 180 => "15" if you prefer 3m → 15m mapping.
Notes
The indicator uses request.security(..., lookahead=barmerge.lookahead_on) to fetch HTF OHLC, and draws boxes/lines accordingly.
If you want documentation expanded (inputs table, screenshots, or example settings), tell me which sections to add.
File references
Main source: sam1.1
Changelog
Updated auto-map: 3m now maps to 30m (in sam1.1).
Overview
Pine Script v5 indicator that renders Higher Timeframe (HTF) candles, separators and liquidity levels on a lower timeframe chart.
Displays a small HTF candle panel (panel 1) and an optional user-selected HTF panel (panel 2).
Key features
Auto-mapping of HTF based on the chart timeframe (configurable via the Extras toggles).
HTF candle drawings using box and line objects, with wick and body colouring.
Range high/low and midline drawing options.
HTF candle countdown label.
Period separators that follow the auto-mapped or manually selected timeframe.
Liquidity level detection with options to display as lines or boxes, mitigation handling, and alerts.
Important inputs (from sam1.1)
Timeframe (tf): manual HTF selection (default "60").
Amount of Candles (numb): number of HTF candles shown (plus one in code logic).
Enable All New Features + Auto-change HTF & Separators (in Extras): when both enabled, the script uses the auto_map_tf function to select HTF automatically.
Range High/Low, Range Mid: toggles for drawing range lines.
Separator style/color/width and manual override timeframe.
Auto-map behavior
The script contains auto_map_tf(chart_tf) which maps chart timeframes to HTF values. The current mapping (as modified in sam1.1) maps:
1m => 15m
3m => 30m (changed to map 3m -> 30m)
5m => 60m
15m => 4h
30m => 4h
60m => D
4h => W
D => 1M
How to make a 3-minute chart show 30-minute HTF candles
Keep Enable All New Features and Auto-change HTF & Separators enabled (default), then open a 3-minute chart — HTF will be auto-mapped to 30m.
Alternatively, disable either toggle and set Timeframe to 30 manually.
How to revert the 3m mapping
Edit auto_map_tf in sam1.1 and change the 180 => "30" line back to 180 => "15" if you prefer 3m → 15m mapping.
Notes
The indicator uses request.security(..., lookahead=barmerge.lookahead_on) to fetch HTF OHLC, and draws boxes/lines accordingly.
If you want documentation expanded (inputs table, screenshots, or example settings), tell me which sections to add.
File references
Main source: sam1.1
Changelog
Updated auto-map: 3m now maps to 30m (in sam1.1).
Release Note
0 # samindicatorA Pine Script indicator package for TradingView, developed from the original `CRT - Samusdtt v1` strategy.
## Overview
This repository contains a TradingView indicator script (`sam11`) which displays:
- Higher timeframe candlestick panels
- Configurable candle count and style
- Range high/low/mid levels
- Optional HTF external panels
- HTF candle countdown timer and auto-timeframe mapping
## Usage
1. Open TradingView and open a chart.
2. Create a new indicator script in Pine Script v5.
3. Copy the contents of the `sam11` file into the editor.
4. Save and add it to the chart.
## Inputs
- `Higher Timeframe Candles` — timeframe, candle count, colors
- `Range` section — high/low/mid display toggles and colors
- `Table` section — show/hide table, size, position, text color
- `Extras` toggles:
- `Enable All New Features`
- `Auto-change HTF & Separators`
- `HTF Candle Countdown`
## License
- Pine Script portions are under the Mozilla Public License 2.0
- Additional contributions are under CC BY-NC-SA 4.0 as noted in source headers.
## Author
- Original: samusdtt
- Fork / updates: harrysam11
- Source inspiration: Zeiierman
Release Note
# samindicatorA comprehensive, institutional-grade Pine Script indicator package for TradingView, built upon the original `CRT - Samusdtt` strategy.
## Overview
This repository contains a unified, all-in-one TradingView indicator script (`CRT-Samusdtt`) that consolidates multiple advanced trading concepts into a single optimized tool.
### Key Features
- **Higher Timeframe (HTF) Candles:** Overlays configurable HTF candles directly on your chart with Range High/Low/Mid levels.
- **HTF Countdown Timer:** A dynamic clock format (HH:MM:SS) timer that counts down to the next HTF candle close. Auto-maps timeframe conversions.
- **SMT Divergences:** Automatically detects and labels structural divergences between two correlated assets (e.g., ES and YM). Includes a customizable statistical dashboard.
- **Seek & Destroy (S&D) Profile:** Highlights the Asian, London, and New York killzones. Identifies "Potential S&D Days" and "Valid S&D Days" with clean, transparent floating labels and a success rate warning table. Restricted to intraday charts (<= 1 Hour).
- **CISD (Change in State of Delivery):** Automatically maps and alerts on bullish and bearish market structure breaks and pullbacks, dynamically projecting levels forward.
- **Macro Tracker:** Visualizes key hourly and NY PM macro time windows (e.g., 09:50 - 10:10) on the chart. Cleanly hides itself on timeframes above 5 minutes.
- **Performance Optimized:** Heavy array processing and string formatting are deferred to `barstate.islast`, saving thousands of compute operations per bar to ensure blazing-fast load times.
## Usage
1. Open TradingView and open a chart.
2. Open the Pine Editor (v5).
3. Copy the contents of the `CRT-Samusdtt` file into the editor.
4. Click **Save** and then **Add to Chart**.
## Customization
The indicator provides a massive suite of inputs, neatly organized by group:
- **Higher Timeframe Candles** — Adjust timeframes, candle counts, and visual colors.
- **Extras** — Toggle auto-HTF mapping and the countdown timer.
- **Style / Dashboard** — Tweak the SMT Divergence styling and table layouts.
- **Seek and Destroy Profile** — Toggle the feature, adjust success criteria tolerances, and customize the transparent label text colors.
- **Macro Tracker** — Toggle specific hourly and PM macro windows on/off (only visible on 1-5min charts).
## License
- Pine Script portions are under the Mozilla Public License 2.0
- Additional contributions are under CC BY-NC-SA 4.0 as noted in source headers.
## Author
- Original: samusdtt
- Fork / advanced updates: harrysam11
- Source inspirations: Zeiierman, tradeforopp, LuxAlgo, toodegrees
Release Note
# SXM Elite++A multi-timeframe Smart Money Concepts / ICT trading indicator built with **Pine Script v6**.
SXM Elite++ combines higher-timeframe candle visualization, automatic market correlation analysis, session structure, True Opens, and delivery-based concepts into one clean TradingView indicator.
---
## ✨ Features
### 🕒 Automatic Period Separators
Automatically displays period separators to help visualize important time and structural boundaries on the chart.
---
### 📊 Higher Timeframe Candles
Displays custom HTF candles directly on the chart:
- **90 Minute**
- **6 Hour**
- **1 Day**
This allows traders to monitor higher-timeframe price delivery without switching chart timeframes.
---
### 🔄 Automatic PSP & SMT Detection
Automatically detects:
- **PSP**
- **SMT / SSMT Divergence**
The system compares correlated market structure and price behavior to identify potential divergence and non-confirmation between instruments.
---
### ⏱️ 6-Hour Session Structure
The trading day is automatically divided into **6-hour periods**, making it easier to visualize intraday delivery and session-based market structure.
---
### 🎯 True Opens
Displays important True Open levels automatically.
Supported True Opens:
- **Daily True Open**
- **Weekly True Open**
- **Monthly True Open**
- **Session True Opens**
These levels can be used as reference points for price delivery, premium/discount analysis, and intraday bias.
---
### 🔁 CISD
Includes **CISD (Change in State of Delivery)** detection to help identify potential changes in market delivery.
The indicator visually highlights relevant delivery shifts directly on the chart.
---
## 📈 Visual Overview
SXM Elite++ is designed to keep important higher-timeframe and session-based information visible without cluttering the chart.
The indicator focuses on:
- Higher Timeframe Structure
- Session Delivery
- Market Correlation
- SMT Divergence
- True Opens
- CISD
- Automatic Time Structure
---
## 🛠️ Built With
- **TradingView**
- **Pine Script v6**
---
## 🚀 Installation
1. Open **TradingView**.
2. Open the **Pine Editor**.
3. Copy the SXM Elite++ Pine Script.
4. Paste the code into a new script.
5. Click **Save**.
6. Click **Add to Chart**.
---
## ⚙️ Recommended Usage
SXM Elite++ can be used across multiple markets and timeframes.
### Suggested Markets
- NAS100 / US100
- XAUUSD
- EURUSD
- GBPUSD
- BTCUSD
- Other correlated instruments
### Suggested Timeframes
- 1 Minute
- 5 Minute
- 15 Minute
- 1 Hour
- 4 Hour
Higher timeframe candles and session structure can then provide additional context while trading on lower timeframes.
---
## ⚠️ Disclaimer
This indicator is designed for **chart analysis and educational purposes only**.
It does not provide financial advice or guarantee profitable trading results.
Always use proper risk management and independent analysis before entering a trade.
---
## 📌 Roadmap
Future SXM Elite++ development may include:
- Enhanced SSMT accuracy
- TCISD
- Turtle Soup detection
- PDH / PDL
- PWH / PWL
- Equilibrium levels
- NDOG / NWOG
- Additional Smart Money Concepts
- Improved drawing and object management
---
## 📷 Preview

---
## 📄 License
Private / Proprietary.
This project is intended for personal use unless otherwise specified by the author.
---
**SXM Elite++ — Multi-Timeframe Market Structure & Smart Money Analysis**
Release Note
# SXM Elite++A multi-timeframe Smart Money Concepts / ICT trading indicator built with **Pine Script v6**.
SXM Elite++ combines higher-timeframe candle visualization, automatic market correlation analysis, session structure, True Opens, and delivery-based concepts into one clean TradingView indicator.
---
## ✨ Features
### 🕒 Automatic Period Separators
Automatically displays period separators to help visualize important time and structural boundaries on the chart.
---
### 📊 Higher Timeframe Candles
Displays custom HTF candles directly on the chart:
- **90 Minute**
- **6 Hour**
- **1 Day**
This allows traders to monitor higher-timeframe price delivery without switching chart timeframes.
---
### 🔄 Automatic PSP & SMT Detection
Automatically detects:
- **PSP**
- **SMT / SSMT Divergence**
The system compares correlated market structure and price behavior to identify potential divergence and non-confirmation between instruments.
---
### ⏱️ 6-Hour Session Structure
The trading day is automatically divided into **6-hour periods**, making it easier to visualize intraday delivery and session-based market structure.
---
### 🎯 True Opens
Displays important True Open levels automatically.
Supported True Opens:
- **Daily True Open**
- **Weekly True Open**
- **Monthly True Open**
- **Session True Opens**
These levels can be used as reference points for price delivery, premium/discount analysis, and intraday bias.
---
### 🔁 CISD
Includes **CISD (Change in State of Delivery)** detection to help identify potential changes in market delivery.
The indicator visually highlights relevant delivery shifts directly on the chart.
---
## 📈 Visual Overview
SXM Elite++ is designed to keep important higher-timeframe and session-based information visible without cluttering the chart.
The indicator focuses on:
- Higher Timeframe Structure
- Session Delivery
- Market Correlation
- SMT Divergence
- True Opens
- CISD
- Automatic Time Structure
---
## 🛠️ Built With
- **TradingView**
- **Pine Script v6**
---
## 🚀 Installation
1. Open **TradingView**.
2. Open the **Pine Editor**.
3. Copy the SXM Elite++ Pine Script.
4. Paste the code into a new script.
5. Click **Save**.
6. Click **Add to Chart**.
---
## ⚙️ Recommended Usage
SXM Elite++ can be used across multiple markets and timeframes.
### Suggested Markets
- NAS100 / US100
- XAUUSD
- EURUSD
- GBPUSD
- BTCUSD
- Other correlated instruments
### Suggested Timeframes
- 1 Minute
- 5 Minute
- 15 Minute
- 1 Hour
- 4 Hour
Higher timeframe candles and session structure can then provide additional context while trading on lower timeframes.
---
## ⚠️ Disclaimer
This indicator is designed for **chart analysis and educational purposes only**.
It does not provide financial advice or guarantee profitable trading results.
Always use proper risk management and independent analysis before entering a trade.
---
## 📌 Roadmap
Future SXM Elite++ development may include:
- Enhanced SSMT accuracy
- TCISD
- Turtle Soup detection
- PDH / PDL
- PWH / PWL
- Equilibrium levels
- NDOG / NWOG
- Additional Smart Money Concepts
- Improved drawing and object management
---
## 📷 Preview

---
## 📄 License
Private / Proprietary.
This project is intended for personal use unless otherwise specified by the author.
---
**SXM Elite++ — Multi-Timeframe Market Structure & Smart Money Analysis**
Release Note
# CRT Model Pro — CRT by SamPine Script v6 indicator (`overlay=true`). A single merged script combining
Sam's own CRT/CISD/dashboard engine with one embedded third-party module
(GXV SMT) and one embedded open-source layer (True Opens).
File: `CRT by Sam.pine`
## 
<img width="1778" height="790" alt="CRT-MODEL-PRO" src="github.com/user-attachments/assets/153a9cdf-aa94-4d6c-a382-0360a1344939" />
*The layout above — the LTF chart on the left, the small HTF candle preview
stack on the right, the compact top-right dashboard, and the CRT H/L levels
drawn as clean horizontal lines — is the visual reference this build is
inspired by and built to match.*
---
## Attribution — who actually wrote what
This matters, so it's stated plainly, and the same notice is repeated as a
comment block inside the `.pine` file itself, directly above the SMT section:
| Component | Author | License / terms |
|---|---|---|
| CRT engine (HTF mapping, candle build, separators, layout, PSP correlation, trace lines, labels, session alignment) | **Sam** | Original work |
| CISD detection + Fibonacci projections | **Sam** | Original work |
| Dashboard | **Sam** | Original work |
| **SMT Divergences module** | **Gregorius_XV** (`GXV SMT_Divergences[LITE✦]`) | © 2026 Gregorius_XV — **Mozilla Public License 2.0**. The original author's attribution notice requires visible credit to Gregorius_XV be preserved in any redistribution, fork, derivative, port, or modified publication based on it. That notice is kept intact, verbatim, in the `.pine` file immediately above the SMT code, and is not to be removed. |
| True Opens (Session/Day/Week/Month/Year) | **Daye** (`Daye's True Opens [Quarterly Theory]`) | Open-source, used with author confirmation |
Everything that isn't the SMT module or the True Opens block is Sam's own
work — the CRT core, CISD, and the dashboard are not ports of anyone else's
script.
---
## What's in it
| Engine | Status | Source |
|---|---|---|
| CRT core (HTF mapping, candle build, separators) | Original | Sam |
| ICT / QT Alignment (single toggle) | Original | Sam |
| SMT (multi-rank correlated-pair divergence, auto-mapping toggle) | Third-party, embedded | Gregorius_XV — MPL-2.0 |
| CISD detection + Fibonacci projections | Original | Sam |
| True Opens (Session / Day / Week / Month / Year) | Third-party, embedded | Daye's Quarterly Theory (open-source) |
| HTF candle preview panel + dashboard | Original | Sam |
| tCISD, Turtle Soup, CRT H/L | Removed | — |
---
## SMT
The embedded module is Gregorius_XV's `GXV SMT_Divergences[LITE✦]` v2.1.0,
used under MPL-2.0. Two things were adapted on top of it for this build,
both additive — the underlying divergence engine itself is without his library:
- **SMT Auto Mapping** (default **ON**): when on, SMT shows only the single
rank that matches the CRT engine's active ICT/QT-mapped timeframe (this
includes an internal 3H rank, used for the ICT 30m → 3H case, since the
original rank list didn't expose one). When **off**, it falls back to the
full original behavior — every rank (15m/30m/1H/90m/4H/6H/7H/12H/1D/1W/
1M/3M/12M) shown or hidden by its own manual toggle, exactly like the
unmodified GXV script.
- **SMT Text** color defaults to **black** (the original defaults to gray).
## True Opens
Ported in as a namespaced block (`crtTo_` prefix) rather than a separate
indicator. Behavior is unchanged from Daye's source script:
- **One live line + label per type.** A new period's open replaces the
previous line for that type — it does not accumulate history.
- Lines extend live to the current bar every bar; labels sit to the right by
`Label Gap` bars.
- Fixed `America/New_York` timezone (matches the source script; not tied to
the CRT engine's own timezone switch).
- Types: **Session** (Asia 19:30, London 01:30, NY AM 07:30, NY PM 13:30 —
off by default), **Day** (00:00 NY), **Week** (Mon 18:00 NY), **Month**
(2nd Monday 18:00 NY), **Year** (April 1, 00:00 NY — Q2 of the yearly
cycle).
- No 90-minute Open (the source script doesn't have one).
- All five types default to **black**; each has its own color input.
- Labels default to `size.small`.
## Dashboard / HTF panel
Top-right compact table: **CRT Model (timeframe)**, **QT Alignment** mode,
a **True Open Day/Week bias** row, **Bias**, **SMT** pair, **Date**.
- The timeframe shown (both in the table header and in the "TF: … [ICT/QT]"
label on the HTF candle panel) is formatted for readability — e.g. `6H`,
`90m`, `1D` — instead of Pine's raw internal string (`360`, `90`, `D`).
This is display-only; the raw string still drives the actual
timeframe-mapping logic.
- The bias row compares price against **True Day Open** on intraday chart
timeframes, or **True Week Open** once the chart is Daily/Weekly/Monthly
(the day cycle stops being a meaningful reference at that zoom), showing
`Above TDO` / `Below TDO` (or `TWO`), colored green/red.
The HTF candle preview panel (the small candle stack to the right of price)
draws directly from the same aggregated HTF OHLC arrays the CRT engine
itself maintains — there's no separate/duplicate data path for it.
## CISD
Always active. The earlier `tCISD Mode` toggle that could hide it has been
removed, so CISD detection and its Fibonacci projections run
unconditionally per their own inputs.
---
## What was removed
**tCISD, Turtle Soup, and CRT H/L are gone.** These were a from-scratch
build (never a faithful port of any single source), and have been fully
removed at the user's request — every input, alert, and drawing call tied
to them, plus now-orphaned helper variables that existed only to feed them.
Nothing else was touched by their removal.
---
## Compiling
Pine v6. Single `indicator()` declaration. Compile in TradingView's Pine
Editor and check for errors before relying on it live — this file has been
reviewed line-by-line but not run against live/replay data.
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน