OPEN-SOURCE SCRIPT
Updated SOXL Breakout

# SOXL Breakout — Intraday Breakout Levels & Position Sizing
## What It Does
SOXL Breakout is a day-trading overlay indicator designed for leveraged ETFs (SOXL, TQQQ, etc.) on the **5-minute timeframe**. It automatically plots key price levels each morning and tracks position sizing and P&L across two independent accounts.
## How It Works
Every trading day at **09:25 EST**, the indicator captures the open of that candle and draws three levels:
- **OPEN** — the 09:25 candle's open price (white solid line)
- **TRIGGER** — a configurable percentage above the open (green dashed line, default +1.41%). This is your **buy signal**. When price touches this level during RTH, the indicator enters a simulated long position.
- **STOP LOSS** — a configurable percentage below the trigger (red dashed line, default -8%). If price drops to this level while in a position, the trade is closed at a loss.
### Trade Lifecycle
1. **09:25 EST** — Levels are drawn for the day.
2. **During RTH (09:30–16:00)** — If price hits the TRIGGER, a position is entered at the trigger price. Shares are calculated based on your account size and deploy percentage, rounded down to the nearest 100 shares.
3. **Stop Loss** — If price hits the stop-loss level at any time while in a position (including pre-market the next day), the position is closed.
4. **09:20 EST (next day)** — If still in a position, it is auto-sold at the open price. This is the default exit.
### SOXS (Inverse) Entry
An optional feature for hedging or inverse plays. When enabled, if the TRIGGER was **never hit** during RTH on Monday, Thursday, or Friday, a **SOXS ENTRY** line is drawn at the 15:55 closing price. This signals a potential inverse (bearish) entry.
## The Position Sizing Table
A live overlay table displays:
| Row | Description |
|---|---|
| **Account** | Current account balance (seed + cumulative P&L). Shows before/after transition on trade close. |
| **Running P&L** | Live dollar P&L while in a position, or locked P&L after exit. |
| **Status** | Current state: Waiting, Acct updated, In position, Sold - gain, Sold - loss, Stopped out. |
| **Shares** | Number of shares to trade based on account size, deploy %, and trigger price. |
| **Risk** | Dollar risk and percentage risk per account if stopped out. |
The table supports **two independent accounts** — useful for tracking separate portfolios or different position sizes side by side.
## Settings
### Open Candle Time
- **Open Candle Hour/Minute (EST)** — When to capture the reference candle (default: 09:25)
- **Trigger % above Open** — Percentage above open for the buy trigger (default: 1.41%)
- **Stop Loss % below Trigger** — Percentage below trigger for the stop loss (default: 8.0%)
### Line Colours
- Customize colors for the OPEN, TRIGGER, and STOP LOSS lines.
### SOXS Entry
- **Enable SOXS Entry** — Toggle the inverse entry line feature.
- **SOXS ENTRY colour** — Color for the SOXS entry line.
### Account 1 / Account 2
- **Account Name** — Label shown in the table header.
- **Starting Account ($)** — Your account seed capital. Changing this resets cumulative P&L.
- **Deploy %** — Percentage of account to deploy per trade (default: 80%).
### Display
- **Table Position** — Where to place the position sizing table on the chart.
## Important Notes
- This indicator is designed for the **5-minute timeframe only**. A warning label will appear if applied to any other timeframe.
- Cumulative P&L only updates on **realtime bars** to avoid inflated backtest results.
- Changing the starting account value resets the cumulative P&L counter.
- Shares are always rounded down to the nearest 100.
- The indicator does **not** place actual trades — it is a visual and analytical tool only.
## Disclaimer
This indicator is for **educational and informational purposes only**. It does not constitute financial advice. Leveraged ETFs carry significant risk, including the potential for substantial losses. Always do your own research and consult a qualified financial advisor before trading. Past performance does not guarantee future results.
## What It Does
SOXL Breakout is a day-trading overlay indicator designed for leveraged ETFs (SOXL, TQQQ, etc.) on the **5-minute timeframe**. It automatically plots key price levels each morning and tracks position sizing and P&L across two independent accounts.
## How It Works
Every trading day at **09:25 EST**, the indicator captures the open of that candle and draws three levels:
- **OPEN** — the 09:25 candle's open price (white solid line)
- **TRIGGER** — a configurable percentage above the open (green dashed line, default +1.41%). This is your **buy signal**. When price touches this level during RTH, the indicator enters a simulated long position.
- **STOP LOSS** — a configurable percentage below the trigger (red dashed line, default -8%). If price drops to this level while in a position, the trade is closed at a loss.
### Trade Lifecycle
1. **09:25 EST** — Levels are drawn for the day.
2. **During RTH (09:30–16:00)** — If price hits the TRIGGER, a position is entered at the trigger price. Shares are calculated based on your account size and deploy percentage, rounded down to the nearest 100 shares.
3. **Stop Loss** — If price hits the stop-loss level at any time while in a position (including pre-market the next day), the position is closed.
4. **09:20 EST (next day)** — If still in a position, it is auto-sold at the open price. This is the default exit.
### SOXS (Inverse) Entry
An optional feature for hedging or inverse plays. When enabled, if the TRIGGER was **never hit** during RTH on Monday, Thursday, or Friday, a **SOXS ENTRY** line is drawn at the 15:55 closing price. This signals a potential inverse (bearish) entry.
## The Position Sizing Table
A live overlay table displays:
| Row | Description |
|---|---|
| **Account** | Current account balance (seed + cumulative P&L). Shows before/after transition on trade close. |
| **Running P&L** | Live dollar P&L while in a position, or locked P&L after exit. |
| **Status** | Current state: Waiting, Acct updated, In position, Sold - gain, Sold - loss, Stopped out. |
| **Shares** | Number of shares to trade based on account size, deploy %, and trigger price. |
| **Risk** | Dollar risk and percentage risk per account if stopped out. |
The table supports **two independent accounts** — useful for tracking separate portfolios or different position sizes side by side.
## Settings
### Open Candle Time
- **Open Candle Hour/Minute (EST)** — When to capture the reference candle (default: 09:25)
- **Trigger % above Open** — Percentage above open for the buy trigger (default: 1.41%)
- **Stop Loss % below Trigger** — Percentage below trigger for the stop loss (default: 8.0%)
### Line Colours
- Customize colors for the OPEN, TRIGGER, and STOP LOSS lines.
### SOXS Entry
- **Enable SOXS Entry** — Toggle the inverse entry line feature.
- **SOXS ENTRY colour** — Color for the SOXS entry line.
### Account 1 / Account 2
- **Account Name** — Label shown in the table header.
- **Starting Account ($)** — Your account seed capital. Changing this resets cumulative P&L.
- **Deploy %** — Percentage of account to deploy per trade (default: 80%).
### Display
- **Table Position** — Where to place the position sizing table on the chart.
## Important Notes
- This indicator is designed for the **5-minute timeframe only**. A warning label will appear if applied to any other timeframe.
- Cumulative P&L only updates on **realtime bars** to avoid inflated backtest results.
- Changing the starting account value resets the cumulative P&L counter.
- Shares are always rounded down to the nearest 100.
- The indicator does **not** place actual trades — it is a visual and analytical tool only.
## Disclaimer
This indicator is for **educational and informational purposes only**. It does not constitute financial advice. Leveraged ETFs carry significant risk, including the potential for substantial losses. Always do your own research and consult a qualified financial advisor before trading. Past performance does not guarantee future results.
Release Notes
# SOXL Breakout — Intraday Trading PlanA rules-based Mon–Fri breakout indicator for SOXL, with a SOXS overnight short overlay and live position sizing for two accounts side-by-side.
---
## What it does
- Draws **OPEN**, **TRIGGER** (+1%) and **STOP** (-7%) levels from the 09:25 NY open candle
- Locks share count per account at trigger time and tracks live $ P&L
- Fires a **BUY SOXS** alert at 15:30 NY on the right days (see plan below)
- Reminds you to sell whatever you're holding at next day's 09:30 open
---
## Day-of-Week Plan
| Day | Storm? | Long | Short |
|-----|--------|------|-------|
| Mon | ignore | trigger entry | SOXS @ 16:00 if no trigger |
| Tue | ignore | trigger entry | — |
| Wed | ignore | trigger entry | — |
| Thu | ignore | trigger entry | SOXS @ 16:00 if no trigger |
| Fri | **matters** | only if **no storm** | SOXS @ 16:00 **if storm** |
**Storm = previous day's range (high − low) / low > 15%.**
---
## Setup (do this once)
1. Apply to a **5-minute SOXL chart** (the indicator warns you if not).
2. Open Settings → Account 1 and Account 2:
- Enter your **Account Name** and **Available Account ($)**.
- Set **Deploy %** (minimum 80%, rounded UP to the nearest 100 shares).
3. Confirm SOXS symbol (default `AMEX:SOXS`).
4. Right-click the indicator → **Add alert on…** → select **Any alert() function call**. This single alert covers both the SOXS-buy reminder and the extended-hours stop-loss.
---
## Daily Workflow
| Time (NY) | What happens |
|-----------|-------------|
| 09:20 | Update each account's **Available Account ($)** with your live balance |
| 09:25 | Script captures the open and draws OPEN / TRIGGER / STOP lines |
| 09:30+ | If SOXL ≥ TRIGGER → buy at trigger price (table shows locked shares & risk) |
| Intraday | If SOXL ≤ STOP → sell, table shows locked loss |
| 15:30 | If today qualifies (see plan), the **BUY SOXS** alert fires once |
| 16:00 | Buy SOXS at the close (LOC). Sell at next day's 09:30 open |
| Next 09:30 | Sell whatever's open (SOXL from yesterday's trigger or SOXS overnight) |
---
## Tables on the chart
**Position Sizing** (default: Bottom Left)
- **Available** — your current balance per account
- **Status** — Waiting / Waiting for trigger / In pos (live $ P&L) / Stopped (locked loss)
- **Shares** — share count locked at trigger time
- **Risk** — % and $ at risk if stop hits
- **Prev Range** — yesterday's range with ⛈ STORM / ✅ calm marker
- **SOXS** — live share count and $ size for the overnight short
**Day-of-Week Plan** (default: Top Right)
- Quick reference of the rules above. Today's row highlights cyan.
Both tables have toggles in **Settings → Display**.
---
## Inputs you'll touch most
- **Account 1/2 → Available Account ($)** — update every morning
- **Account 1/2 → Deploy %** — your sizing (≥ 80%)
- **Storm Range Threshold (%)** — default 15
- **SOXS Alert Hour/Minute** — default 15:30 NY
---
## Alerts
- 🚨 **BUY SOXS NOW** — fires once at the alert time on a qualifying day
- 🚨 **STOP LOSS HIT** — fires outside RTH if SOXL crosses your stop while you're holding
---
## Notes
- Stops are intraday market exits; if hit outside RTH, you'll get the alert and need to close manually.
- Share counts always round **UP** to the nearest 100, so realized deployment ≥ your set %.
- Storm Skip half-sizing for Mon–Thu has been removed — those days now deploy full size regardless of yesterday's range. Storm only matters on Fridays.
---
## Disclaimer
This is a trading aid, not financial advice. Backtests use historical data and do not guarantee future results. SOXL/SOXS are 3× leveraged ETFs — drawdowns can be severe. Use at your own risk.
---
---
# 🇰🇷 SOXL Breakout — 한국어 안내
월~금 단순 룰 기반 SOXL 돌파 인디케이터입니다. SOXS 야간 숏 오버레이가 같이 들어 있고, 두 계좌를 동시에 보면서 사이즈/손익을 실시간으로 확인할 수 있어요.
---
## 무엇을 해주나요
- **OPEN / TRIGGER (+1%) / STOP (-7%)** 가격선을 09:25 NY 캔들에서 자동으로 그려줍니다
- 트리거 닿는 순간 계좌별 주식 수를 락(lock)하고 실시간 $ 손익을 표시
- 정해진 날에는 **15:30 NY**에 "SOXS 사세요" 알람이 울려요
- 다음날 **09:30 NY** 시초가에 보유 종목을 매도하라고 알려줍니다
---
## 요일별 룰
| 요일 | 폭풍? | 롱 (SOXL) | 숏 (SOXS) |
|------|-------|----------|----------|
| 월 | 무시 | 트리거 진입 | 트리거 안 닿으면 16:00에 SOXS |
| 화 | 무시 | 트리거 진입 | — |
| 수 | 무시 | 트리거 진입 | — |
| 목 | 무시 | 트리거 진입 | 트리거 안 닿으면 16:00에 SOXS |
| 금 | **중요** | **폭풍 아닌 날만** 진입 | **폭풍이면** 16:00에 SOXS |
**폭풍(Storm) = 어제 캔들 (고가 − 저가) / 저가 > 15%**
---
## 처음 한 번만 세팅
1. **SOXL 5분봉 차트**에 적용 (틀리면 경고가 뜹니다)
2. 설정창에서 계좌 1, 2 입력:
- **Account Name** (계좌 이름)
- **Available Account ($)** (현재 가용 잔고)
- **Deploy %** (최소 80%, 100주 단위로 올림)
3. SOXS 심볼 확인 (기본 `AMEX:SOXS`)
4. 인디케이터 우클릭 → **알람 추가** → **Any alert() function call** 선택. 이 알람 하나면 SOXS 매수 알람과 장외 손절 알람이 모두 작동합니다.
---
## 매일 흐름
| 시간 (NY) | 할 일 |
|-----------|------|
| 09:20 | 계좌별 **Available Account ($)** 를 현재 잔고로 업데이트 |
| 09:25 | 스크립트가 시초가를 잡고 OPEN/TRIGGER/STOP 선을 그림 |
| 09:30~ | SOXL이 TRIGGER 닿으면 트리거 가격에 매수 (테이블에 주식 수/리스크 표시) |
| 장중 | SOXL이 STOP 닿으면 매도, 테이블에 확정 손실 표시 |
| 15:30 | 오늘 SOXS 사야 하는 날이면 **BUY SOXS** 알람이 한 번 울림 |
| 16:00 | 종가에 SOXS 매수 (LOC 주문). 다음날 09:30에 매도 |
| 다음날 09:30 | 보유 종목(어제 산 SOXL이든 SOXS든) 시초가 매도 |
---
## 차트 위 테이블
**Position Sizing** (기본 위치: 좌하단)
- **Available** — 계좌별 현재 잔고
- **Status** — 대기 / 트리거 대기 / 보유 중 (실시간 $ 손익) / 손절 (확정 손실)
- **Shares** — 트리거 시점에 락된 주식 수
- **Risk** — 손절 시 손실 (% / $)
- **Prev Range** — 어제 캔들 범위 + ⛈ 폭풍 / ✅ 평온 표시
- **SOXS** — 야간 숏 주식 수 / 금액
**Day-of-Week Plan** (기본 위치: 우상단)
- 위 룰을 차트에서 바로 볼 수 있도록. 오늘 행이 시안색으로 강조됩니다.
두 테이블 모두 **설정 → Display** 에서 토글 가능.
---
## 자주 만지는 입력값
- **계좌 1/2 → Available Account ($)** — 매일 아침 업데이트
- **계좌 1/2 → Deploy %** — 사이즈 (80% 이상)
- **Storm Range Threshold (%)** — 기본 15
- **SOXS Alert Hour/Minute** — 기본 15:30 NY
---
## 알람
- 🚨 **BUY SOXS NOW** — 해당 요일/조건에서 알람 시간에 한 번 울림
- 🚨 **STOP LOSS HIT** — 장외에 SOXL이 손절선 닿으면 울림 (수동 청산 필요)
---
## 알아둘 점
- 손절은 장중 시장가 청산 기준. 장외에 닿으면 알람만 울리고 직접 닫아야 합니다.
- 주식 수는 항상 100주 단위로 **올림**해서, 실 배포율은 설정값 이상.
- 월~목 폭풍 절반 사이즈 룰은 제거되었습니다. 폭풍은 **금요일에만** 의미가 있어요.
---
## 면책
이건 매매 보조 도구이지 투자 자문이 아닙니다. 백테스트는 과거 데이터 기반이고 미래 수익을 보장하지 않아요. SOXL/SOXS는 3배 레버리지 ETF — 손실이 클 수 있습니다. 본인 책임 하에 사용하세요.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.