OPEN-SOURCE SCRIPT
Trinity ATR Levels

Trinity ATR Levels
Is an open-source overlay that draws volatility levels from the previous period close and a period ATR, then adds a session-aware signal layer on top of those levels.
Credit
The level map is a derivative of Saty ATR Levels by satymahajan, published open-source on TradingView in 2022.
Original:
What this script keeps from Saty:
What this script adds:
This is not a republish of Saty ATR Levels with new colors. The ruler is Saty's. The traffic lights, session clock, and scoped percentages are new. Source is open so both parts can be inspected.
What the levels are
Every line is the chosen period's reference close plus or minus a fraction of that period's ATR.
Leave "Use Current Close" OFF for trading. When it is ON, the forming close becomes the anchor, the levels drift with price, the trigger boxes cannot arm correctly, and none of the historical percentages apply. The only intended use is a last-minutes preview of the next period's map. Note the numbers, then switch it back OFF.
The three modes
The levels are the same in every mode. Mode only changes signal timing, re-entry policy, and whether percentages print.
MILKMAN — default. Day period forced. Regular-hours previous close and ATR. Signals only on a 3-minute chart during regular hours. One long and one short trigger entry per session. No entry buffer. Three-bar cooldown after an exit. Percentages print only when the chart is SPY or SPX, 3-minute, Day period, regular session. That is the only configuration those figures were compiled for. On any other symbol they hide.
UNIVERSAL — same structure on any market and timeframe. Signals on every bar. Unlimited re-entries with a longer cooldown. 1 percent ATR entry buffer. Percentages hidden everywhere. They were not measured outside SPY regular hours, so the script does not show SPY numbers on other markets.
CUSTOM — every control under "Signal Rules" applies. Use this only when you know which rule you are changing and why.
How a signal is taken
A wick does not count. The script waits for a confirmed bar close.
Long trigger entry: confirmed close above the call trigger, session and timeframe allowed, entry budget remaining, cooldown finished, and the close beyond any buffer you set.
Long exit: confirmed close back below the call trigger. The stop does not use the buffer.
Short side is the mirror.
After the Golden Gate is open, two extra entries can print: a pullback that tags the trigger again (T-PB), and a pullback to the 10-minute EMA8 inside the gate. The 10-minute EMA8 is requested from the 10-minute timeframe. It is not your chart's own 8 EMA. Above a 10-minute chart that line is only an approximation and those signals are suppressed. The Status row says so.
PDC reclaim is a first-hour 10-minute close back through the previous close after price started the session on the other side of it. It is not a trigger entry. It is a flip warning. It is also suppressed above 10 minutes.
Historical percentages
When they are visible they are historical frequencies from SPY, regular session 09:30-16:00 ET, 3-minute confirmed closes, sample window 2000-2025, compiled as "Milkman stats v2026-08-29". Examples the dashboard and labels may show:
*Confirmed call close through the trigger: 73.6 percent reached 38.2 percent the same day. If price then closed back below the trigger, that fell to 59.5 percent.
*Median time from a winning call trigger to 38.2 percent: 18 minutes. That is a median, not a deadline.
*Trigger day to 38.2 percent: 78.5 percent bull, 79.0 percent bear.
*38.2 percent to 61.8 percent: 62.7 percent bull, 65.5 percent bear.
*Gate completion from a trigger day: 62.5 percent bull (n=3,421), 65.4 percent bear (n=3,196).
*Full ±1 ATR on any day: 13.8 percent up, 16.1 percent down.
The 3-minute close study that produced the 73.6 / 59.5 pair was run on calls only. The script says so on the put trigger. Do not apply that pair to shorts.
These figures are not a win rate for your account, not a forecast, and not valid on QQQ, ES, BTC, a 5-minute chart, weekly levels, or extended-hours closes. If the dashboard says stats are hidden, believe it. The mechanics still run. The percentages do not.
Bilbo
Bilbo is a 1-hour Phase Oscillator state used as context, not as an entry trigger. It can only be read cleanly on a chart of 60 minutes or less. On higher timeframes the dashboard drops the intraday rows rather than inventing a value. Outer-zone states were associated with higher gate-completion frequencies in the same SPY sample. Treat that as sample context, not a filter you must wait for.
How to use it
*For the published configuration:
SPY or
SPX, 3-minute, regular hours, Mode = MILKMAN, Level Period left on Day, Use Current Close OFF.
*Wait for a confirmed close through the trigger, or for GG / T-PB if you take those.
*Stop is a confirmed close back through the same trigger.
*Primary target is 61.8 percent. Scale at least half there. Trail remaining size. Do not add at 50 percent.
*Read STATUS before you assume the script is broken. It will say if you are on the wrong timeframe, in cooldown, out of entries, or still short of the level.
*On crypto, FX, futures, or a 4-hour chart, switch to UNIVERSAL or CUSTOM and ignore percentages.
*Swing or Position level periods rebuild the same map from monthly or quarterly ATR. Use a 4-hour or daily chart for those. They are structure, not a 3-minute day-trade signal.
Alerts
Alert text is mechanical on purpose. TradingView freezes alertcondition text at compile time, so the message cannot know your mode or symbol. Percentages live on the dashboard, which does know the scope.
Limitations
*Not financial advice. You are responsible for orders, risk, and venue rules.
*Percentages describe one historical sample on one product. They can fail going forward.
*10-minute EMA8, PDC reclaim, and 1-hour Bilbo are wrong or suppressed above their native timeframes.
*Milkman stats require an exact ticker match. SPYG and SPYD do not inherit SPY figures.
*A buffer, if set, moves only the entry. You can be in a trade and not yet stopped. The dashboard prints both prices when a buffer is on.
*This script plots levels and discrete events. It does not place orders and it is not a strategy report.
Originality
Saty published the close ± ATR fib map and the period selector. This publication keeps that map, credits it, and adds a separate signal and session layer plus scoped historical labels. Code is open so the split is visible. If you only need the original lines, use Saty ATR Levels.
Published under the Mozilla Public License 2.0, subject to TradingView Script Publishing Rules, which take precedence for what may appear in the public library.
Full user guide: What this tool is
Trinity ATR Levels is a map of where the current period sits inside yesterday’s (or last week’s, month’s, quarter’s, year’s) volatility, plus a set of rules for when a bar is allowed to count as an entry or an exit.
It does not know your account size, your options expiry, or whether the next bar will continue. It answers four questions:
Where is price relative to the previous close and the ATR grid?
Has a confirmed close gone through the trigger?
Is the Golden Gate open?
If nothing is printing, why?
If you treat the percentages as a promise, you will misuse it. If you treat the lines as a fixed map and the markers as timestamps of confirmed events, it does what it was built to do.
### What you need on the chart
Add the script to a standard candlestick chart. Do not use Heikin Ashi, Renko, Kagi, line break, point and figure, or range bars if you care about the signals. Those charts change the close that the engine tests.
For the configuration the historical numbers belong to:
Open SPY or SPX.
Set the chart to 3 minutes.
Use regular trading hours for the Milkman mode. Turn extended hours on only if you also want premarket high and low drawn. Premarket lines stay blank without extended hours.
Leave Mode on MILKMAN.
Leave Level Period on Day. Milkman forces Day even if you change the input.
Leave Use Current Close OFF.
Leave Trigger at 0.236 unless you have a reason to move it. Every label reads that input, so the text will follow you if you change it.
If you are on QQQ, ES, NQ, a single name, FX, or crypto, switch Mode to UNIVERSAL before you look at the dashboard. The lines will still draw. The percentages should not.
### The map, from the middle outward
All distances are a fraction of the selected period’s ATR, measured from the previous period close (PDC).
PDC is the spine. On a Day period in Milkman mode it is yesterday’s regular-session close, not last night’s extended print and not the live price.
The call trigger sits 0.236 ATR above PDC. The put trigger sits 0.236 ATR below it. These two lines are the only entry gate and the only mechanical stop. Price touching them is not an event. A confirmed candle close through them is.
38.2 percent of ATR beyond PDC is where the Golden Gate opens. From there to 61.8 percent is the corridor the script treats as the trade. 61.8 percent is the gate target, not a suggestion to hold for a full ATR.
50 percent is halfway through that corridor. The script’s labels tell you not to start a new position there. Reward left to 61.8 is smaller than the risk back to the trigger. If you are already in, you hold and you still use the trigger as the stop.
78.6 percent is past the gate. The intended action on arrival is to trail, not to add.
±1 ATR is the full daily range relative to PDC. In the SPY sample a complete +1 ATR day happened on 13.8 percent of days and a complete −1 ATR day on 16.1 percent of days. Treat it as rare air, take remaining profits, and do not invent a second system beyond it.
Extensions past 1 ATR (1.236, 1.618, 2.0, and so on) are optional. Simple Mode hides them. They are orientation, not entries.
Previous period high and low, and premarket high and low, are extra structure. They are not part of the trigger rule. Premarket needs the 04:00–09:30 window (exchange time) and extended hours enabled.
The 10-minute EMA8 is pulled from the 10-minute timeframe so it is the same line on a 1-minute, 3-minute, or 10-minute chart. Confirmed mode steps every 10 minutes. That staircase is the real completed value. Live mode is smoother and it moves inside the bar. Signals test the confirmed value.
### Confirmed close is the whole mechanic
Saty’s original script drew the lines and stopped. Trinity adds a rule: the event is the close of a finished bar that is allowed to speak.
Allowed to speak means three things at once.
The chart timeframe is allowed. In Milkman that is 3 minutes only. On a 1-minute or 5-minute chart in Milkman, signals stay off and STATUS will say so.
The session is allowed. In Milkman that is regular hours only. Overnight bars do not arm the trigger.
The bar is confirmed. A live wick through the trigger during the forming bar is not an entry.
Exit is the same test in reverse: a confirmed close back through the trigger ends the setup. That invalidation is the filter. In the call-side 3-minute sample, a confirmed close above the trigger reached 38.2 percent the same day 73.6 percent of the time. If price then closed back below the trigger, that dropped to 59.5 percent. The numbers are history. The rule is: if the trigger gives the close back, you are out.
Wicks do not count on the way in and they do not count on the way out.
### The markers you will see
ENTER under or over a bar is a trigger entry. Long is a confirmed close above the call trigger. Short is a confirmed close below the put trigger.
EXIT is the invalidation close back through that same trigger.
GG is the Golden Gate opening: a confirmed close that first reaches 38.2 percent with the trade already allowed. That bar can also be painted gold if you leave gate coloring on.
T-PB is a pullback to the trigger after the gate is already open. The script ranks this as the best expected-value add or re-entry in the sample it displays. It is not a second daily trigger budget item in the same way as ENTER. It is a pullback event.
EMA8 is a pullback to the 10-minute EMA8 while price is inside the gate. Off by default because it prints often. It is suppressed above a 10-minute chart.
PDC is a first-hour reclaim or loss of the previous close on a 10-minute close. First hour means sixty minutes from the session start the mode is using. On SPY in Milkman that is 09:30–10:30 Eastern. It is a flip warning, not an order.
If markers are missing, read STATUS before you hunt through settings. The usual causes are: not 3 minutes, not regular hours, already used the one entry per direction, still inside the cooldown after an EXIT, or the chart is coarser than 10 minutes so EMA8 and PDC reclaim are disabled.
### How to take a long, step by step
Set Milkman on SPY 3-minute before the cash open if you can, so the levels are fixed and you can mark the call trigger and 38.2 / 61.8 before price gets there.
Do nothing in the trigger box except watch. The box is the space between PDC and the call trigger. Occupying it is common. It is not a signal.
When a 3-minute candle closes above the call trigger during regular hours, that is ENTER. In Milkman you get one of those per direction per session. After that, further longs come from T-PB, GG, or EMA8, not from another raw trigger fire.
Stop is already defined: a later 3-minute close back below the call trigger. You do not trail that stop until the gate target is reached. You do not move it to 50 percent. You do not use a wick.
If price reaches 38.2 percent, the gate is open. You may already be in from the trigger. You may enter there immediately. You may wait for a pullback to the trigger. The sample ranked those options in that order of expected value, with a fresh entry at 50 percent last and negative. Use that ranking as context, not as a second strategy.
At 61.8 percent, scale out at least half. Trail what is left. If price continues to 78.6 percent, trail again; do not add. If a full ATR prints, the script’s guidance is to finish the position. Mean reversion toward PDC is the next map, not a reason to press the same trade.
If you get stopped and the session still has time, Milkman will not give you another raw ENTER in that direction. That is intentional. A stop-out is the invalidation. Chasing a second trigger fire is how the 73.6 percent figure becomes the 59.5 percent figure.
Shorts are the mirror image. One extra warning: the 73.6 / 59.5 pair is call-side only. Bear-side labels use the bear frequencies (trigger to 38.2, gate completion, hold rates) and they say so. Do not quote the call study on a put.
### The three modes in practice
MILKMAN is the published study shape. Use it when you want the script to behave like the sample: SPY or SPX, cash session, 3-minute closes, daily ATR, one bite per side. If you take it to TSLA or to a 5-minute chart and wonder why stats vanished or signals died, that is the mode working.
UNIVERSAL is the same ruler on a market that has no cash open. Crypto and FX should live here. Signals run all day. Re-entries are unlimited. A 1 percent ATR buffer sits beyond the trigger so a messy close through the line does not count until price clears it. The stop stays on the trigger, so there is a band where you can be in and not yet stopped. The dashboard prints both prices when that buffer is on. Percentages stay off. Showing 73.6 percent on BTC would be invented evidence.
CUSTOM is a workshop. Every item under Signal Rules starts to matter: which timeframe may fire, which session, how many entries, how many bars of cooldown, how large a buffer, whether pullbacks fire once or on every linger, whether an overnight gap through the trigger still counts, and whether stats hide off the SPY 3-minute Day RTH scope. Change one thing at a time. If you do not know why you are changing it, stay on Milkman or Universal.
### Reading the dashboard
Full layout is the operator panel. Compact keeps the six lines you act on and shortens the wording. Off removes the panel and leaves levels and markers. Above a 1-hour chart the script drops the intraday rows instead of leaving them marked inactive, because the 3-minute entry rules and the 1-hour Bilbo state cannot be evaluated there.
The Mode row is a one-line reminder of which preset is live and whether stats are on.
Location is where price sits on the map: still inside the trigger box, through the trigger, inside the gate, past 61.8, or out at a full ATR.
Watch and Entry tell you what would have to happen next. If the next event is “need a confirmed close above 612.40,” that is the instruction. If the next event is “cooldown, 2 bars left,” that is also the instruction.
Targets and Stop reprint 61.8 and the trigger so you do not have to hunt labels during a fast bar.
Stall guidance is what to do when price is inside the gate and not moving. The default answer is hold until a trigger close against you or a 61.8 print.
Bilbo is the 1-hour Phase Oscillator context: high or low zone, rising or falling. In the same SPY sample, outer-zone states came with higher gate-completion frequencies, with Low+Falling the strongest bear-side figure in that set. You do not wait for Bilbo to take a trigger. You use it to decide how hard you lean on a runner.
Context and Timing cover session phase, first hour, and how the sample behaved in similar locations. Distance prints how far you are from the trigger, 38.2, and 61.8 in price and in percent of ATR, and how far an open trade has traveled through the gate.
STATUS is the line to trust when the chart looks dead. It will say signals are gated off, the timeframe is degraded, the daily budget is spent, cooldown is running, or you are simply waiting and how far the level still is. If STATUS and your eyes disagree, STATUS wins. The script is telling you which rule blocked the print.
The smaller range/ATR info table is Saty’s original idea: period name, how much of the ATR the current period has already used, and the two trigger prices. Green / orange / red on that range reading is utilization, not a signal. A day that has already spent most of its ATR has less room left to the full-range line. That does not forbid a trigger trade. It tells you the remaining runner is smaller.
### Bilbo, without mystique
Bilbo is not a person and it is not an extra level. It is a classification of the last completed 1-hour Phase Oscillator reading into high/low and rising/falling.
The script can only request that 1-hour series cleanly when your chart is 60 minutes or finer. On a 4-hour or daily chart the value you would get is not the completed hour the sample used, so the script stops showing the row.
Use it as a weight, not a gate. A call trigger with High+Rising or High+Falling in the sample completed the gate more often than the unfiltered baseline. A put trigger with Low+Falling was the strongest cell in that grid. None of those cells are 100 percent. None of them override a confirmed close back through the trigger.
### Historical numbers, and how not to lie to yourself
When stats are on, labels and the dashboard splice in frequencies from one compiled block: SPY, regular hours, 3-minute confirmed closes, 2000–2025, version tag Milkman stats v2026-08-29.
A few more figures you will see in Detailed labels, so they are not a surprise:
Trigger day reaching 38.2 percent: 78.5 percent bull, 79.0 percent bear.
38.2 to 61.8: 62.7 percent bull, 65.5 percent bear.
61.8 to 78.6: 68.9 percent bull, 74.7 percent bear.
78.6 to full ATR: 60.9 percent bull, 66.9 percent bear.
Gate completion from the trigger day: 62.5 percent bull, 65.4 percent bear.
Expected-value ranking in that sample put trigger pullback first, immediate 38.2 second, 10-minute EMA8 third, and a fresh 50 percent entry last and negative.
First-hour 10-minute PDC reclaim then reaching a trigger: 73.0 percent in that sample. Reclaim then reaching the gate: 49.0 percent.
Those are counts of past days that did a thing after another thing. They are not the probability of your next trade. They disappear the moment you leave SPY/SPX, leave 3 minutes, leave Day levels, or leave the regular-session close. SPYG is not SPY. The script checks the ticker exactly.
If you publish commentary, quote the scope in the same sentence as the number. “73.6 percent of confirmed SPY 3-minute call closes through the trigger reached 38.2 percent the same day in the 2000–2025 regular-hours sample” is honest. “This setup wins 74 percent of the time” is not.
### Settings that change behavior versus settings that only change paint
Mode, Level Period, ATR length, Trigger share, PDC/ATR session, and Use Current Close change the map or the clock.
Signal Rules change who is allowed to fire. They are ignored unless Mode is CUSTOM, except that Milkman and Universal already stamp their own values onto those same internal switches.
Display, colors, Simple Mode, dashboard position and size, legend, and label detail change what you see. Simple Mode keeps PDC, both triggers, 38.2, and 61.8, and hides 50, 78.6, extensions, prior high/low, and premarket. That is the right first view if the chart is unreadable.
Chart Markers turn ENTER, EXIT, GG, T-PB, EMA8, PDC, and gate-candle color on or off one at a time. Turning markers off does not turn the logic off. Alerts can still fire.
The colour-blind palette replaces gold/green pairs that collapse under deuteranopia. Use it if you cannot separate the default gate and trigger colors.
Runner Target under Trend & Runner is a discretionary extra line at 1.0, 1.236, 1.618, 2.0, 2.618, or 3.0 ATR. It is not the researched gate target. If both tags are on, 61.8 is the gate, the runner tag is optional greed. Do not confuse them.
Alert checkboxes only enable the long or short trigger alerts. The other alertconditions still exist in the script’s alert list when you create an alert on the chart.
### Alerts
Create the alert from this script on the chart, not from a second copy. Pick the condition by name.
ENTER Long / ENTER Short: confirmed close through the trigger.
EXIT Long / EXIT Short: confirmed close back through it.
Gate Open: first 38.2 event.
T-PB: pullback to the trigger with the gate already open.
EMA8 Pullback: 10-minute EMA8 tag inside the gate.
Gate Complete: confirmed close through 61.8.
PDC Reclaim: first-hour 10-minute close back through PDC.
The message body is mechanics only. It will not paste a SPY percentage onto a Bitcoin alert. That is deliberate. Read the dashboard for numbers.
### Timeframes other than 3 minutes
The levels will draw on any chart because they come from a higher-timeframe request. The signals will not always draw.
On 1 minute in Milkman, the engine refuses to fire because the study used 3-minute closes. Switch to Custom and “Any chart timeframe” only if you accept that you have left the sample.
On 5 or 15 minutes the Day levels still sit in the right place. A 15-minute close through the trigger is a different event from a 3-minute close through the trigger. Do not quote the 73.6 percent figure there.
On 1 hour and above, EMA8 pullback, PDC reclaim, and Bilbo are degraded or removed. STATUS and the swing layout of the dashboard are the honest view: location, targets, stop, distance.
On Swing or Position periods the same fibs are built from monthly or quarterly ATR. That is a multi-week map. Read it on a 4-hour or daily chart of a liquid name. Thin small-cap crypto can travel several of those ATRs in a session and then go dead. Daily period is safer there.
### The one setting that breaks the tool
Use Current Close ON rebuilds every line from the live close. Price is then sitting on the anchor by definition. The trigger box is “price between the close and a trigger,” which can never be true when the close is the live price. The gate cannot open. History on the chart becomes look-ahead because each past day is drawn from that day’s own close. The Milkman percentages assume a locked prior close. Turn this on only after the session, to preview tomorrow, then turn it off.
### What this script will not do
It will not size the position.
It will not know your option delta or your expiry.
It will not place the Webull or broker order.
It will not stay honest if you show it on Heikin Ashi and take the signals.
It will not carry SPY frequencies onto another product.
It will not keep a trade alive after a confirmed close back through the trigger just because 38.2 “usually” gets reached.
It will not replace Saty ATR Levels if all you wanted was the quiet fib grid. Use Saty’s script for that. Use Trinity when you want the grid and a clock that says when a close counts.
### A simple daily routine
Before 09:30 Eastern on SPY, load the 3-minute chart, Milkman, current close off. Write down PDC, call trigger, put trigger, upper 38.2, upper 61.8, lower 38.2, lower 61.8.
During the first hour, note whether price is stuck in a box, already through a trigger, or reclaiming PDC on a 10-minute close.
Take at most one raw trigger per side. Prefer a close, not a poke. Put the stop on the other side of that same line as a close, not as a tick.
If the gate opens, manage to 61.8. If it fails back through the trigger, flatten and stop trading that direction on the raw trigger for the rest of the session.
After 16:00, if you want tomorrow’s sketch, flip Use Current Close on for one minute, write the projected levels, flip it off.
If STATUS ever says you are out of scope, you are. Change product or mode on purpose, not by accident.
That is the whole tool: Saty’s ruler, a confirmed-close clock, a gate from 38.2 to 61.8, and a dashboard that tells you when the clock is not allowed to tick.
Is an open-source overlay that draws volatility levels from the previous period close and a period ATR, then adds a session-aware signal layer on top of those levels.
Credit
The level map is a derivative of Saty ATR Levels by satymahajan, published open-source on TradingView in 2022.
Original:

What this script keeps from Saty:
- Previous period close as the anchor
- Trigger at a user-set share of ATR (default 0.236)
- 38.2, 50, 61.8, 78.6, ±1 ATR, and the same extension stack
- Day / Multiday / Swing / Position / Long-term period selector
- Optional "Use Current Close" switch
- 8-21-34 ribbon used only to color the small range/ATR info table
What this script adds:
- Three modes that change when a signal may fire, not the level math
- Confirmed-close ENTER and EXIT through the trigger
- Golden Gate open at 38.2 percent, with 61.8 percent as the gate target
- Optional pullback markers: trigger pullback (T-PB) and 10-minute EMA8
- Optional first-hour previous-close reclaim on 10-minute closes
- Session clock for regular hours, premarket, or 24-hour markets
- Entry budget, cooldown, debounce, gap-safe open, and an optional entry buffer that does not move the stop
- A dashboard that states location, action, targets, stop, and why nothing is firing
- Historical percentages that appear only on the exact sample they were measured on
- Alerts for the mechanical events above
This is not a republish of Saty ATR Levels with new colors. The ruler is Saty's. The traffic lights, session clock, and scoped percentages are new. Source is open so both parts can be inspected.
What the levels are
Every line is the chosen period's reference close plus or minus a fraction of that period's ATR.
- PDC — previous period close. The anchor. Nothing is measured from live price unless you turn "Use Current Close" on.
- Call / Put trigger — default 23.6 percent of ATR either side of PDC. A confirmed close through this line is the entry gate. A confirmed close back through it is the exit.
- 38.2 percent — the Golden Gate opens.
- 50 percent — midpoint of the gate. The script treats fresh entries here as poor reward versus the stop at the trigger.
- 61.8 percent — the gate target. Scale out is the intended action.
- 78.6 percent and ±1 ATR — extension and full-range lines. Rare on a single day. The script does not treat them as add-on zones.
Leave "Use Current Close" OFF for trading. When it is ON, the forming close becomes the anchor, the levels drift with price, the trigger boxes cannot arm correctly, and none of the historical percentages apply. The only intended use is a last-minutes preview of the next period's map. Note the numbers, then switch it back OFF.
The three modes
The levels are the same in every mode. Mode only changes signal timing, re-entry policy, and whether percentages print.
MILKMAN — default. Day period forced. Regular-hours previous close and ATR. Signals only on a 3-minute chart during regular hours. One long and one short trigger entry per session. No entry buffer. Three-bar cooldown after an exit. Percentages print only when the chart is SPY or SPX, 3-minute, Day period, regular session. That is the only configuration those figures were compiled for. On any other symbol they hide.
UNIVERSAL — same structure on any market and timeframe. Signals on every bar. Unlimited re-entries with a longer cooldown. 1 percent ATR entry buffer. Percentages hidden everywhere. They were not measured outside SPY regular hours, so the script does not show SPY numbers on other markets.
CUSTOM — every control under "Signal Rules" applies. Use this only when you know which rule you are changing and why.
How a signal is taken
A wick does not count. The script waits for a confirmed bar close.
Long trigger entry: confirmed close above the call trigger, session and timeframe allowed, entry budget remaining, cooldown finished, and the close beyond any buffer you set.
Long exit: confirmed close back below the call trigger. The stop does not use the buffer.
Short side is the mirror.
After the Golden Gate is open, two extra entries can print: a pullback that tags the trigger again (T-PB), and a pullback to the 10-minute EMA8 inside the gate. The 10-minute EMA8 is requested from the 10-minute timeframe. It is not your chart's own 8 EMA. Above a 10-minute chart that line is only an approximation and those signals are suppressed. The Status row says so.
PDC reclaim is a first-hour 10-minute close back through the previous close after price started the session on the other side of it. It is not a trigger entry. It is a flip warning. It is also suppressed above 10 minutes.
Historical percentages
When they are visible they are historical frequencies from SPY, regular session 09:30-16:00 ET, 3-minute confirmed closes, sample window 2000-2025, compiled as "Milkman stats v2026-08-29". Examples the dashboard and labels may show:
*Confirmed call close through the trigger: 73.6 percent reached 38.2 percent the same day. If price then closed back below the trigger, that fell to 59.5 percent.
*Median time from a winning call trigger to 38.2 percent: 18 minutes. That is a median, not a deadline.
*Trigger day to 38.2 percent: 78.5 percent bull, 79.0 percent bear.
*38.2 percent to 61.8 percent: 62.7 percent bull, 65.5 percent bear.
*Gate completion from a trigger day: 62.5 percent bull (n=3,421), 65.4 percent bear (n=3,196).
*Full ±1 ATR on any day: 13.8 percent up, 16.1 percent down.
The 3-minute close study that produced the 73.6 / 59.5 pair was run on calls only. The script says so on the put trigger. Do not apply that pair to shorts.
These figures are not a win rate for your account, not a forecast, and not valid on QQQ, ES, BTC, a 5-minute chart, weekly levels, or extended-hours closes. If the dashboard says stats are hidden, believe it. The mechanics still run. The percentages do not.
Bilbo
Bilbo is a 1-hour Phase Oscillator state used as context, not as an entry trigger. It can only be read cleanly on a chart of 60 minutes or less. On higher timeframes the dashboard drops the intraday rows rather than inventing a value. Outer-zone states were associated with higher gate-completion frequencies in the same SPY sample. Treat that as sample context, not a filter you must wait for.
How to use it
*For the published configuration:
*Wait for a confirmed close through the trigger, or for GG / T-PB if you take those.
*Stop is a confirmed close back through the same trigger.
*Primary target is 61.8 percent. Scale at least half there. Trail remaining size. Do not add at 50 percent.
*Read STATUS before you assume the script is broken. It will say if you are on the wrong timeframe, in cooldown, out of entries, or still short of the level.
*On crypto, FX, futures, or a 4-hour chart, switch to UNIVERSAL or CUSTOM and ignore percentages.
*Swing or Position level periods rebuild the same map from monthly or quarterly ATR. Use a 4-hour or daily chart for those. They are structure, not a 3-minute day-trade signal.
Alerts
Alert text is mechanical on purpose. TradingView freezes alertcondition text at compile time, so the message cannot know your mode or symbol. Percentages live on the dashboard, which does know the scope.
Limitations
*Not financial advice. You are responsible for orders, risk, and venue rules.
*Percentages describe one historical sample on one product. They can fail going forward.
*10-minute EMA8, PDC reclaim, and 1-hour Bilbo are wrong or suppressed above their native timeframes.
*Milkman stats require an exact ticker match. SPYG and SPYD do not inherit SPY figures.
*A buffer, if set, moves only the entry. You can be in a trade and not yet stopped. The dashboard prints both prices when a buffer is on.
*This script plots levels and discrete events. It does not place orders and it is not a strategy report.
Originality
Saty published the close ± ATR fib map and the period selector. This publication keeps that map, credits it, and adds a separate signal and session layer plus scoped historical labels. Code is open so the split is visible. If you only need the original lines, use Saty ATR Levels.
Published under the Mozilla Public License 2.0, subject to TradingView Script Publishing Rules, which take precedence for what may appear in the public library.
Full user guide: What this tool is
Trinity ATR Levels is a map of where the current period sits inside yesterday’s (or last week’s, month’s, quarter’s, year’s) volatility, plus a set of rules for when a bar is allowed to count as an entry or an exit.
It does not know your account size, your options expiry, or whether the next bar will continue. It answers four questions:
Where is price relative to the previous close and the ATR grid?
Has a confirmed close gone through the trigger?
Is the Golden Gate open?
If nothing is printing, why?
If you treat the percentages as a promise, you will misuse it. If you treat the lines as a fixed map and the markers as timestamps of confirmed events, it does what it was built to do.
### What you need on the chart
Add the script to a standard candlestick chart. Do not use Heikin Ashi, Renko, Kagi, line break, point and figure, or range bars if you care about the signals. Those charts change the close that the engine tests.
For the configuration the historical numbers belong to:
Open SPY or SPX.
Set the chart to 3 minutes.
Use regular trading hours for the Milkman mode. Turn extended hours on only if you also want premarket high and low drawn. Premarket lines stay blank without extended hours.
Leave Mode on MILKMAN.
Leave Level Period on Day. Milkman forces Day even if you change the input.
Leave Use Current Close OFF.
Leave Trigger at 0.236 unless you have a reason to move it. Every label reads that input, so the text will follow you if you change it.
If you are on QQQ, ES, NQ, a single name, FX, or crypto, switch Mode to UNIVERSAL before you look at the dashboard. The lines will still draw. The percentages should not.
### The map, from the middle outward
All distances are a fraction of the selected period’s ATR, measured from the previous period close (PDC).
PDC is the spine. On a Day period in Milkman mode it is yesterday’s regular-session close, not last night’s extended print and not the live price.
The call trigger sits 0.236 ATR above PDC. The put trigger sits 0.236 ATR below it. These two lines are the only entry gate and the only mechanical stop. Price touching them is not an event. A confirmed candle close through them is.
38.2 percent of ATR beyond PDC is where the Golden Gate opens. From there to 61.8 percent is the corridor the script treats as the trade. 61.8 percent is the gate target, not a suggestion to hold for a full ATR.
50 percent is halfway through that corridor. The script’s labels tell you not to start a new position there. Reward left to 61.8 is smaller than the risk back to the trigger. If you are already in, you hold and you still use the trigger as the stop.
78.6 percent is past the gate. The intended action on arrival is to trail, not to add.
±1 ATR is the full daily range relative to PDC. In the SPY sample a complete +1 ATR day happened on 13.8 percent of days and a complete −1 ATR day on 16.1 percent of days. Treat it as rare air, take remaining profits, and do not invent a second system beyond it.
Extensions past 1 ATR (1.236, 1.618, 2.0, and so on) are optional. Simple Mode hides them. They are orientation, not entries.
Previous period high and low, and premarket high and low, are extra structure. They are not part of the trigger rule. Premarket needs the 04:00–09:30 window (exchange time) and extended hours enabled.
The 10-minute EMA8 is pulled from the 10-minute timeframe so it is the same line on a 1-minute, 3-minute, or 10-minute chart. Confirmed mode steps every 10 minutes. That staircase is the real completed value. Live mode is smoother and it moves inside the bar. Signals test the confirmed value.
### Confirmed close is the whole mechanic
Saty’s original script drew the lines and stopped. Trinity adds a rule: the event is the close of a finished bar that is allowed to speak.
Allowed to speak means three things at once.
The chart timeframe is allowed. In Milkman that is 3 minutes only. On a 1-minute or 5-minute chart in Milkman, signals stay off and STATUS will say so.
The session is allowed. In Milkman that is regular hours only. Overnight bars do not arm the trigger.
The bar is confirmed. A live wick through the trigger during the forming bar is not an entry.
Exit is the same test in reverse: a confirmed close back through the trigger ends the setup. That invalidation is the filter. In the call-side 3-minute sample, a confirmed close above the trigger reached 38.2 percent the same day 73.6 percent of the time. If price then closed back below the trigger, that dropped to 59.5 percent. The numbers are history. The rule is: if the trigger gives the close back, you are out.
Wicks do not count on the way in and they do not count on the way out.
### The markers you will see
ENTER under or over a bar is a trigger entry. Long is a confirmed close above the call trigger. Short is a confirmed close below the put trigger.
EXIT is the invalidation close back through that same trigger.
GG is the Golden Gate opening: a confirmed close that first reaches 38.2 percent with the trade already allowed. That bar can also be painted gold if you leave gate coloring on.
T-PB is a pullback to the trigger after the gate is already open. The script ranks this as the best expected-value add or re-entry in the sample it displays. It is not a second daily trigger budget item in the same way as ENTER. It is a pullback event.
EMA8 is a pullback to the 10-minute EMA8 while price is inside the gate. Off by default because it prints often. It is suppressed above a 10-minute chart.
PDC is a first-hour reclaim or loss of the previous close on a 10-minute close. First hour means sixty minutes from the session start the mode is using. On SPY in Milkman that is 09:30–10:30 Eastern. It is a flip warning, not an order.
If markers are missing, read STATUS before you hunt through settings. The usual causes are: not 3 minutes, not regular hours, already used the one entry per direction, still inside the cooldown after an EXIT, or the chart is coarser than 10 minutes so EMA8 and PDC reclaim are disabled.
### How to take a long, step by step
Set Milkman on SPY 3-minute before the cash open if you can, so the levels are fixed and you can mark the call trigger and 38.2 / 61.8 before price gets there.
Do nothing in the trigger box except watch. The box is the space between PDC and the call trigger. Occupying it is common. It is not a signal.
When a 3-minute candle closes above the call trigger during regular hours, that is ENTER. In Milkman you get one of those per direction per session. After that, further longs come from T-PB, GG, or EMA8, not from another raw trigger fire.
Stop is already defined: a later 3-minute close back below the call trigger. You do not trail that stop until the gate target is reached. You do not move it to 50 percent. You do not use a wick.
If price reaches 38.2 percent, the gate is open. You may already be in from the trigger. You may enter there immediately. You may wait for a pullback to the trigger. The sample ranked those options in that order of expected value, with a fresh entry at 50 percent last and negative. Use that ranking as context, not as a second strategy.
At 61.8 percent, scale out at least half. Trail what is left. If price continues to 78.6 percent, trail again; do not add. If a full ATR prints, the script’s guidance is to finish the position. Mean reversion toward PDC is the next map, not a reason to press the same trade.
If you get stopped and the session still has time, Milkman will not give you another raw ENTER in that direction. That is intentional. A stop-out is the invalidation. Chasing a second trigger fire is how the 73.6 percent figure becomes the 59.5 percent figure.
Shorts are the mirror image. One extra warning: the 73.6 / 59.5 pair is call-side only. Bear-side labels use the bear frequencies (trigger to 38.2, gate completion, hold rates) and they say so. Do not quote the call study on a put.
### The three modes in practice
MILKMAN is the published study shape. Use it when you want the script to behave like the sample: SPY or SPX, cash session, 3-minute closes, daily ATR, one bite per side. If you take it to TSLA or to a 5-minute chart and wonder why stats vanished or signals died, that is the mode working.
UNIVERSAL is the same ruler on a market that has no cash open. Crypto and FX should live here. Signals run all day. Re-entries are unlimited. A 1 percent ATR buffer sits beyond the trigger so a messy close through the line does not count until price clears it. The stop stays on the trigger, so there is a band where you can be in and not yet stopped. The dashboard prints both prices when that buffer is on. Percentages stay off. Showing 73.6 percent on BTC would be invented evidence.
CUSTOM is a workshop. Every item under Signal Rules starts to matter: which timeframe may fire, which session, how many entries, how many bars of cooldown, how large a buffer, whether pullbacks fire once or on every linger, whether an overnight gap through the trigger still counts, and whether stats hide off the SPY 3-minute Day RTH scope. Change one thing at a time. If you do not know why you are changing it, stay on Milkman or Universal.
### Reading the dashboard
Full layout is the operator panel. Compact keeps the six lines you act on and shortens the wording. Off removes the panel and leaves levels and markers. Above a 1-hour chart the script drops the intraday rows instead of leaving them marked inactive, because the 3-minute entry rules and the 1-hour Bilbo state cannot be evaluated there.
The Mode row is a one-line reminder of which preset is live and whether stats are on.
Location is where price sits on the map: still inside the trigger box, through the trigger, inside the gate, past 61.8, or out at a full ATR.
Watch and Entry tell you what would have to happen next. If the next event is “need a confirmed close above 612.40,” that is the instruction. If the next event is “cooldown, 2 bars left,” that is also the instruction.
Targets and Stop reprint 61.8 and the trigger so you do not have to hunt labels during a fast bar.
Stall guidance is what to do when price is inside the gate and not moving. The default answer is hold until a trigger close against you or a 61.8 print.
Bilbo is the 1-hour Phase Oscillator context: high or low zone, rising or falling. In the same SPY sample, outer-zone states came with higher gate-completion frequencies, with Low+Falling the strongest bear-side figure in that set. You do not wait for Bilbo to take a trigger. You use it to decide how hard you lean on a runner.
Context and Timing cover session phase, first hour, and how the sample behaved in similar locations. Distance prints how far you are from the trigger, 38.2, and 61.8 in price and in percent of ATR, and how far an open trade has traveled through the gate.
STATUS is the line to trust when the chart looks dead. It will say signals are gated off, the timeframe is degraded, the daily budget is spent, cooldown is running, or you are simply waiting and how far the level still is. If STATUS and your eyes disagree, STATUS wins. The script is telling you which rule blocked the print.
The smaller range/ATR info table is Saty’s original idea: period name, how much of the ATR the current period has already used, and the two trigger prices. Green / orange / red on that range reading is utilization, not a signal. A day that has already spent most of its ATR has less room left to the full-range line. That does not forbid a trigger trade. It tells you the remaining runner is smaller.
### Bilbo, without mystique
Bilbo is not a person and it is not an extra level. It is a classification of the last completed 1-hour Phase Oscillator reading into high/low and rising/falling.
The script can only request that 1-hour series cleanly when your chart is 60 minutes or finer. On a 4-hour or daily chart the value you would get is not the completed hour the sample used, so the script stops showing the row.
Use it as a weight, not a gate. A call trigger with High+Rising or High+Falling in the sample completed the gate more often than the unfiltered baseline. A put trigger with Low+Falling was the strongest cell in that grid. None of those cells are 100 percent. None of them override a confirmed close back through the trigger.
### Historical numbers, and how not to lie to yourself
When stats are on, labels and the dashboard splice in frequencies from one compiled block: SPY, regular hours, 3-minute confirmed closes, 2000–2025, version tag Milkman stats v2026-08-29.
A few more figures you will see in Detailed labels, so they are not a surprise:
Trigger day reaching 38.2 percent: 78.5 percent bull, 79.0 percent bear.
38.2 to 61.8: 62.7 percent bull, 65.5 percent bear.
61.8 to 78.6: 68.9 percent bull, 74.7 percent bear.
78.6 to full ATR: 60.9 percent bull, 66.9 percent bear.
Gate completion from the trigger day: 62.5 percent bull, 65.4 percent bear.
Expected-value ranking in that sample put trigger pullback first, immediate 38.2 second, 10-minute EMA8 third, and a fresh 50 percent entry last and negative.
First-hour 10-minute PDC reclaim then reaching a trigger: 73.0 percent in that sample. Reclaim then reaching the gate: 49.0 percent.
Those are counts of past days that did a thing after another thing. They are not the probability of your next trade. They disappear the moment you leave SPY/SPX, leave 3 minutes, leave Day levels, or leave the regular-session close. SPYG is not SPY. The script checks the ticker exactly.
If you publish commentary, quote the scope in the same sentence as the number. “73.6 percent of confirmed SPY 3-minute call closes through the trigger reached 38.2 percent the same day in the 2000–2025 regular-hours sample” is honest. “This setup wins 74 percent of the time” is not.
### Settings that change behavior versus settings that only change paint
Mode, Level Period, ATR length, Trigger share, PDC/ATR session, and Use Current Close change the map or the clock.
Signal Rules change who is allowed to fire. They are ignored unless Mode is CUSTOM, except that Milkman and Universal already stamp their own values onto those same internal switches.
Display, colors, Simple Mode, dashboard position and size, legend, and label detail change what you see. Simple Mode keeps PDC, both triggers, 38.2, and 61.8, and hides 50, 78.6, extensions, prior high/low, and premarket. That is the right first view if the chart is unreadable.
Chart Markers turn ENTER, EXIT, GG, T-PB, EMA8, PDC, and gate-candle color on or off one at a time. Turning markers off does not turn the logic off. Alerts can still fire.
The colour-blind palette replaces gold/green pairs that collapse under deuteranopia. Use it if you cannot separate the default gate and trigger colors.
Runner Target under Trend & Runner is a discretionary extra line at 1.0, 1.236, 1.618, 2.0, 2.618, or 3.0 ATR. It is not the researched gate target. If both tags are on, 61.8 is the gate, the runner tag is optional greed. Do not confuse them.
Alert checkboxes only enable the long or short trigger alerts. The other alertconditions still exist in the script’s alert list when you create an alert on the chart.
### Alerts
Create the alert from this script on the chart, not from a second copy. Pick the condition by name.
ENTER Long / ENTER Short: confirmed close through the trigger.
EXIT Long / EXIT Short: confirmed close back through it.
Gate Open: first 38.2 event.
T-PB: pullback to the trigger with the gate already open.
EMA8 Pullback: 10-minute EMA8 tag inside the gate.
Gate Complete: confirmed close through 61.8.
PDC Reclaim: first-hour 10-minute close back through PDC.
The message body is mechanics only. It will not paste a SPY percentage onto a Bitcoin alert. That is deliberate. Read the dashboard for numbers.
### Timeframes other than 3 minutes
The levels will draw on any chart because they come from a higher-timeframe request. The signals will not always draw.
On 1 minute in Milkman, the engine refuses to fire because the study used 3-minute closes. Switch to Custom and “Any chart timeframe” only if you accept that you have left the sample.
On 5 or 15 minutes the Day levels still sit in the right place. A 15-minute close through the trigger is a different event from a 3-minute close through the trigger. Do not quote the 73.6 percent figure there.
On 1 hour and above, EMA8 pullback, PDC reclaim, and Bilbo are degraded or removed. STATUS and the swing layout of the dashboard are the honest view: location, targets, stop, distance.
On Swing or Position periods the same fibs are built from monthly or quarterly ATR. That is a multi-week map. Read it on a 4-hour or daily chart of a liquid name. Thin small-cap crypto can travel several of those ATRs in a session and then go dead. Daily period is safer there.
### The one setting that breaks the tool
Use Current Close ON rebuilds every line from the live close. Price is then sitting on the anchor by definition. The trigger box is “price between the close and a trigger,” which can never be true when the close is the live price. The gate cannot open. History on the chart becomes look-ahead because each past day is drawn from that day’s own close. The Milkman percentages assume a locked prior close. Turn this on only after the session, to preview tomorrow, then turn it off.
### What this script will not do
It will not size the position.
It will not know your option delta or your expiry.
It will not place the Webull or broker order.
It will not stay honest if you show it on Heikin Ashi and take the signals.
It will not carry SPY frequencies onto another product.
It will not keep a trade alive after a confirmed close back through the trigger just because 38.2 “usually” gets reached.
It will not replace Saty ATR Levels if all you wanted was the quiet fib grid. Use Saty’s script for that. Use Trinity when you want the grid and a clock that says when a close counts.
### A simple daily routine
Before 09:30 Eastern on SPY, load the 3-minute chart, Milkman, current close off. Write down PDC, call trigger, put trigger, upper 38.2, upper 61.8, lower 38.2, lower 61.8.
During the first hour, note whether price is stuck in a box, already through a trigger, or reclaiming PDC on a 10-minute close.
Take at most one raw trigger per side. Prefer a close, not a poke. Put the stop on the other side of that same line as a close, not as a tick.
If the gate opens, manage to 61.8. If it fails back through the trigger, flatten and stop trading that direction on the raw trigger for the rest of the session.
After 16:00, if you want tomorrow’s sketch, flip Use Current Close on for one minute, write the projected levels, flip it off.
If STATUS ever says you are out of scope, you are. Change product or mode on purpose, not by accident.
That is the whole tool: Saty’s ruler, a confirmed-close clock, a gate from 38.2 to 61.8, and a dashboard that tells you when the clock is not allowed to tick.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.