Mar 8, 2025
Time Based Reversion

Let’s Get to Work.
Introduction
The Uptrick: Time Based Reversion indicator is designed to provide a comprehensive view of market momentum and potential trend shifts by combining multiple moving averages, a streak-based trend analysis system, and adaptive color visualization. It helps traders identify strong trends, spot potential reversals, and make more informed trading decisions.
Purpose
The primary goal of this indicator is to assist traders in distinguishing between sustained market movements and short-lived fluctuations. By evaluating how price behaves relative to its moving averages, and by measuring consecutive streaks above or below these averages, the indicator highlights areas where trends are likely to continue or lose momentum.
Overview
Uptrick: Time Based Reversion calculates one or more moving averages of price data and then tracks the number of consecutive bars (streaks) above or below these averages. This streak-based detection provides insight into whether a trend is gaining strength or nearing a potential reversal point. The indicator offers:
• Multiple moving average types (SMA, EMA, WMA)
• Optional second and third moving average layers for additional smoothing of first moving average
• A streak detection system to quantify trend intensity
• A dynamic color scheme that changes with streak strength
• Optional buy and sell signals for potential trade entries and exits
• A ribbon mode that applies moving averages to Open, High, Low, and Close prices for a more detailed visualization of overall trend alignment
Originality and Uniqueness
Unlike traditional moving average indicators, Uptrick: Time Based Reversion incorporates a streak measurement system to detect trend strength. This approach helps clarify whether a price movement is merely a quick fluctuation or part of a longer-lasting trend. Additionally, the optional ribbon mode extends this logic to Open, High, Low, and Close prices, creating a layered and intuitive visualization that shows complete trend alignment.
Inputs and Features
1. Enable Ribbon Mode
This input lets you activate or deactivate the ribbon display of multiple moving averages. When enabled, the script plots moving averages for the Open, High, Low, and Close prices and uses color fills to show whether these four data points are collectively above or below their respective moving averages.
2. Color Scheme Selection
Users can choose from several predefined color schemes, such as Default, Emerald, Crimson, Sapphire, Gold, Purple, Teal, Orange, Gray, Lime, or Aqua. Each scheme assigns distinct bullish, bearish and neutral colors..
3. Show Buy/Sell Signals
The indicator can display buy or sell signals based on its streak analysis logic. These signals appear as markers on the chart, indicating a “Safe Uptrend” (buy) or “Safe Downtrend” (sell).
4. Moving Average Types and Lengths
• First MA Type and Length: Choose SMA, EMA, or WMA along with a customizable period.
• Second and Third MA Types and Lengths: You can optionally stack additional moving averages for further smoothing, each with its own customizable type and period.
5. Streak Threshold Multiplier
This numeric input determines how strong a streak must be before the script considers it a “safe” trend. A higher multiplier requires a longer or more intense streak for a buy or sell signal.
6. Dynamic Transparency Calculation
The color intensity adapts to the streak’s strength. Longer streaks increase the transparency of the opposing color, making the current dominant color stand out. This feature ensures that a vigorous uptrend or downtrend is visually distinct from short-lived or weaker moves.
7. Ribbon Moving Averages
In ribbon mode, the script calculates moving averages for the Open, High, Low, and Close prices. Each of these is optionally smoothed again if the second and/or third moving average layers are active. The final result is a ribbon of moving averages that helps confirm whether the market is uniformly aligned above or below these key reference points.
Calculation Methodology
1. Initial Moving Average
The script calculates the first moving average (SMA, EMA, or WMA) of the closing price over a user-defined period.
2. Optional Secondary and Tertiary Averages
If selected, the script then applies a second and/or third smoothing step. Each of these steps can be a different type of moving average (SMA, EMA, or WMA) with its own period length.
3. Streak Detection
The indicator counts consecutive bars above or below the smoothed moving average. A running total (streakUp or streakDown) increments with every bar that remains above or below that average.
4. Reversion Intensity
The script compares the current streak value to its own average (calculated over the final chosen period). This ratio determines whether the streak is nearing a likely reversion or is strong enough to continue.
5. Color Assignment and Signals
The indicator calculates color transparency based on streak intensity. Buy and sell signals appear when the streak meets or exceeds the threshold multiplier, indicating a safe uptrend or downtrend.
Color Schemes and Visualization
This indicator offers multiple predefined color sets. Each scheme specifies a unique bullish color, bearish color and neutral color. The script automatically varies transparency to highlight strong trends and fade weaker ones, making it visually clear when a trend is intensifying or losing momentum.
Smoothing Techniques
By allowing up to three layers of moving average smoothing, the indicator accommodates different trading styles. A single layer provides faster reactions to market changes, while more layers reduce noise at the cost of slower responsiveness. Traders can choose the right balance between responsiveness and stability for their strategy, whether it is short-term scalping or long-term trend following.
Why It Combines Specific Smoothing Techniques
The Uptrick: Time Based Reversion indicator strategically combines specific smoothing techniques—SMA, EMA, and WMA—to leverage their complementary strengths. The SMA provides stable and consistent trend identification by equally weighting all data points, while the EMA emphasizes recent price movements, allowing quicker responses to market changes. WMA enhances sensitivity to recent price shifts, which helps in detecting subtle momentum changes early. By integrating these methods in layers, the indicator effectively balances responsiveness with stability, helping traders clearly identify genuine trend changes while filtering out short-term noise and false signals.
Ribbon Mode
If Open, High, Low, and Close prices remain above or below their respective moving averages consistently, the script colors the bars fully bullish or bearish. When the data points are mixed, a neutral color is applied. This mode provides a thorough perspective on whether the entire price range is aligned in one direction or showing conflicting signals.
Summary
Uptrick: Time Based Reversion combines multiple moving averages, streak detection, and dynamic color adjustments to help traders identify significant trends and potential reversal areas. Its flexibility allows it to be used either in a simpler form, with one moving average and streak analysis, or in a more advanced configuration with ribbon mode that charts multiple smoothed averages for a deeper understanding of price alignment. By adapting color intensities based on streak strength and providing optional buy/sell signals, this indicator delivers a clear and flexible tool suited to various trading strategies.
Disclaimer
This indicator is designed as an analysis aid and does not guarantee profitable trades. Past performance does not indicate future success, and market conditions can change unexpectedly. Users are advised to employ proper risk management and thoroughly evaluate trades before taking positions. Use this indicator as part of a broader strategy, not as a sole decision-making tool.