Risk Management Layer for LuxAlgo Premium Indicator
A TradingView indicator that reads sources from the LuxAlgo Premium indicator and adds a dynamic trailing stop loss system on top, with reset logic and full Heikin Ashi compatibility.
A reliable dynamic trailing stop loss layer built on top of LuxAlgo, with shrinking swing lookback, reset logic, and tested alert delivery on Heikin Ashi charts
The Brief
The client was already using LuxAlgo for trade entries and needed a separate indicator to handle stop loss management. The indicator had to read LONG, SHORT, and RESET signals externally, trail the stop loss dynamically as the trade progressed, and fire alerts when the stop was hit.
What We Built
The indicator activates when it receives a LONG or SHORT signal and begins tracking a dynamic swing-based stop loss. The lookback window starts at 50 bars and reduces by 1 every 3 bars, tightening down to a minimum of 5. This creates a trailing effect that gradually closes in on price as the trade matures.
When a RESET signal is received, the trade is deactivated, the lookback resets to its initial value, and a label appears on the chart confirming the reset. Stop loss lines and visual markers only appear when a trade is active, keeping the chart clean otherwise.
A green X marks a long stop out below the candle, a red X marks a short stop out above it. All calculations use raw OHLC values from Heikin Ashi candles rather than the smoothed visuals, ensuring the logic is accurate regardless of the chart type in use.
On Heikin Ashi charts, alerts are handled using a strategy-based approach to ensure they fire consistently on intra-bar conditions.
Interested in a similar project?
Get in touch