IFT Stochastic + Trailing Stop
Jun 28, 2019

The IFT Stochastic + Trailing Stop indicator provides a systematic trend-following strategy that combines Inverse Fisher Transform logic with Renko-based volatility filtering and a trailing stop mechanism. It is designed to navigate flat market periods by utilizing mid-wave length analysis and volatility-adjusted entry/exit points.
Usage
The Usage section describes how the script can be used, particularly in identifying trend reversals and managing trade exits through volatility-based boundaries.
Renko Filtering
The script generates signals based on synthetic Renko price movement. By default, it looks for crossovers in the Renko calculation to determine market direction. Users can toggle between ATR-based Renko (adaptive to volatility) or Traditional Renko (fixed price movement) to define the sensitivity of the trend detection.
Stochastic Filtration
For users seeking more refined entries, the "Use stochastic filtration" setting enables an additional layer of confirmation. When active, long trades are only triggered if the price shows a Renko crossover while the Stochastic oscillator is crossing above the lower level. Conversely, short trades require a cross below the upper level.
Warning Zones and Trailing Stops
The indicator plots dynamic warning zones based on a percentage of the Renko brick size. These zones act as a trailing stop-loss mechanism; if the price crosses into the warning zone (halfway into the previous Renko movement), a "close" signal is triggered, visualized by arrows or colored bars to warn of potential trend exhaustion.
Details
The script operates by calculating a synthetic price series based on Renko logic via the ticker.renko function. This smooths out price action and focuses on significant price movements rather than time-based fluctuations.
The Inverse Fisher Transform approach is applied to the Stochastic oscillator to create a more responsive and "square-wave" like output, making it easier to identify overbought and oversold conditions. The strategy execution includes commission modeling (default 0.0454%) and equity management (100% of equity) to provide a realistic backtesting framework.
Original code by @laptevmaxim92; refactored and visually updated for improved alert handling and clarity.
Settings
General Settings
- ATR Length: Sets the lookback period for the Average True Range if ATR Renkos are enabled.
- ATR Renkos?: Toggles between ATR-based brick sizes and Traditional fixed brick sizes.
- Input value for Non-ATR Renkos: Defines the price step for traditional Renko bricks.
- Warning zone, % of Renko: Adjusts the sensitivity of the trailing stop warning area.
Timeframe & Visuals
- Use Current Chart Resolution?: When enabled, uses the chart's timeframe for calculations.
- Use Different Timeframe: Allows the script to fetch data from a specific timeframe (default is 1 minute).
- Plot buy/sell arrows: Toggles the visibility of entry signals.
- Plot arrows if price cross warning zone: Displays exit/warning signals.
- Colored warning/entry bars: Changes the color of the price bars based on active signals.
Stochastic Settings
- Use stochastic filtration: Enables the Stochastic oscillator as a mandatory filter for entries.
- Length for Main Stochastic: The lookback period for the raw Stochastic calculation.
- SmoothK / SmoothD: Smoothing periods for the %K and %D lines.
- Upper/Lower Level %: Defines the thresholds for overbought and oversold zones.
FAQ
How do I interpret the warning zones on the chart? The warning zones are plotted as shaded areas around the Renko levels. If the current price enters these zones, it suggests the trend is weakening, often triggering a trailing stop exit signal.
What is the benefit of using Stochastic filtration? Using the filter helps reduce "whipsaw" signals in ranging markets by ensuring that entries only occur when the momentum (via Stochastic) aligns with the price trend (via Renko).
How can I access this tool? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

