Contrarian Scalping Counter Trend Bb Envelope Adx and Stochastic
Dec 15, 2021

The Contrarian Scalping Counter Trend Bb Envelope Adx and Stochastic indicator tool provides a comprehensive framework for identifying counter-trend trading opportunities by combining volatility bands with momentum and trend strength filters.
Usage
The Usage section focuses on identifying extreme price exhaustion points where a reversal is likely to occur. This strategy is primarily used for scalping in environments where price deviates significantly from its mean but lacks strong directional momentum.
Entry Rules:
- Long Entry: Triggered when the price closes below both the lower Bollinger Band and the lower Envelope, provided the ADX is below 30 (indicating a weak trend) and the Stochastic oscillator is below 50.
- Short Entry: Triggered when the price closes above both the upper Bollinger Band and the upper Envelope, provided the ADX is below 30 and the Stochastic oscillator is above 50.
Exit Rules:
- Long Exit: Occurs when the price closes above either the upper Bollinger Band or the upper Envelope, or when the Stochastic oscillator crosses above 50.
- Short Exit: Occurs when the price closes below either the lower Bollinger Band or the lower Envelope, or when the Stochastic oscillator crosses below 50.
Details
This script integrates four distinct technical indicators to validate contrarian setups:
- Bollinger Bands & Envelopes: These act as volatility-based boundaries. Requiring the price to breach both layers ensures that the asset is significantly overextended before a signal is generated.
- Average Directional Index (ADX): Used as a trend filter. By requiring ADX to be below 30, the script avoids entering counter-trend trades during strong breakouts or trending markets where "oversold" or "overbought" conditions can persist.
- Stochastic Oscillator: Provides a final momentum confirmation to ensure the entry aligns with the early stages of a mean-reversion move.
Settings
Bollinger Bands
- Length BB: The lookback period for the Bollinger Bands moving average.
- Source: The price data used for calculations (default is Close).
- StdDev BB: The multiplier for the standard deviation bands.
Envelope
- Length Envelope: The lookback period for the Envelope's central moving average.
- Percent Envelope: The percentage offset used to create the upper and lower envelope bands.
- Exponential: Toggles between Simple Moving Average (SMA) and Exponential Moving Average (EMA) for the envelope calculation.
ADX
- ADX Smoothing: The smoothing period for the ADX calculation.
- DI Length: The period for the Directional Indicators (+DI and -DI).
Stochastic
- %K Length: The lookback period for the raw Stochastic calculation.
- %K Smoothing: The smoothing period applied to the %K line.
FAQ
How do I use the Contrarian Scalping Counter Trend indicator?
Apply it to your chart and look for the combined signals where price breaches the outer bands while the ADX and Stochastic filters are met. It is best suited for ranging or low-volatility markets.
Can I adjust the sensitivity of the signals?
Yes, by modifying the "Percent Envelope" or "StdDev BB" settings, you can widen or narrow the entry requirements to capture more or fewer trades based on market volatility.
How can I access the Contrarian Scalping Counter Trend Bb Envelope Adx and Stochastic?
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.

