OPEN-SOURCE SCRIPT
TBR Stats+ (M1D)

TBR Stats+
Measures how far price has historically travelled once a fixed New York morning window breaks from its opening price, and draws that history as percentile boxes on today's window. It is built for one-minute to one-hour charts. It is not a signal generator, and the entry is left to you.
What it does
1 · The window. One window is read each weekday, 8:00 to 12:00 New York time by default. The open of its first bar is the TBR Open, drawn as a solid line with a dotted trigger line either side of it.
2 · The break. The trigger sits 0.25 standard deviations either side of the TBR Open, where the standard deviation is taken from the open-to-close change of the last 20 windows. A break is the first bar that CLOSES beyond a trigger line. A wick through it is not a break.
3 · The boxes. Every past window that broke the same way is measured twice. Ext is how far price travelled past the TBR Open in the break direction before the window closed. Rev is how far it came back through the TBR Open after the break, and a window that never came back measures zero. Each box is drawn from the median to the 90th percentile of its distance: the heavier part runs median to 75th, the lighter part 75th to 90th. Until the window breaks, both sides' Ext boxes are drawn faintly. On the break they are replaced by the break side's Ext box and the opposite Rev box.
4 · The sample. On NQ and MNQ with the default window, trigger and lookback, the boxes and held rates come from five years of MNQ one-minute sessions, October 2021 to September 2026: 1,269 windows, 614 that broke up and 643 that broke down. Those distances are stored in standard deviation units and multiplied by the live standard deviation, so a box sizes itself to current volatility rather than to price levels from years ago. On any other symbol or setting, the sample is built from the chart's own history on a five-minute request, and the boxes stay hidden until at least 15 windows have broken the same way. The archive is fixed; it does not update itself.
5 · The table. It reports whether this window has broken up, down or not yet; how many windows broke each way and how many of those held; how many never broke; the trigger distance in points; and where the sample comes from. A break held when the window closed on the break side of the TBR Open, or, in the stricter setting, beyond the trigger line.
Visual grammar
The up side is purple and the down side is magenta. The Ext and Rev names sit to the left of the window, each listing its median, 75th and 90th percentile prices in one block, or on every edge as a setting. The TBR Open name sits at the right, beside the line it names. Only the last five windows stay on the chart by default.
Method & repainting
Breaks are evaluated on confirmed bars only. A window only enters the sample once it has closed, so today's window never feeds its own boxes. The sample request runs without lookahead; its figures change only when a window closes.
Settings
The window; whether to use the archive on NQ and MNQ, the sample timeframe, the trigger in standard deviations, the standard deviation lookback, the sample cap and the minimum sample before boxes draw; the held definition; label layout and side, windows kept on the chart, the before-break boxes, right offset and text size; the table and its position. Two alerts: break up, and break down.
Disclaimer
This is a decision-support tool for discretionary trading. It is not financial advice, and no market's past behaviour is indicative of future results.
Measures how far price has historically travelled once a fixed New York morning window breaks from its opening price, and draws that history as percentile boxes on today's window. It is built for one-minute to one-hour charts. It is not a signal generator, and the entry is left to you.
What it does
1 · The window. One window is read each weekday, 8:00 to 12:00 New York time by default. The open of its first bar is the TBR Open, drawn as a solid line with a dotted trigger line either side of it.
2 · The break. The trigger sits 0.25 standard deviations either side of the TBR Open, where the standard deviation is taken from the open-to-close change of the last 20 windows. A break is the first bar that CLOSES beyond a trigger line. A wick through it is not a break.
3 · The boxes. Every past window that broke the same way is measured twice. Ext is how far price travelled past the TBR Open in the break direction before the window closed. Rev is how far it came back through the TBR Open after the break, and a window that never came back measures zero. Each box is drawn from the median to the 90th percentile of its distance: the heavier part runs median to 75th, the lighter part 75th to 90th. Until the window breaks, both sides' Ext boxes are drawn faintly. On the break they are replaced by the break side's Ext box and the opposite Rev box.
4 · The sample. On NQ and MNQ with the default window, trigger and lookback, the boxes and held rates come from five years of MNQ one-minute sessions, October 2021 to September 2026: 1,269 windows, 614 that broke up and 643 that broke down. Those distances are stored in standard deviation units and multiplied by the live standard deviation, so a box sizes itself to current volatility rather than to price levels from years ago. On any other symbol or setting, the sample is built from the chart's own history on a five-minute request, and the boxes stay hidden until at least 15 windows have broken the same way. The archive is fixed; it does not update itself.
5 · The table. It reports whether this window has broken up, down or not yet; how many windows broke each way and how many of those held; how many never broke; the trigger distance in points; and where the sample comes from. A break held when the window closed on the break side of the TBR Open, or, in the stricter setting, beyond the trigger line.
Visual grammar
The up side is purple and the down side is magenta. The Ext and Rev names sit to the left of the window, each listing its median, 75th and 90th percentile prices in one block, or on every edge as a setting. The TBR Open name sits at the right, beside the line it names. Only the last five windows stay on the chart by default.
Method & repainting
Breaks are evaluated on confirmed bars only. A window only enters the sample once it has closed, so today's window never feeds its own boxes. The sample request runs without lookahead; its figures change only when a window closes.
Settings
The window; whether to use the archive on NQ and MNQ, the sample timeframe, the trigger in standard deviations, the standard deviation lookback, the sample cap and the minimum sample before boxes draw; the held definition; label layout and side, windows kept on the chart, the before-break boxes, right offset and text size; the table and its position. Two alerts: break up, and break down.
Disclaimer
This is a decision-support tool for discretionary trading. It is not financial advice, and no market's past behaviour is indicative of future results.
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน