OPEN-SOURCE SCRIPT
Updated Risk Sizer

### Risk Sizer
**Risk Sizer** is a fast position-sizing and execution-risk tool designed for discretionary intraday and breakout trading.
Instead of choosing a position size first, place the draggable **SL** at the level where your trade idea is invalidated. Risk Sizer then calculates the position size based on your account risk while accounting for trading costs and execution conditions.
The indicator displays:
* **REC QTY** — liquidity-adjusted recommended position size
* **RISK QTY** — maximum size based on your configured risk
* **POSITION** — recommended position notional
* **SL** — stop price and percentage distance
* **ATR** — ATR for the current chart timeframe
* **SL / ATR** — stop distance relative to current volatility
* **BUFFER** — configurable slippage/execution allowance
* **RT FEES** — estimated round-trip trading fees
* **FEE / SL** — how significant fees are relative to the stop distance
* **RISK USED** — estimated total risk versus your configured risk budget
* **CAP USED** — percentage of the configured maximum position limit
* **1M LIQ** — average 1-minute notional volume used as a liquidity proxy
* **LIQ MULT** — suggested size reduction when the position is large relative to observed volume
* **EXECUTION** — simple green / amber / red execution warnings
### Position sizing
Position size accounts for:
**Structural SL + execution buffer + estimated round-trip fees**
This helps prevent extremely tight stops from producing unrealistically large position sizes.
For example, if your stop is only `0.01%` but your round-trip trading costs are `0.08%`, fees are already significantly larger than the structural stop. Risk Sizer highlights this through the **FEE / SL** metric and includes those costs when determining size.
### Liquidity-adjusted sizing
Risk Sizer also calculates an optional liquidity recommendation using average **1-minute PulseWire notional volume**.
If your risk-based position would represent more than your configured target percentage of average 1-minute volume, the indicator reduces the recommended size and shows the resulting **LIQ MULT**.
Example:
```text
RISK QTY 100 ETH
LIQ MULT 0.40x
REC QTY 40 ETH
```
The risk-based quantity remains visible so you can distinguish between:
**Risk capacity** — how much you could trade based on your stop and risk budget.
**Execution capacity** — a more conservative recommendation based on observed market activity.
### Execution status
The indicator classifies conditions into simple execution warnings.
**Green — OK**
No obvious sizing or execution issue detected.
**Amber — Review**
* High fees relative to SL
* Very tight or wide SL relative to ATR
* Liquidity-based size reduction
* Position notional cap reached
**Red — Attention**
* Round-trip fees exceed the structural SL percentage
* Invalid or impractical calculated position size
### Typical workflow
**1. Identify the trade setup**
**2. Drag SL to structural invalidation**
**3. Check EXECUTION status**
**4. Read REC QTY**
**5. Execute**
The indicator is intentionally designed for quick visual use during fast-moving markets.
### Important limitations
The liquidity model is a **proxy**, not an order-book or slippage prediction.
It uses PulseWire's available 1-minute volume data and does not know the actual depth, spread, liquidity-provider inventory, or execution quality available at your broker or exchange.
Actual fills may differ due to:
* Spread
* Order-book depth
* Market impact
* Latency
* Volatility
* Slippage
* Broker/exchange execution
* Fees and instrument specifications
Fees, quantity increments, point value, maximum notional and liquidity thresholds are configurable and should be adjusted to match the instrument and venue you trade.
**Risk Sizer is an execution and risk-management aid, not a trading signal or financial advice.**
**Risk Sizer** is a fast position-sizing and execution-risk tool designed for discretionary intraday and breakout trading.
Instead of choosing a position size first, place the draggable **SL** at the level where your trade idea is invalidated. Risk Sizer then calculates the position size based on your account risk while accounting for trading costs and execution conditions.
The indicator displays:
* **REC QTY** — liquidity-adjusted recommended position size
* **RISK QTY** — maximum size based on your configured risk
* **POSITION** — recommended position notional
* **SL** — stop price and percentage distance
* **ATR** — ATR for the current chart timeframe
* **SL / ATR** — stop distance relative to current volatility
* **BUFFER** — configurable slippage/execution allowance
* **RT FEES** — estimated round-trip trading fees
* **FEE / SL** — how significant fees are relative to the stop distance
* **RISK USED** — estimated total risk versus your configured risk budget
* **CAP USED** — percentage of the configured maximum position limit
* **1M LIQ** — average 1-minute notional volume used as a liquidity proxy
* **LIQ MULT** — suggested size reduction when the position is large relative to observed volume
* **EXECUTION** — simple green / amber / red execution warnings
### Position sizing
Position size accounts for:
**Structural SL + execution buffer + estimated round-trip fees**
This helps prevent extremely tight stops from producing unrealistically large position sizes.
For example, if your stop is only `0.01%` but your round-trip trading costs are `0.08%`, fees are already significantly larger than the structural stop. Risk Sizer highlights this through the **FEE / SL** metric and includes those costs when determining size.
### Liquidity-adjusted sizing
Risk Sizer also calculates an optional liquidity recommendation using average **1-minute PulseWire notional volume**.
If your risk-based position would represent more than your configured target percentage of average 1-minute volume, the indicator reduces the recommended size and shows the resulting **LIQ MULT**.
Example:
```text
RISK QTY 100 ETH
LIQ MULT 0.40x
REC QTY 40 ETH
```
The risk-based quantity remains visible so you can distinguish between:
**Risk capacity** — how much you could trade based on your stop and risk budget.
**Execution capacity** — a more conservative recommendation based on observed market activity.
### Execution status
The indicator classifies conditions into simple execution warnings.
**Green — OK**
No obvious sizing or execution issue detected.
**Amber — Review**
* High fees relative to SL
* Very tight or wide SL relative to ATR
* Liquidity-based size reduction
* Position notional cap reached
**Red — Attention**
* Round-trip fees exceed the structural SL percentage
* Invalid or impractical calculated position size
### Typical workflow
**1. Identify the trade setup**
**2. Drag SL to structural invalidation**
**3. Check EXECUTION status**
**4. Read REC QTY**
**5. Execute**
The indicator is intentionally designed for quick visual use during fast-moving markets.
### Important limitations
The liquidity model is a **proxy**, not an order-book or slippage prediction.
It uses PulseWire's available 1-minute volume data and does not know the actual depth, spread, liquidity-provider inventory, or execution quality available at your broker or exchange.
Actual fills may differ due to:
* Spread
* Order-book depth
* Market impact
* Latency
* Volatility
* Slippage
* Broker/exchange execution
* Fees and instrument specifications
Fees, quantity increments, point value, maximum notional and liquidity thresholds are configurable and should be adjusted to match the instrument and venue you trade.
**Risk Sizer is an execution and risk-management aid, not a trading signal or financial advice.**
Release Notes
OverviewRisk Sizer is a fast position-sizing and execution-risk tool built for scalping.
The idea is simple:
- Identify where the trade thesis becomes invalid.
- Drag the SL line to that price.
- Read the recommended position size.
- Check execution conditions.
- Execute.
The goal is to answer one question quickly:
“How much should I trade if this is where I am wrong?”
How It Works
Risk Sizer starts with your account size and configured risk percentage.
For example:
Account Size: $100,000
Risk Per Trade: 0.50%
Risk Budget: $500
You then place the draggable SL at your structural invalidation level.
Instead of calculating position size from stop distance alone, Risk Sizer accounts for:
- Stop distance
- Slippage / execution buffer
- Estimated trading fees
- Maximum position size
- Optional liquidity-based size reduction
This becomes especially important with very tight stops, where traditional position-sizing formulas can otherwise produce unrealistically large positions.
Example — Normal Breakout
Assume ETH is trading around $1,917 and your structural stop is approximately 0.20% away.
Your configured risk budget is $500.
Risk Sizer may calculate:
RISK QTY: 88.24 ETH
However, if that position is unusually large relative to recent 1-minute PulseWire volume, the liquidity model may recommend a smaller size.
For example:
RISK QTY: 88.24 ETH
Liquidity Multiplier: 0.50x
REC QTY: 44.12 ETH
RISK USED: approximately $250 / $500
The trade intentionally uses less than the maximum risk budget because execution conditions suggest using a smaller position.
Example — Extremely Tight Stop
Consider a trade with:
Structural SL: 0.01%
Round-trip fees: 0.08%
A traditional position calculator may produce an extremely large position because the stop is tiny.
Risk Sizer recognizes that trading fees alone are eight times larger than the structural stop:
FEE / SL = 8.00x
The indicator includes those costs when calculating position size and highlights:
FEES > SL
This helps prevent microscopic stops from generating unrealistic position sizes.
The Execution HUD
The interface is intentionally compact and prioritizes information needed during a fast-moving trade.
REC QTY
The primary execution number.
REC QTY is the final recommended position size after risk sizing, position limits, and any optional liquidity adjustment.
RISK QTY
The maximum quantity allowed by the configured risk model before liquidity adjustment.
SL
Shows the structural stop price and percentage distance from the current market price.
RISK
Shows estimated risk for the recommended position compared with the configured maximum risk budget.
Estimated risk includes:
- Structural SL loss
- Execution buffer
- Estimated round-trip fees
SL / ATR
SL / ATR compares the structural stop distance with ATR on the current chart timeframe.
Very small values can indicate that the stop is sitting inside normal market noise.
Very large values can indicate a wide structural stop or an entry relatively far from invalidation.
SL / ATR is context — not a trading signal or mandatory stop rule.
FEES
FEES displays the estimated round-trip trading cost of the recommended position and compares those fees with the structural stop.
LIQ LOAD
LIQ LOAD compares the original risk-sized position with average 1-minute notional volume on the PulseWire instrument.
For example:
LIQ LOAD: 285% → 0.25x
This means the original risk-sized position is approximately 2.85 times average 1-minute traded notional, and the liquidity model recommends using 25% of that position.
Liquidity Model
Risk Sizer intentionally uses a simple soft liquidity haircut rather than pretending to predict exact market impact.
The default model is:
Below 5% load → 1.00x
5–10% → 0.90x
10–20% → 0.75x
20–40% → 0.50x
40–75% → 0.35x
Above 75% → 0.25x
These are conservative execution-risk heuristics.
They are not predictions of actual slippage.
Execution Status
Risk Sizer summarizes the most important condition in the EXECUTION row.
OK
No obvious sizing or execution problem was detected.
LIQUIDITY LIMITED
The recommended position was reduced because the theoretical risk-sized position is large relative to recent 1-minute PulseWire volume.
HIGH FEES
Trading costs are becoming significant relative to the structural stop.
TIGHT SL
The structural stop is extremely small relative to current market volatility.
POSITION CAPPED
The calculated position exceeded the configured maximum notional position size.
FEES > SL
Estimated round-trip fees are larger than the structural stop percentage.
This highlights situations where transaction costs are dominating the intended stop distance.
Typical Workflow
- Identify the trade setup.
- Determine where the idea becomes invalid.
- Drag the SL line to that level.
- Read REC QTY.
- Check SL / ATR, FEES and LIQ LOAD.
- Check EXECUTION.
- Place the trade.
Important Liquidity Limitation
The liquidity calculation is a proxy — not an order-book or slippage prediction.
Risk Sizer uses available PulseWire 1-minute traded volume.
It does not have access to your broker or exchange's complete executable order book.
Actual execution can be affected by:
- Bid/ask spread
- Order-book depth
- Market impact
- Volatility
- Latency
- Order type
- Liquidity providers
- Broker or exchange execution
A high LIQ LOAD should therefore be interpreted as:
“This position is large relative to recent visible market activity.”
It should not be interpreted as a precise prediction of how much slippage the order will experience.
Customization
The following parameters can be configured:
- Account size
- Risk percentage
- Execution/slippage buffer
- Trading fees
- Fee multiplier
- ATR settings
- Quantity increment
- Contract point value
- Maximum position notional
- Liquidity recommendation
These settings should be adjusted to match the instrument and trading venue being used.
Purpose
Risk Sizer is designed to quickly answer:
- Where am I wrong?
- How much can I risk?
- How large should the position be?
- Are trading costs becoming significant?
- Is my position unusually large relative to recent market activity?
Risk Sizer is an execution and risk-management aid. It does not generate buy or sell signals and is not financial advice.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
