ATAMOKU: A Hierarchical Scoring Tool Based on Ichimoku Principle
Overview and Purpose of ATAMOKU
The name "ATAMOKU" combines “Ata” (meaning “ancestor” in Turkish) and “Moku” (meaning “cloud” in Japanese). ATAMOKU is built on Ichimoku principles, designed to assist traders in analyzing trend direction and strength. By providing a structured, score-based approach, ATAMOKU aims to make Ichimoku data more accessible for identifying potential entry and exit points.
How ATAMOKU Works
ATAMOKU uses Ichimoku’s essential elements—including the Conversion Line (Tenkan-sen), Base Line (Kijun-sen), and Leading Spans A and B—and applies a scoring hierarchy to assess market conditions. The scoring system measures trend strength and alignment by comparing the relationships between these elements. This method allows ATAMOKU to produce an objective score that reflects whether the market is in an “ideal” or “non-ideal” state.
Key Features of ATAMOKU
1 - Hierarchy-Based Scoring System:
ATAMOKU calculates a score that represents the strength and direction of the current trend. Each component of Ichimoku is assigned a weight, and the indicator scores these components based on their hierarchical position. When all components align for an upward trend, ATAMOKU’s score will approach +364 (representing an ideal state). In contrast, a score of -364 indicates a non-ideal or bearish alignment.
2 - Optimal and Suboptimal Tracking:
ATAMOKU includes Optimal and Suboptimal markers to track the highest and lowest scores over a specific period, with a default of 52 periods. The Optimal score captures the highest recorded value within the period, while the Suboptimal score captures the lowest. These markers help traders gauge how current conditions compare to recent peaks and troughs, indicating market stability or volatility.
3 - Real-Time Scoring Display (Hierarchy Table):
ATAMOKU uses a Hierarchy Table adjacent to the main chart to present real-time scoring data for each Ichimoku component. This table displays values for Conversion Line, Base Line, Leading Spans, and Lagging Span, providing traders with a detailed view of each component’s contribution to the total score. By referencing the table, traders can understand the weight and impact of each Ichimoku element on the overall score.
4 - Histogram Visualization:
ATAMOKU’s scores are displayed on a histogram with green and red bars to indicate market sentiment. Green bars represent bullish conditions, while red bars indicate bearish conditions. This visual format allows traders to quickly assess trend direction and strength at a glance, providing context for decision-making.
5 - Signal and Smoothing Lines:
To help reduce noise, ATAMOKU features Signal and Smooth lines, which can be customized using different smoothing methods (such as SMA, EMA, or WMA). When the Signal and Smooth lines cross, the indicator will label the trend as UP or DOWN based on the direction of the crossover. This feature helps traders detect potential reversals or trend confirmations.
6 - Adjustable Settings:
* Scoring Weights: Traders can configure the relative weights of each Ichimoku component to match their analysis preferences.
* Smoothing Techniques: Users may choose from SMA, EMA, and WMA smoothing methods to adjust signal sensitivity.
* Period Adjustments: Scoring and smoothing period lengths can be customized to fit various trading styles and time frames.
Intended Use and Practical Application
ATAMOKU is best used alongside the Ichimoku Cloud, as its scoring and signal features complement the visual data provided by Ichimoku. The Hierarchy Score, combined with Optimal/Suboptimal markers, gives traders insight into the current market conditions and allows for comparisons across time. ATAMOKU is adaptable to any time frame and provides both trend analysis and potential entry/exit signals based on Ichimoku principles.
Legal Disclaimer
ATAMOKU is a technical analysis tool and does not guarantee profitability. It is designed to aid in decision-making by providing additional market insights. Traders are encouraged to exercise their judgment and assume responsibility for their trading actions.
Phân tích Xu hướng
Adaptive Kalman filter - Trend Strength Oscillator (Zeiierman)█ Overview
The Adaptive Kalman Filter - Trend Strength Oscillator by Zeiierman is a sophisticated trend-following indicator that uses advanced mathematical techniques, including vector and matrix operations, to decompose price movements into trend and oscillatory components. Unlike standard indicators, this model assumes that price is driven by two latent (unobservable) factors: a long-term trend and localized oscillations around that trend. Through a dynamic "predict and update" process, the Kalman Filter leverages vectors to adaptively separate these components, extracting a clearer view of market direction and strength.
█ How It Works
This indicator operates on a trend + local change Kalman Filter model. It assumes that price movements consist of two underlying components: a core trend and an oscillatory term, representing smaller price fluctuations around that trend. The Kalman Filter adaptively separates these components by observing the price series over time and performing real-time updates as new data arrives.
Predict and Update Procedure: The Kalman Filter uses an adaptive predict-update cycle to estimate both components. This cycle allows the filter to adjust dynamically as the market evolves, providing a smooth yet responsive signal. The trend component extracted from this process is plotted directly, giving a clear view of the prevailing direction. The oscillatory component indicates the tendency or strength of the trend, reflected in the green/red coloration of the oscillator line.
Trend Strength Calculation: Trend strength is calculated by comparing the current oscillatory value against a configurable number of past values.
█ Three Kalman filter Models
This indicator offers three distinct Kalman filter models, each designed to handle different market conditions:
Standard Model: This is a conventional Kalman Filter, balancing responsiveness and smoothness. It works well across general market conditions.
Volume-Adjusted Model: In this model, the filter’s measurement noise automatically adjusts based on trading volume. Higher volumes indicate more informative price movements, which the filter treats with higher confidence. Conversely, low-volume movements are treated as less informative, adding robustness during low-activity periods.
Parkinson-Adjusted Model: This model adjusts measurement noise based on price volatility. It uses the price range (high-low) to determine the filter’s sensitivity, making it ideal for handling markets with frequent gaps or spikes. The model responds with higher confidence in low-volatility periods and adapts to high-volatility scenarios by treating them with more caution.
█ How to Use
Trend Detection: The oscillator oscillates around zero, with positive values indicating a bullish trend and negative values indicating a bearish trend. The further the oscillator moves from zero, the stronger the trend. The Kalman filter trend line on the chart can be used in conjunction with the oscillator to determine the market's trend direction.
Trend Reversals: The blue areas in the oscillator suggest potential trend reversals, helping traders identify emerging market shifts. These areas can also indicate a potential pullback within the prevailing trend.
Overbought/Oversold: The thresholds, such as 70 and -70, help identify extreme conditions. When the oscillator reaches these levels, it suggests that the trend may be overextended, possibly signaling an upcoming reversal.
█ Settings
Process Noise 1: Controls the primary level of uncertainty in the Kalman filter model. Higher values make the filter more responsive to recent price changes, but may also increase susceptibility to random noise.
Process Noise 2: This secondary noise setting works with Process Noise 1 to adjust the model's adaptability. Together, these settings manage the uncertainty in the filter's internal model, allowing for finely-tuned adjustments to smoothness versus responsiveness.
Measurement Noise: Sets the uncertainty in the observed price data. Increasing this value makes the filter rely more on historical data, resulting in smoother but less reactive filtering. Lower values make the filter more responsive but potentially more prone to noise.
O sc Smoothness: Controls the level of smoothing applied to the trend strength oscillator. Higher values result in a smoother oscillator, which may cause slight delays in response. Lower values make the oscillator more reactive to trend changes, useful for capturing quick reversals or volatility within the trend.
Kalman Filter Model: Choose between Standard, Volume-Adjusted, and Parkinson-Adjusted models. Each model adapts the Kalman filter for specific conditions, whether balancing general market data, adjusting based on volume, or refining based on volatility.
Trend Lookback: Defines how far back to look when calculating the trend strength, which impacts the indicator's sensitivity to changes in trend strength. Shorter values make the oscillator more reactive to recent trends, while longer values provide a smoother reading.
Strength Smoothness: Adjusts the level of smoothing applied to the trend strength oscillator. Higher values create a more gradual response, while lower values make the oscillator more sensitive to recent changes.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Dynamic Time Period CandlesThis indicator gives the dynamic history of the current price over various time frames as a series of candles on the right of the display, with optional lines on the chart, so that you can assess the current trend more easily.
In the library I found lots of indicators that looked at the previous xx time period candle, but they then immediately switched to the new xx time candle when it started to be formed. This indicator looks back at the rolling previous time period. With this indicator, you can clearly see how price has been behaving over time.
IMPORTANT SETUP INFO:
Initially, you must go into the settings and select the timeframe (in minutes) that your chart is displaying. If you don't do this then the indicator will look back the wrong number of candles and give you totally wrong results.
You can then setup how high you want the candle labels to be on the chart.
Then you can select settings for each candle that you want displayed. Anywhere between 1 and 5 different timeframes can be displayed on the chart at once.
I initially published an indicator called 'Dynamic 4-Hour Candle (Accurate Highs and Lows)', but this new indicator is so different that it needs to be forked and published as a separate indicator. The reasons for this are below:
The original indicator only looked at the previous 4 hour time period. This indicator allows the user to select any time period that they choose.
The original indicator only looked at one time period. This indicator allows to select between one and five time periods on the chart at once.
The original indicator did not put lines on the chart to show the lookback period and the highs and lows of that time period. This indicator does both those things.
The name of the original indicator in no way now describes what this new indicator is capable of, and would be very misleading to anyone who came across it. This new indicator has a name that much more accurately reflects what its' purpose and functionality is.
[ AlgoChart ] - Compare MarketIndicator Description:
This indicator allows you to display a second asset, selectable from the input panel, in a separate window. Plotted on the same time scale as the first asset but with a distinct price scale, the indicator enables analysis of the relationships and relative movements of two financial instruments. It’s an ideal tool for understanding whether two assets move in a correlated or divergent manner.
Key Features:
Multi-Asset Comparison: Display two assets simultaneously to compare their trends.
Custom Scale: Each asset uses its own price scale, making comparative analysis easier.
Intuitive Interface: Easily select the second asset through the input panel.
Operational Applications:
Spread Trading: Identify optimal moments to execute spread trades when two highly correlated instruments move in opposite directions.
Supply & Demand: Pinpoint zones of interest on both assets, increasing the validity of support and resistance areas.
Exposure Reduction: Monitor instruments that move similarly to avoid exposing the portfolio in identical directions, thereby reducing the risk of double losses.
Additional Features:
Candle Color Change: When a directional divergence occurs between the two assets, the candles change color to highlight the event.
Customizable Notifications: Receive instant alerts when a divergence occurs, allowing you to act promptly.
Anchored Average Trading PriceThis "Anchored Average Trading Price" indicator allows users to anchor the calculation of the average trading price to a specific candle. By selecting an anchor date and time, the indicator begins calculating the average trading price from that point forward. This tool is particularly helpful for traders who want to analyze the price action relative to a key event or a particular point in time on the chart.
Key Features:
1. Flexible Anchoring: The indicator lets you set an anchor time, which determines the specific candle from which the average trading price calculation starts.
2. Customizable Calculation Method: You have the option to choose the basis of the average calculation:
- Open Price
- Close Price
- Average Daily Traded Price (calculated as `(Open + High + Low + Close) / 4`)
3. Automatic Updating: Once the anchor is set, the indicator dynamically updates on each new candle to continuously reflect the average trading price since the anchor point.
Potential Uses and Functionality Expansions:
- Trend Analysis: By observing the average trading price over time, you can gauge market sentiment and track trends from a particular event or time in the market.
- Support and Resistance: Anchoring this indicator to major highs, lows, or significant events could help identify dynamic support and resistance levels as the market interacts with the average price line.
- Customization Options: Future updates could allow additional flexibility, such as:
- A reset feature for users to easily re-anchor without changing the timestamp.
- Additional price calculation methods, like VWAP (Volume Weighted Average Price) for volume-based insights.
- Alerts when price crosses above or below the anchored average, signaling potential entry or exit points.
Trend of Multiple Oscillator Dashboard ModifiedDescription: The "Trend of Multiple Oscillator Dashboard Modified" is a powerful Pine Script indicator that provides a dashboard view of various oscillator and trend-following indicators across multiple timeframes. This indicator helps traders to assess trend conditions comprehensively by integrating popular technical indicators, including MACD, EMA, Stochastic, Elliott Wave, DID (Curta, Media, Longa), Price Volume Trend (PVT), Kuskus Trend, and Wave Trend Oscillator. Each indicator’s trend signal (bullish, bearish, or neutral) is displayed in a color-coded dashboard, making it easy to spot the consensus or divergence in trends across different timeframes.
Key Features:
Multi-Timeframe Analysis: Displays trend signals across five predefined timeframes (1, 2, 3, 5, and 10 minutes) for each included indicator.
Customizable Inputs: Allows for customization of key parameters for each oscillator and trend-following indicator.
Trend Interpretation: Each indicator is visually represented with green (bullish), red (bearish), and yellow (neutral) trend markers, making trend identification intuitive and quick.
Trade Condition Controls: Input options for the number of positive and negative conditions needed to trigger entries and exits, allowing users to refine the decision-making criteria.
Delay Management: Options for re-entry conditions based on both price movement (in points) and the minimum number of candles since the last exit, giving users flexibility in managing trade entries.
Usage: This indicator is ideal for traders who rely on multiple oscillators and moving averages to gauge trend direction and strength across timeframes. The dashboard allows users to observe trends at a glance and make informed decisions based on the alignment of various trend indicators. It’s particularly useful in consolidating signals for strategies that require multiple conditions to align before entering or exiting trades.
Note: Ensure that you’re familiar with each oscillator’s functionality, as some indicators like Elliott Wave and Wave Trend are simplified for visual coherence in this dashboard.
Disclaimer: This script is intended for educational and informational purposes only. Use it with caution and adapt it to your specific trading plan.
Developer's Remark: "This indicator's comprehensive design allows traders to filter noise and identify the most robust trends effectively. Use it to visualize trends across timeframes, understand oscillator behavior, and enhance decision-making with a more strategic approach."
Trends and Peaks [AgJ]Trends and Peaks
The Trends and Peaks indicator is designed to identify and visualize trends and key peaks in the price series. It provides three main functions:
Trends
The indicator detects the formation of trends in the price series and marks uptrend periods in green on the chart. This helps identify where the market is trending in a particular direction.
Peaks
The indicator uses a combination of custom and standard indicators to identify significant peaks in the price action. It classifies these peaks into two categories:
Parabolic Stages : Where the price exhibits accelerated, parabolic growth or decline.
Localized Stages : Where smaller, local peaks occur within a broader trend.
Slowing Trend
In parabolic stages, local peaks can serve as a signal of a slowing trend . As the price begins to plateau, the indicator helps identify areas where the trend might be losing momentum.
NOTE : The default settings are calibrated for BTC. If you're using the indicator on other assets, you may need to adjust the parameters for optimal performance.
Configuration notes
Peaks Settings
Cutoff Limits : Adjusts the width of the area where peaks are detected, allowing you to narrow or widen the peak detection range.
Peak Limits : Offers finer control over the peak detection formula, enabling more precise calibration of what is considered a "peak."
Trends Settings
Algo Parameters : Adjust the algorithm settings to fine-tune trend detection based on your preferences.
Advanced Bitcoin Trend Following StrategyTitle: Bitcoin Multi-Factor Trend Following Strategy
Description:
The Bitcoin Multi-Factor Trend Following Strategy is designed for traders seeking a robust, multi-factor approach to trend following in Bitcoin markets. This script combines technical indicators and statistical methods to identify trend directions, optimize entry and exit points, and manage position sizing based on volatility and leverage constraints. Key features of the strategy include:
Multi-Indicator Trend Forecasting:
This strategy employs three trend forecasting methods: range, exponential moving average (EMA), and Bollinger Bands. Each method can be independently enabled or disabled, giving traders flexibility in how trends are identified and followed.
Range Forecast : Calculates forecast based on the range (high and low) of recent prices, with optional smoothing via a Kalman filter to reduce noise.
EMA Spread Forecast : Utilizes the spread between fast and slow EMAs to gauge the trend’s strength, adjusted for volatility.
Bollinger Band Forecast : Measures the proximity of price to Bollinger Band levels to assess trend intensity.
Kalman Filter for Smoothing:
The Kalman filter is applied to price data for smoother trend estimation, particularly within the range forecast. This allows the strategy to reduce noise and focus on more reliable price signals.
Volatility-Adjusted Position Sizing:
The strategy incorporates volatility targeting to dynamically adjust position sizes based on current market conditions. Traders can set an annualized volatility target to control the risk level, with position size scaled accordingly to maintain consistent risk exposure. A maximum leverage cap ensures that position sizes do not exceed a user-defined threshold, offering an additional layer of risk control.
Dynamic Entry and Exit Points:
Entry and exit points are based on customizable thresholds that determine trend strength and are sensitive to market volatility. The script monitors changes in forecast values and automatically adjusts trades to capitalize on emerging trends or exit weakening ones. The strategy includes an option to close all open positions when trend forecasts fall below defined thresholds, ensuring an automated approach to risk management.
Backtesting and Performance Metrics:
To support strategy optimization, the script includes a backtest mode that calculates key performance metrics such as Sharpe Ratio, Buy & Hold profit, Strategy profit, Win rate, and other metrics. These metrics are displayed in a summary table directly on the chart, providing real-time insight into the strategy’s historical performance compared to a buy-and-hold approach.
Configurable Time and Date Range:
Users can specify start and end dates for the backtest period, allowing for focused backtesting over any desired timeframe. This feature enables in-depth analysis of performance across varying market conditions.
Use Case:
This strategy is best suited for experienced traders who wish to apply a structured trend-following approach in Bitcoin or other high-volatility assets. It is highly customizable, making it adaptable to various market conditions and trading styles. The combination of trend forecasting methods, volatility targeting, and automatic leverage control offers a balanced approach to capturing long-term trends while managing risk.
Parameters:
Entry Threshold: Adjusts the sensitivity of the entry point for trends. Lower values make the strategy more reactive.
Annual Volatility Target: Controls the risk level by targeting a specific annualized volatility percentage.
Max Leverage: Caps the allowable leverage for each trade.
Forecast Activations: Toggles to enable or disable the use of range, EMA, and Bollinger forecasts.
Date Range: Allows users to define the start and end dates for testing the strategy.
Notes:
This strategy is designed for educational purposes and requires thorough backtesting and optimization before live trading. Real-time performance may vary, and additional risk management practices are advised.
License:
This script is subject to the terms of the Mozilla Public License 2.0.
Market structureHi all!
This script shows you the market structure. You can choose to show internal market structure (with pivots of a default length of 5) and swing market structure (with pivots of a default length of 50). For these two trends it will show you:
• Break of structure (BOS)
• Change of character (CHoCH) (mandatory)
• Equal high/low (EQH/EQL)
It's inspired by "Smart Money Concepts (SMC) " by LuxAlgo that will also show you the market structure.
It will create the two market structures depending on the pivots found. Both of these market structures can be enabled/disabled. The pivots length can be configured separately. The pivots found will be the 'base' of this indicator and will show you when price breaks it. When that happens a break of structure or a change of character will be created. The latest 5 pivots found within the current trends will be kept to take action on. The internal market structure is shown with dashed lines and swing market structure is shown with solid lines.
A break of structure is removed if an earlier pivots within the same trend is broken. Like in the images below, the first pivot (in the first image) is removed when an earlier pivot's higher price within the same trend is broken (the second image):
Equal high/lows have a pink zone (by default but can be changed by the user). These zones can be configured to be extended to the right (off by default). Equal high/lows are only possible if it's not been broken by price and if a later bar has a high/low within the limit it's added to the zone (without it being more 'extreme' (high or low) then the previous price). A factor (percentage of width) of the Average True Length (of length 14) that the pivot must be within to to be considered an Equal high/low. This is configurable and sets this 'limit' and is 10 by default.
You are able to show the pivots that are used. "HH" (higher high), "HL" (higher low), "LH" (lower high), "LL" (lower low) and "H"/"L" (for pivots (high/low) when the trend has changed) are the labels used.
This script has proven itself useful for me to quickly see how the current market is. You can see the pivots (price and bar) where break of structure or change of character happens to see the current trends. I hope that you will find this useful for you.
When programming I focused on simplicity and ease of read. I did not focus on performance, I will do so if it's a problem (haven't noticed it is one yet).
You can set alerts for when a change of character happens. You can configure it to fire on when it happens (all or once per bar) but it defaults to 'once_per_bar_close' to avoid repainting. This has the drawback to alert you when the bar closes.
TLDR: this is an indicator showing you the market structure (break of structures and change of characters) using swing points/pivots. Two trends can be shown, internal (with pivots of length of 5) and swing (with pivots of the length of 50).
Best of trading luck!
Trend Trader-RemasteredThe script was originally coded in 2018 with Pine Script version 3, and it was in invite only status. It has been updated and optimised for Pine Script v5 and made completely open source.
Overview
The Trend Trader-Remastered is a refined and highly sophisticated implementation of the Parabolic SAR designed to create strategic buy and sell entry signals, alongside precision take profit and re-entry signals based on marked Bill Williams (BW) fractals. Built with a deep emphasis on clarity and accuracy, this indicator ensures that only relevant and meaningful signals are generated, eliminating any unnecessary entries or exits.
Key Features
1) Parabolic SAR-Based Entry Signals:
This indicator leverages an advanced implementation of the Parabolic SAR to create clear buy and sell position entry signals.
The Parabolic SAR detects potential trend shifts, helping traders make timely entries in trending markets.
These entries are strategically aligned to maximise trend-following opportunities and minimise whipsaw trades, providing an effective approach for trend traders.
2) Take Profit and Re-Entry Signals with BW Fractals:
The indicator goes beyond simple entry and exit signals by integrating BW Fractal-based take profit and re-entry signals.
Relevant Signal Generation: The indicator maintains strict criteria for signal relevance, ensuring that a re-entry signal is only generated if there has been a preceding take profit signal in the respective position. This prevents any misleading or premature re-entry signals.
Progressive Take Profit Signals: The script generates multiple take profit signals sequentially in alignment with prior take profit levels. For instance, in a buy position initiated at a price of 100, the first take profit might occur at 110. Any subsequent take profit signals will then occur at prices greater than 110, ensuring they are "in favour" of the original position's trajectory and previous take profits.
3) Consistent Trend-Following Structure:
This design allows the Trend Trader-Remastered to continue signaling take profit opportunities as the trend advances. The indicator only generates take profit signals in alignment with previous ones, supporting a systematic and profit-maximising strategy.
This structure helps traders maintain positions effectively, securing incremental profits as the trend progresses.
4) Customisability and Usability:
Adjustable Parameters: Users can configure key settings, including sensitivity to the Parabolic SAR and fractal identification. This allows flexibility to fine-tune the indicator according to different market conditions or trading styles.
User-Friendly Alerts: The indicator provides clear visual signals on the chart, along with optional alerts to notify traders of new buy, sell, take profit, or re-entry opportunities in real-time.
TrigWave Suite [InvestorUnknown]The TrigWave Suite combines Sine-weighted, Cosine-weighted, and Hyperbolic Tangent moving averages (HTMA) with a Directional Movement System (DMS) and a Relative Strength System (RSS).
Hyperbolic Tangent Moving Average (HTMA)
The HTMA smooths the price by applying a hyperbolic tangent transformation to the difference between the price and a simple moving average. It also adjusts this value by multiplying it by a standard deviation to create a more stable signal.
// Function to calculate Hyperbolic Tangent
tanh(x) =>
e_x = math.exp(x)
e_neg_x = math.exp(-x)
(e_x - e_neg_x) / (e_x + e_neg_x)
// Function to calculate Hyperbolic Tangent Moving Average
htma(src, len, mul) =>
tanh_src = tanh((src - ta.sma(src, len)) * mul) * ta.stdev(src, len) + ta.sma(src, len)
htma = ta.sma(tanh_src, len)
Sine-Weighted Moving Average (SWMA)
The SWMA applies sine-based weights to historical prices. This gives more weight to the central data points, making it responsive yet less prone to noise.
// Function to calculate the Sine-Weighted Moving Average
f_Sine_Weighted_MA(series float src, simple int length) =>
var float sine_weights = array.new_float(0)
array.clear(sine_weights) // Clear the array before recalculating weights
for i = 0 to length - 1
weight = math.sin((math.pi * (i + 1)) / length)
array.push(sine_weights, weight)
// Normalize the weights
sum_weights = array.sum(sine_weights)
for i = 0 to length - 1
norm_weight = array.get(sine_weights, i) / sum_weights
array.set(sine_weights, i, norm_weight)
// Calculate Sine-Weighted Moving Average
swma = 0.0
if bar_index >= length
for i = 0 to length - 1
swma := swma + array.get(sine_weights, i) * src
swma
Cosine-Weighted Moving Average (CWMA)
The CWMA uses cosine-based weights for data points, which produces a more stable trend-following behavior, especially in low-volatility markets.
f_Cosine_Weighted_MA(series float src, simple int length) =>
var float cosine_weights = array.new_float(0)
array.clear(cosine_weights) // Clear the array before recalculating weights
for i = 0 to length - 1
weight = math.cos((math.pi * (i + 1)) / length) + 1 // Shift by adding 1
array.push(cosine_weights, weight)
// Normalize the weights
sum_weights = array.sum(cosine_weights)
for i = 0 to length - 1
norm_weight = array.get(cosine_weights, i) / sum_weights
array.set(cosine_weights, i, norm_weight)
// Calculate Cosine-Weighted Moving Average
cwma = 0.0
if bar_index >= length
for i = 0 to length - 1
cwma := cwma + array.get(cosine_weights, i) * src
cwma
Directional Movement System (DMS)
DMS is used to identify trend direction and strength based on directional movement. It uses ADX to gauge trend strength and combines +DI and -DI for directional bias.
// Function to calculate Directional Movement System
f_DMS(simple int dmi_len, simple int adx_len) =>
up = ta.change(high)
down = -ta.change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
trur = ta.rma(ta.tr, dmi_len)
plus = fixnan(100 * ta.rma(plusDM, dmi_len) / trur)
minus = fixnan(100 * ta.rma(minusDM, dmi_len) / trur)
sum = plus + minus
adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adx_len)
dms_up = plus > minus and adx > minus
dms_down = plus < minus and adx > plus
dms_neutral = not (dms_up or dms_down)
signal = dms_up ? 1 : dms_down ? -1 : 0
Relative Strength System (RSS)
RSS employs RSI and an adjustable moving average type (SMA, EMA, or HMA) to evaluate whether the market is in a bullish or bearish state.
// Function to calculate Relative Strength System
f_RSS(rsi_src, rsi_len, ma_type, ma_len) =>
rsi = ta.rsi(rsi_src, rsi_len)
ma = switch ma_type
"SMA" => ta.sma(rsi, ma_len)
"EMA" => ta.ema(rsi, ma_len)
"HMA" => ta.hma(rsi, ma_len)
signal = (rsi > ma and rsi > 50) ? 1 : (rsi < ma and rsi < 50) ? -1 : 0
ATR Adjustments
To minimize false signals, the HTMA, SWMA, and CWMA signals are adjusted with an Average True Range (ATR) filter:
// Calculate ATR adjusted components for HTMA, CWMA and SWMA
float atr = ta.atr(atr_len)
float htma_up = htma + (atr * atr_mult)
float htma_dn = htma - (atr * atr_mult)
float swma_up = swma + (atr * atr_mult)
float swma_dn = swma - (atr * atr_mult)
float cwma_up = cwma + (atr * atr_mult)
float cwma_dn = cwma - (atr * atr_mult)
This adjustment allows for better adaptation to varying market volatility, making the signal more reliable.
Signals and Trend Calculation
The indicator generates a Trend Signal by aggregating the output from each component. Each component provides a directional signal that is combined to form a unified trend reading. The trend value is then converted into a long (1), short (-1), or neutral (0) state.
Backtesting Mode and Performance Metrics
The Backtesting Mode includes a performance metrics table that compares the Buy and Hold strategy with the TrigWave Suite strategy. Key statistics like Sharpe Ratio, Sortino Ratio, and Omega Ratio are displayed to help users assess performance. Note that due to labels and plotchar use, automatic scaling may not function ideally in backtest mode.
Alerts and Visualization
Trend Direction Alerts: Set up alerts for long and short signals
Color Bars and Gradient Option: Bars are colored based on the trend direction, with an optional gradient for smoother visual feedback.
Important Notes
Customization: Default settings are experimental and not intended for trading/investing purposes. Users are encouraged to adjust and calibrate the settings to optimize results according to their trading style.
Backtest Results Disclaimer: Please note that backtest results are not indicative of future performance, and no strategy guarantees success.
AI x Meme Impulse Tracker [QuantraSystems]AI x Meme Impulse Tracker
Quantra Systems guarantees that the information created and published within this document and on the Tradingview platform is fully compliant with applicable regulations, does not constitute investment advice, and is not exclusively intended for qualified investors.
Important Note!
The system equity curve presented here has been generated as part of the process of testing and verifying the methodology behind this script.
Crucially, it was developed after the system was conceptualized, designed, and created, which helps to mitigate the risk of overfitting to historical data. In other words, the system was built for robustness, not for simply optimizing past performance.
This ensures that the system is less likely to degrade in performance over time, compared to hyper-optimized systems that are tailored to past data. No tweaks or optimizations were made to this system post-backtest.
Even More Important Note!!
The nature of markets is that they change quickly and unpredictably. Past performance does not guarantee future results - this is a fundamental rule in trading and investing.
While this system is designed with broad, flexible conditions to adapt quickly to a range of market environments, it is essential to understand that no assumptions should be made about future returns based on historical data. Markets are inherently uncertain, and this system - like all trading systems - cannot predict future outcomes.
Introduction
The AI x Meme Impulse Tracker is a cutting-edge, fast-acting rotational algorithm designed to capitalize on the strength of assets within pre-selected categories. Using a custom function built on top of the RSI Pulsar, the system measures momentum through impulses rather than traditional trend following methods. This allows for swifter reallocations based on short bursts of strength.
This system focuses on precision and agility - making it highly adaptable in volatile markets. The strategy is built around three independent asset categories - with allocations only made to the strongest asset in each - ensuring that capital movement (in particular between blockchains) is kept to a minimum for efficiency purposes while maintaining exposure to the highest performing tokens.
Legend
Token Inputs:
The Impulse Tracker is designed with dynamic asset selection - allowing traders to customize the inputs for each category. This feature enables flexible system management, as the number of active tokens within each category can be adjusted at any time. Whether the user chooses the default of 13 tokens per category, or fewer, the system will automatically recalibrate. This ensures that all calculations, from relative strength to individual performance assessments, adjust as required. Disabled tokens are treated by the system as if they don’t exist - seamlessly updating performance metrics and the Impulse Tracker’s allocation behavior to maintain the highest level of efficiency and accuracy.
System Equity Curve:
The Impulse Tracker plots both the rotational system’s equity and the Buy-and-Hold (or ‘HODL’) benchmark of Bitcoin for comparison. While the HODL approach allocates the entire portfolio to Bitcoin and functions as an index to compare to, the Impulse Tracker dynamically allocates based on strength impulses within the chosen tokens and categories. The system equity curve is representative of adding an equal capital split between the strongest assets of each category. The relative strength system does handle ‘ties’ of strength - in this situation multiple tokens from a single category can be included in the final equity curve, with the allocated weight to that category split between the tied assets.
TABLES:
Equity Stats:
This table is held in Quantra System's typical UI design language. It offers a comprehensive snapshot of the system’s performance, with key metrics organized to help traders quickly assess both short-term and cumulative results. The left side provides details on individual asset performance, while the right side presents a comparison of the system’s risk-adjusted metrics against a simple BTC Hodl strategy.
The leftmost column of the Equity Stats table showcases performance indicators for the system’s current allocations. This provides quick identification of the current strongest tokens, based on confirmed and non-repainting data as soon as the current opens and the last bar closes.
The right-hand side compares the performance differences between the system and Hodl profits, both on a cumulative basis and analyzing only the previous bar. The total number of position changes is also tracked in this table - an important metric when calculating total slippage and should be used to determine how ‘hands-on’ the strategy will be on the current timeframe.
The lower part of the table highlights a direct comparison of the AI x Memes Impulse strategy with buy-and-hold Bitcoin. The risk adjusted performance ratios, Sharpe, Sortino and Omega, are shown side by side, as well as the maximum drawdown experienced by both strategies within the set testing window.
Screener Table:
This table provides a detailed breakdown of the performance for each asset that has been the strongest in its category at some point and thus received an allocation. The table tracks several key metrics for each asset - including returns, volatility, Sharpe ratio, Sortino ratio, Omega ratio, and maximum drawdown. It also displays the signals for both current and previous periods, as well as the assets weight in the theoretical portfolio. Assets that have never received a signal are also included, giving traders an overview of which assets have contributed to the portfolio's performance and which have not played a role so far.
The position changes cell also offers important insights, as it shows the frequency of not just total position changes, but also rebalancing events.
Detailed Slippage Table:
The Detailed Slippage Table provides a comprehensive breakdown of the calculated slippage and fees incurred throughout the strategy’s operations. It contains several key metrics that give traders a granular view of the costs associated with executing the system:
Selected Slippage - Displays the current slippage rate, as defined in the input menu.
Removal Slippage - This accounts for any slippage or fees incurred when removing an allocation from a token.
Reallocation Slippage - Tracks the slippage or fees when reallocating capital to existing positions.
Addition Slippage - Measures the slippage or fees incurred when allocating capital to new tokens.
Final Slippage - Is the sum of all the individual slippage points and provides a quick view of the total slippage accounted for by the system.
The table is also divided into two columns:
Last Transaction Slippage + Fees - Displays any slippage or fees incurred based on position changes within the current bar.
Total Slippage + Fees - Shows the cumulative slippage and fees incurred since the portfolio’s selected start date.
Visual Customization:
Several customizable features are included within the input menu to enhance user experience. These include custom color palettes, both preloaded and user-selectable. This allows traders to personalize the visual appearance of the tables, ensuring clarity and consistency with their preferred interface themes and background coloring.
Additionally, users can adjust both the position and sizes of all the tables - enabling complete tailoring to the trader’s layout and specific viewing preferences and screen configurations. This level of customization ensures a more intuitive and flexible interaction with the system’s data.
Core Features and Methodologies
Advanced Risk Management - A Unique Filtering Approach:
The Equity Curve Activation Filter introduces an innovative way to dynamically manage capital allocation, aligning with periods of market trend strength. This filter is rooted in the understanding that markets move cyclically - altering between periods trending and mean-reverting periods. This cycle is especially pronounced in the crypto markets, where strong uptrends are often followed by prolonged periods of sideways movements or corrections as participants take profits and momentum fades.
The Cyclical Nature of Markets and Trend Following:
Financial markets do not trend indefinitely. Each uptrend or downtrend, whether over high and low timeframes, tends to culminate in a phase where momentum exhausts - leading to the sideways or corrective phases. This cycle results from the natural dynamics of market participants: during extended trends, more participants jump in, riding the momentum until profit taking causes the trend to slow down or reverse. This cyclical behavior occurs across all timeframes and in all markets - making it essential to adapt trading strategies in attempt to minimize losses during less favorable conditions.
In a trend following system, profitability often mirrors this cyclical pattern. Trend following strategies thrive when markets are moving directionally, capturing gains as price moves with strength in a single direction. However in phases where the market chops sideways, trend following strategies will usually experience drawdowns and reduced returns due to the impersistent nature of any trends. This fluctuation in trend following profitability can actually serve as one of the best coincident indicators of broader market regime change - when profitability begins to fade, it often signals a transition to drawn out unfavorable trend trading conditions.
The Equity Curve as a Market Signal
Within the Impulse Tracker, a continuous equity curve is calculated based upon the system's allocation to the strongest tokens. This equity curve effectively tracks the system’s performance under all market conditions. However, instead of solely relying on the direct performance of the selected tokens, the system applies additional filters to analyze the trend strength of this equity curve itself.
In the same way you only want to purchase an asset that is moving up in price, you only want to allocate capital to a strategy whose equity curve is trending upwards!
The Equity Curve Activation Filter consistently monitors the trend of this equity curve through various filter indicators, such as the “Wave Pendulum Trend”, the “Quasar QSM” and the “MAQSM” (an aggregate of multiple types of averages). These filters help determine whether the equity curve is trending upwards, signaling a favorable period for trend following. When the equity curve is in a positive trend, capital is allocated to the system as normal - allowing it to capture gains during favorable market conditions, Conversely, when the trend weakens and the equity curves begins to stagnate or decline, the activation filter shifts the system into a “cash” positions - temporarily halting allocations in order to prevent market exposure during choppy or mean reverting phases.
Timing Allocation With Market Conditions
This unique filtering approach ensures that the system is primarily active during periods when market trends are most supportive. By aligning capital allocations with the uptrend in trend following profitability, the system is designed to enter during periods of strong momentum and move to cash when momentum with the equity curve wanes. This approach reduces the risk of overtrading in less favorable conditions and preserves capital for the next favorable trend.
In essence the Equity Curve Allocation Filter serves as a dynamic risk management layer that leverages the cyclicality of trend following profitability in order to navigate shifting market phases.
Sensitivity and Signal Responsiveness:
The Quasar Sensitivity Setting allows users to fine-tune the system’s responsiveness to asset signals. High sensitivity settings lead to quicker position changes, making the system highly reactive to short term strength impulses. This is especially useful in fast moving markets where token strength can shift rapidly. The Sensitive setting might be more applicable to higher volatility or lower market cap assets - as the increased volatility increases the necessity of faster position cutting in order to front run the crowd. Of course - a balanced approach is ideal, as if the signals are too fast there will be too many whips and false signals. (And extra fees + slippage!)
The benefit of this script is because of the advanced slippage calculations, false signals are sufficiently punished (unlike systems without fees or slippage) - so it will become immediately apparent if the false signals have a significantly detrimental impact on the system’s equity curve.
Asset specific signals within each category are re-evaluated after the close of each bar to ensure that capital is always allocated to the highest performing asset. If a token’s momentum begins to fade the system swiftly reallocates to the next strongest asset within that category.
Category Filter - Allocates only to the Strongest Asset per group
One of the core innovations of the AI x Meme Impulse Tracker is the customizable Category Filter, which ensures that only the strongest-performing asset within each predefined group receives capital allocation. This approach not only increases the precision of asset selection but also allows traders to tailor the system to specific token narratives or categories. Sectors can include trending themes such as high-attention meme tokens, AI-driven tokens, or even categorize assets by blockchain ecosystems like Ethereum, Solana, or Base chain. This flexibility enables users to align their strategies with the latest market narratives or to optimize for specific groups, focusing on high-beta tokens within well defined sectors for a more targeted exposure. By keeping the focus on category leaders, the system avoids diluting its impact across underperforming assets, thereby maximizing capital efficiency and reducing unnecessary trading costs.
Dynamic Asset Reallocation:
Dynamic reallocation ensures that the system remains nimble and adapts to changing market conditions. Unlike slower systems, the Quasar method continually monitors for changes in asset strength and reallocates capital accordingly - ensuring that the system is always positioned in the highest performing assets within each category.
Position Changes and Slippage:
The Impulse Tracker places a strong emphasis on realistic simulation, prioritizing accuracy over inflated backtest results. This approach ensures that slippage is accounted for in a more aggressive manner than what may be experienced in real-world execution.
Each position change within the system - whether it’s buying, selling, reallocating, or rebalancing between assets - incurs slippage. Slippage is applied to both ends of every transaction: when a position is entered and exited, and when reallocating capital from one token to another. This dynamic behavior is further enhanced by a customizable slippage/fees input, allowing users to simulate realistic transaction costs based on their own market conditions and execution behaviors.
The slippage model works by applying a weighted slippage to the equity curve, taking into account the actual amount of capital being moved. Slippage is not applied in a blanket manner but rather in proportion to the allocation changes. For example, if the system reallocates from a single 100% position to two 50% allocations, slippage will be applied to the 50% removed from the first asset and the 50% added to the new asset, resulting in a 1x slippage multiplier.
This process becomes more granular when multiple assets are involved. For instance, if reallocating from two 50% positions to three 33% positions, slippage will be incurred on each of the changes, but at a reduced rate (⅔ x slippage), reflecting the smaller percentage of portfolio equity being moved. The slippage model accounts for all types of allocation shifts, whether increasing or decreasing the number of tokens held, providing a realistic assessment of system costs.
Here are some detailed examples to illustrate how slippage is calculated based on different scenarios:
100% → 50% / 50%: 1x slippage applied to both position changes (2 allocation changes).
50% / 50% → 33% / 33% / 33%: ⅔ x slippage multiplier applied across 3 allocation changes.
33% / 33% / 33% → 100%: 4/3 x slippage multiplier applied across 3 allocation changes.
In practice, not every position change will be rebalanced perfectly, leading to a lower number of transactions and lower costs in practice. Additionally, with the use of limit orders, a trader can easily reduce the costs of entering a position, as well as ensuring a competitive entry price.
By simulating slippage in this granular manner, the system captures the absolute maximum level of fees and slippage, in order to ensure that backtest results lean towards an underrepresentation - opposed to inflated results compared with practical execution.
A Special Note on Slippage
In the image above, the system has been applied to four different timeframes - 20h, 15h, 10h, and 5h - using identical settings and a selected slippage amount of 2%. By isolating a recent trend leg, we can illustrate an important concept: while the 15h timeframe is more profitable than the 20h timeframe, this difference stems from a core trading principle. Lower timeframes typically provide more data points and allow for quicker entries and exits in a robust system. This often results in reduced downside and compounding of gains.
However, slippage, fees, and execution constraints are limiting factors, especially in volatile, low-cap cryptocurrencies. Although lower timeframes can improve performance by increasing trade frequency, each trade incurs heavy slippage costs that accumulate - impacting the portfolio’s capital at a compounding rate. In this example, the chosen slippage rate of 2% per trade is designed to reflect the realistic trading costs, emphasizing how lower timeframe trading comes at the cost of increased slippage and fees
Finding the optimal balance between timeframe and slippage impact requires careful consideration of factors such as portfolio size, liquidity of selected tokens, execution speed, and the fee rate of the exchange you execute trades on.
Equity Curve and Performance Calculations
To provide a benchmark, the script also generates a Buy-and-Hold (or "HODL") equity curve that represents a complete allocation to Bitcoin. This allows users to easily compare the performance of the dynamic rotation system with that more traditional benchmark strategy.
The script tracks key performance metrics for both the dynamic portfolio and the HODL strategy, including:
Sharpe Ratio
The Sharpe Ratio is a key metric that evaluates a portfolio’s risk-adjusted return by comparing its ‘excess’ return to its volatility. Traditionally, the Sharpe Ratio measures returns relative to a risk-free rate. However, in our system’s calculation, we omit the risk-free rate and instead measure returns above a benchmark of 0%. This adjustment provides a more universal comparison, especially in the context of highly volatile assets like cryptocurrencies, where a traditional risk-free benchmark, such as the usual 3-month T-bills, is often irrelevant or too distant from the realities of the crypto market.
By using 0% as the baseline, we focus purely on the strategy's ability to generate raw returns in the face of market risk, which makes it easier to compare performance across different strategies or asset classes. In an environment like cryptocurrency, where volatility can be extreme, the importance of relative return against a highly volatile backdrop outweighs comparisons to a risk-free rate that bears little resemblance to the risk profile of digital assets.
Sortino Ratio
The Sortino Ratio improves upon the Sharpe Ratio by specifically targeting downside risk and leaves the upside potential untouched. In contrast to the Sharpe Ratio (which penalizes both upside and downside volatility), the Sortino Ratio focuses only on negative return deviations. This makes it a more suitable metric for evaluating strategies like the AI x Meme Impulse Tracker - that aim to minimize drawdowns without restricting upside capture. By measuring returns relative to a 0% baseline, the Sortino ratio provides a clearer assessment of how well the system generates gains while avoiding substantial losses in highly volatile markets like crypto.
Omega Ratio
The Omega Ratio is calculated as the ratio of gains to losses across all return thresholds, providing a more complete view of how the system balances upside and downside risk even compared to the Sortino Ratio. While it achieves a similar outcome to the Sortino Ratio by emphasizing the system's ability to capture gains while limiting losses, it is technically a mathematically superior method. However, we include both the Omega and Sortino ratios in our metric table, as the Sortino Ratio remains more widely recognized and commonly understood by traders and investors of all levels.
Usage Summary:
While the backtests in this description are generated as if a trader held a portfolio of just the strongest tokens, this was mainly designed as a method of logical verification and not a recommended investment strategy. In practice, this system can be used in multiple ways.
It can be used as above, or as a factor in forming part of a broader asset selection system, or even a method of filtering tokens by strength in order to inform a day trader which tokens might be optimal to look for long-only trading setups on an intrabar timeframe.
Final Summary:
The AI x Meme Impulse Tracker is a powerful algorithm that leverages a unique strength and impulse based approach to asset allocation within high beta token categories. Built with a robust risk management framework, the system’s Equity Curve Activation Filter dynamically manages capital exposure based on the cyclical nature of market trends, minimizing exposure during weaker phases.
With highly customizable settings, the Impulse Tracker enables precise capital allocation to only the strongest assets, informed by real-time metrics and rigorous slippage modeling in order to provide the best view of historical profitability. This adaptable design, coupled with advanced performance analytics, makes it a versatile tool for traders seeking an edge in fast moving and volatile crypto markets.
Volume Flow ConfluenceVolume Flow Confluence (CMF-KVO Integration)
Core Function:
The Volume Flow Confluence Indicator combines two volume-analysis methods: Chaikin Money Flow (CMF) and the Klinger Volume Oscillator (KVO). It displays a histogram only when both indicators align in their respective signals.
Signal States:
• Green Bars: CMF is positive (> 0) and KVO is above its signal line
• Red Bars: CMF is negative (< 0) and KVO is below its signal line
• No Bars: When indicators disagree
Technical Components:
Chaikin Money Flow (CMF):
Measures the relationship between volume and price location within the trading range:
• Calculates money flow volume using close position relative to high/low range
• Aggregates and normalizes over specified period
• Default period: 20
Klinger Volume Oscillator (KVO):
Evaluates volume in relation to price movement:
• Tracks trend changes using HLC3
• Applies volume force calculation
• Uses two EMAs (34/55) with a signal line (13)
Practical Applications:
1. Signal Identification
- New colored bars after blank periods show new agreement between indicators
- Color intensity differentiates new signals from continuations
- Blank spaces indicate lack of agreement
2. Trend Analysis
- Consecutive colored bars show continued indicator agreement
- Transitions between colors or to blank spaces show changing conditions
- Can be used alongside other technical analysis tools
3. Risk Considerations
- Signals are not predictive of future price movement
- Should be used as one of multiple analysis tools
- Effectiveness may vary across different markets and timeframes
Technical Specifications:
Core Algorithm
CMF = Σ(((C - L) - (H - C))/(H - L) × V)n / Σ(V)n
KVO = EMA(VF, 34) - EMA(VF, 55)
Where VF = V × |2(dm/cm) - 1| × sign(Δhlc3)
Signal Line = EMA(KVO, 13)
Signal Logic
Long: CMF > 0 AND KVO > Signal
Short: CMF < 0 AND KVO < Signal
Neutral: All other conditions
Parameters
CMF Length = 20
KVO Fast = 34
KVO Slow = 55
KVO Signal = 13
Volume = Regular/Actual Volume
Data Requirements
Price Data: OHLC
Volume Data: Required
Minimum History: 55 bars
Recommended Timeframe: ≥ 1H
Credits:
• Marc Chaikin - Original CMF development
• Stephen Klinger - Original KVO development
• Alex Orekhov (everget) - CMF script implementation
• nj_guy72 - KVO script implementation
3 CANDLE SUPPLY/DEMANDExplanation of the Code:
Demand Zone Logic: The script checks if the second candle closes below the low of the first candle and the third candle closes above both the highs of the first and second candles.
Zone Plotting: Once the pattern is identified, a demand zone is plotted from the low of the first candle to the high of the third candle, using a dashed green line for clarity.
Markers: A small triangle marker is added below the bars where a demand zone is detected for easy visualization.
Efficient Logic: The script checks the conditions for demand zone formation for every three consecutive candles on the chart.
This approach should be both accurate and efficient in plotting demand zones, making it easier to spot potential support levels on the chart.
Rikki's DikFat Bull/Bear OscillatorRikki's DikFat Bull/Bear Oscillator - Trend Identification & Candle Colorization
Rikki's DikFat Bull/Bear Oscillator is a powerful visual tool designed to help traders easily identify bullish and bearish trends on the chart. By analyzing market momentum using specific elements of the Commodity Channel Index (CCI) , this indicator highlights key trend reversals and continuations with color-coded candles, allowing you to quickly spot areas of opportunity.
How It Works
At the heart of this indicator is the Commodity Channel Index (CCI) , a popular momentum-based oscillator. The CCI measures the deviation of price from its average over a specified period (default is 30 bars). This helps identify whether the market is overbought, oversold, or trending.
Here's how the indicator interprets the CCI:
Bullish Trend (Green Candles) : When the market is showing signs of continued upward momentum, the candles turn green. This happens when the current CCI is less than 200 and moves from a value greater than 100 with velocity, signaling that the upward trend is still strong, and the market is likely to continue rising. Green candles indicate bullish price action , suggesting it might be a good time to look for buying opportunities or hold your current long position.
Bearish Trend (Red Candles) : Conversely, when the CCI shows signs of downward momentum (both the current and previous CCI readings are negative), the candles turn red. This signals that the market is likely in a bearish trend , with downward price action expected to continue. Red candles are a visual cue to consider selling opportunities or to stay out of the market if you're risk-averse.
How to Use It
Bullish Market : When you see green candles, the market is in a bullish phase. This suggests that prices are moving upward, and you may want to focus on buying signals . Green candles are your visual confirmation of a strong upward trend.
Bearish Market : When red candles appear, the market is in a bearish phase. This indicates that prices are moving downward, and you may want to consider selling or staying out of long positions. Red candles signal that downward pressure is likely to continue.
Why It Works
This indicator uses momentum to identify shifts in trend. By tracking the movement of the CCI , the oscillator detects whether the market is trending strongly or simply moving in a sideways range. The color changes in the candles help you quickly visualize where the market momentum is headed, giving you an edge in determining potential buy or sell opportunities.
Clear Visual Signals : The green and red candles make it easy to follow market trends, even for beginners.
Identifying Trend Continuations : The oscillator helps spot ongoing trends, whether bullish or bearish, so you can align your trades with the prevailing market direction.
Quick Decision-Making : By using color-coded candles, you can instantly know whether to consider entering a long (buy) or short (sell) position without needing to dive into complex indicators.
NOTES This indicator draws and colors it's own candles bodies, wicks and borders. In order to have the completed visualization of red and green trends, you may need to adjust your TradingView chart settings to turn off or otherwise modify chart candles.
Conclusion
With Rikki's DikFat Bull/Bear Oscillator , you have an intuitive and easy-to-read tool that helps identify bullish and bearish trends based on proven momentum indicators. Whether you’re a novice or an experienced trader, this oscillator allows you to stay in tune with the market’s direction and make more informed, confident trading decisions.
Make sure to use this indicator in conjunction with your own trading strategy and risk management plan to maximize your trading potential and limit your risks.
Cross-Asset Correlation Trend IndicatorCross-Asset Correlation Trend Indicator
This indicator uses correlations between the charted asset and ten others to calculate an overall trend prediction. Each ticker is configurable, and by analyzing the trend of each asset, the indicator predicts an average trend for the main asset on the chart. The strength of each asset's trend is weighted by its correlation to the charted asset, resulting in a single average trend signal. This can be a rather robust and effective signal, though it is often slow.
Functionality Overview :
The Cross-Asset Correlation Trend Indicator calculates the average trend of a charted asset based on the correlation and trend of up to ten other assets. Each asset is assigned a trend signal using a simple EMA crossover method (two customizable EMAs). If the shorter EMA crosses above the longer one, the asset trend is marked as positive; if it crosses below, the trend is negative. Each trend is then weighted by the correlation coefficient between that asset’s closing price and the charted asset’s closing price. The final output is an average weighted trend signal, which combines each trend with its respective correlation weight.
Input Parameters :
EMA 1 Length : Sets the period of the shorter EMA used to determine trends.
EMA 2 Length : Sets the period of the longer EMA used to determine trends.
Correlation Length : Defines the lookback period used for calculating the correlation between the charted asset and each of the other selected assets.
Asset Tickers : Each of the ten tickers is configurable, allowing you to set specific assets to analyze correlations with the charted asset.
Show Trend Table : Toggle to show or hide a table with each asset’s weighted trend. The table displays green, red, or white text for each weighted trend, indicating positive, negative, or neutral trends, respectively.
Table Position : Choose the position of the trend table on the chart.
Recommended Use :
As always, it’s essential to backtest the indicator thoroughly on your chosen asset and timeframe to ensure it aligns with your strategy. Feel free to modify the input parameters as needed—while the defaults work well for me, they may need adjustment to better suit your assets, timeframes, and trading style.
As always, I wish you the best of luck and immense fortune as you develop your systems. May this indicator help you make well-informed, profitable decisions!
Bullrun Profit Maximizer [QuantraSystems]Bullrun Profit Maximizer
Quantra Systems guarantees that the information created and published within this document and on the Tradingview platform is fully compliant with applicable regulations, does not constitute investment advice, and is not exclusively intended for qualified investors.
Important Note!
The system equity curve presented here has been generated as part of the process of testing and verifying the methodology behind this script.
Crucially, it was developed after the system was conceptualized, designed, and created, which helps to mitigate the risk of overfitting to historical data. In other words, the system was built for robustness, not for simply optimizing past performance.
This ensures that the system is less likely to degrade in performance over time, compared to hyper optimized systems that are tailored to past data. No tweaks or optimizations were made to this system post backtest.
Even More Important Note!!
The nature of markets is that they change quickly and unpredictably. Past performance does not guarantee future results - this is a fundamental rule in trading and investing.
While this system is designed with broad, flexible conditions to adapt quickly to a range of market environments, it is essential to understand that no assumptions should be made about future returns based on historical data. Markets are inherently uncertain, and this system - like all trading systems - cannot predict future outcomes.
Introduction
The "Adaptive Pairwise Momentum System" is not a prototype to the Bullrun Profit Maximizer (BPM) . The Bullrun Profit Maximizer is a fully re-engineered, higher frequency momentum system.
The Bullrun Profit Maximizer (BPM) uses a completely different filter logic and refines momentum calculations, specifically to support higher frequency trading on Crypto's Blue Chip assets. It correctly calculates fees and slippage by compounding them against System Profit before plotting the equity curve.
Unlike prior systems, this script utilizes a completely new filter logic and refined momentum calculation, specifically built to support higher frequency trading on blue-chip assets, while minimizing the impact of fees and slippage.
While the APMS focuses on Macro Trend Alignment, the BPM instead applies an equity curve based filter, allowing for targeted precision on the current asset’s trend without relying on broader market conditions. This approach delivers more responsive and asset specific signals, enhancing agility in today’s fast paced crypto markets.
The BPM dynamically optimizes capital allocation across up to four high performing assets, ensuring that the portfolio adapts swiftly to changing market conditions. The system logic consists of sophisticated quantitative methods, rapid momentum analysis and alpha cyclicality/seasonality optimizations. The overarching goal is to ensure that the portfolio is always invested in the highest performing asset based on dynamic market conditions, while at the same time managing risk through rapid asset filters and internal mechanisms like alpha cyclicality, volatility and beta analysis.
In addition to these core functionalities, the BPM comes with the typical Quantra Systems UI design, structured to reduce data clutter and provide users with only the most essential, impactful information. The BPM UI format delivers clear and easy to read signals. It enables rapid decision making in a high frequency environment without compromising on depth or accuracy.
Bespoke Logic Filtering with Equity Curve Precision
The BPM script utilizes a completely new methodology and focuses on intraday rotations of blue-chip crypto assets, while previously built systems were designed with a longer term focus in mind.
In response to the need for more precise signal generation, the BPM replaces the previous macro trend filter with a new, highly specific equity curve activation filter. This unique logic filter is driven solely by the performance trends of the asset currently held by the system. By analyzing the equity curve directly, this system can make more targeted, timely allocations based on asset specific momentum, allowing for quick adjustments that are more relevant to the held asset rather than general market conditions.
The benefits of this new, unique approach are twofold: first, it avoids premature allocation shifts based on broader macro movements, and second, it enables the system to adapt dynamically to the performance of each asset individually. This asset specific filtering allows traders to capitalize on localized strength within individual blue-chip cryptoassets without being affected by lags in the overall market trend.
High Frequency Momentum Calculation for Enhanced Flexibility
The BPM incorporates a newly designed momentum calculation that increases its suitability across lower timeframes. This new momentum indicator captures and processes more data points within a shorter window than ever before, rather than extending bar intervals and potentially losing high frequency detail. This creates a smooth, data rich featureset that is especially suited for blue-chip assets, where liquidity reduces slippage and fees, making higher frequency trading viable.
By retaining more data, this system captures subtle shifts in momentum more effectively than traditional approaches, offering higher resolution insights. These modifications result in a system capable of generating highly responsive signals on faster timeframes, empowering traders to act quickly in volatile markets.
User Interface and Enhanced Readability
The BPM also features a reimagined, streamlined user interface, making it easier than ever to monitor essential signals at a glance. The new layout minimizes extraneous data points in the tables, leaving only the most actionable information for traders. This cleaner presentation is purpose built to help traders identify the strongest asset in real time, with clear, color coded signals to facilitate swift decision making in fast moving markets.
Equity Stats Table : Designed for clarity, the stats table focuses on the current allocation’s performance metrics, emphasizing the most critical metrics without unnecessary clutter.
Color Coded Highlights : The interface includes the option to highlight both the current top performing asset, and historical allocations - with indicators of momentum shifts and performance metrics readily accessible.
Clear Signals : Visual cues are presented in an enhanced way to improve readability, including simplified line coloring, and improve visualization of the outperforming assets in the allocation table.
Dynamic Asset Reallocation
The BPM dynamically allocates capital to the strongest performing asset in a selected pool. This system incorporates a re-engineered, pairwise momentum measurement designed to operate at higher frequencies. The system evaluates each asset against others in real time, ensuring only the highest momentum asset receives allocation. This approach keeps the portfolio positioned for maximum efficiency, with an updated weighting logic that favors assets showing both strength and sustainability.
Position Changes and Slippage Calculation
Position changes are optimized for faster reallocation, with realistic slippage and fee calculations factored into each trade. The system’s structure minimizes the impact of these costs on blue-chip assets, allowing for more active management on short timeframes without incurring significant drag on performance.
A Special Note on Fees + Slippage
In the image above, the system has been applied to four different timeframes - 12h, 8h, 4h and 1h - using identical settings and a selected slippage and fees amount of 0.2%. In this stress test, we isolate the choppy downwards period from the previous Bitcoin all time high - set in March 2024, to the current date where Bitcoin is currently sitting at around the same level.
This illustrates an important concept: starting at the 12h, the system performed better as the timeframes decreased. In fact, only on the 4hr chart did the system equity curve make a new all time high alongside Bitcoin. It is worth noting that market phases that are “non-trending” are generally the least profitable periods to use a momentum/trend system - as most systems will get caught by false momentum and will “buy the top,” and then proceed to “sell the bottom.”
Lower timeframes typically offer more data points for the algorithm to compute over, and enable quicker entries and exits within a robust system, often reducing downside risk and compounding gains more effectively - in all market environments.
However, slippage, fees, and execution constraints are still limiting factors. Although blue-chip cryptocurrencies are more liquid and can be traded with lower fees compared to low cap assets, frequent trading on lower timeframes incurs cumulative slippage costs. With the BPM system set to a realistic slippage rate of 0.2% per trade, this example emphasizes how even lower fees impact performance as trade frequency increases.
Finding the optimal balance between timeframe and slippage impact requires careful consideration of factors such as portfolio size, liquidity of selected tokens, execution speed, and the fee rate of the exchange you execute trades on.
Number of Position Changes
Understanding the number of position changes in a strategy is critical to assessing its feasibility in real world trading. Frequent position changes can lead to increased costs due to slippage and fees. Monitoring the number of position changes provides insight into the system’s behavior - helping to evaluate how active the strategy is and whether it aligns with the trader's desired time input for position management.
Equity Curve and Performance Calculations
To provide a benchmark, the script also generates a Buy-and-Hold (or "HODL") equity curve that represents a 100% allocation to Bitcoin, the highest market cap cryptoasset. This allows users to easily compare the performance of the dynamic rotation system with that of a more traditional investment strategy.
The script tracks key performance metrics for both the dynamic portfolio and the HODL strategy, including:
Sharpe Ratio
The Sharpe Ratio is a key metric that evaluates a portfolio’s risk adjusted return by comparing its ‘excess’ return to its volatility. Traditionally, the Sharpe Ratio measures returns relative to a risk-free rate. However, in our system’s calculation, we omit the risk-free rate and instead measure returns above a benchmark of 0%. This adjustment provides a more universal comparison, especially in the context of highly volatile assets like cryptocurrencies, where a traditional risk-free benchmark, such as the usual 3-month T-bills, is often irrelevant or too distant from the realities of the crypto market.
By using 0% as the baseline, we focus purely on the strategy's ability to generate raw returns in the face of market risk, which makes it easier to compare performance across different strategies or asset classes. In an environment like cryptocurrency, where volatility can be extreme, the importance of relative return against a highly volatile backdrop outweighs comparisons to a risk-free rate that bears little resemblance to the risk profile of digital assets.
Sortino Ratio
The Sortino Ratio improves upon the Sharpe Ratio by specifically targeting downside risk and leaves the upside potential untouched. In contrast to the Sharpe Ratio (which penalizes both upside and downside volatility), the Sortino Ratio focuses only on negative return deviations. This makes it a more suitable metric for evaluating strategies like the Bullrun Profit Maximizer - that aim to minimize drawdowns without restricting upside capture. By measuring returns relative to a 0% baseline, the Sortino ratio provides a clearer assessment of how well the system generates gains while avoiding substantial losses in highly volatile markets like crypto.
Omega Ratio
The Omega Ratio is calculated as the ratio of gains to losses across all return thresholds, providing a more complete view of how the system balances upside and downside risk even compared to the Sortino Ratio. While it achieves a similar outcome to the Sortino Ratio by emphasizing the system's ability to capture gains while limiting losses, it is technically a mathematically superior method. However, we include both the Omega and Sortino ratios in our metric table, as the Sortino Ratio remains more widely recognized and commonly understood by traders and investors of all levels.
Usage Summary:
While the backtests in this description are generated as if a trader held a portfolio of just the strongest tokens, this was mainly designed as a method of logical verification and not a recommended investment strategy. In practice, this system can be used in multiple ways.
It can be used as above, or as a factor in forming part of a broader asset selection tool, or even a method of filtering tokens by strength in order to inform a day trader which tokens might be optimal to look at, for long-only trading setups on an intrabar timeframe.
Summary
The Bullrun Profit Maximizer is an advanced tool tailored for traders, offering the precision and agility required in today’s markets. With its asset specific equity curve filter, reworked momentum analysis, and streamlined user interface, this system is engineered to maximize gains and minimize risk during bullmarkets, with a strong focus on risk adjusted performance.
Its refined approach, focused on high resolution data processing and adaptive reallocation, makes it a powerful choice for traders looking to capture high quality trends on clue-chip assets, no matter the market’s pace.
Trend Titan Neutronstar [QuantraSystems]Trend Titan NEUTRONSTAR
Credits
The Trend Titan NEUTRONSTAR is a comprehensive aggregation of nearly 100 unique indicators and custom combinations, primarily developed from unique and public domain code.
We'd like to thank our TradingView community members: @IkKeOmar for allowing us to add his well-built "Normalized KAMA Oscillator" and "Adaptive Trend Lines " indicators to the aggregation, as well as @DojiEmoji for his valuable "Drift Study (Inspired by Monte Carlo Simulations with BM)".
Introduction
The Trend Titan NEUTRONSTAR is a robust trend following algorithm meticulously crafted to meet the demands of crypto investors. Designed with a multi layered aggregation approach, NEUTRONSTAR excels in navigating the unique volatility and rapid shifts of the cryptocurrency market. By stacking and refining a variety of carefully selected indicators, it combines their individual strengths while reducing the impact of noise or false signals. This "aggregation of aggregators" approach enables NEUTRONSTAR to produce a consistently reliable trend signal across assets and timeframes, making it an exceptional tool for investors focused on medium to long term market positioning.
NEUTRONSTAR ’s powerful trend following capabilities provide investors with straightforward, data driven analysis. It signals when tokens exhibit sustained upward momentum and systematically removes allocations from assets showing signs of weakness. This structure aids investors in recognizing peak market phases. In fact, one of NEUTRONSTAR ’s most valuable applications is its potential to help investors time exits near the peak of bull markets. This aims to maximize gains while mitigating exposure to downturns.
Ultimately, NEUTRONSTAR equips investors with a high precision, adaptable framework for strategic decision making. It offers robust support to identify strong trends, manage risk, and navigate the dynamic crypto market landscape.
With over a year of rigorous forward testing and live trading, NEUTRONSTAR demonstrates remarkable robustness and effectiveness, maintaining its performance without succumbing to overfitting. The system has been purposefully designed to avoid unnecessary optimization to past data, ensuring it can adapt as market conditions evolve. By focusing on aggregating valuable trend signals rather than tuning to historical performance, the NEUTRONSTAR serves as a reliable universal trend following system that aligns with the natural market cycles of growth and correction.
Core Methodology
The foundation of the NEUTRONSTAR lies in its multi aggregated structure, where five custom developed trend models are combined to capture the dominant market direction. Each of these aggregates has been carefully crafted with a specific trend signaling period in mind, allowing it to adapt seamlessly across various timeframes and asset classes. Here’s a breakdown of the key components:
FLARE - The original Quantra Signaling Matrix (QSM) model, best suited for timeframes above 12 hours. It forms the foundation of long term trend detection, providing stable signals.
FLAREV2 - A refined and more sophisticated model that performs well across both high and low timeframes, adding a layer of adaptability to the system.
NEBULA - An advanced model combining FLARE and FLAREV2. NEBULA brings the advantages of both components together, enhancing reliability and capturing smoother, more accurate trends.
SPARK - A high speed trend aggregator based on the QSM Universal model. It focuses on fast moving trends, providing early signals of potential shifts.
SUNBURST - A balanced aggregate that combines elements of SPARK and FLARE, confirming SPARK’s signals while minimizing false positives.
Each of these models contributes its own unique perspective on market movement. By layering fast, medium, and slower trend following signals, NEUTRONSTAR can confirm strong trends while filtering out shorter term noise. The result is a comprehensive tool that signals clear market direction with minimized false signals.
A Unique Approach to Trend Aggregation
One of the defining characteristics of NEUTRONSTAR is its deliberate choice to avoid perfectly time coherent indicators within its aggregation. In simpler terms, NEUTRONSTAR purposefully incorporates trend following indicators with slightly different signal periods, rather than synchronizing all components to a single signaling period. This choice brings significant benefits in terms of diversification, adaptability, and robustness of the overall trend signal.
When aggregating multiple trend following components, if all indicators were perfectly time coherent - meaning they responded to market changes in exactly the same way and over the time periods - the resulting signal would effectively be no different from a single trend following indicator. This uniformity would limit the system’s ability to capture a variety of market conditions, leaving it vulnerable to the same noise or false signals that any single indicator might encounter. Instead, NEUTRONSTAR leverages a balanced mix of indicators with varied timing: some fast, some slower, and some in the medium range. This choice allows the system to extract the unique strengths of each component, creating a combined signal that is stronger and more reliable than any single indicator.
By incorporating different signal periods, NEUTRONSTAR achieves what can be thought of as a form of edge accumulation. The fast components within NEUTRONSTAR , for example, are highly sensitive to quick shifts in market direction. These indicators excel at identifying early trend signals, enabling NEUTRONSTAR to react swiftly to emerging momentum. However, these fast indicators alone would be prone to reacting to market noise, potentially generating too many premature signals. This is where the medium term indicators come into play. These components operate with a slower reaction time, filtering out the short term fluctuations and confirming the direction of the trend established by the faster indicators. The combination of these varying signal speeds results in a balanced, adaptive response to market changes.
This approach also allows NEUTRONSTAR to adapt to different market regimes seamlessly. In fast moving, volatile markets, the faster indicators provide an early alert to potential trend shifts, while the slower components offer a stabilizing influence, preventing overreaction to temporary noise. Conversely, in steadier or trending markets, the medium and slower indicators sustain the trend signal, reducing the likelihood of premature exits. This flexible design enhances NEUTRONSTAR ’s ability to operate effectively across multiple asset classes and timeframes, from short term fluctuations to longer term market cycles.
The result is a powerful, multi-layered trend following tool that remains adaptive, capturing the benefits of both fast and medium paced reactions without becoming overly sensitive to short term noise. This unique aggregation methodology also supports NEUTRONSTAR ’s robustness, reducing the risk of overfitting to historical data and ensuring that the system can perform reliably in forward testing and live trading environments. The slightly staggered signal periods provide a greater degree of resilience, making NEUTRONSTAR a dependable choice for traders looking to capitalize on sustained trends while minimizing exposure during periods of market uncertainty.
In summary, the lack of perfect time coherence among NEUTRONSTAR ’s sub components is not a flaw - but a deliberate, robust design choice.
Risk Management through Market Mode Analysis
An essential part of NEUTRONSTAR is its ability to assess the market's underlying behavior and adapt accordingly. It employs a Market Mode Analysis mechanism that identifies when the market is either in a “Trending State” or a “Mean Reverting State.” When enough confidence is established that the market is trending, the system confirms and signals a “Trending State,” which is optimal for maintaining positions in the direction of the trend. Conversely, if there’s insufficient confidence, it labels the market as “Mean Reverting,” alerting traders to potentially avoid trend trades during likely sideways movement.
This distinction is particularly valuable in crypto, where asset prices often oscillate between aggressive trends and consolidation periods. The Market Mode Analysis keeps traders aligned with the broader market conditions, minimizing exposure during periods of potential whipsaws and maximizing gains during sustained trends.
Zero Overfitting: Design and Testing for Real World Resilience
Unlike many trend following indicators that rely heavily on backtesting and optimization, NEUTRONSTAR was built to perform well in forward testing and live trading without post design adjustments. Over a year of live market exposure has all but proven its robustness, with the system’s methodology focused on universal applicability and simplicity rather than curve fitting to past data. This approach ensures the aggregator remains effective across different market cycles and maintains relevance as new data unfolds.
By avoiding overfitting, NEUTRONSTAR is inherently more resistant to the common issue of strategy degradation over time, making it a valuable tool for traders seeking reliable market analysis you can trust for the long term.
Settings and Customization Options
To accommodate a range of trading styles and market conditions, NEUTRONSTAR includes adjustable settings that allow for fine tuning sensitivity and signal generation:
Calculation Method - Users can choose between calculating the NEUTRONSTAR score based on aggregated scores or by using the state of individual aggregates (long, neutral, short). The score method provides faster signals with slightly more noise, while the state based approach offers a smoother signal.
Sensitivity Threshold - This setting adjusts the system’s sensitivity, defining the width of the neutral zone. Higher thresholds reduce sensitivity, allowing for a broader range of volatility before triggering a trend reversal.
Market Regime Sensitivity - A sensitivity adjustment, ranging from 0 to 100, that affects the sensitivity of the sub components in market regime calculation.
These settings offer flexibility for users to tailor NEUTRONSTAR to their specific needs, whether for medium term investment strategies or shorter term trading setups.
Visualization and Legend
For intuitive usability, NEUTRONSTAR uses color coded bar overlays to indicate trend direction:
Green - indicates an uptrend.
Gray - signals a neutral or transition phase.
Purple - denotes a downtrend.
An optional background color can be enabled for market mode visualization, indicating the overall market state as either trending or mean reverting. This feature allows traders to assess trend direction and strength at a glance, simplifying decision making.
Additional Metrics Table
To support strategic decision making, NEUTRONSTAR includes an additional metrics table for in depth analysis:
Performance Ratios - Sharpe, Sortino, and Omega ratios assess the asset’s risk adjusted returns.
Volatility Insights - Provides an average volatility measure, valuable for understanding market stability.
Beta Measurement - Calculates asset beta against BTC, offering insight into asset volatility in the context of the broader market.
These metrics provide deeper insights into individual asset behavior, supporting more informed trend based allocations. The table is fully customizable, allowing traders to adjust the position and size for a seamless integration into their workspace.
Final Summary
The Trend Titan NEUTRONSTAR indicator is a powerful and resilient trend following system for crypto markets, built with a unique aggregation of high performance models to deliver dependable, noise reduced trend signals. Its robust design, free from overfitting, ensures adaptability across various assets and timeframes. With customizable sensitivity settings, intuitive color coded visualization, and an advanced risk metrics table, NEUTRONSTAR provides traders with a comprehensive tool for identifying and riding profitable trends, while safeguarding capital during unfavorable market phases.
Composite Oscillation Indicator Based on MACD and OthersThis indicator combines various technical analysis tools to create a composite oscillator that aims to capture multiple aspects of market behavior. Here's a breakdown of its components:
* Individual RSIs (xxoo1-xxoo15): The code calculates the RSI (Relative Strength Index) of numerous indicators, including volume-based indicators (NVI, PVI, OBV, etc.), price-based indicators (CCI, CMO, etc.), and moving averages (WMA, ALMA, etc.). It also includes the RSI of the MACD histogram (xxoo14).
* Composite RSI (xxoojht): The individual RSIs are then averaged to create a composite RSI, aiming to provide a more comprehensive view of market momentum and potential turning points.
* MACD Line RSI (xxoo14): The RSI of the MACD histogram incorporates the momentum aspect of the MACD indicator into the composite measure.
* Double EMA (co, coo): The code employs two Exponential Moving Averages (EMAs) of the composite RSI, with different lengths (9 and 18 periods).
* Difference (jo): The difference between the two EMAs (co and coo) is calculated, aiming to capture the rate of change in the composite RSI.
* Smoothed Difference (xxp): The difference (jo) is further smoothed using another EMA (9 periods) to reduce noise and enhance the signal.
* RSI of Smoothed Difference (cco): Finally, the RSI is applied to the smoothed difference (xxp) to create the core output of the indicator.
Market Applications and Trading Strategies:
* Overbought/Oversold: The indicator's central line (plotted at 50) acts as a reference for overbought/oversold conditions. Values above 50 suggest potential overbought zones, while values below 50 indicate oversold zones.
* Crossovers and Divergences: Crossovers of the cco line above or below its previous bar's value can signal potential trend changes. Divergences between the cco line and price action can also provide insights into potential trend reversals.
* Emoji Markers: The code adds emoji markers ("" for bullish and "" for bearish) based on the crossover direction of the cco line. These can provide a quick visual indication of potential trend shifts.
* Colored Fill: The area between the composite RSI line (xxoojht) and the central line (50) is filled with color to visually represent the prevailing market sentiment (green for above 50, red for below 50).
Trading Strategies (Examples):
* Long Entry: Consider a long entry (buying) signal when the cco line crosses above its previous bar's value and the composite RSI (xxoojht) is below 50, suggesting a potential reversal from oversold conditions.
* Short Entry: Conversely, consider a short entry (selling) signal when the cco line crosses below its previous bar's value and the composite RSI (xxoojht) is above 50, suggesting a potential reversal from overbought conditions.
* Confirmation: Always combine the indicator's signals with other technical analysis tools and price action confirmation for better trade validation.
Additional Notes:
* The indicator offers a complex combination of multiple indicators. Consider testing and optimizing the parameters (EMAs, RSI periods) to suit your trading style and market conditions.
* Backtesting with historical data can help assess the indicator's effectiveness and identify potential strengths and weaknesses in different market environments.
* Remember that no single indicator is perfect, and the cco indicator should be used in conjunction with other forms of analysis to make informed trading decisions.
By understanding the logic behind this composite oscillator and its potential applications, you can incorporate it into your trading strategy to potentially identify trends, gauge market sentiment, and generate trading signals.
Fractional Accumulation Distribution Strategy🔹 INTRODUCTION:
As traders and investors, we often find ourselves searching for ways to maximize our market positioning—trying to capture the best price, manage risk, and adapt to ever-changing volatility. Through years of working with a variety of traders and investors, a common theme emerged: the most successful market participants were those who accumulated positions strategically over time, rather than relying on one-off, rigid entry points. However, even the best of them struggled to consistently time their entries and exits for optimal results.
That's why I created the Fractional Accumulation/Distribution Strategy (FADS)—an adaptable solution designed to dynamically adjust position sizing and entry points based on changing market conditions, enabling both passive and active market participants to optimize their approach.
The FADS trading strategy combines volatility-based trend detection and adaptive position scaling to maximize profitability across varied market conditions. By using the price ranges from higher timeframes, FADS pinpoints extreme demand and supply zones with a high statistical probability of reversal, making it effective in both high and low volatility environments. By applying adjustable threshold settings, users can focus on meaningful price movements to reduce unnecessary trades. Adaptive position scaling further enhances this approach by adjusting position sizes based on entry level distances, allowing for strategic position building that balances risk and reward in uncertain markets. This systematic scaling begins with smaller positions, expanding as the trend solidifies, creating a refined, robust trading experience.
🔹 FEATURES:
Multi-Timeframe Volatility-Based Trend Detection
Accumulation/Distribution Level Filter
Customizable Period for Highest/Lowest Prices Capture
Adjustable Sensitivity & Frequency in Positioning
Broad control settings of Strategy
Adaptive Position Scaling
🔹 SETTINGS:
Volatility : Determines trading range based on market volatility . Highest range value number of periods.
Factor : Adjusts the width of the Accumulation & Distribution bands separately. The Level Filter feature offers customizable triggering bands, allowing users to fine-tune the initiation point for the Accumulation/Distribution sequence. This flexibility enables traders to align entries more precisely with market conditions, setting optimal thresholds for initiating trade chains, whether in accumulating positions during uptrends or distributing in downtrends.
Lowest : Choose the price source (e.g., Close, Low). Number of bars considered when determining the lowest price level. Selecting the checkbox generate a signal when the price crosses below the previous lowest value for calculating the lowest value used for trade signals.
Highest : Choose the price source (e.g., Close, High). Number of bars considered when determining the highest price levels. Selecting the checkbox generate a signal when the price crosses above the previous highest value for calculating the highest value used for trade signals.
Accumulation Spread : Adjusts the buying frequency sensitivity by setting the distance between entries based on personal risk tolerance. Larger values for less frequent buys; smaller values for more frequent buys.
Distribution Spread : Adjusts the selling frequency sensitivity by setting the distance between exits based on reward preference. Larger values for less frequent sells; smaller values for more frequent sells.
Percentage of Capital Allocation : Sets the portion of total capital used for the initial trade in a strategy. It sets the scale for subsequent trades during accumulation phase.
🔹 APPLICATIONS:
❖ Accumulation and Distribution Phases
Early entries are avoided by initiating accumulation only after a trend reversal is confirmed and price breaks below long-term range.
Position sizes are determined by the distance between consecutive trades, smaller distance results in smaller position sizes and vice versa.
Average position cost is reduced by accumulating larger positions at the lower prices, potentially resulting in improved profitability.
Early exits are avoided by initiating distribution only after trend reversal is confirmed and price breaks above long-term range.
The pace of distribution can be tracked by the violet line that represents average positions during distribution phase
❖ Use Cases (Different than default setting input is used for illustration purposes)
If the starting point of accumulation starts too high for the risk preference, Accumulation Level Filter can be lowered by increasing the 🟢 threshold Factor.
If the starting point of distribution is too low for the reward preference, the Distribution Level Filter can be raised by increasing the 🔴 threshold Factor.
In lower timeframes, positions during the accumulation phase could be purchased at higher levels relative to prior entry positions. To optimize for this, consider extending the period used to capture the lowest prices. Similarly, during the distribution phase, increasing the period for identifying higher prices can improve accuracy.
🔹 Strategy Properties:
Adjusting properties within the script settings is recommended to align with specific accounts and trading platforms, ensuring realistic strategy results.
Balance (default): $100,000
Initial Order Size: 1% of the default balance
Commission: 0.1%
Slippage: 5 Ticks
Backtesting: Backtested using TradingView’s built-in strategy testing tool with default commission rates of 0.1% and slippage of 5 ticks. It reflects average market conditions for Apple Inc. (APPL) on 1-hour timeframe
Disclaimers: Commission and slippage varies with market conditions and brokerage policies. The assumed value may not represent all trading environments.
PAST PERFORMANCE DOESN’T GUARANTEE FUTURE RESULTS!
Disclaimer: Please remember that past performance may not be indicative of future results. Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script don’t provide any financial advice.
This invite-only script is being published as part of my commitment to developing tools that align with TradingView’s community standards. Access requests will be reviewed carefully after the script passes TradingView's moderation process.
Supertrend EMA & KNNSupertrend EMA & KNN
The Supertrend EMA indicator cuts through the noise to deliver clear trend signals.
This tool is built using the good old Exponential Moving Averages (EMAs) with a novel of machine learning; KNN (K Nearest Neighbors) breakout detection method.
Key Features:
Effortless Trend Identification: Supertrend EMA simplifies trend analysis by automatically displaying a color-coded EMA. Green indicates an uptrend, red signifies a downtrend, and the absence of color suggests a potential range.
Dynamic Breakout Detection: Unlike traditional EMAs, Supertrend EMA incorporates a KNN-based approach to identify breakouts. This allows for faster color changes compared to standard EMAs, offering a more dynamic picture of the trend.
Customizable Parameters: Fine-tune the indicator to your trading style. Adjust the EMA length for trend smoothing, KNN lookback window for breakout sensitivity, and breakout threshold for filtering noise.
A Glimpse Under the Hood:
Dual EMA Power: The indicator utilizes two EMAs. A longer EMA (controlled by the "EMA Length" parameter) provides a smooth trend direction, while a shorter EMA (controlled by the "Short EMA Length" parameter) triggers color changes, aiming for faster response to breakouts.
KNN Breakout Detection: This innovative feature analyzes price action over a user-defined lookback period (controlled by the "KNN Lookback Length" parameter) to identify potential breakouts. If the price surpasses a user-defined threshold (controlled by the "Breakout Threshold" parameter) above the recent highs, a green color is triggered, signaling a potential uptrend. Conversely, a breakdown below the recent lows triggers a red color, indicating a potential downtrend.
Trading with Supertrend EMA:
Ride the Trend: When the indicator displays green, look for long (buy) opportunities, especially when confirmed by bullish price action patterns on lower timeframes. Conversely, red suggests potential shorting (sell) opportunities, again confirmed by bearish price action on lower timeframes.
Embrace Clarity: The color-coded EMA provides a clear visual representation of the trend, allowing you to focus on price action and refine your entry and exit strategies.
A Word of Caution:
While Supertrend EMA offers faster color changes than traditional EMAs, it's important to acknowledge a slight inherent lag. Breakout detection relies on historical data, and there may be a brief delay before the color reflects a new trend.
To achieve optimal results, consider:
Complementary Tools: Combine Supertrend EMA with other indicators or price action analysis for additional confirmation before entering trades.
Solid Risk Management: Always practice sound risk management strategies such as using stop-loss orders to limit potential losses.
Supertrend EMA is a powerful tool designed to simplify trend identification and enhance your trading experience. However, remember, no single indicator guarantees success. Use it with a comprehensive trading strategy and disciplined risk management for optimal results.
Disclaimer:
While the Supertrend EMA indicator can be a valuable tool for identifying potential trend changes, it's important to note that it's not infallible. Market conditions can be highly dynamic, and indicators may sometimes provide false signals. Therefore, it's crucial to use this indicator in conjunction with other technical analysis tools and sound risk management practices. Always conduct thorough research and consider consulting with a financial advisor before making any investment decisions.
Power Core MAThe Power Core MA indicator is a powerful tool designed to identify the most significant moving average (MA) in a given price chart. This indicator analyzes a wide range of moving averages, from 50 to 400 periods, to determine which one has the strongest influence on the current price action.
The blue line plotted on the chart represents the "Current Core MA," which is the moving average that is most closely aligned with other nearby moving averages. This line indicates the current trend and potential support or resistance levels.
The table displayed on the chart provides two important pieces of information. The "Current Core MA" value shows the length of the moving average that is currently most influential. The "Historical Core MA" value represents the average length of the most influential moving averages over time.
This indicator is particularly useful for traders and analysts who want to identify the most relevant moving average for their analysis. By focusing on the moving average that has the strongest historical significance, users can make more informed decisions about trend direction, support and resistance levels, and potential entry or exit points.
The Power Core MA is an excellent tool for those interested in finding the strongest moving average in the price history. It simplifies the process of analyzing multiple moving averages by automatically identifying the most influential one, saving time and providing valuable insights into market dynamics.
By combining current and historical data, this indicator offers a comprehensive view of the market's behavior, helping traders to adapt their strategies to the most relevant timeframes and trend strengths.
The Strat Patterns Indicator v1.0The Strat Patterns Indicator is a tool that draws Strat patterns in real-time, highlights Strat scenarios, key levels, and helps traders effectively apply the Strat trading strategy.
It combines features such as pattern recognition, timeframe continuity analysis, target level highlighting, and custom alerts to simplify trading decisions and maximize profit potential.
Display All Strat Patterns
The Strat Patterns Indicator shows all Strat patterns directly on your chart, making it easier to spot trading opportunities in real-time. You can choose to show or hide specific patterns based on your preferences. The patterns include:
2-2 Continuation
2-2 Reversal
3-2-2 Reversal
2-1-2 Continuation
2-1-2 Reversal
1-2-2 Reversal
3-1-2 Continuation
1-3 Reversal
3-1-2 Reversal
Highlight Major Candlestick Patterns
The indicator highlights important candlestick formations that are crucial for forecasting the major trend reversals in the market. These candlestick patterns include:
Hammer
Shooting Star
Doji
Gravestone Doji
Dragonfly Doji
Morning Doji Star
Evening Doji Star
By showcasing these patterns, the indicator helps traders quickly identify possible reversals or continuations, providing an extra layer of confirmation for trading decisions.
Timeframe Continuity Table
This indicator includes a customizable table that displays timeframe continuity, allowing you to align your trades with the overall market trend. You can select up to four higher timeframes to monitor, helping you ensure that your trades follow the broader trend direction.
This feature makes it easy to identify whether the market trend is aligned across multiple timeframes, enhancing your ability to make high-probability trades.
Show Target Levels (Previous Highs/Lows)
The indicator highlights target levels based on previous highs or lows, making it easier to set realistic profit targets and manage trades effectively.
By identifying these key levels, you can better gauge potential price movements and plan your trades with greater precision, ensuring that you maximize profit opportunities while minimizing risk.
Highlight Higher Timeframe Target Levels
This feature allows you to display target levels from a higher timeframe while trading on a lower timeframe.
For example, if you are trading on a 4-hour chart, you can choose to show daily target levels, including high/low levels and Fibonacci golden ratios. This helps you identify more significant profit targets and enhances your ability to capture larger moves while staying aligned with the overall trend.
Breakout Confirmation
The indicator provides an option to display the previous candlestick's high or low value, helping you confirm breakouts in Strat patterns. This feature is useful for validating whether a true breakout has occurred, giving you greater confidence in your trade entries and helping you avoid potential false breakouts.
Alerts for Strat Patterns
With this feature, you can set up alerts that trigger whenever a Strat pattern forms. This ensures you never miss a trading opportunity, keeping you informed and ready to act when key patterns emerge. The alerts provide real-time notifications, allowing you to stay on top of market movements without constantly monitoring your charts.