← Script Vault

Indicator | Published 2022-12-31

Range Bound Trailing Stop Loss

Built on Signal Lynx's Range Bound indicator, this overlay draws three trailing-stop levels and flags potential stop conditions. Its example trade-direction logic is deliberately basic.

Range Bound Trailing Stop Loss chart screenshot

Indicator

Range Bound Trailing Stop Loss — Indicator Signal Lynx | Free TradingView Scripts | Pine Script v5 Original release: December 31, 2022

1. Overview This indicator builds on Signal Lynx's Range Bound code. It uses range-derived levels to visualize potential trailing-stop conditions for an assumed long or short trade. It is a charting and labeling tool, not an automatically executed brokerage stop order.

2. How it works The script monitors range values derived from highs, lows, opens, and closes. It then checks whether a selected trailing-stop level moves against the assumed trade direction and draws a label when a trigger condition occurs. There are three levels: - L1: short-term range high/low, the most conservative - L2: closing-price range levels, with more room for price movement - L3: longer-term range high/low, the loosest level

A trigger resets when its trailing level resumes movement in the trade's direction, so multiple L1 labels can appear during one trade.

3. Important limitations The included long/short direction logic is intentionally basic. Replace that example with your own position-state logic before using these levels as part of a trading system. The script produces chart labels; TradingView alerts would require adapting the trigger conditions.

For the underlying range calculations, see the separate Signal Lynx Range Bound indicator.

Signal Lynx — Automation for the Night-Shift Nation. https://www.signallynx.com

Get the Pine Code

Copy the full Pine code or download the .pine file. You don't need an account.

Indicator (Pine Script v5)

The source files include their author credits and license notices. Please follow those terms when you reuse the code.