ST0P
Apr 17, 2020

The ST0P indicator provides a highly customizable trailing stop loss system that allows traders to define risk levels based on percentage-based or unit-based price offsets for both long and short positions.
Usage
The Usage section describes how to implement the trailing stop logic into a trading strategy. Users must first select the trade direction using the "LONG=1 SHORT=2" setting to align the indicator with their current market bias. Once the direction is set, the stop loss distance can be fine-tuned using either a percentage of the current price or a fixed unit difference.
- Long Positions: When set to Long (1), the indicator plots a trailing floor below the price. If the price drops below this line, a sell signal is triggered, indicating the stop loss has been hit.
- Short Positions: When set to Short (2), the indicator plots a trailing ceiling above the price. If the price rises above this line, a buy signal is triggered to cover the position.
- Signal Interpretation: The indicator includes visual labels ("ST0P") and optional background highlighting to clearly identify when price action has invalidated the current stop level.
Details
The ST0P indicator, developed by Kıvanç Özbilgiç, addresses the limitations of standard stop loss tools by allowing manual adjustment of both percentage and absolute unit changes simultaneously.
The mathematical construction relies on recursive logic to ensure the stop level only moves in the direction of the trade, preventing the stop from loosening as price fluctuates. For long positions, the script calculates a potential stop level (longVal) by subtracting the unit and percentage values from the source price. It then compares this to the previous bar's stop value to ensure the level only stays the same or moves upward. A similar inverse logic is applied to short positions to ensure the ceiling only stays the same or moves downward.
Settings
- Percent: A float input that determines the stop loss distance as a percentage of the source price.
- Source: Defines the price data used for calculations (e.g., Close, HL2, OHLC4).
- LONG=1 SHORT=2: A toggle to switch the indicator logic between long trade tracking (1) and short trade tracking (2).
- Unit: A float input that adds a fixed price-point difference to the stop loss calculation.
- Show ST0P Signals?: A boolean toggle to enable or disable the visual "ST0P" labels on the chart.
- Highlighter On/Off?: A boolean toggle to enable or disable the background color fill between the price and the stop line.
FAQ
How does the "Unit" setting differ from the "Percent" setting? The Percent setting adjusts the stop loss distance relative to the asset's price, making it dynamic to volatility, while the Unit setting applies a fixed numerical value (e.g., $1.00 or 0.10 points) regardless of the price level.
Can I use the ST0P indicator for automated alerts? Yes, the script includes optimized alert conditions for both long and short positions. You can configure alerts to trigger whenever the price crosses the calculated stop loss line.
How do I access the ST0P indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.