RSI with Swing Trade by Kelvin_VAlgorithm Description: "RSI with Swing Trade by Kelvin_V"
1. Introduction:
This algorithm uses the RSI (Relative Strength Index) and optional Moving Averages (MA) to detect potential uptrends and downtrends in the market. The key feature of this script is that it visually changes the candle colors based on the market conditions, making it easier for users to identify potential trend swings or wave patterns.
The strategy offers flexibility by allowing users to enable or disable the MA condition. When the MA condition is enabled, the strategy will confirm trends using two moving averages. When disabled, the strategy will only use RSI to detect potential market swings.
2. Key Features of the Algorithm:
RSI (Relative Strength Index):
The RSI is used to identify potential market turning points based on overbought and oversold conditions.
When the RSI exceeds a predefined upper threshold (e.g., 60), it suggests a potential uptrend.
When the RSI drops below a lower threshold (e.g., 40), it suggests a potential downtrend.
Moving Averages (MA) - Optional:
Two Moving Averages (Short MA and Long MA) are used to confirm trends.
If the Short MA crosses above the Long MA, it indicates an uptrend.
If the Short MA crosses below the Long MA, it indicates a downtrend.
Users have the option to enable or disable this MA condition.
Visual Candle Coloring:
Green candles represent a potential uptrend, indicating a bullish move based on RSI (and MA if enabled).
Red candles represent a potential downtrend, indicating a bearish move based on RSI (and MA if enabled).
3. How the Algorithm Works:
RSI Levels:
The user can set RSI upper and lower bands to represent potential overbought and oversold levels. For example:
RSI > 60: Indicates a potential uptrend (bullish move).
RSI < 40: Indicates a potential downtrend (bearish move).
Optional MA Condition:
The algorithm also allows the user to apply the MA condition to further confirm the trend:
Short MA > Long MA: Confirms an uptrend, reinforcing a bullish signal.
Short MA < Long MA: Confirms a downtrend, reinforcing a bearish signal.
This condition can be disabled, allowing the user to focus solely on RSI signals if desired.
Swing Trade Logic:
Uptrend: If the RSI exceeds the upper threshold (e.g., 60) and (optionally) the Short MA is above the Long MA, the candles will turn green to signal a potential uptrend.
Downtrend: If the RSI falls below the lower threshold (e.g., 40) and (optionally) the Short MA is below the Long MA, the candles will turn red to signal a potential downtrend.
Visual Representation:
The candle colors change dynamically based on the RSI values and moving average conditions, making it easier for traders to visually identify potential trend swings or wave patterns without relying on complex chart analysis.
4. User Customization:
The algorithm provides multiple customization options:
RSI Length: Users can adjust the period for RSI calculation (default is 4).
RSI Upper Band (Potential Uptrend): Users can customize the upper RSI level (default is 60) to indicate a potential bullish move.
RSI Lower Band (Potential Downtrend): Users can customize the lower RSI level (default is 40) to indicate a potential bearish move.
MA Type: Users can choose between SMA (Simple Moving Average) and EMA (Exponential Moving Average) for moving average calculations.
Enable/Disable MA Condition: Users can toggle the MA condition on or off, depending on whether they want to add moving averages to the trend confirmation process.
5. Benefits of the Algorithm:
Easy Identification of Trends: By changing candle colors based on RSI and MA conditions, the algorithm makes it easy for users to visually detect potential trend reversals and trend swings.
Flexible Conditions: The user has full control over the RSI and MA settings, allowing them to adapt the strategy to different market conditions and timeframes.
Clear Visualization: With the candle color changes, users can quickly recognize when a potential uptrend or downtrend is forming, enabling faster decision-making in their trading.
6. Example Usage:
Day traders: Can apply this strategy on short timeframes such as 5 minutes or 15 minutes to detect quick trends or reversals.
Swing traders: Can use this strategy on longer timeframes like 1 hour or 4 hours to identify and follow larger market swings.
Cari dalam skrip untuk "algo"
Intramarket Difference Index StrategyHi Traders !!
The IDI Strategy:
In layman’s terms this strategy compares two indicators across markets and exploits their differences.
note: it is best the two markets are correlated as then we know we are trading a short to long term deviation from both markets' general trend with the assumption both markets will trend again sometime in the future thereby exhausting our trading opportunity.
📍 Import Notes:
This Strategy calculates trade position size independently (i.e. risk per trade is controlled in the user inputs tab), this means that the ‘Order size’ input in the ‘Properties’ tab will have no effect on the strategy. Why ? because this allows us to define custom position size algorithms which we can use to improve our risk management and equity growth over time. Here we have the option to have fixed quantity or fixed percentage of equity ATR (Average True Range) based stops in addition to the turtle trading position size algorithm.
‘Pyramiding’ does not work for this strategy’, similar to the order size input togeling this input will have no effect on the strategy as the strategy explicitly defines the maximum order size to be 1.
This strategy is not perfect, and as of writing of this post I have not traded this algo.
Always take your time to backtests and debug the strategy.
🔷 The IDI Strategy:
By default this strategy pulls data from your current TV chart and then compares it to the base market, be default BINANCE:BTCUSD . The strategy pulls SMA and RSI data from either market (we call this the difference data), standardizes the data (solving the different unit problem across markets) such that it is comparable and then differentiates the data, calling the result of this transformation and difference the Intramarket Difference (ID). The formula for the the ID is
ID = market1_diff_data - market2_diff_data (1)
Where
market(i)_diff_data = diff_data / ATR(j)_market(i)^0.5,
where i = {1, 2} and j = the natural numbers excluding 0
Formula (1) interpretation is the following
When ID > 0: this means the current market outperforms the base market
When ID = 0: Markets are at long run equilibrium
When ID < 0: this means the current market underperforms the base market
To form the strategy we define one of two strategy type’s which are Trend and Mean Revesion respectively.
🔸 Trend Case:
Given the ‘‘Strategy Type’’ is equal to TREND we define a threshold for which if the ID crosses over we go long and if the ID crosses under the negative of the threshold we go short.
The motivating idea is that the ID is an indicator of the two symbols being out of sync, and given we know volatility clustering, momentum and mean reversion of anomalies to be a stylised fact of financial data we can construct a trading premise. Let's first talk more about this premise.
For some markets (cryptocurrency markets - synthetic symbols in TV) the stylised fact of momentum is true, this means that higher momentum is followed by higher momentum, and given we know momentum to be a vector quantity (with magnitude and direction) this momentum can be both positive and negative i.e. when the ID crosses above some threshold we make an assumption it will continue in that direction for some time before executing back to its long run equilibrium of 0 which is a reasonable assumption to make if the market are correlated. For example for the BTCUSD - ETHUSD pair, if the ID > +threshold (inputs for MA and RSI based ID thresholds are found under the ‘‘INTRAMARKET DIFFERENCE INDEX’’ group’), ETHUSD outperforms BTCUSD, we assume the momentum to continue so we go long ETHUSD.
In the standard case we would exit the market when the IDI returns to its long run equilibrium of 0 (for the positive case the ID may return to 0 because ETH’s difference data may have decreased or BTC’s difference data may have increased). However in this strategy we will not define this as our exit condition, why ?
This is because we want to ‘‘let our winners run’’, to achieve this we define a trailing Donchian Channel stop loss (along with a fixed ATR based stop as our volatility proxy). If we were too use the 0 exit the strategy may print a buy signal (ID > +threshold in the simple case, market regimes may be used), return to 0 and then print another buy signal, and this process can loop may times, this high trade frequency means we fail capture the entire market move lowering our profit, furthermore on lower time frames this high trade frequencies mean we pay more transaction costs (due to price slippage, commission and big-ask spread) which means less profit.
By capturing the sum of many momentum moves we are essentially following the trend hence the trend following strategy type.
Here we also print the IDI (with default strategy settings with the MA difference type), we can see that by letting our winners run we may catch many valid momentum moves, that results in a larger final pnl that if we would otherwise exit based on the equilibrium condition(Valid trades are denoted by solid green and red arrows respectively and all other valid trades which occur within the original signal are light green and red small arrows).
another example...
Note: if you would like to plot the IDI separately copy and paste the following code in a new Pine Script indicator template.
indicator("IDI")
// INTRAMARKET INDEX
var string g_idi = "intramarket diffirence index"
ui_index_1 = input.symbol("BINANCE:BTCUSD", title = "Base market", group = g_idi)
// ui_index_2 = input.symbol("BINANCE:ETHUSD", title = "Quote Market", group = g_idi)
type = input.string("MA", title = "Differrencing Series", options = , group = g_idi)
ui_ma_lkb = input.int(24, title = "lookback of ma and volatility scaling constant", group = g_idi)
ui_rsi_lkb = input.int(14, title = "Lookback of RSI", group = g_idi)
ui_atr_lkb = input.int(300, title = "ATR lookback - Normalising value", group = g_idi)
ui_ma_threshold = input.float(5, title = "Threshold of Upward/Downward Trend (MA)", group = g_idi)
ui_rsi_threshold = input.float(20, title = "Threshold of Upward/Downward Trend (RSI)", group = g_idi)
//>>+----------------------------------------------------------------+}
// CUSTOM FUNCTIONS |
//<<+----------------------------------------------------------------+{
// construct UDT (User defined type) containing the IDI (Intramarket Difference Index) source values
// UDT will hold many variables / functions grouped under the UDT
type functions
float Close // close price
float ma // ma of symbol
float rsi // rsi of the asset
float atr // atr of the asset
// the security data
getUDTdata(symbol, malookback, rsilookback, atrlookback) =>
indexHighTF = barstate.isrealtime ? 1 : 0
= request.security(symbol, timeframe = timeframe.period,
expression = [close , // Instentiate UDT variables
ta.sma(close, malookback) ,
ta.rsi(close, rsilookback) ,
ta.atr(atrlookback) ])
data = functions.new(close_, ma_, rsi_, atr_)
data
// Intramerket Difference Index
idi(type, symbol1, malookback, rsilookback, atrlookback, mathreshold, rsithreshold) =>
threshold = float(na)
index1 = getUDTdata(symbol1, malookback, rsilookback, atrlookback)
index2 = getUDTdata(syminfo.tickerid, malookback, rsilookback, atrlookback)
// declare difference variables for both base and quote symbols, conditional on which difference type is selected
var diffindex1 = 0.0, var diffindex2 = 0.0,
// declare Intramarket Difference Index based on series type, note
// if > 0, index 2 outpreforms index 1, buy index 2 (momentum based) until equalibrium
// if < 0, index 2 underpreforms index 1, sell index 1 (momentum based) until equalibrium
// for idi to be valid both series must be stationary and normalised so both series hae he same scale
intramarket_difference = 0.0
if type == "MA"
threshold := mathreshold
diffindex1 := (index1.Close - index1.ma) / math.pow(index1.atr*malookback, 0.5)
diffindex2 := (index2.Close - index2.ma) / math.pow(index2.atr*malookback, 0.5)
intramarket_difference := diffindex2 - diffindex1
else if type == "RSI"
threshold := rsilookback
diffindex1 := index1.rsi
diffindex2 := index2.rsi
intramarket_difference := diffindex2 - diffindex1
//>>+----------------------------------------------------------------+}
// STRATEGY FUNCTIONS CALLS |
//<<+----------------------------------------------------------------+{
// plot the intramarket difference
= idi(type,
ui_index_1,
ui_ma_lkb,
ui_rsi_lkb,
ui_atr_lkb,
ui_ma_threshold,
ui_rsi_threshold)
//>>+----------------------------------------------------------------+}
plot(intramarket_difference, color = color.orange)
hline(type == "MA" ? ui_ma_threshold : ui_rsi_threshold, color = color.green)
hline(type == "MA" ? -ui_ma_threshold : -ui_rsi_threshold, color = color.red)
hline(0)
Note it is possible that after printing a buy the strategy then prints many sell signals before returning to a buy, which again has the same implication (less profit. Potentially because we exit early only for price to continue upwards hence missing the larger "trend"). The image below showcases this cenario and again, by allowing our winner to run we may capture more profit (theoretically).
This should be clear...
🔸 Mean Reversion Case:
We stated prior that mean reversion of anomalies is an standerdies fact of financial data, how can we exploit this ?
We exploit this by normalizing the ID by applying the Ehlers fisher transformation. The transformed data is then assumed to be approximately normally distributed. To form the strategy we employ the same logic as for the z score, if the FT normalized ID > 2.5 (< -2.5) we buy (short). Our exit conditions remain unchanged (fixed ATR stop and trailing Donchian Trailing stop)
🔷 Position Sizing:
If ‘‘Fixed Risk From Initial Balance’’ is toggled true this means we risk a fixed percentage of our initial balance, if false we risk a fixed percentage of our equity (current balance).
Note we also employ a volatility adjusted position sizing formula, the turtle training method which is defined as follows.
Turtle position size = (1/ r * ATR * DV) * C
Where,
r = risk factor coefficient (default is 20)
ATR(j) = risk proxy, over j times steps
DV = Dollar Volatility, where DV = (1/Asset Price) * Capital at Risk
🔷 Risk Management:
Correct money management means we can limit risk and increase reward (theoretically). Here we employ
Max loss and gain per day
Max loss per trade
Max number of consecutive losing trades until trade skip
To read more see the tooltips (info circle).
🔷 Take Profit:
By defualt the script uses a Donchain Channel as a trailing stop and take profit, In addition to this the script defines a fixed ATR stop losses (by defualt, this covers cases where the DC range may be to wide making a fixed ATR stop usefull), ATR take profits however are defined but optional.
ATR SL and TP defined for all trades
🔷 Hurst Regime (Regime Filter):
The Hurst Exponent (H) aims to segment the market into three different states, Trending (H > 0.5), Random Geometric Brownian Motion (H = 0.5) and Mean Reverting / Contrarian (H < 0.5). In my interpretation this can be used as a trend filter that eliminates market noise.
We utilize the trending and mean reverting based states, as extra conditions required for valid trades for both strategy types respectively, in the process increasing our trade entry quality.
🔷 Example model Architecture:
Here is an example of one configuration of this strategy, combining all aspects discussed in this post.
Future Updates
- Automation integration (next update)
Arithmetic Candlesticks (Zeiierman)█ Arithmetic Candlestick - Overview
Arithmetic Candlesticks (Zeiierman) introduce a new way to read charts by applying logical arithmetic to real price data. These candlesticks focus on filtering out noise and smoothing price movements using a bell-shaped curve, which helps to refine the data and highlight the true trend. This approach provides a clearer view of market trends, allowing traders to interpret price action more effectively with minimal lag and distraction.
⚪ What is Arithmetic Candlesticks
Arithmetic Candlesticks use a calculation method rooted in the idea that the market moves in patterns that can be identified and predicted by examining past price movements.
Analyzing momentum, price action, and trend patterns is useful for traders who want to quickly scan and identify price patterns, trends, and momentum in the market. The system searches for these patterns and trends to anticipate future price movements. Traders and investors can identify trends hidden in market noise, enabling them to uncover trading opportunities that might not be immediately obvious to the naked eye.
⚪ Eliminates price noise
The Arithmetic Candlestick noise filtering function is used to reduce price noise, which is the randomness in the price movement of an asset caused by market participants trading on a short-term basis. The idea behind the filter is that it eliminates the impact of short-term fluctuations in the price, thus providing a more accurate picture of the overall trend.
█ Capturing Trends with precise chart reading
Trend moves are some of the biggest moneymakers in trading; in fact, trading in the direction of the trend reduces risk and increases profit potential. Arithmetic Candlestick helps traders do just that.
In a fast-moving and volatile market characterized by high-frequency algorithms, retail traders have a hard time distinguishing the real trend from the noise. Arithmetic Candlesticks are designed to filter out the noise created by insignificant price moves and leave traders with the price action that matters, namely a clear and insightful chart reading. Due to its sophisticated mathematical calculations, Arithmetic Candlesticks are able to analyze any market and timeframe.
█ How to use Arithmetic Candlesticks
Arithmetic Candlesticks is an all-in-one trend and momentum tool that can be used stand-alone or in conjunction with other indicators. Its primary use is to provide a clear chart reading, easily identify trends, and help traders stay longer in trends.
The indicator includes excellent momentum features that offer insights into the current momentum and the strength of the price action. This provides traders with a unique chart experience that yields valuable insights. The indicator boasts numerous features, each of which can be used stand-alone or in combination with others. Read more about the features below.
These candles can be used in conjunction with other indicators such as support/resistance, trendlines, ICT trading, and other patterns.
█ Arithmetic Candlesticks features
The indicator comes with tons of great features that make the indicator into its own system that can be used stand-alone. You find everything from trend reading, entry/exit points, identifying momentum, and auto-stop loss.
⚪ Candle Modes:
Traders can select from three different types of arithmetic candle calculations and enable our volatility-adjusted filter for all of them. By default, the candles are set to Arithmetic candlesticks. However, depending on their trading preferences, users can select Arithmetic + Heikin Ashi Candles or Impulse + Wicks Candles.
The Heikin Ashi mode of the candlesticks makes the indicator smoother and more trend-friendly.
The Impulse + Wick mode of the candlesticks makes the indicator responsive to momentum. The length of the wicks represents the strength of the current momentum. The longer the wicks, the greater the momentum in the market.
If traders enable the Volatility Adjusted candles , the indicator becomes much more responsive to volatility moves, which is a way of making the candlesticks more responsive to significant price movements.
⚪ Trend coloring
Arithmetic candlesticks come in three different color modes: the default one, the gradient one, and the advanced trend coloring. Enable the Trend coloring if you want to engage in long-term trend trading. This filter does not change the arithmetic candlesticks, only the bar coloring.
⚪ Buy and Sell signals
To make trend trading easier to understand, we have included Buy/Sell signals. These signals are based both on the type of candlesticks selected and the type of coloring used. In addition, they come with three filters and are available in scalping and trend modes.
Candle Color Filter: A buy signal will only occur if the candlesticks are bullish, and a sell signal will only occur if the candlesticks are bearish.
Trend Tracker Filter: A buy signal will only occur if the Trend Tracker is bullish, and a sell signal will only occur if the Trend Tracker is bearish.
When both filters are applied, it means that both the candle color and the Trend Tracker should have the same sign in order to trigger a signal.
These filters are very effective and should be used when utilizing the signals.
Take Profit signals can be enabled to help traders know when to take profits.
Adaptive Stop Loss can be enabled for the signals, helping traders manage their risk.
⚪ Trend Tracker
The Trend Tracker line provides insights about the underlying trend. Adjust it if you want to engage in scalping, which makes the line much more responsive. Set the underlying speed of the trend to either Fast or Slow. This Trend Tracker works well in conjunction with Arithmetic Candlesticks and the associated signals.
⚪ Trend Sentiment
Enable Trend Sentiment to identify the levels at which the market is considered bullish or bearish. This feature helps you gauge the overall market direction, allowing you to align your trades with the prevailing trend. The Trend Sentiment also measures the strength of the trend, highlighting whether the current price action reflects a strong or weak trend. Adjust the sensitivity to determine how early or late you want to capture these trend signals.
⚪ Impulse
Enable Impulse Signals to understand when the market is making a significant move, often leading to a pullback or pause. These Impulse Signals can indicate the very start of a trend or serve as the first sign of a reversal. Enable 'Significant Impulses' if you only want to display the most significant market impulses.
█ How is Arithmetic Candlesticks Calculated?
⚪ Candlesticks
These candlesticks combine advanced smoothing techniques with price pattern recognition, giving traders a clearer view of market dynamics.
Adaptive Smoothing: The core of this smoothing approach is its ability to adjust dynamically based on market conditions. It reduces lag while staying responsive to price changes. This adaptive nature allows the candlesticks to follow the price action smoothly, minimizing the influence of short-term fluctuations. As a result, the trend is depicted with greater accuracy, helping traders to stay in tune with the market’s true direction.
Refined Smoothing with Weighted Averages: Another key component of the smoothing process involves applying a refined technique that uses a bell-shaped curve to weight price data. This method reduces the impact of outlier movements, resulting in a smoother, more continuous curve that accurately represents the market's central trend. This ensures that the candlesticks reflect a more balanced view of price action, focusing on the significant movements while filtering out unnecessary noise.
⚪ Trend Coloring
The Trend Coloring feature offers a powerful visualization tool that helps traders quickly identify the prevailing market trend and its strength. By analyzing market structure and the velocity of price movements, this feature provides a clear, dynamic view of the long-term trend direction.
Market Structure Analysis: The Trend Coloring is rooted in a thorough analysis of market structure, focusing on key price levels over time. By evaluating these levels, the system determines whether the market is in an uptrend, downtrend, or ranging phase. This information is then used to color the chart according to the current trend direction, providing a visual cue that makes it easier to align your trades with the broader market movement.
Velocity of Price Movements: . In addition to identifying the trend direction, the system also calculates the velocity of price movements. This involves assessing how quickly or slowly prices are advancing in a particular direction, offering deeper insight into the trend's strength and momentum. Faster price movements suggest a stronger trend, while slower movements may indicate a weakening or consolidating market. This dynamic approach ensures that the Trend Coloring not only highlights the trend but also reflects its intensity and potential sustainability.
⚪ Buy and Sell signals
The Buy/Sell signals are generated using a sophisticated approach that tracks key price action levels to determine market direction and momentum. This method constantly evaluates the relationship between the current price and dynamically adjusting levels that reflect the underlying market conditions. By staying in tune with the flow of the market, this approach effectively captures the onset of new trends while reducing the lag typically associated with traditional indicators.
Dynamic Price Action Levels: The signals are based on critical price action levels that adapt in real-time to market movements. These levels serve as flexible thresholds that help identify potential buy or sell opportunities. When the price interacts with these levels, it triggers signals that indicate possible entry or exit points, aligning your trades with the prevailing market direction.
Price Patterns: The algorithm also recognizes and integrates specific price patterns that are often precursors to significant market moves. By identifying these patterns, the system can anticipate changes in market direction more accurately, enabling earlier and more precise signals. This helps in capturing trend reversals or continuations effectively.
Momentum-Driven Adjustments: The system's price action levels are not static; they adjust dynamically in response to strong price movements. This ensures that the signals are not only timely but also in sync with the underlying market momentum, making the system highly effective in volatile conditions where quick decision-making is crucial.
⚪ Trend Tracker
The Trend Tracker utilizes the core principles of Arithmetic Candlesticks, including their sophisticated smoothing techniques and pattern recognition capabilities. By leveraging these features, the Trend Tracker effectively filters out market noise, allowing it to present a smooth and accurate representation of the current trend. This makes it easier to identify whether the market is trending upwards, downwards, or entering a period of consolidation.
Adaptive to Market Conditions: The Trend Tracker is not static; it dynamically adjusts as market conditions change. Whether the market is experiencing high volatility or moving through a quieter phase, the Trend Tracker remains responsive, continuously updating to reflect the most recent price action. This ensures that traders are always working with the most relevant information, making it easier to stay in sync with the market's true direction.
⚪ Trend Sentiment
Trend Sentiment analyzes key price levels and market structure to determine whether the current market sentiment is bullish or bearish. By examining the direction and momentum of price movements, it provides a straightforward view of the market's overall trend direction.
⚪ Impulse
Impulse monitors the market for sudden shifts in momentum, recognizing when the price is making a strong move that could lead to a trend continuation or a reversal. The feature is tuned to distinguish between regular market fluctuations and significant impulses. It focuses on the most meaningful price movements, ensuring that the signals you receive are relevant and actionable.
█ Important Note
Caution! Arithmetic candlesticks do not always reflect the actual price. Arithmetic uses smoothing and noise filtering to capture trends; hence, it might deviate from the actual close.
It's important to understand that Arithmetic Candlesticks are intended to provide a clearer picture of trend direction rather than exact price levels. Therefore, they should not be used as a substitute for actual market prices, especially in scenarios like backtesting or precise trade execution where exact price data is crucial. Instead, use Arithmetic Candlesticks as a tool for understanding trends and overall market direction, while relying on actual price data for decisions that require precise price points.
-----------------
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!
Consolidation Range Detector [Pt]█ Author's Note:
After extensively reviewing the existing consolidation detection tools in the TradingView library, I found that none fully met my expectations. Some tools were overly sensitive, producing too many invalid ranges, while others lacked the necessary sensitivity. Consequently, I decided to develop my own tool. I hope that you, fellow traders, find it valuable and enjoy using it.
█ Description:
The Consolidation Range Detector is a sophisticated TradingView tool designed to identify and visualize periods of price consolidation on any financial chart. This indicator employs advanced algorithms to detect ranges where price movements are confined, helping traders spot potential breakout zones and make informed trading decisions.
█ Key Features:
► Customizable Detection Sensitivity: Adjust the sensitivity of the detection algorithm to suit your trading strategy, ensuring a precise fit within the consolidation range.
► Dynamic Coloring: Choose between random or fixed colors for the consolidation ranges, with options to match different background color schemes (Dark, Light, Neutral).
► Visual Clarity: Highlight detected consolidation ranges directly on the chart with customizable color schemes to enhance visibility and provide clear visual cues.
► ATR-Based Validation: Ensures detected consolidation ranges are significant and reliable by using the Average True Range (ATR) for validation.
█ User-Defined Inputs:
► Minimum Detection Bars: Set the minimum number of bars required to detect a consolidation range.
► Max Range Multiplier: Define the maximum range for detection as a multiple of the ATR.
► Detection Sensitivity: Adjust the sensitivity of the detection algorithm. Higher values mean a tighter fit within the consolidation range.
► Color Options: Choose the color for the consolidation range boxes and decide whether to use random colors.
► Color Scheme (Background): Select a color scheme for the chart background (Dark, Light, Neutral).
█ How It Works:
► Range Detection: The indicator scans the chart for potential consolidation ranges based on user-defined parameters. It calculates the average price and ATR to determine the significance of the range.
► Validation: Each detected range is validated based on criteria such as ATR threshold, range validity, average price comparison, and the number of touches at the range boundaries.
► Visualization: Validated ranges are highlighted on the chart with colored boxes, providing a clear visual cue of potential consolidation zones.
█ Usage Examples:
► Example 1:
The image below showcases the Consolidation Range Detector in action on a chart of S&P 500 E-mini Futures. The indicator highlights several consolidation ranges with different colors, demonstrating its ability to adapt to varying market conditions and visually emphasize key areas of price consolidation. The annotations for breakouts and price reactions are manually marked to illustrate the practical application of the tool in identifying potential trading opportunities based on these key areas.
█ Practical Applications:
► Identify Breakout Zones: Use the detected consolidation ranges to identify potential breakout zones, helping to anticipate significant price movements.
► Identify Key Price Levels: The tool helps in pinpointing key price levels where there is a high probability of significant price reactions, providing crucial insights for trading strategies.
► Enhance Technical Analysis: Integrate the Consolidation Range Detector into your existing technical analysis toolkit to improve the accuracy of your trading decisions.
█ Conclusion:
The Consolidation Range Detector is a powerful tool for traders looking to identify periods of price consolidation and potential breakout zones. With its customizable settings and advanced detection algorithms, it provides a reliable and visual method to enhance your trading strategy. Whether you're a beginner or an experienced trader, this indicator can add significant value to your technical analysis.
█ Cautionary Note:
While the Consolidation Range Detector is a powerful tool, it's important to combine it with other indicators and analysis methods for comprehensive trading decisions. Always consider market context and external factors when interpreting detected consolidation ranges.
AI SuperTrend x Pivot Percentile - Strategy [PresentTrading]█ Introduction and How it is Different
The AI SuperTrend x Pivot Percentile strategy is a sophisticated trading approach that integrates AI-driven analysis with traditional technical indicators. Combining the AI SuperTrend with the Pivot Percentile strategy highlights several key advantages:
1. Enhanced Accuracy in Trend Prediction: The AI SuperTrend utilizes K-Nearest Neighbors (KNN) algorithm for trend prediction, improving accuracy by considering historical data patterns. This is complemented by the Pivot Percentile analysis which provides additional context on trend strength.
2. Comprehensive Market Analysis: The integration offers a multi-faceted approach to market analysis, combining AI insights with traditional technical indicators. This dual approach captures a broader range of market dynamics.
BTC 6H L/S Performance
Local
█ Strategy: How it Works - Detailed Explanation
🔶 AI-Enhanced SuperTrend Indicators
1. SuperTrend Calculation:
- The SuperTrend indicator is calculated using a moving average and the Average True Range (ATR). The basic formula is:
- Upper Band = Moving Average + (Multiplier × ATR)
- Lower Band = Moving Average - (Multiplier × ATR)
- The moving average type (SMA, EMA, WMA, RMA, VWMA) and the length of the moving average and ATR are adjustable parameters.
- The direction of the trend is determined based on the position of the closing price in relation to these bands.
2. AI Integration with K-Nearest Neighbors (KNN):
- The KNN algorithm is applied to predict trend direction. It uses historical price data and SuperTrend values to classify the current trend as bullish or bearish.
- The algorithm calculates the 'distance' between the current data point and historical points. The 'k' nearest data points (neighbors) are identified based on this distance.
- A weighted average of these neighbors' trends (bullish or bearish) is calculated to predict the current trend.
For more please check: Multi-TF AI SuperTrend with ADX - Strategy
🔶 Pivot Percentile Analysis
1. Percentile Calculation:
- This involves calculating the percentile ranks for high and low prices over a set of predefined lengths.
- The percentile function is typically defined as:
- Percentile = Value at (P/100) × (N + 1)th position
- Where P is the desired percentile, and N is the number of data points.
2. Trend Strength Evaluation:
- The calculated percentiles for highs and lows are used to determine the strength of bullish and bearish trends.
- For instance, a high percentile rank in the high prices may indicate a strong bullish trend, and vice versa for bearish trends.
For more please check: Pivot Percentile Trend - Strategy
🔶 Strategy Integration
1. Combining SuperTrend and Pivot Percentile:
- The strategy synthesizes the insights from both AI-enhanced SuperTrend and Pivot Percentile analysis.
- It compares the trend direction indicated by the SuperTrend with the strength of the trend as suggested by the Pivot Percentile analysis.
2. Signal Generation:
- A trading signal is generated when both the AI-enhanced SuperTrend and the Pivot Percentile analysis agree on the trend direction.
- For instance, a bullish signal is generated when both the SuperTrend is bullish, and the Pivot Percentile analysis shows strength in bullish trends.
🔶 Risk Management and Filters
- ADX and DMI Filter: The strategy uses the Average Directional Index (ADX) and the Directional Movement Index (DMI) as filters to assess the trend's strength and direction.
- Dynamic Trailing Stop Loss: Based on the SuperTrend indicator, the strategy dynamically adjusts stop-loss levels to manage risk effectively.
This strategy stands out for its ability to combine real-time AI analysis with established technical indicators, offering traders a nuanced and responsive tool for navigating complex market conditions. The equations and algorithms involved are pivotal in accurately identifying market trends and potential trade opportunities.
█ Usage
To effectively use this strategy, traders should:
1. Understand the AI and Pivot Percentile Indicators: A clear grasp of how these indicators work will enable traders to make informed decisions.
2. Interpret the Signals Accurately: The strategy provides bullish, bearish, and neutral signals. Traders should align these signals with their market analysis and trading goals.
3. Monitor Market Conditions: Given that this strategy is sensitive to market dynamics, continuous monitoring is crucial for timely decision-making.
4. Adjust Settings as Needed: Traders should feel free to tweak the input parameters to suit their trading preferences and to respond to changing market conditions.
█Default Settings and Their Impact on Performance
1. Trading Direction (Default: "Both")
Effect: Determines whether the strategy will take long positions, short positions, or both. Adjusting this setting can align the strategy with the trader's market outlook or risk preference.
2. AI Settings (Neighbors: 3, Data Points: 24)
Neighbors: The number of nearest neighbors in the KNN algorithm. A higher number might smooth out noise but could miss subtle, recent changes. A lower number makes the model more sensitive to recent data but may increase noise.
Data Points: Defines the amount of historical data considered. More data points provide a broader context but may dilute recent trends' impact.
3. SuperTrend Settings (Length: 10, Factor: 3.0, MA Source: "WMA")
Length: Affects the sensitivity of the SuperTrend indicator. A longer length results in a smoother, less sensitive indicator, ideal for long-term trends.
Factor: Determines the bandwidth of the SuperTrend. A higher factor creates wider bands, capturing larger price movements but potentially missing short-term signals.
MA Source: The type of moving average used (e.g., WMA - Weighted Moving Average). Different MA types can affect the trend indicator's responsiveness and smoothness.
4. AI Trend Prediction Settings (Price Trend: 10, Prediction Trend: 80)
Price Trend and Prediction Trend Lengths: These settings define the lengths of weighted moving averages for price and SuperTrend, impacting the responsiveness and smoothness of the AI's trend predictions.
5. Pivot Percentile Settings (Length: 10)
Length: Influences the calculation of pivot percentiles. A shorter length makes the percentile more responsive to recent price changes, while a longer length offers a broader view of price trends.
6. ADX and DMI Settings (ADX Length: 14, Time Frame: 'D')
ADX Length: Defines the period for the Average Directional Index calculation. A longer period results in a smoother ADX line.
Time Frame: Sets the time frame for the ADX and DMI calculations, affecting the sensitivity to market changes.
7. Commission, Slippage, and Initial Capital
These settings relate to transaction costs and initial investment, directly impacting net profitability and strategy feasibility.
HolidayLibrary "Holiday"
- Full Control over Holidays and Daylight Savings Time (DLS)
The Holiday Library is an essential tool for traders and analysts who engage in backtesting and live trading . This comprehensive library enables the incorporation of crucial calendar elements - specifically Daylight Savings Time (DLS) adjustments and public holidays - into trading strategies and backtesting environments.
Key Features:
- DLS Adjustments: The library takes into account the shifts in time due to Daylight Savings. This feature is particularly vital for backtesting strategies, as DLS can impact trading hours, which in turn affects the volatility and liquidity in the market. Accurate DLS adjustments ensure that backtesting scenarios are as close to real-life conditions as possible.
- Comprehensive Holiday Metadata: The library includes a rich set of holiday metadata, allowing for the detailed scheduling of trading activities around public holidays. This feature is crucial for avoiding skewed results in backtesting, where holiday trading sessions might differ significantly in terms of volume and price movement.
- Customizable Holiday Schedules: Users can add or remove specific holidays, tailoring the library to fit various regional market schedules or specific trading requirements.
- Visualization Aids: The library supports on-chart labels, making it visually intuitive to identify holidays and DLS shifts directly on trading charts.
Use Cases:
1. Strategy Development: When developing trading strategies, it’s important to account for non-trading days and altered trading hours due to holidays and DLS. This library enables a realistic and accurate representation of these factors.
2. Risk Management: Trading around holidays can be riskier due to thinner liquidity and greater volatility. By integrating holiday data, traders can better manage their risk exposure.
3. Backtesting Accuracy: For backtesting to be effective, it must simulate the actual market conditions as closely as possible. Incorporating holidays and DLS adjustments contributes to more reliable and realistic backtesting results.
4. Global Trading: For traders active in multiple global markets, this library provides an easy way to handle different holiday schedules and DLS shifts across regions.
The Holiday Library is a versatile tool that enhances the precision and realism of trading simulations and strategy development . Its integration into the trading workflow is straightforward and beneficial for both novice and experienced traders.
EasterAlgo(_year)
Calculates the date of Easter Sunday for a given year using the Anonymous Gregorian algorithm.
`Gauss Algorithm for Easter Sunday` was developed by the mathematician Carl Friedrich Gauss
This algorithm is based on the cycles of the moon and the fact that Easter always falls on the first Sunday after the first ecclesiastical full moon that occurs on or after March 21.
While it's not considered to be 100% accurate due to rare exceptions, it does give the correct date in most cases.
It's important to note that Gauss's formula has been found to be inaccurate for some 21st-century years in the Gregorian calendar. Specifically, the next suggested failure years are 2038, 2051.
This function can be used for Good Friday (Friday before Easter), Easter Sunday, and Easter Monday (following Monday).
en.wikipedia.org
Parameters:
_year (int) : `int` - The year for which to calculate the date of Easter Sunday. This should be a four-digit year (YYYY).
Returns: tuple - The month (1-12) and day (1-31) of Easter Sunday for the given year.
easterInit()
Inits the date of Easter Sunday and Good Friday for a given year.
Returns: tuple - The month (1-12) and day (1-31) of Easter Sunday and Good Friday for the given year.
isLeapYear(_year)
Determine if a year is a leap year.
Parameters:
_year (int) : `int` - 4 digit year to check => YYYY
Returns: `bool` - true if input year is a leap year
method timezoneHelper(utc)
Helper function to convert UTC time.
Namespace types: series int, simple int, input int, const int
Parameters:
utc (int) : `int` - UTC time shift in hours.
Returns: `string`- UTC time string with shift applied.
weekofmonth()
Function to find the week of the month of a given Unix Time.
Returns: number - The week of the month of the specified UTC time.
dayLightSavingsAdjustedUTC(utc, adjustForDLS)
dayLightSavingsAdjustedUTC
Parameters:
utc (int) : `int` - The normal UTC timestamp to be used for reference.
adjustForDLS (bool) : `bool` - Flag indicating whether to adjust for daylight savings time (DLS).
Returns: `int` - The adjusted UTC timestamp for the given normal UTC timestamp.
getDayOfYear(monthOfYear, dayOfMonth, weekOfMonth, dayOfWeek, lastOccurrenceInMonth, holiday)
Function gets the day of the year of a given holiday (1-366)
Parameters:
monthOfYear (int)
dayOfMonth (int)
weekOfMonth (int)
dayOfWeek (int)
lastOccurrenceInMonth (bool)
holiday (string)
Returns: `int` - The day of the year of the holiday 1-366.
method buildMap(holidayMap, holiday, monthOfYear, weekOfMonth, dayOfWeek, dayOfMonth, lastOccurrenceInMonth, closingTime)
Function to build the `holidaysMap`.
Namespace types: map
Parameters:
holidayMap (map) : `map` - The map of holidays.
holiday (string) : `string` - The name of the holiday.
monthOfYear (int) : `int` - The month of the year of the holiday.
weekOfMonth (int) : `int` - The week of the month of the holiday.
dayOfWeek (int) : `int` - The day of the week of the holiday.
dayOfMonth (int) : `int` - The day of the month of the holiday.
lastOccurrenceInMonth (bool) : `bool` - Flag indicating whether the holiday is the last occurrence of the day in the month.
closingTime (int) : `int` - The closing time of the holiday.
Returns: `map` - The updated map of holidays
holidayInit(addHolidaysArray, removeHolidaysArray, defaultHolidays)
Initializes a HolidayStorage object with predefined US holidays.
Parameters:
addHolidaysArray (array) : `array` - The array of additional holidays to be added.
removeHolidaysArray (array) : `array` - The array of holidays to be removed.
defaultHolidays (bool) : `bool` - Flag indicating whether to include the default holidays.
Returns: `map` - The map of holidays.
Holidays(utc, addHolidaysArray, removeHolidaysArray, adjustForDLS, displayLabel, defaultHolidays)
Main function to build the holidays object, this is the only function from this library that should be needed. \
all functionality should be available through this function. \
With the exception of initializing a `HolidayMetaData` object to add a holiday or early close. \
\
**Default Holidays:** \
`DLS begin`, `DLS end`, `New Year's Day`, `MLK Jr. Day`, \
`Washington Day`, `Memorial Day`, `Independence Day`, `Labor Day`, \
`Columbus Day`, `Veterans Day`, `Thanksgiving Day`, `Christmas Day` \
\
**Example**
```
HolidayMetaData valentinesDay = HolidayMetaData.new(holiday="Valentine's Day", monthOfYear=2, dayOfMonth=14)
HolidayMetaData stPatricksDay = HolidayMetaData.new(holiday="St. Patrick's Day", monthOfYear=3, dayOfMonth=17)
HolidayMetaData addHolidaysArray = array.from(valentinesDay, stPatricksDay)
string removeHolidaysArray = array.from("DLS begin", "DLS end")
܂Holidays = Holidays(
܂ utc=-6,
܂ addHolidaysArray=addHolidaysArray,
܂ removeHolidaysArray=removeHolidaysArray,
܂ adjustForDLS=true,
܂ displayLabel=true,
܂ defaultHolidays=true,
܂ )
plot(Holidays.newHoliday ? open : na, title="newHoliday", color=color.red, linewidth=4, style=plot.style_circles)
```
Parameters:
utc (int) : `int` - The UTC time shift in hours
addHolidaysArray (array) : `array` - The array of additional holidays to be added
removeHolidaysArray (array) : `array` - The array of holidays to be removed
adjustForDLS (bool) : `bool` - Flag indicating whether to adjust for daylight savings time (DLS)
displayLabel (bool) : `bool` - Flag indicating whether to display a label on the chart
defaultHolidays (bool) : `bool` - Flag indicating whether to include the default holidays
Returns: `HolidayObject` - The holidays object | Holidays = (holidaysMap: map, newHoliday: bool, holiday: string, dayString: string)
HolidayMetaData
HolidayMetaData
Fields:
holiday (series string) : `string` - The name of the holiday.
dayOfYear (series int) : `int` - The day of the year of the holiday.
monthOfYear (series int) : `int` - The month of the year of the holiday.
dayOfMonth (series int) : `int` - The day of the month of the holiday.
weekOfMonth (series int) : `int` - The week of the month of the holiday.
dayOfWeek (series int) : `int` - The day of the week of the holiday.
lastOccurrenceInMonth (series bool)
closingTime (series int) : `int` - The closing time of the holiday.
utc (series int) : `int` - The UTC time shift in hours.
HolidayObject
HolidayObject
Fields:
holidaysMap (map) : `map` - The map of holidays.
newHoliday (series bool) : `bool` - Flag indicating whether today is a new holiday.
activeHoliday (series bool) : `bool` - Flag indicating whether today is an active holiday.
holiday (series string) : `string` - The name of the holiday.
dayString (series string) : `string` - The day of the week of the holiday.
MTF Workbench [WinWorld]WHAT IS THIS?
This is MTF Workbench — an indicator, which is based on World Class SMC, but has one main feature — multi-timeframe analysis.
WHY MAKING MTF FEATURE AS A SEPARATE INDICATOR?
We weren't able to implement this feature in the World Class SMC itself due to huge size and complexity of the script, so we have re-written the entire script and optimized it to implement MTF and decided to make a separate script for MTF features in order to not make World Class SMC any heavier, because otherwise the script would probably not even load up on the chart.
WHAT ARE THE FEATURES?
MTF Workbench has two features for now: dashboard and structure mapping. But there will be more soon!
DASHBOARD
Dashboard gathers data from 4 different timeframes and visualize the results in the nice little table on the chart. It is useful to have a dashboard because it visualizes important data in a simple way.
The settings of the dashboard are:
- Position. this settings has 2 subsettings: vertical position (bottom, middle, top) and horizontal position (left, center, right). These subsettings allow you to place dashboard on any side of the chart;
- Text size. This settings defines size of the text in the dashboard, simple as that;
- Timeframe #1, #2, ..., #4. These four settings allow you to choose 4 different timeframes for the table to gather data from.
How to read the dashboard:
- The colour of the specific data cell is the current trend of selected timeframe;
- IDM ⧖ — price has not reached IDM yet;
- IDM ✓ — price grabbed IDM.
This is it for dashboard, now for structure mapping.
STRUCTURE MAPPING
By structure we mean IDM, BoS and ChoCh (if you don't what this means, refer to World Class SMC description to learn the terms, we won't explain it here). In our main indicator structure was only drawn for the timeframe you were currently using, but now you can choose whatever timeframe you want to get structure from!
Why do this matter? Well, this feature alone allows to perform so called intern-structure analysis, because now you will able to compare current timeframe's structure to a higher timeframe's structure and get an a sufficient amount of edge about what Smart Money are doing.
* And yes, this feature only works for analyzing higher timeframes!
The structure itself is plotted the same way as it is in our main indicator, but we also add timeframe to the specific structure event (event is when price reaches IDM, BoS or ChoCh lines) so you could differentiate internal-structure events from any other events.
Live structure is also available in this indicator.
WHY USE THIS INDICATOR?
Even though there a lot of structure mapping indicators with MTF features, they don't have what MTF Workbench has — the correct core structure-mapping algorithm. We took our core structure-mapping algorithm and put it into MTF Workbench to finally bring MTF analysis to life to work state-of-the-art structure-mapping algorithm, which gives any user a huge edge in the market by a very simple reason — this algorithm actually works. Our algorithm proved itself to be efficient and it helps map structure without human intervention, which is a huge leap in smart money trading. To this day we were not able to find an algorithm which would match the quality of our algo! Which why we think making an MTF version of our algorithm is a good thing to do, because now users can finally work with current timeframe and see information about structure from other timeframes using only ONE chart. If you are smart-money trader, you understand that this is a HUGE thing.
For PineScript moderators
We know the rule not publish slightly modifie version of some indicator as another indicator, but this is not a slightly different version. MTF Workbench was completely re-writtten from scratch and optimized so it could fint PineSript's code restrictions such as 500 max local scopes, which World Class SMC with MTF Workbench's features exceeded way too far.
Also, by referencing our World Class SMC indicator we don't promote it in any way. The reference is only made with purposes of
1) Informational reference to help users learn specific terms.
2) Informational reference to some of the World Class SMC features to give users a clue about what exactly MTF Workbench does.
We hope that you will find a great use from MTF Workbench as we did and it will help your level up your edge!
Sincerely, WinWorld Team.
Automating wealth creation since 2022.
Volume ForecastThe Volume Forecast indicator on TradingView is a comprehensive tool designed to analyze historical price action and project future market movements based on the average sizes of candles. Incorporating various data points such as candle high/low, open/close, and real volumes, Volume Forecast provides traders with a holistic view of market dynamics, allowing for more informed decision-making.
Key Features:
Multi-Data Source Analysis:
Volume Forecast seamlessly integrates multiple data sources, including candle high/low, open/close prices, and real volumes. By considering these diverse elements, the indicator offers a nuanced understanding of market conditions.
Historical Candle Size Analysis:
The indicator conducts a thorough analysis of historical candle sizes, capturing key data points to calculate the average candle size over a specified period. This historical context serves as the foundation for forecasting future candle sizes.
Customizable Forecasting Parameters:
Traders have the flexibility to fine-tune forecasting parameters to align with their trading strategies. Whether focusing on open/close relationships, high/low points, or real volumes, users can customize the indicator to suit their preferences.
Predictive Algorithm:
Volume Forecast employs a sophisticated predictive algorithm that leverages historical candle size data to project the potential size of upcoming candles. This algorithmic approach enhances the indicator's accuracy in forecasting market movements.
Visual Clarity:
The indicator provides a clear visual representation on the TradingView chart, displaying historical candle sizes and forecasted values. Color-coded elements and visual cues help traders quickly interpret the data, facilitating timely decision-making.
Adaptive Real-Time Updates:
Volume Forecast dynamically updates in real-time, ensuring traders have access to the latest information. This adaptability allows for swift adjustments to trading strategies in response to changing market conditions.
Comprehensive Market Compatibility:
Whether trading stocks, forex, cryptocurrencies, or commodities, Volume Forecast is compatible across various financial instruments and timeframes. This versatility makes it a valuable asset for traders in different markets.
User-Friendly Interface:
With an intuitive interface, Volume Forecast is accessible to traders of all experience levels. The indicator's user-friendly design streamlines the analysis process, making it easier for traders to incorporate it into their trading routines.
In summary, Volume Forecast is a robust TradingView indicator that combines historical candle size analysis with advanced forecasting techniques. By incorporating multiple data sources and offering customization options, it empowers traders to make more informed decisions in anticipation of market movements. Whether used independently or in conjunction with other tools, Volume Forecast is a valuable asset for traders seeking a comprehensive understanding of market dynamics.
Grid by Volatility (Expo)█ Overview
The Grid by Volatility is designed to provide a dynamic grid overlay on your price chart. This grid is calculated based on the volatility and adjusts in real-time as market conditions change. The indicator uses Standard Deviation to determine volatility and is useful for traders looking to understand price volatility patterns, determine potential support and resistance levels, or validate other trading signals.
█ How It Works
The indicator initiates its computations by assessing the market volatility through an established statistical model: the Standard Deviation. Following the volatility determination, the algorithm calculates a central equilibrium line—commonly referred to as the "mid-line"—on the chart to serve as a baseline for additional computations. Subsequently, upper and lower grid lines are algorithmically generated and plotted equidistantly from the central mid-line, with the distance being dictated by the previously calculated volatility metrics.
█ How to Use
Trend Analysis: The grid can be used to analyze the underlying trend of the asset. For example, if the price is above the Average Line and moves toward the Upper Range, it indicates a strong bullish trend.
Support and Resistance: The grid lines can act as dynamic support and resistance levels. Price tends to bounce off these levels or breakthrough, providing potential trade opportunities.
Volatility Gauge: The distance between the grid lines serves as a measure of market volatility. Wider lines indicate higher volatility, while narrower lines suggest low volatility.
█ Settings
Volatility Length: Number of bars to calculate the Standard Deviation (Default: 200)
Squeeze Adjustment: Multiplier for the Standard Deviation (Default: 6)
Grid Confirmation Length: Number of bars to calculate the weighted moving average for smoothing the grid lines (Default: 2)
-----------------
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!
Quantum TrendQuantum Trend indicator is our new tool to trade on futures and spot markets in the world of cryptocurrency.
This indicator uses some advanced techniques to determine price reversals and filter them out with other indicators, such as oscillators ( Stochastic RSI and etc. ) and trend-based indicators ( such as EMA and others ), but even after filtering signals with these tools Quantum Trend indicator then applies our own private algorithm, based on our modified z-score mertic, which reduces lag drastically and helps find good entries faster.
What algo is behind the signals?
For finding new entries we used RSI- and stochastic-based oscillators, which help us determine potential price reversal movements. When new entry is found, we filter it through our own stochastic RSI filter (takes stoch RSI's pivot points into account to find better entries; pivot points left and right bars are hard coded into the indicator) with our private indicators, based on close-to-close volatility filter methods, to understand whether or not entry valid enough. Why stochastic RSI? Because it is much less messy than most of other existing oscillators (by our own opinion and experience).
That was first filtering stage, now comes the second .
In the second phase we filter out signals even more with our own modified-standard-deviation-based indicators ( not Bollinger Bands! ) to determine whether or not price went above or below 2 sigma channel, which would mean that current price's movement is extremely rare (because for going above 2 sigma or below -2 sigma there is only 5% chance (classic Gaussian distribution)) and the reversal will probably happen soon.
If signal passed all two phases of filtering, it will be showed on the chart.
Over all, this indicator uses our own private indicators, based on some core concepts, which we described above ( classic Gaussian distribution for choosing signals with nice reversal moments , close-to-close volatility for understanding if market is volatile enough to make a good move , modified z-score metric for reducing lag and finding entries faster , own stoch RSI filter with pivot points for reducing lag and finding good reversal moments and etc. )
That's for idea reveal, now let's dive into the settings!
Indicator settings
Main Algo Settings — group of settings of the core algorithm, that forms signals.
Signal Length * — determines how many bars from the past should be taken to make a signal.
Signal Factor * — determines the threshold for signal quality.
* — the more this parameter is, the less signals you will get, but they will be more high-quality.
Signals to Show — determines which type of signals will be displayed on the chart:
Classic — Long/Short signals;
Strong — Strong Long/Short signals;
All — Classic + Strong signals;
Signal Colours — group of settings for customizing signals' colours.
Long — colour for Long signals
Short — colour for Short signals
Strong Long — colour for Strong Long signals
Strong Short — colour for Strong Short signals
Filter for Strong Signals — group of settings for strong signals.
Use Strong Signals? — enabling/disabling strong signals on the chart;
Apply this filter to Strong Signals? — enabling/disabling filter for strong signals. When disabled, strong signals won't be filtered and there will be a lot more signals on the chart, but with less quallity.
Fast Period * — number of bars for 1st group of candles to form a signal;
Slow Period * — number of bars for 2nd group of candles to form a signal ( we need these two groups to align short-term with long-term trend );
Additional Filter Period * — period for filter indicator, which cuts out bad strong signals;
Additional Filter Smoother Period * — period for filter indicator's smoother, which makes additionally smoothes signals to filter out bad ones;
Filter's source — price souce for the filter ( open, close, hl2 and etc. ).
* — the more this parameter is, the less signals you will get, but they will be more high-quality.
2nd Filter — group of settings for the 2nd filter, which cuts out bad signals from Main Algo.
Enable 2nd Filter? — enabling/disabling 2nd filter. When diasbled, there wiull be a lot more signals on the chart, but with less quality;
2nd Filter Length — period for the indicator, which is embedded in 2nd filter. Based on improved RSI;
OverBought Lvl — level, which indicates that asset is probably overbought ;
OverSold Lvl — level, which indicates that asset is probably oversold ;
TP/SL Settings — Take-Profit/Stop-Loss settings
Use TP? — Show take profits on the chart
TP Mode — Take Profit mode (either zone or 3 levels (drawn on the chart))
Take-Profit 1, 2, 3 Factor — Multiplier/factor for the 1st, 2nd, 3rd take-profits accrodingly . Determines the width of the take profits/zone (the higher the factor, the further the take profits are located from the entry point)
SL Factor — Multiplier/factor for the stop loss (line on the chart; not displayed if the take profit mode is set to zone)
Whales Screener — screener, that shows where whales buy (green zones) and sell (red zones).
Use Whales Screener? — enabling/disabling whales screener.
Support & Resistance Settings — group of settings for support and resistance lines.
Support Color — Support color;
Resistance Color — Resistance color;
S/R Strength — Strength of support and resistance lines. The greater it is, the more reliable the S/R lines will be;
Line Style — style of each S/R line ( solid, dotted, dashed );
Zone Width, % — Zone width in percentage of the price fro the last 250 bars;
Extend S/R Lines — Extend the S/R lines to the right and left.
What timeframes to use?
This indicator was built to work on any timeframe, but our practice shows that it works best on higher timeframes such 30 minutes and more, but you should find by yourself which timeframe suits you best.
What markets can this indicator be applied to?
This indicator is market-indifferent, which means that you can use this indicator on any possible market.
How should I use this indicator?
Quantum Trend indicator can be a useful tool for finding entries and confirming signals from your own trading system, as it is built with multiple signal filter layers, which drastically reduce amount of bad signals. Also it is better to use other indicators to confirm signals, produced by Quantum Trend, because this way you will get even more high-quality signals.
Does it repaint?
No, this indicator doesn't repaint.
IMPORTANT, PLEASE READ!
This is indicator is not a Holy Grail of trading and we DON'T promote it as such in any possible way. As any possible indicator, Quantum Trend uses price data of the past, which CAN NOT guarantee perfect price predicitions of the future!
Hope this indicator will help you make a much better trading decisions!
Buy/Sell Toolkit (Expo)█ Overview
The Buy/Sell Toolkit is a comprehensive trading tool designed to provide a holistic approach to trading. It brings together essential trading indicators and features in one place, simplifying the trading process and offering valuable insights into the market.
The indicator serves as an all-inclusive solution for traders seeking in-depth technical insights. While the Buy/Sell Toolkit can be utilized alongside other technical analysis methods, it can also be used as a standalone toolkit, adaptable to any trading style. In addition, each feature is thoughtfully integrated because not all technical indicators are suitable for every market condition or trading style.
The Buy/Sell toolkit works in any market and timeframe for discretionary analysis and includes many features:
█ Features
Buy/Sell signals: This feature provides real-time Buy/Sell trading signals for any market and timeframe. These signals are based on the trend.
Contrarian Signals: This feature provides real-time contrarian signals to take a position against the prevailing market trend.
Ultimate Trend: This feature assists in identifying the overall trend of the market, recognizing whether the market is in an uptrend, downtrend, or sideways.
Trend Advisor: The Trend Advisor helps traders understand the trend's strength, duration, and direction.
Trend Reversal: This feature identifies potential points where the current market may reverse within a trend. It's basically a trend-following line based on reversal calculation; it helps traders catch trend continuation setups.
Momentum Average: This indicator measures the rate of change in prices to identify the strength of the current trend. It can be beneficial for spotting potential price breakouts or warning of a market slowdown and pullbacks.
Take Profit Points: This feature suggests optimal points to exit a trade and lock in profits. It determines these points by using various factors such as volatility, support and resistance levels, and historical price movements.
Candle Coloring, Arithmetic Candlesticks, including Arithmetic Heikin Ashi: This feature provides an excellent visual aid to assist traders in recognizing patterns, identifying trends, and optimizing their trading strategies. The Arithmetic Candlesticks help smooth out price volatility and identify market trends more clearly.
Reversal Cloud: This innovative feature provides a graphical representation of potential price reversal zones. The cloud helps traders visualize where the price might reverse its trend.
Trend Cloud: Similar to the Reversal Cloud, this feature visualizes the prevailing market trend, making it easy for traders to understand the direction of the market at a glance.
Signal Optimizer: The Signal Optimizer is a powerful tool that optimizes the Buy/Sell and contrarian signals based on win-rate or performance. It automatically applies the best settings to the signals, freeing traders from the task of constantly adjusting them. This helps traders to get the most reliable signals automatically, enhancing their trading efficiency.
█ How to use the Buy/Sell Toolkit?
Here are a few illustrative examples to provide traders with a better understanding of the Toolkit's practical usage. These examples showcase the combination of features, but it's important to note that they serve as demonstrations, and we encourage traders to explore and adapt the features to align with their unique trading styles.
Buy/Sell Signals & Take Profit
Optimized Buy/Sell signals & Candle Color + Trend Advisor + Reversal Cloud
Contrarian Signals & Take Profit
,with Reversal Cloud
Optimized Contrarian Signals & Ultimate Trend & Reversal Cloud
Trend Cloud
Filter signals with Trend Cloud
█ Why is this Buy/Sell Toolkit Needed?
The Buy/Sell Toolkit is an exceptional tool for traders because it consolidates several critical trading indicators into a single, user-friendly platform. The Toolkit's holistic approach to market analysis can enhance decision-making, reduce guesswork, and improve overall trading performance. Additionally, it allows traders to customize their approach according to the market conditions and their trading style.
The Toolkit's automated features, such as the Signal Optimizer, save time and effort, making it easier for both new and experienced traders. In addition, its comprehensive suite of features ensures traders have all the information they need to make informed trading decisions. All these features make the Buy/Sell Toolkit a powerful ally in any trader's arsenal.
Here's why this Toolkit is essential:
Comprehensive Market Analysis: The Toolkit offers a wide range of indicators and tools for comprehensive market analysis, from trend detection to momentum analysis. This reduces the need for multiple tools and allows for a more efficient trading process. By providing a host of indicators like Buy/Sell signals, Contrarian Signals, Trend Analysis, and Momentum Average, the Toolkit helps traders make well-informed decisions based on comprehensive data and trend analysis.
Automation and Time-Saving: The Signal Optimizer automatically applies the best settings to the signals based on win rate or performance. This saves time and ensures the signals' reliability, reducing, it makes the trading process efficient and hassle-free.
Versatility: The Toolkit is versatile and can be used for various financial markets, including stocks, forex, commodities, or cryptocurrencies. Regardless of the market you trade in, the Buy/Sell Toolkit has something to offer.
Visual Tools: The Toolkit provides visual tools like Reversal Cloud, Trend Cloud, Trend lines, Candle coloring, and much more, which are excellent for visualizing market trends and potential reversal zones. This can make the process of understanding market movements more intuitive and less intimidating, especially for novice traders.
Confirmation: By using multiple indicators in conjunction with each other, traders can confirm signals and improve the accuracy of their trades.
Learning and Development: The Toolkit serves as an excellent resource for both novice and experienced traders to learn about different trading indicators, how they interact, and how to use them effectively.
█ Any Alert Function Call
This function allows traders to combine any feature and create customized alerts. These alerts can be set for various conditions and customized according to the trader's strategy or preferences.
█ How are the features calculated? - Overview
The Toolkit combines many of our existing premium indicators and new technical analysis algorithms to analyze the market. This overview covers how the main features are calculated.
Buy/Sell
The core function calculates the Exponential Weighting for a given time series X over a period T. The time series is based on absolute price changes. It focuses on the magnitude of price changes from one period to the next, irrespective of the direction (up or down). This type of time series can be used to measure the volatility of a price series, as it quantifies the size of price movements. It's useful in scenarios where the direction of the change is not as important as the magnitude of the change.
Contrarian Signals
Our contrarian signals are based on deviation from the expected range value. The algorithm quantifies the amount of variation or dispersion in a set of trading ranges. Non-expected values are the fundamental core of the signal generation process.
Ultimate Trend
The Ultimate trend calculates an adaptive smoothing momentum function by first determining the directional price movement and then applying smoothing to the positive and negative price changes. It then uses these values to calculate a form of Variable Moving Average (VMA), where the smoothing factor is adjusted based on a normalized measure of the relative difference between the Positive and Negative Directional values.
Trend Advisor
It's a form of Moving Averages that are applied to the price chart using three different weighting functions, simple weighting, price volatility smoothing constant weighting, and the traditional EMA weighting function.
Trend Reversal and Cloud
The function uses the information on how much the current price compared to the relative historical price fluctuates over a specific period and automatically updates its equilibrium value at new price changes.
Momentum Average
Essentially, it uses a modified version of the relative rate of change over a certain period.
Take Profit
The take profit uses similar range price functions as the contrarian signals, where a take profit signal is triggered at extremely abnormal values.
Candles
Note, Using and Backtesting on non-standard charts produces unrealistic results since it does not represent the closing price. The candles are based on a smoothing process that finds the best smoothing coefficient for the current data, using close as time series.
█ In conclusion , The Buy/Sell Toolkit serves as a comprehensive, user-friendly, and efficient trading assistant. It brings automation and intelligent data play-by-play to your fingertips, making it an essential tool for anyone serious about trading.
-----------------
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!
Channel Based Zigzag [HeWhoMustNotBeNamed]🎲 Concept
Zigzag is built based on the price and number of offset bars. But, in this experiment, we build zigzag based on different bands such as Bollinger Band, Keltner Channel and Donchian Channel. The process is simple:
🎯 Derive bands based on input parameters
🎯 High of a bar is considered as pivot high only if the high price is above or equal to upper band.
🎯 Similarly low of a bar is considered as pivot low only if low price is below or equal to lower band.
🎯 Adding the pivot high/low follows same logic as that of regular zigzag where pivot high is always followed by pivot low and vice versa.
🎯 If the new pivot added is of same direction as that of last pivot, then both pivots are compared with each other and only the extreme one is kept. (Highest in case of pivot high and lowest in case of pivot low)
🎯 If a bar has both pivot high and pivot low - pivot with same direction as previous pivot is added to the list first before adding the pivot with opposite direction.
🎲 Use Cases
Can be used for pattern recognition algorithms instead of standard zigzag. This will help derive patterns which are relative to bands and channels.
Example: John Bollinger explains how to manually scan double tap using Bollinger Bands in this video: www.youtube.com This modified zigzag base can be used to achieve the same using algorithmic means.
🎲 Settings
Few simple configurations which will let you select the band properties. Notice that there is no zigzag length here. All the calculations depend on the bands.
With bands display, indicator looks something like this
Note that pivots do not always represent highest/lowest prices. They represent highest/lowest price relative to bands.
As mentioned many times, application of zigzag is not for buying at lower price and selling at higher price. It is mainly used for pattern recognition either manually or via algorithms. Lets build new Harmonic, Chart patterns, Trend Lines using the new zigzag?
Machine Learning: kNN (New Approach)Description:
kNN is a very robust and simple method for data classification and prediction. It is very effective if the training data is large. However, it is distinguished by difficulty at determining its main parameter, K (a number of nearest neighbors), beforehand. The computation cost is also quite high because we need to compute distance of each instance to all training samples. Nevertheless, in algorithmic trading KNN is reported to perform on a par with such techniques as SVM and Random Forest. It is also widely used in the area of data science.
The input data is just a long series of prices over time without any particular features. The value to be predicted is just the next bar's price. The way that this problem is solved for both nearest neighbor techniques and for some other types of prediction algorithms is to create training records by taking, for instance, 10 consecutive prices and using the first 9 as predictor values and the 10th as the prediction value. Doing this way, given 100 data points in your time series you could create 10 different training records. It's possible to create even more training records than 10 by creating a new record starting at every data point. For instance, you could take the first 10 data points and create a record. Then you could take the 10 consecutive data points starting at the second data point, the 10 consecutive data points starting at the third data point, etc.
By default, shown are only 10 initial data points as predictor values and the 6th as the prediction value.
Here is a step-by-step workthrough on how to compute K nearest neighbors (KNN) algorithm for quantitative data:
1. Determine parameter K = number of nearest neighbors.
2. Calculate the distance between the instance and all the training samples. As we are dealing with one-dimensional distance, we simply take absolute value from the instance to value of x (| x – v |).
3. Rank the distance and determine nearest neighbors based on the K'th minimum distance.
4. Gather the values of the nearest neighbors.
5. Use average of nearest neighbors as the prediction value of the instance.
The original logic of the algorithm was slightly modified, and as a result at approx. N=17 the resulting curve nicely approximates that of the sma(20). See the description below. Beside the sma-like MA this algorithm also gives you a hint on the direction of the next bar move.
DCA Average Arbitrage - The Quant ScienceDCA Average Arbitrage - The Quant Science™ is a quantitative algorithm based on a DCA model that uses averaging to create a statistical arbitrage system.
DESCRIPTION
The algorithm can be set long or short.
1. Long algorithm: opens long positions with 100% of the capital every time the price deviates negatively for a certain percentage distance from the average.
2. Short algorithm: opens short positions with 100% of capital every time the price deviates positively for a certain percentage distance from the average.
The closing of positions depends on the parameters activated by the user. The user can set the closing on the reverse condition and/or add functions such as stop loss, take profit and closing after a certain bar period.
USER INTERFACE SETTING
The user chooses the long or short direction and sets the parameters for average as length, source and percent distance.
AUTO TRADING COMPLIANT
With the user interface, the trader can easily set up this algorithm for automatic trading. Automating it is very simple, activate the alert functions and enter the links generated by your broker.
BACKTESTING INCLUDED
With the user interface, the trader can adjust the backtesting period of the strategy before putting it live. You can analyze large periods such as years or months or focus on short-term periods.
NO LIMIT TIMEFRAME
This algorithm can be used on all timeframes and is ideal for lower timeframes.
GENERAL FEATURES
Multi-strategy: the algorithm can apply either the long strategy or the short strategy.
Built-in alerts: the algorithm contains alerts that can be customized from the user interface.
Integrated indicator: the quantity indicator is included.
Backtesting included: automatic backtesting of the strategy is generated based on the values set.
Auto-trading compliant: functions for auto trading are included.
ABOUT THE BACKTEST
Backtesting refers to the period 1 January 2022 - today, ticker: ICP/USDT, timeframe 5 minutes.
Initial capital: $1000.00
Commission per trade: 0.03%
Trend Friend - Swing Trade & Scalp Signals - Stocks Crypto ForexTREND FRIEND is a custom built, data driven algorithm that gives buy and sell signals when many different factors line up together on a single candle. It is designed to catch every move so you can expect early entries and exits across all of your favorite markets. Use scalp mode for early entries with lots of signals or swing mode for longer swings with fewer signals and long swing mode for really long swing trades with even less signals.
The best markets to use this indicator on are high volume tickers with a lot of price action as these markets have enough data to use to give the signals the algo needs to be able to detect highly probable moves in price. That being said, it works across all markets such as stocks, crypto, forex and futures and across all timeframes(on really long timeframes it may not give signals due to not having enough data to work with).
***MAJOR POINTS TO REMEMBER BEFORE USING THIS INDICATOR***
The algo is designed to catch major moves, so if a signal seems to come in late, it is highly likely the market is about to reverse so use caution when taking signals that seem late. This typically happens because the market is indecisive so always be careful in these situations and just wait for a better signal when markets are really decisive.
Always trade in the direction of the trend meaning the volume weighted moving average clouds. There is also a trend detection label and risk level label that you should follow to keep your trades as safe as possible. The safest way to do this is only trade short when the VWMA 100 is below the VWMA 500 and a Bear signal comes in very close to a VWMA line. Only trade long when the VWMA 100 is above the VWMA 500 and a Bull signal comes in very close to a VWMA line.
If price is between the moving averages, play the VWMA 100 and VWMA 500 as support and resistance and only take signals near one of the VWMAs with the plan of price returning to the other VWMA. If you are taking trades against the trend, like trying to buy the dips or sell the tops, wait for price to cross the VWMA 100 before following a signal.
If the VWMA 100 and VWMA 500 are close to each other and/or moving sideways, you can expect choppy price action and consolidation so use caution when taking trades during this time. It is better to wait for the price to hold above or below both VWMAs and stay supportive there before taking trades. Waiting for volume to increase is also a good way to avoid chop after the trend decides a direction.
This indicator will repaint sometimes before the candle has closed, so either wait for the candle to close with a signal before entering trades or only take signals before it closes on candles with good volume and technical analysis backing it.
***ALL THE FEATURES YOU NEED***
Trend Friend has multiple features designed to help you trade better and make decisions faster.
Buy & Sell Signals - When the algo detects all of our required parameters lining up on a single candle, Trend Friend will give Bull or Bear signals on the chart. Bull means upward price action is expected. Bear means downward price action is expected.
Take Profit Signals - When the price action makes a move that typically signals a reversal, a take profit signal will show up on the chart to help you get out of a trade before the next signal comes in.
Risk Levels For Signals
There is a risk detection system that tells you how risky each signal is as it comes in to help you stay out of dangerous trades. Wait for signals with low risk and you’ll be much safer than trying to take trades against the trend.
Alerts - There are options for alerts on buy signals, sell signals, take profit signals, price crossing the VWMA 100 and price crossing the VWMA 500. All of these can be controlled using tradingview alerts so you don't have to watch the charts and wait for things to happen. These alerts can also be used to send orders to trading bots if you choose.
Candles Painted Green Or Red According To Buy & Sell Pressure - By default, this indicator paints the candle sticks green, red or blue according to buy & sell pressure(DMI). You will need to turn off candle colors in your chart settings for this to appear correctly.
Percentage Updates - The table on the right has live percentage updates so you don’t have to measure out every move you are expecting. It will tell you the percentage from closest fibonacci levels, percentage away from the VWAP, percent gain or loss from the last signal entry and percentages from your own trades that can be configured in the settings. These help you always know how much more you can squeeze out of a trade and where your position stands without having to switch screens between Tradingview and your broker constantly.
Moving Average & VWAP Clouds - We included two color coded volume weighted moving averages(VWMA 100 and VWMA 500) and a color coded RMA 10 moving average. We also have a VWAP dotted line and cloud so you can easily see the trend direction on the chart at all times. The cloud and moving averages will turn green or red in real time depending on whether price is above or below each moving average or the VWAP respectively.
Trend Detection Label - The top label on the percentage update table tells you if the trend for this timeframe is Bullish or Bearish as well as when the trend is undecisive with choppy price action expected.
Chop & Low Volume Warning Labels - When price action is choppy or there is very low volume compared to historic candles, a warning label will appear at the top of the screen so you know to use caution and stay out of trades during these times.
Auto Fibonacci Levels - The chart will automatically populate fibonacci retracement and extension levels. The percentage update table will also give you real time updates on how far away the next fibonacci levels are from the current price.
Bounce Zone - We also included a very long term moving average cloud(EMA 1000 and EMA 2000) that shows as purple on the chart. When price enters that cloud, you can expect a reversal in that area. If price was trending above the cloud, expect that cloud to act as support. If price was trending below the cloud, expect that cloud to act as resistance. When price is trying to break through that cloud in either direction you can expect price action to be choppy and big moves to happen once price gets supportive in that zone and breaks out.
Margin Multiplier - If you are using margin to trade, our margin multiplier will multiply all of the percentage updates by the margin level you input in the settings tab so your percentages will reflect the percentages in your account.
***HOW TO USE***
Scalp, Swing And Long Swing Mode
You can choose from scalp mode, swing mode or long swing mode in the indicator settings. It is set to scalp mode by default. Scalpers will want to use the scalp mode as it provides early entries and exits and is designed to catch every move quickly. Swing mode is designed to catch almost every move and filter out some of the noise so it will have less signals than scalp mode. Long swing mode is designed to catch those lengthy moves and will hold positions the longest but give entries later than the other modes.
Try all three on a few charts and timeframes to see which setting matches your trading style the best. If you want more signals with any of the 3 modes, go to a lower timeframe. If you want less signals on any mode, go to a higher timeframe.
Bull & Bear Signals - When all of our algo parameters line up, a BULL or BEAR label will print on the chart. Bull labels will be colored green and bear labels will be colored red. Bull indicates a good place to enter a long trade because the algo is detecting patterns that indicate price should move upwards. Bear indicates a good place to enter a short trade because the algo is detecting patterns that indicate price should move downwards.
For best results using these signals, take trade signals that line up very closely with fibonacci levels or volume weighted moving averages or the vwap or any combination of them. It is also recommended to only take trades in the direction of the trend to avoid trading false reversals. Wait for low risk signals using our risk identifier and then enter the market. Waiting for good volume to come in will also help you avoid chop and catch those quick moves.
Also, make sure to check the percentage updates table to see if the expected move to the next fibonacci level is far enough away to make the risk to reward ratio worth taking the trade. Watch for signals when the VWMAs squeeze together after a wide gap and price breaks out with a corresponding signal as these can bring large, quick moves in price. Use caution when the VWMAs are close to each other and trending sideways as this usually brings choppy price action.
(The bull and bear signals can be turned on or off in the indicator settings input tab. Useful if you want to clean up the chart or only show bear or bull signals according to the trend.)
Take profit Signals - Take profit labels will show up on the chart when a reversal candle pattern or reversal indicator pattern is detected while a trade is still open. Use these signals as times that it may be a good point to exit the trade to avoid losses or reduced profits.
(The take profit signals can be turned on or off in the indicator settings input tab.)
Risk Level Label
Taking trades against the trend is dangerous because there are more false bottoms than there are actual bottoms. Our risk detection label is there to keep you from taking dangerous trades against the trend. The label will say Low Risk when the trend is in the same direction as the last signal given. The label will say Medium Risk when the trend is neutral because price likes to chop around during these times. The label will say High Risk when the trend is in the opposite direction as the last signal given.
Make sure you wait for the risk level detector to show Low Risk before taking trades or you may be buying a false bottom.
Candles Colored According To Buy & Sell Pressure - By default this indicator will paint the candlesticks green, red or blue depending on the buy & sell pressure for those candles using the Directional Movement Index or DMI. If buy pressure is higher than sell pressure, it will paint green. If Sell pressure is higher than buy pressure, it will paint red. If buy pressure is equal to sell pressure, it will paint blue. Use this to confirm which direction buying and selling is favoring and use a change in color trend to determine reversal points early. For this to work correctly you will need to go into chart settings(gear icon top right) and in the symbol tab turn off body, wicks and border.
(The buy & sell pressure candle coloring can be turned on or off in the indicator settings input tab.)
Auto Fibonacci - This indicator will automatically populate fibonacci retracement and extension levels for you. These levels are calculated using the previous high and low. You can switch the source between the previous day, week, month, quarter and year(the weekly setting is the default as it is great for day trading). The previous high and low levels will show as white(These are very important levels so watch for price to bounce off of the white lines). The percentage update table will also show the percentage gap from the current price and the next closest fibonacci level above and below, with labels telling you which fib levels they are.
(The fibonacci levels can be turned on or off in the indicator settings input tab.)
Volume Weighted Moving Averages With Clouds - The red or green moving averages should be treated as dynamic support and resistance as well as a visual way of telling current price trends. You can expect price to bounce off of these moving averages very often and quick moves usually happen when price breaks out of these moving averages.
The safest long trades you can take will be when the VWMA 100 is above the VWMA 500 and you get a BULL signal that is very close to the VWMA 100 or VWMA 500. The safest short trades you can take will be when the VWMA 100 is below the VWMA 500 and you get a BEAR signal that is very close to the VWMA 100 or VWMA 500.
When the moving averages squeeze together and price bounces between them, you can expect big moves in price when it breaks out. If price has been trending up and the moving averages squeeze together, expect the price to fall quickly once it breaks down from there. If price has been trending down and the moving averages squeeze together, expect the price to jump quickly once it breaks out from there.
These moving averages and the clouds associated with them will paint green when price is above them, indicating a bullish trend and they will change to red when price is below the moving averages, indicating a bearish trend.
You can also use the moving averages as support and resistance levels when markets are moving sideways. Since these are volume weighted moving averages, price tends to stick to them very well and paints a much clearer picture of what is going to happen than regular moving averages that don't take volume into account. Try it on a bunch of different timeframes and charts to see for yourself.
(The moving averages and clouds can be turned on or off in the indicator settings input tab.)
Bounce Zone - The bounce zone is a purple cloud that is made up of two very long term moving averages. When price is trending above this cloud and comes back down to it, you can expect the price to bounce back upwards in this zone. If the price is trending below this cloud and comes up to it, you can expect the price to bounce back downwards when it reaches this zone.
Sometimes price will break through this cloud and you will usually notice a lot of choppy price action and accumulation in this zone. When price does break out of it, you can expect fast, large moves. I also like to call this zone the safe zone because taking trades in this zone is typically a very safe place to enter trades depending on how the price is trending before it entered this zone. If you look at the cloud on any of your favorite charts, you will see that the cloud usually represents support and resistance areas quite well.
(The bounce zone can be turned on or off in the indicator settings input tab.)
Chop & Low Volume Warnings - When price is choppy, it can be a portfolio killer. When volume is low, it can give false signals or the market can reverse easily, so stay out of trades when these warning labels appear on your chart. If you were already in a trade when these warnings appear, keep a close eye on your trades and be ready to exit if things start to go the wrong way.
Long & Short Entry Calculator - Here you can enter your own entry price for short or long positions so that your actual P&L will be shown live on your chart. This eliminates the need to calculate percentages in your head or switch screens to your broker often or use the measuring tool to calculate your P&L. These will show as zero until a trade price is entered.
Margin Multiplier - If you use margin to trade, enter your margin multiplier in this input and all of the percentages in the percentage update table will reflect how far each level is based on your margin. So a 5x margin will multiply all percentages in the chart by 5 and so on. This way you don’t have to calculate everything in your head or switch between your chart and your broker constantly.
Customization - Go into the indicator settings and you can customize just about everything to suit your style. In the Input tab you can: turn the Bull or Bear labels off or on so you only get the signals that are going in the direction of the trend, turn on or off the moving average lines & clouds, turn on or off the vwap & clouds, set your fibonacci timeframe or turn them off completely and set your long or short entry price as well as your margin level for percentage updates according to your portfolio.
You can also easily customize: the moving average lines & clouds, the bounce zone lines and cloud, the vwap color and line style, the support and resistance line colors and thickness, the bull and bear label styles, the take profit label styles and more.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex as long as Tradingview has enough data to support the calculations needed by the algo.
***TIMEFRAMES***
Trend Friend can be used on all timeframes.
***IMPORTANT NOTES***
For the buy & sell pressure colored candles to show up properly you will need to go to the chart settings(gear icon in top right corner) and in the symbol tab turn off body, wicks and border.
No indicator can be right 100% of the time and remember that past results do not guarantee future performance. You still need to make smart decisions when using this indicator to be successful. It is also important to note that markets with little volume and price action may not give very good signals due to many different parameters needing to line up on one candle for a signal to be given so use it on high volume tickers with lots of price action for best results.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Volume Spikes, Directional Movement Index + Fisher, Volume Profile with DMI, and MOM + MFI + RSI with Trend Friend. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
CRYPTO TRADING BOT - 1min SCALPING LONG/SHORTHOW IT WORKS
The core concept behind the script is the determination of the current market mood in sense of creating a trendline indicator using EMA / SMA .
By using this trend indication alongside RSI / MACD value range, we are able to enter/exit the market in both directions: LONG and SHORT .
In case of confirmed false signals, we try to catch up the next good opportunity to minimise loss and to close the current trade.
If the chance for a good countertrade is given at this point, the market is going to be entered reversely.
Should the market move incredibly fast against our trade direction, we use proven Stop-loss targets, to bring our children into safety.
As many others, we could tell you now, that we used state-of-the-art machine learning algorithms
as well as highly sophisticated methods to gain our results.
As a fact, we started with an idea, using simple and common trading tools/indicators,
as a solid ground. We did not want to reinvent the wheel and it paid off.
GET A WORKING SCRIPT
The algorithm we are using has initially been created with a self-developed backtesting software.
To be able to deliver gas to our engine, we have bought a huge amount of OHLCV data for the 1min chart.
After many exhausting and frustrating weeks of our workflow-rotation (develop, fail, fix, test, repeat)
we finally got confirmation for all of our conditions/expectations, so we translated our algorithm into pine-code.
THE RESULTS
Since we have been using our Pine-Strategy alongside our backtesting software , we checked all the results provided by TradingView
and our tool to be 100% sure every outcome, every entry and every exit is exactly the same.
We did this for several months and since 2021 June we have been using it with real Alerts, coped to our binance account.
Below, you will find how the performance for the previous months looked like (every trade was made with 100% of the capital, of course using proper stop loss and take profit):
September 2020: 15.18%
October 2020: 36.17%
November 2020: 15.12%
December 2020: 48.58%
January 2021: 150.10%
February 2021: 45.96%
March 2021: 46.48%
April 2021: 4.96%
May 2021: 43.48%
June 2021: -28.99%
Juli 2021: 15.63%
August 2021 (so far): 11.57%
Accumulated Profit: 1,979.01%
To prove our results, we will link an excel sheet for every trade that was made within this timerange.
Link: docs.google.com
ABOUT US
We are two good friends, both incredibly interested in mathematics, software engineering, AI and algorithmics. After getting introduced into the crypto space
by a common friend, we started figuring out that there is a pattern behind every big or small move which happens in an asset.
This is where the passion for creating a CRYPTO TRADING BOT began. It was our goal, to create this script for the 1min Timeframe, so the software can react quickly when a
big or small move is happening - this is why it is called a SCALPING SCRIPT .
We are incredibly proud of this script and would like to share it with this amazing community - just hit us up on TradingView!
Cycles StrategyThis is back-testable strategy is a modified version of the Stochastic strategy. It is meant to accompany the modified Stochastic indicator: "Cycles".
Modifications to the Stochastic strategy include;
1. Programmable settings for the Stochastic Periods (%K, %D and Smooth %K).
2. Programmable settings for the MACD Periods (Fast, Slow, Smoothing)
3. Programmable thresholds for %K, to qualify a potential entry strategy.
4. Programmable thresholds for %D, to qualify a potential exit strategy.
5. Buttons to choose which components to use in the trading algorithm.
6. Choose the month and year to back test.
The trading algorithm:
1. When %K exceeds the upper/lower threshold and then hooks down/up, in the direction of the Moving Average (MA). This is the minimum entry qualification.
2. When %D exceeds the lower/upper threshold and angled in the direction of the trade, is the exit qualification.
3. Additional entry filters include the direction of MACD, Signal and %D. Also, the "cliff", being a long entry is a higher high or a short entry is a lower low.
4. Strategy can only go "Long" or "Short" depending on the selected setting.
5. By matching the settings in the "Cycles" indicator, you can (almost) see what the strategy is doing.
6. Be sure to select the "Recalculate" buttons, to recalculate on every new Tick, for best results.
Please click the Like button and leave a comment if you appreciate this script. Improvements will be implemented as time goes on.
I am not a licensed trade advisor. This strategy is for entertainment only. Use at your own risk!
GA - Value at RiskGA Value at Risk is a multifunctional tool. Its main purpose is to plot on the chart the Value at Risk . But it shows also integrated features related to the Volatility.
Value at Risk is a measure of the risk of loss for investments, given normal market conditions, in a period.
It measures and quantifies the level of financial risk. In this case, the risk is within position over a specific time frame.
Defining p as VaR, the probability of a loss greater than VaR is p, at most. Instead, the probability of loss that is less than VaR is 1-p, at least.
The VaR Breach occurs when a loss exceeds the VaR threshold .
For this case, VaR calculation uses the volatility estimation in a time interval. It defines the Probability Confidence according to the Normal Distribution. VaR is a percentile of the Normal Distribution. This is a multiplier of the Standard Deviation that define a Volatility Range.
The Normal Distribution Area around +- the Standard Deviation gives 68% of Confidence. 2 times the Standard Deviation returns a 95% of probability area. 3 time the Standard Deviation the Area returns 99.7% of Confidence.
Knowing VaR modeling, it is possible to determine the amount of a potential loss . Then, it is possible to know if there is enough capital to cover losses. In the same way, higher-than-acceptable risks forces reducing exposure in a financial instrument.
One of its practical use is to estimate the risk of an investment that is already at portfolio. Indeed, this is the purpose of the Value at Risk calculated in this script.
At the VaR Breach that investment has reached its worst scenario. Then, it can be the case to manage that investment into the balanced portfolio.
The Value at Risk does not tell when to enter the market.
Moving Averages
GA Value at Risk bases its calculations on a set of Moving Averages. Every feature of the script uses one of these Moving Averages for its algorithm.
Moving Averages from MA0 to MA8, are the core of each feature of the script.
By default, from MA0 to MA8, Moving Averages use the Fibonacci Series to define their lengths. This happens because of the power of the Golden Ratio in the market behavior.
Instead, the first moving average is an extra resource. Its purpose is to plot a Signal Line on the chart.
The script does not consider plotting every Moving Average on the chart. But it lets you enable the plotting of 7 Moving Averages (from MA0 to MA5 + Signal Line).
It is possible to select the Moving Average Formula to use in the script. This is a setting that affects every Moving Average. Then, it changes also the result of every feature of the script.
The selection is between:
Exponential Moving Average.
Simple Moving Average.
Weighted moving Average.
Simple Moving Averages and Pointers - Full Visibility
Moving Averages and Partial Visibility
The plotting of each Moving Average can be total or partial.
By default, the plotting of Moving Averages and Signal Line is partial.
When the price approaches a Moving Average a little part of the curve becomes visible. This highlights supports or resistances.
Besides, this tracking remains on the chart. Then it shows supports and resistances that the price reached during its progression.
The Partial Visibility Algorithm is a great advantage, ruling how to plot curves. It uses a parameter to set how much of the curves is to plot.
Exponential Moving Averages and Pointers - Partial Visibility
Exponential Moving Averages and Pointers - Full Visibility
Moving Averages and Pointers
As it is clear, it is not necessary to plot entire curves of Moving Averages on the chart. But it becomes relevant to plot Pointers to Moving Averages.
Indeed, the script plots horizontal segments that point to the latest Average Prices.
Every segment has a Label that shows Average Price, Length, and its related Moving Average (from MA0 to MA8). Besides, it is possible to extend the segment to right.
These pointers are a very useful automatization. They point to the Moving Averages. In this way, they show Dynamic Supports and Resistances as horizontal segments.
They are adaptive. Used together with the Volume Profile their progression approaches Edges of High Nodes.
This adaptive behavior makes easy to see when the price reaches Volume High Nodes and slows down.
Moving Average Pointers use the Partial Visibility Algorithm. In this case, the algorithm shows pointers with higher frequency than curves.
Moving Averages Pointers have:
Horizontal Segment as a Pointer with Arrow.
Label with details.
Circle to the current Average Price.
Weighted Moving Averages and Pointers - Full Visibility
Volatility Channels
Having Moving Averages, from MA0 to MA8, it is possible to plot 9 Volatility Channels.
Each Volatility Channel uses one of the Moving Averages, from MA0 to MA8.
Indeed, each Volatility Channel has the same designation of the Moving Average used.
The Standard Deviation defines the Volatility Range. It uses the length of the Moving Average related to the Volatility Channel.
The Volatility Range is unique for each Volatility Channel. In the same way, each Volatility Channel is unique because of its relation to only one Moving Average.
By default, each volatility channel has the 2 value as Standard Deviation Multiplier. This gives 95% of Confidence that the price will stay into the Volatility Range.
Using the Simple Moving Average, each Volatility Channel becomes a Bollinger Bands envelop.
Volatility Channels work very well even using Exponential or Weighted Moving Averages.
MA0 - Volatility Channel
Volatility Channels - From MA0 to MA8
Value at Risk (VaR)
GA Value at Risk plots VaR according to the volatility. The VaR plotting follows the Trend Momentum or Buying-Selling Waves.
By default, VaR follows the Trend Momentum by 2 times the Standard Deviation of MA0. Where MA0 is the first Moving Average and Volatility Channel of the set.
Besides, by default, the calculation of the Value at Risk is adaptive. It does not follow the Volatility Channel Bands. But it changes according to the fast reaction of the price into the Volatility Range.
By default, VaR follows the main momentum even if the price is moving in opposition to it. This occurs as long as the Trend Momentum persists.
In the settings box, It is possible to select the following of the latest Buying Wave or Selling Wave.
In this case, VaR changes according to the change of Buying Wave or Selling Wave. This means that, on these conditions, VaR follows main swings. Then it follows the weakening and the strengthening of the trend momentum as long as it persists.
The plotting of the Value at Risk can show these features:
Red cycle to show the Value at Risk at the current price.
Look Back Red Line that shows the progression of the Value at Risk.
Label with details.
MA0 - Value at Risk - Not Adaptive
MA0 - Value at Risk - Adaptive
It is possible to use a different Moving Average and Volatility Channel from the set. This affects the calculation and the plotting of the Value at Risk. In this way, the algorithm return the Value at Risk for the short, middle, or long-term.
Then, you can get the Value at Risk for that Financial Instrument, calculated for ~1 year or more so as for 1 month.
The Value at Risk does not tell you when to enter the market. Besides, it does not show you that the trend is changing.
MA3 - Value at Risk - Adaptive
Value at Profit (VaP)
The Value at Profit has a descriptive purpose. It points the Volatility Band that is opposite to the Value at Risk.
I chose Value at Profit as a designation for this feature. It does not tell you where to exit the market.
But is shows what the price progression is pointing on. This happens following the switching between Volatility Ranges.
The VaP follows the Volatility Band where the price tends to converge.
An outperforming or underperforming price is running faster than the average trend. Then when the price runs enough to converge to the Volatility Band, it is over extended or under extended.
At these conditions, the increased buying or selling pressure affects the price behavior. This slows down the price progression.
The Algorithm behind the Value at Profit is adaptive. Then the pointer jumps up and down the Volatility Bands of the 9 Volatility Channels. This occurs according to the price progression, following the switching between Volatility Ranges.
So, the VaP points a Volatility Band as long as the price can have chances to converges on it. Instead, when the price has chances to exceed the Volatility Band, the VaP points to the next one.
The plotting of the Value at Profit occurs enabling its Label with details.
Value at Profit - MA0 Volatility Channel Upper Band
Value at Profit - MA6 Volatility Channel Upper Band
Price Extension
When the price runs far away from the average trend price, GA Value at Risk can plot the price extension.
It shows the distance in percentage of the price from a Moving Average of the set. This tends to highlight conditions where the price is over or under extended.
An overbought or oversold condition precedes the shortening of the Trust. It is a cause of the hesitation of the price to continue its progression. This includes also Climactic Points and Signs of Dominance.
The Price Extension plotting uses a variation of the Partial Visibility Algorithm. It plots the Price Extension Arrow only when there are specific volatility conditions.
When the Partial Visibility is set to 0, the Price Extension Arrow is always visible on the chart.
The plotting of the Price Extension includes a Label with details.
Over Extension - The Price is Outperforming MA0
Under Extension - The Price is Underperforming MA0
Price Extension Coloring for Bars and Line Chart
GA Value at Risk lets you enable the coloring of vertical charts. Green and Red colors mark the over and under extended price on bars, candle sticks, and also on the Line Chart.
The Price Extension Algorithm colors Bars and Line Chart by a momentum function.
Indeed, the coloring happens following Relative Strength Index or Bollinger Bands %B.
These 2 Momentum functions are different. Indeed, they color the chart according to the purpose of their curves.
Coloring the Line Chart, it is necessary to put on front the script visibility.
Overbought and Oversold Conditions on Line Chart by Bollinger Bands %B
Overbought and Oversold Conditions on Candlesticks Chart by Relative Strength Index
Note: I restrict access to the tool. Use the links in my signature field to gain access to the script. Feel free to send me a PM for any question.
Thank you
Girolamo Aloe
Founder of Profiting Me Finance Analytics
-
Disclaimer
Nobody in Girolamo Aloe websites and trading view profile is a Financial Advisor. Nothing therein is intended to be constructed as Financial Advice. The content on his websites is for information and educational purposes only.
Trading carries high risk. You should not invest money that you cannot afford to lose. Past performance is not an indication of future results.
KarkadannKarkadann is an indicator derived from a Naberius trading algorithm. It represents a medium ground between our two other algorithms Mammon and Malphas.
It detects the current trend ranges in the market and prints a suggested entry accordingly at assumed trend channel tops & bottoms upon encountering stalled out price action usually indicative of a retracement. As such, Karakadann can be traded on nearly any timeframe.
This algorithm was developed to trade primarily leveraged XBT; however, after exploring larger alt coins and the more traditional markets outside of cryptocurrency we found that Karkadann does better than the average trader regardless of the pair or ticker being traded at the time. Any core changes to the live trading algorithm will be added to this indicator as they are deployed.
Suggested Methods of Operation:
1. Buy and Sell signals represent a possible trading opportunity. Based on our testing, manual traders should use the 15m - 60m for scalping and 240m - 1D for larger swings.
2. Upon signal print, place your limit orders spread throughout the current candles total body range. DO NOT MARKET IN. DO NOT CHASE. If the limit orders don't fill within the following candle regardless of timeframe being traded remove them and re-evaluate.
3. Use standard candles. Heikin Ashi candles are ok but can be deceiving in times of localized price volatility
4. Trade the trend or wait for extreme price action, counter to the trend, to take up positions.
Real Cumulative Delta VolumeReal Cumulative Delta Volume (CDV) - Enhanced Volume Flow Analysis
What This Indicator Does
This indicator calculates cumulative delta volume using an enhanced approximation methodology that analyzes buying and selling pressure within each candlestick. It provides traders with insights into volume flow dynamics by tracking the cumulative difference between estimated buy and sell volumes over time.
Technical Methodology & Calculation Details
Volume Distribution Algorithm: The indicator uses a price-weighted distribution method to estimate buy and sell volumes within each bar:
Delta multiplier = (close - low) / (high - low)
Buy volume = total volume × delta multiplier
Sell volume = total volume × (1 - delta multiplier)
Net delta = buy volume - sell volume
Cumulative Delta Tracking: Unlike basic volume indicators, this approach maintains a running cumulative total of net delta values:
CDV Open = Previous CDV Close
CDV Close = Previous CDV Close + Net Delta
CDV High/Low = Previous CDV Close + estimated intrabar extremes
Enhanced Features Beyond Standard CDV:
Divergence Detection: Automatically identifies when price direction conflicts with volume flow direction
Body Size Analysis: Compares current vs previous CDV candle body sizes to detect momentum changes
Conditional Color Coding: Special visual alerts when specific price/volume relationships occur
Signal Generation: Buy/sell signals based on divergence resolution patterns
How This Differs from Basic Cumulative Delta
Standard Limitations Addressed:
Most cumulative delta indicators on TradingView use simple uptick/downtick classification. This indicator enhances the approach by:
Price-Weighted Distribution: Instead of assuming 50/50 volume splits, uses the bar's price action (close relative to high/low) to estimate volume distribution
OHLC Representation: Displays CDV as candlesticks rather than just a line, showing intrabar volume dynamics
Integrated Divergence Detection: Built-in algorithms identify price/volume conflicts automatically
Advanced Signal Logic: Multi-condition signal generation beyond simple crossovers
Visual Enhancement Features:
Dual display modes (candlestick or line)
Special color coding for divergence conditions
Moving average overlays for trend confirmation
Optional buy/sell signal markers
Signal Generation Logic
Buy Signals Generated When:
Previous bar showed bearish divergence (price down, CDV up)
Current CDV candle shows specific color condition
Current CDV body is contained within previous divergence body
Price closes above previous high
Sell Signals Generated When:
Previous bar showed bullish divergence (price up, CDV down)
Current CDV candle shows specific color condition
Current CDV body is contained within previous divergence body
Price closes below previous low
Trading Applications
Volume Flow Analysis:
Identify periods of hidden accumulation or distribution
Spot when large players are buying/selling against the price trend
Confirm trend strength through volume alignment
Divergence Trading:
Early warning system for potential reversals
Identify when price movements lack volume support
Time entries based on divergence resolution
Trend Confirmation:
Use CDV direction to confirm price trend validity
Moving averages on CDV provide additional trend context
Volume momentum changes often precede price momentum shifts
Display Options & Settings
Visual Modes:
Candlestick: Full OHLC representation of cumulative delta
Line: Simplified cumulative line display
Moving Averages:
Optional SMA overlays (default: 50, 200 periods)
Optional EMA overlays (default: 50, 200 periods)
Customizable periods and colors
Signal Controls:
Toggle buy/sell signals on/off independently
Customizable colors for all visual elements
Adjustable transparency and styling options
Usage Guidelines & Limitations
Best Practices:
Most effective on timeframes 15m and higher due to volume data quality
Works best in liquid markets with consistent volume
Should be used alongside price action analysis and support/resistance levels
Signals are more reliable during trending market conditions
Technical Limitations:
Uses approximation methods due to lack of tick-by-tick data in Pine Script
Volume distribution estimates may be less accurate during gaps or low-volume periods
Effectiveness depends on quality of volume data from your broker/exchange
Market Context Considerations:
Less reliable during market holidays or extremely low volume sessions
News events and earnings can cause volume anomalies that affect calculations
Consider market microstructure when interpreting signals on very short timeframes
Important Disclaimers
Educational Purpose: This indicator is designed for educational and analysis purposes. It does not constitute financial or investment advice.
Risk Warning: All trading involves risk of loss. Past performance of any indicator signals does not guarantee future results.
Testing Required: Users should thoroughly backtest and forward test this indicator before using it in live trading. Paper trading is recommended to understand signal behavior.
No Guarantees: The developer makes no claims about profitability or accuracy. Market conditions change and historical effectiveness may not continue.
Proper Usage: This is a technical analysis tool, not a complete trading system. Always use appropriate risk management, position sizing, and combine with other forms of analysis.
Developer: Delta Merge Professional Trading Applications
Access Instructions: Send a private message through TradingView explaining your trading experience and how you plan to use this indicator. Access is provided to traders who demonstrate understanding of volume analysis concepts and proper risk management practices.
Langlands-Operadic Möbius Vortex (LOMV)Langlands-Operadic Möbius Vortex (LOMV)
Where Pure Mathematics Meets Market Reality
A Revolutionary Synthesis of Number Theory, Category Theory, and Market Dynamics
🎓 THEORETICAL FOUNDATION
The Langlands-Operadic Möbius Vortex represents a groundbreaking fusion of three profound mathematical frameworks that have never before been combined for market analysis:
The Langlands Program: Harmonic Analysis in Markets
Developed by Robert Langlands (Fields Medal recipient), the Langlands Program creates bridges between number theory, algebraic geometry, and harmonic analysis. In our indicator:
L-Function Implementation:
- Utilizes the Möbius function μ(n) for weighted price analysis
- Applies Riemann zeta function convergence principles
- Calculates quantum harmonic resonance between -2 and +2
- Measures deep mathematical patterns invisible to traditional analysis
The L-Function core calculation employs:
L_sum = Σ(return_val × μ(n) × n^(-s))
Where s is the critical strip parameter (0.5-2.5), controlling mathematical precision and signal smoothness.
Operadic Composition Theory: Multi-Strategy Democracy
Category theory and operads provide the mathematical framework for composing multiple trading strategies into a unified signal. This isn't simple averaging - it's mathematical composition using:
Strategy Composition Arity (2-5 strategies):
- Momentum analysis via RSI transformation
- Mean reversion through Bollinger Band mathematics
- Order Flow Polarity Index (revolutionary T3-smoothed volume analysis)
- Trend detection using Directional Movement
- Higher timeframe momentum confirmation
Agreement Threshold System: Democratic voting where strategies must reach consensus before signal generation. This prevents false signals during market uncertainty.
Möbius Function: Number Theory in Action
The Möbius function μ(n) forms the mathematical backbone:
- μ(n) = 1 if n is a square-free positive integer with even number of prime factors
- μ(n) = -1 if n is a square-free positive integer with odd number of prime factors
- μ(n) = 0 if n has a squared prime factor
This creates oscillating weights that reveal hidden market periodicities and harmonic structures.
🔧 COMPREHENSIVE INPUT SYSTEM
Langlands Program Parameters
Modular Level N (5-50, default 30):
Primary lookback for quantum harmonic analysis. Optimized by timeframe:
- Scalping (1-5min): 15-25
- Day Trading (15min-1H): 25-35
- Swing Trading (4H-1D): 35-50
- Asset-specific: Crypto 15-25, Stocks 30-40, Forex 35-45
L-Function Critical Strip (0.5-2.5, default 1.5):
Controls Riemann zeta convergence precision:
- Higher values: More stable, smoother signals
- Lower values: More reactive, catches quick moves
- High frequency: 0.8-1.2, Medium: 1.3-1.7, Low: 1.8-2.3
Frobenius Trace Period (5-50, default 21):
Galois representation lookback for price-volume correlation:
- Measures harmonic relationships in market flows
- Scalping: 8-15, Day Trading: 18-25, Swing: 25-40
HTF Multi-Scale Analysis:
Higher timeframe context prevents trading against major trends:
- Provides market bias and filters signals
- Improves win rates by 15-25% through trend alignment
Operadic Composition Parameters
Strategy Composition Arity (2-5, default 4):
Number of algorithms composed for final signal:
- Conservative: 4-5 strategies (higher confidence)
- Moderate: 3-4 strategies (balanced approach)
- Aggressive: 2-3 strategies (more frequent signals)
Category Agreement Threshold (2-5, default 3):
Democratic voting minimum for signal generation:
- Higher agreement: Fewer but higher quality signals
- Lower agreement: More signals, potential false positives
Swiss-Cheese Mixing (0.1-0.5, default 0.382):
Golden ratio φ⁻¹ based blending of trend factors:
- 0.382 is φ⁻¹, optimal for natural market fractals
- Higher values: Stronger trend following
- Lower values: More contrarian signals
OFPI Configuration:
- OFPI Length (5-30, default 14): Order Flow calculation period
- T3 Smoothing (3-10, default 5): Advanced exponential smoothing
- T3 Volume Factor (0.5-1.0, default 0.7): Smoothing aggressiveness control
Unified Scoring System
Component Weights (sum ≈ 1.0):
- L-Function Weight (0.1-0.5, default 0.3): Mathematical harmony emphasis
- Galois Rank Weight (0.1-0.5, default 0.2): Market structure complexity
- Operadic Weight (0.1-0.5, default 0.3): Multi-strategy consensus
- Correspondence Weight (0.1-0.5, default 0.2): Theory-practice alignment
Signal Threshold (0.5-10.0, default 5.0):
Quality filter producing:
- 8.0+: EXCEPTIONAL signals only
- 6.0-7.9: STRONG signals
- 4.0-5.9: MODERATE signals
- 2.0-3.9: WEAK signals
🎨 ADVANCED VISUAL SYSTEM
Multi-Dimensional Quantum Aura Bands
Five-layer resonance field showing market energy:
- Colors: Theme-matched gradients (Quantum purple, Holographic cyan, etc.)
- Expansion: Dynamic based on score intensity and volatility
- Function: Multi-timeframe support/resistance zones
Morphism Flow Portals
Category theory visualization showing market topology:
- Green/Cyan Portals: Bullish mathematical flow
- Red/Orange Portals: Bearish mathematical flow
- Size/Intensity: Proportional to signal strength
- Recursion Depth (1-8): Nested patterns for flow evolution
Fractal Grid System
Dynamic support/resistance with projected L-Scores:
- Multiple Timeframes: 10, 20, 30, 40, 50-period highs/lows
- Smart Spacing: Prevents level overlap using ATR-based minimum distance
- Projections: Estimated signal scores when price reaches levels
- Usage: Precise entry/exit timing with mathematical confirmation
Wick Pressure Analysis
Rejection level prediction using candle mathematics:
- Upper Wicks: Selling pressure zones (purple/red lines)
- Lower Wicks: Buying pressure zones (purple/green lines)
- Glow Intensity (1-8): Visual emphasis and line reach
- Application: Confluence with fractal grid creates high-probability zones
Regime Intensity Heatmap
Background coloring showing market energy:
- Black/Dark: Low activity, range-bound markets
- Purple Glow: Building momentum and trend development
- Bright Purple: High activity, strong directional moves
- Calculation: Combines trend, momentum, volatility, and score intensity
Six Professional Themes
- Quantum: Purple/violet for general trading and mathematical focus
- Holographic: Cyan/magenta optimized for cryptocurrency markets
- Crystalline: Blue/turquoise for conservative, stability-focused trading
- Plasma: Gold/magenta for high-energy volatility trading
- Cosmic Neon: Bright neon colors for maximum visibility and aggressive trading
📊 INSTITUTIONAL-GRADE DASHBOARD
Unified AI Score Section
- Total Score (-10 to +10): Primary decision metric
- >5: Strong bullish signals
- <-5: Strong bearish signals
- Quality ratings: EXCEPTIONAL > STRONG > MODERATE > WEAK
- Component Analysis: Individual L-Function, Galois, Operadic, and Correspondence contributions
Order Flow Analysis
Revolutionary OFPI integration:
- OFPI Value (-100% to +100%): Real buying vs selling pressure
- Visual Gauge: Horizontal bar chart showing flow intensity
- Momentum Status: SHIFTING, ACCELERATING, STRONG, MODERATE, or WEAK
- Trading Application: Flow shifts often precede major moves
Signal Performance Tracking
- Win Rate Monitoring: Real-time success percentage with emoji indicators
- Signal Count: Total signals generated for frequency analysis
- Current Position: LONG, SHORT, or NONE with P&L tracking
- Volatility Regime: HIGH, MEDIUM, or LOW classification
Market Structure Analysis
- Möbius Field Strength: Mathematical field oscillation intensity
- CHAOTIC: High complexity, use wider stops
- STRONG: Active field, normal position sizing
- MODERATE: Balanced conditions
- WEAK: Low activity, consider smaller positions
- HTF Trend: Higher timeframe bias (BULL/BEAR/NEUTRAL)
- Strategy Agreement: Multi-algorithm consensus level
Position Management
When in trades, displays:
- Entry Price: Original signal price
- Current P&L: Real-time percentage with risk level assessment
- Duration: Bars in trade for timing analysis
- Risk Level: HIGH/MEDIUM/LOW based on current exposure
🚀 SIGNAL GENERATION LOGIC
Balanced Long/Short Architecture
The indicator generates signals through multiple convergent pathways:
Long Entry Conditions:
- Score threshold breach with algorithmic agreement
- Strong bullish order flow (OFPI > 0.15) with positive composite signal
- Bullish pattern recognition with mathematical confirmation
- HTF trend alignment with momentum shifting
- Extreme bullish OFPI (>0.3) with any positive score
Short Entry Conditions:
- Score threshold breach with bearish agreement
- Strong bearish order flow (OFPI < -0.15) with negative composite signal
- Bearish pattern recognition with mathematical confirmation
- HTF trend alignment with momentum shifting
- Extreme bearish OFPI (<-0.3) with any negative score
Exit Logic:
- Score deterioration below continuation threshold
- Signal quality degradation
- Opposing order flow acceleration
- 10-bar minimum between signals prevents overtrading
⚙️ OPTIMIZATION GUIDELINES
Asset-Specific Settings
Cryptocurrency Trading:
- Modular Level: 15-25 (capture volatility)
- L-Function Precision: 0.8-1.3 (reactive to price swings)
- OFPI Length: 10-20 (fast correlation shifts)
- Cascade Levels: 5-7, Theme: Holographic
Stock Index Trading:
- Modular Level: 25-35 (balanced trending)
- L-Function Precision: 1.5-1.8 (stable patterns)
- OFPI Length: 14-20 (standard correlation)
- Cascade Levels: 4-5, Theme: Quantum
Forex Trading:
- Modular Level: 35-45 (smooth trends)
- L-Function Precision: 1.6-2.1 (high smoothing)
- OFPI Length: 18-25 (disable volume amplification)
- Cascade Levels: 3-4, Theme: Crystalline
Timeframe Optimization
Scalping (1-5 minute charts):
- Reduce all lookback parameters by 30-40%
- Increase L-Function precision for noise reduction
- Enable all visual elements for maximum information
- Use Small dashboard to save screen space
Day Trading (15 minute - 1 hour):
- Use default parameters as starting point
- Adjust based on market volatility
- Normal dashboard provides optimal information density
- Focus on OFPI momentum shifts for entries
Swing Trading (4 hour - Daily):
- Increase lookback parameters by 30-50%
- Higher L-Function precision for stability
- Large dashboard for comprehensive analysis
- Emphasize HTF trend alignment
🏆 ADVANCED TRADING STRATEGIES
The Mathematical Confluence Method
1. Wait for Fractal Grid level approach
2. Confirm with projected L-Score > threshold
3. Verify OFPI alignment with direction
4. Enter on portal signal with quality ≥ STRONG
5. Exit on score deterioration or opposing flow
The Regime Trading System
1. Monitor Aether Flow background intensity
2. Trade aggressively during bright purple periods
3. Reduce position size during dark periods
4. Use Möbius Field strength for stop placement
5. Align with HTF trend for maximum probability
The OFPI Momentum Strategy
1. Watch for momentum shifting detection
2. Confirm with accelerating flow in direction
3. Enter on immediate portal signal
4. Scale out at Fibonacci levels
5. Exit on flow deceleration or reversal
⚠️ RISK MANAGEMENT INTEGRATION
Mathematical Position Sizing
- Use Galois Rank for volatility-adjusted sizing
- Möbius Field strength determines stop width
- Fractal Dimension guides maximum exposure
- OFPI momentum affects entry timing
Signal Quality Filtering
- Trade only STRONG or EXCEPTIONAL quality signals
- Increase position size with higher agreement levels
- Reduce risk during CHAOTIC Möbius field periods
- Respect HTF trend alignment for directional bias
🔬 DEVELOPMENT JOURNEY
Creating the LOMV was an extraordinary mathematical undertaking that pushed the boundaries of what's possible in technical analysis. This indicator almost didn't happen. The theoretical complexity nearly proved insurmountable.
The Mathematical Challenge
Implementing the Langlands Program required deep research into:
- Number theory and the Möbius function
- Riemann zeta function convergence properties
- L-function analytical continuation
- Galois representations in finite fields
The mathematical literature spans decades of pure mathematics research, requiring translation from abstract theory to practical market application.
The Computational Complexity
Operadic composition theory demanded:
- Category theory implementation in Pine Script
- Multi-dimensional array management for strategy composition
- Real-time democratic voting algorithms
- Performance optimization for complex calculations
The Integration Breakthrough
Bringing together three disparate mathematical frameworks required:
- Novel approaches to signal weighting and combination
- Revolutionary Order Flow Polarity Index development
- Advanced T3 smoothing implementation
- Balanced signal generation preventing directional bias
Months of intensive research culminated in breakthrough moments when the mathematics finally aligned with market reality. The result is an indicator that reveals market structure invisible to conventional analysis while maintaining practical trading utility.
🎯 PRACTICAL IMPLEMENTATION
Getting Started
1. Apply indicator with default settings
2. Select appropriate theme for your markets
3. Observe dashboard metrics during different market conditions
4. Practice signal identification without trading
5. Gradually adjust parameters based on observations
Signal Confirmation Process
- Never trade on score alone - verify quality rating
- Confirm OFPI alignment with intended direction
- Check fractal grid level proximity for timing
- Ensure Möbius field strength supports position size
- Validate against HTF trend for bias confirmation
Performance Monitoring
- Track win rate in dashboard for strategy assessment
- Monitor component contributions for optimization
- Adjust threshold based on desired signal frequency
- Document performance across different market regimes
🌟 UNIQUE INNOVATIONS
1. First Integration of Langlands Program mathematics with practical trading
2. Revolutionary OFPI with T3 smoothing and momentum detection
3. Operadic Composition using category theory for signal democracy
4. Dynamic Fractal Grid with projected L-Score calculations
5. Multi-Dimensional Visualization through morphism flow portals
6. Regime-Adaptive Background showing market energy intensity
7. Balanced Signal Generation preventing directional bias
8. Professional Dashboard with institutional-grade metrics
📚 EDUCATIONAL VALUE
The LOMV serves as both a practical trading tool and an educational gateway to advanced mathematics. Traders gain exposure to:
- Pure mathematics applications in markets
- Category theory and operadic composition
- Number theory through Möbius function implementation
- Harmonic analysis via L-function calculations
- Advanced signal processing through T3 smoothing
⚖️ RESPONSIBLE USAGE
This indicator represents advanced mathematical research applied to market analysis. While the underlying mathematics are rigorously implemented, markets remain inherently unpredictable.
Key Principles:
- Use as part of comprehensive trading strategy
- Implement proper risk management at all times
- Backtest thoroughly before live implementation
- Understand that past performance does not guarantee future results
- Never risk more than you can afford to lose
The mathematics reveal deep market structure, but successful trading requires discipline, patience, and sound risk management beyond any indicator.
🔮 CONCLUSION
The Langlands-Operadic Möbius Vortex represents a quantum leap forward in technical analysis, bringing PhD-level pure mathematics to practical trading while maintaining visual elegance and usability.
From the harmonic analysis of the Langlands Program to the democratic composition of operadic theory, from the number-theoretic precision of the Möbius function to the revolutionary Order Flow Polarity Index, every component works in mathematical harmony to reveal the hidden order within market chaos.
This is more than an indicator - it's a mathematical lens that transforms how you see and understand market structure.
Trade with mathematical precision. Trade with the LOMV.
*"Mathematics is the language with which God has written the universe." - Galileo Galilei*
*In markets, as in nature, profound mathematical beauty underlies apparent chaos. The LOMV reveals this hidden order.*
— Dskyz, Trade with insight. Trade with anticipation.
AQPRO ScalperX📝 INTRODUCTION
AQPRO ScalperX is a trading indicator designed for fast-paced, intraday trading. It uses Donchian channel breakouts, combined with a proprietary filtering system, to catch buy and sell opportunities as close to the beginning as possible without losing quality of the signals.
On top of core signals, ScalperX includes a real-time max profit tracker, a multi-timeframe (MTF) dashboard, support and resistance zones, and risk management visualization tools like automatic rendering of TP and SL lines. The indicator is fully customizable for both its visuals and functional settings.
🎯 PURPOSE OF USAGE
This indicator was initially designed with the idea of trying to make such a tool, that would be able to catch trend reversal in the most safe way. In this particular situation term 'safe way' is very abstract and it is up to interpretation, but we decided that our definition will be 'trading with price breakouts' , meaning that we would like to capitalize on price breaking its previous structure in the direction opposite to the previous one.
You can clearly see on the chart how buy and sell signals are going one after another on the screenshot below:
This ensures that we follow trend consistently and without missing out on potential profits. Just like they say: " let the winners run ".
Even though indicator with similar goals already exist in the open market, we believe that our proprietary algorithms and filters for determining price breakouts can make a big difference to traders, which employ similar strategies on daily basis, by helping them understand where are the potential high-quality breakouts might be. We haven't found indicator with exact same functionality as ours, which means that traders will be able to leverage an actually new tool to generate new price insights.
In short, main goals of this indicator are as follows:
Catching high-quality price breakouts, filtered to reduce the amount of choppy moves and false signals;
Tracking potential profits in real-time, directly on trader's chart;
Organizing data visualization of data pf latest signals from chosen asset from multiple timeframe in one dashboard;
Automated highlighting of key support and resistance zones on the chart, which serve as confirmation for main signals;
⚙️ SETTINGS OVERVIEW
Options for customization of this indicator are straightforward, but let's review them to make things certainly clear:
🔑 ScalperX / Main Settings
Range — defines the "wideness" of the breakout boxes. Higher values create wider breakout zones and impact breakout sensitivity;
Filter — adjusts the spacing between breakout boxes, determining the strictness of signal filtering. Higher values lead to more selective and rarer signals;
Show Max Profit — displays a real-time line and label that updates when a trade achieves a new peak profit, measured in ticks.
⏰ MTF Signal / Main Settings
Show MTF Signals — enables the generation of buy/sell signals from selected higher timeframes, displayed as labels on the current chart;
Timeframe — specifies the higher timeframe to use for MTF signal detection, such as 1 hour (1h) or 4 hours (4h).
🗂️ MTF Dashboard / Main Settings
Show MTF Dashboard — activates a dashboard that tracks entries, TP, SL, and overall trade bias for one selected symbol across four customizable timeframes;
* Dashboard position ( Vertical ) — adjusts whether the dashboard appears on the Top, Middle, or Bottom of the chart;
* Dashboard position ( Horizontal ) — aligns the dashboard Left, Center, or Right within the chart window;
* the name of the parameter is hidden in the settings
🗂️ MTF Dashboard / Ticker
Ticker to Track — Allows you to choose the specific ticker symbol (e.g., BINANCE:BTCUSDT) for MTF tracking.
🗂️ MTF Dashboard / Timeframes
* Timeframe 1 — set the first timeframe for multi-timeframe analysis (e.g., 15 minutes);
* Timeframe 2 — set the second timeframe for multi-timeframe analysis (e.g., 30 minutes);
* Timeframe 3 — set the third timeframe for multi-timeframe analysis (e.g., 1 hour);
* Timeframe 4 — set the fourth timeframe for multi-timeframe analysis (e.g., 4 hours).
* the name of the parameter is hidden in the settings
🛡️ Risk Management / Main Settings
Show TP&SL — displays dynamic lines and labels for the entry, Take Profit (TP), and Stop Loss (SL) of the most recent signal, updated in real-time until a new signal triggers;
Risk-to-Reward Ratio (R:R) — defines the ratio for TP and SL calculation to control your risk and reward on every trade.
📐 Support & Resistance / Main Settings
Show Support & Resistance Zones — enables dynamic zones based on pivot points, colored bullish or bearish based on price context;
History Lookback — defines the number of bars to consider when calculating support and resistance levels. Increasing this results in zones derived from longer-term price structures.
🎨 Visual Settings / ScalperX
Bullish Box — defines the color for bullish breakout boxes;
Bearish Box — defines the color for bearish breakout boxes;
Max Profit — sets the color for the max profit line on the chart.
🎨 Visual Settings / S&R
Support — defines color used for standard support zones;
Resistance — defines color used for standard resistance zones;
Strong Support — defines special color for zones classified as "strong support";
Strong Resistance — defines special color for zones classified as "strong resistance".
🎨 Visual Settings / MTF Dashboard
Bullish — sets the color for bullish trade states in the MTF dashboard;
Bearish — sets the color for bearish trade states in the MTF dashboard.
🔔 Alerts / Main Settings
Buy & Sell — toggles alerts for buy and sell signals detected by the indicator in the current chart timeframe;
MTF Buy & Sell — toggles alerts for buy and sell signals detected across the selected MTF timeframes.
📈 APPLICATION GUIDE
Application flow of this indicator very easy to understand and get used to, because all of the necessary elements — analysis, drawing, alert — are already automated by our algorithms. Let's review how the indicator works.
Let's start with the most basic thing — how will your indicator look when you load it on your chart for the first time:
AQPRO ScalperX consists mainly of 6 logic blocks:
ScalperX signals;
Risk visualization;
Max Profit tracking;
MTF scalper signals;
MTF dashboard;
Support & Resistance zones.
Description of each logic block is provided in the corresponding sections below.
SCALPERX SIGNALS
Signals, generated by our indicator, are shown on the chart as coloured up/down triangle. When a signal appears on the chart, indicator also create a box of length equal to 'Range' parameter from "Main Settings" group of settings. This box is intended to show which area of the price was broken by current candle.
It also important to acknowledge, the breakout itself happens only when price closes beyond broken price area with its close (!) price . Breakouts with highs or lows are not counted. This reduces the amount of low-quality signals and ensures that only the strong breakout will appear on the chart.
VERY IMPORTANT NOTE: all signals are considered valid only on the close of the candle, which triggered the signal, so if you want to enter a trade by any signal, wait for its candle to close and open your trade right on the next candle.
Talking about scalper's settings, we need to shed a light on how the changes in them affect signal's quality.
Parameter 'Range' defines the amount of bars, that will be review prior to current candle to determine wether the price area of this bars is good enough to track and if current candle actually broke this price area.
👍 Rule of thumb : the higher the 'Range' is, the "wider" the boxes. Also the with the increase of this parameter rises the lag of the signals, so be carefully with setting high values to this parameter.
See the visual showcase of signals with different 'Range' parameters on the screenshot below:
The example above features two instancies of ScalperX with two different 'Range' parameter values: 15 (leftchart) and 5 (right chart). You can clearly see, that on left chart here are 2 signals in comparison to 6 signals on right chart. Also signals on the left side have bigger lag and they don't catch the start of the move in comparison to how quickly tops and bottoms are catched with low 'Range' . However, low 'Range' will lead to excessive amount of signals, quality of which during 'whipsaw' markets is not that great.
✉️ Our advice on how to optimally set 'Range' parameter:
Use low values to trade during the times, when there are a lot of clean up and down impulses. This way you will catch reversal opportunities sooner and the quality of the signals will still be great;
Use high values on the 'whipsaw' markets. This will filter out many bad signals, that you would get with low-value 'Range' , and will drastically reduces amount of losing trades.
Talking about the 'Filter' parameter, this particular setting defines the 'strictness' of rules which will be applied to price area validation process. Essentially, the higher this parameter is, the stronger price impulse has to be confirm the breakout. However, changes in this parameter will not impact the "wideness" of boxes at all.
👍 Rule of thumb : the higher the 'Filter' is, the more separated the signal will be. Setting this parameter to high value will lead to increase in lag and big reduction in amount of signals, so be careful this parameter to high values.
See the visual showcase of signals with different 'Filter' parameters on the screenshot below:
The example above features two instancies of ScalperX with two different 'Filter' parameter values: 20 (left chart) and 2.5 (right chart). You can clear see, that low 'Filter' generated 6 signals, while higher one generated only 4 signals. However if you look closer, you will see that 2 signals, that existing in the yellow dashed area on the right chart, don't exist in the same area on the left chart. This is because high value of this parameter requires price impulse to be very strong in order for the indicator to mark this breakout as a valid one. What is more important is that these 2 'missing' signals were actually bad and, technically, we actually cut our losses in this case with high value of 'Filter' . You can see that the leftmost sell signal on the left chart eventually closed in a nice profit, in comparison to the same trade being closed in a loss on the right chart because of the 2 signals that we were talking about above.
It is important to note, that setting 'Filter' to low values will not affect performance this much as it low value of 'Range' do, because the indicator already works on low values of this parameter by default and the signals on average are already good enough for trading.
✉️ Our advice on how to optimally set 'Filter' parameter:
Use low values to trade on the markets with clean up and down impulses. This way you avoid excessive filtering and leave a room for good signals to come right at you;
Use high values to trade on 'whipsaw' markets. Higher values of this parameter on these markets have same effect as high 'Range' parameter: filtering false signals and leaving room for actually strong price impulses, which you will later capitalize on.
RISK VISUALIZATION (TP&SL)
Rendering Take-Profits and Stop-Losses in our indicator works quite simple: for each new trade indicator creates new pairs of lines and labels for TP and SL, while lines & labels from previous trade are erased for aesthetics purposes. Each label shows price coordinates, so that each trader would be able to grap the numbers in seconds.
See the visual showcase of TP & SL visualization on the screenshot below:
Also, whenever TP or SL of the current trade is reached, drawing of both TP and SL stops. When the TP is reached, additional '✅' emoji on the TP price is shown as confirmation of Take-Profit.
However, while TP or SL has not been reached, TP&SL labels and lines will be prolonged until one of them will be reached or new signals will come.
See the visual showcase of TP & SL stopping being visualized & TP on the screenshot below:
MAX PROFIT TRACKING
This mechanic is not particularly a new one in field of trading, but people usually forgot that it can be a useful indicator of state of the market:
when lines and labels of Max Profit are far from entry points on consistent basis , it usually means that indicator's signals actually can catch a beginning of good price moves, which enables trader to capitalize on them;
when lines and labels of Max Profit are close to entry points on consistent basis , it means that either market is choppy or the indicator can't catch trading opportunities in time. To 'fix' this you can try to reconfigure scalper's parameters, which were described above.
Principles of Max Profit in this indicator are of industry-standard: when price updates its extremum and 'generates' more profit than it previously did, Max Profit label and line change their position to this extremum. Max Profit label displays the maximum potential amount of profit that a trader could have got during this trade in pips (!) .
See the visual showcase of Max Profit work on the screenshot below:
MTF SCALPER SIGNALS
The principles of these signals are exactly the same as principles for classic Scalper signals. Refer to 'Scalper Signals' section above to rehearse the knowledge.
Logic behind these signals is very simple:
We take classic Scalper signals;
We request the data about these latest signals from specific other timeframe ( user can choose it in the settings );
If such signals appeared, we display it on the chart as a big label with timeframe value inside of it. In comparison to classic signals, no additional boxes are created . TP&SL functionality doesn't cover MTF signals, so don't expect to see TP&SL lines and labels for MTF signals.
See the visual showcase of MTF Scalper signals on the screenshot below:
MTF DASHBOARD
The functionality of the dashboard is pretty simple, but it makes the dashboard itself a very powerful tool in a hands of experienced trader.
Let's review structure of MTF dashboard on the screenshot below:
The important feature of MTF dashboard is that its tracks latest trade's data from a particular ticker and its four timeframes, all of which any trader chooses in the settings. This means, that you can be on asset ABC , but track the data from asset XYZ . This allows for a quick scan of sentiment from different assets and their timeframes, which gives traders a clue on what is the trend on these assets both on lower and higher timeframes at the same moment and saves a lot of time from jumping from one asset & timeframe to another.
To see that this is exactly the case with our indicator, see the screenshot below:
Needless to say, that you can track current asset in the dashboard as well. This will have the same benefits, described in the paragraph above.
You can also customize colours for bullish and bearish patterns for MTF Dashboard in the settings.
SUPPORT & RESISTANCE ZONES
Support & resistance (S&R) zones are a great tool for confirming Scalper signals in complex situations. Using these zones to determine whether or a particular entry opportunity is good is a practice of professional traders, which we specifically added to our indicator for the reason of improving the quality of Scalper signals in long run.
The mechanics behind these zones is based on pivot points, the lookback for which you can customize in the parameter called 'History Lookback (Bars)' in "Support & Resistance / Main Settings" group of settings. Increasing this parameter will lead to a appearance of more 'global' zones, but they will appear much rarer, rather then zones, generated with low values of this parameter.
The quality of these zones doesn't change much when changing this parameter — it only changes the frequency of the zones on the chart. Zones, generated from high values of this parameter are more suitable for long-term trading, while zones, generated from low value of this parameter, are more suitable for short-term trading.
It also important to mention that any zone on the chart is considered active only until the moment its farther border ( top border for resistance zones and bottom border for support zones) is reached by price's high or low .
Take a look on the screenshot below to see which zones does the indicator draw:
Let's review the zones themselves now:
Classic Support/Resistance Zone — a standard zone, which on average has amedium success rate to reverse the price when collided with it;
High-buyer-volume/High-seller-volume Support/Resistance Zone — a stronger zone, which on average has much better success rate to reverse the price when collided with it. Classic zone is marked as high-volume only if the up/down volume near the pivot point of this zone is greater than a certain threshold ( not changeable );
Extreme Support/Resistance Zone — a zone, which appeared beyond price's least-possible-to-cross levels, and has to the highest success rate of reversing the price on encounter across the zones, mentioned previously. Classic zone, which appeared beyond certain price levels, calculated with our proprietary risk system, is considered extreme. Classic zone doesn't need to be high-volume to become an Extreme Zone!
High-buyer-volume/High-seller-volume Extreme Support/Resistance Zone — an Extreme Zone, which has also passed up/down volume evolution process, mentioned in the point 2 .
Trading with the zones, mentioned above, with highest-on-paper success rate — especially Extreme Zones — does NOT guarantee you a price reversal when the price will reach this zone. However, by conducting our own extensive research with this indicator, we have found that using these zone will actually help you increase your success rate on average, because using these zones as confirmation systems filter out quite a number of false signals on average.
It is also important to mention, that opacity (same as 'transparency') of S&R zones depends on the volume of around zone's pivot point:
if volume is high , zone has 'brighter' (less opacity) colour;
if volume is low , zone has 'darker' (more opacity) colour.
Let's review examples of Scalper signal, which 1) where filtered out by our S&R zones and 2) where confirmed by our S&R zones. See the screenshot below:
The example above clearly shows the importance of having an S&R zone confirming the signal. This kind of 'team work' between of Scalper signals and S&R zones results in filtering lots of bad signals and confirmation of truly strong ones.
🔔 ALERTS
This indicator employs alerts for an event when new signal occurs on the current timeframe or on MTF timeframe. While creating the alert below 'Condition' field choose 'any alert() function call'.
When this alert is triggered, it will generate this kind of message:
// Alerts for current timeframe
string msg_template = "EXCHANGE:ASSET, TIMEFRAME: BUY_OR_SELL"
string msg_example = "BINANCE:BTCUSDT, 15m: Buy"
// Alerts for MTF timeframe
string msg_template_mtf = "MTF / EXCHANGE:ASSET, TIMEFRAME: BUY_OR_SELL"
string msg_example_mtf = "MTF / BINANCE:BTCUSDT, 1h: Buy"
📌 NOTES
This indicators works best on assets with high liquidity; most suitable timeframes range from 1m to 4h (depends on your trading style) ;
Seriously consider using S&R zones as confirmation to main Scalper signals or any of your own signals. Confirmation process may filter out a lot of signals, but your PNL History will say "thank you" to you in the long-run and you will see yourself how good confirmed signals actually do work;
Don't forget to look at MTF dashboard from time to time to see global sentiment. This will help you time your entry moments better and will improve your performance in the long run;
This indicator can serve both as primary source of signals and as confirmation tool, but we advise to try to combine it with your own strategy frst to see if it will improve your performance.
🏁 AFTERWORD
AQPRO ScalperX was designed to help traders identify high-quality price breakouts and generate market insights based on them, which include signal generation. Main feature of this indicator is Scalper algorithm, which generate price-breakout-based signals directly on your chart.
Alongside these signals you can leverage 1) MTF Dashboard to track latest trade's data from chosen asset and its four timeframes, 2) risk visualization functionality (TP&SL) to improve understanding of current market risks and 3) Support & Resistance zones, which serve as a great confirmation tool for Scalper signals, but can also work with any other signal generation tool to enhance its performance.
ℹ️ If you have questions about this or any other our indicator, please leave it in the comments.
MLExtensions_CoreLibrary "MLExtensions_Core"
A set of extension methods for a novel implementation of a Approximate Nearest Neighbors (ANN) algorithm in Lorentzian space, focused on computation.
normalizeDeriv(src, quadraticMeanLength)
Returns the smoothed hyperbolic tangent of the input series.
Parameters:
src (float) : The input series (i.e., the first-order derivative for price).
quadraticMeanLength (int) : The length of the quadratic mean (RMS).
Returns: nDeriv The normalized derivative of the input series.
normalize(src, min, max)
Rescales a source value with an unbounded range to a target range.
Parameters:
src (float) : The input series
min (float) : The minimum value of the unbounded range
max (float) : The maximum value of the unbounded range
Returns: The normalized series
rescale(src, oldMin, oldMax, newMin, newMax)
Rescales a source value with a bounded range to anther bounded range
Parameters:
src (float) : The input series
oldMin (float) : The minimum value of the range to rescale from
oldMax (float) : The maximum value of the range to rescale from
newMin (float) : The minimum value of the range to rescale to
newMax (float) : The maximum value of the range to rescale to
Returns: The rescaled series
getColorShades(color)
Creates an array of colors with varying shades of the input color
Parameters:
color (color) : The color to create shades of
Returns: An array of colors with varying shades of the input color
getPredictionColor(prediction, neighborsCount, shadesArr)
Determines the color shade based on prediction percentile
Parameters:
prediction (float) : Value of the prediction
neighborsCount (int) : The number of neighbors used in a nearest neighbors classification
shadesArr (array) : An array of colors with varying shades of the input color
Returns: shade Color shade based on prediction percentile
color_green(prediction)
Assigns varying shades of the color green based on the KNN classification
Parameters:
prediction (float) : Value (int|float) of the prediction
Returns: color
color_red(prediction)
Assigns varying shades of the color red based on the KNN classification
Parameters:
prediction (float) : Value of the prediction
Returns: color
tanh(src)
Returns the the hyperbolic tangent of the input series. The sigmoid-like hyperbolic tangent function is used to compress the input to a value between -1 and 1.
Parameters:
src (float) : The input series (i.e., the normalized derivative).
Returns: tanh The hyperbolic tangent of the input series.
dualPoleFilter(src, lookback)
Returns the smoothed hyperbolic tangent of the input series.
Parameters:
src (float) : The input series (i.e., the hyperbolic tangent).
lookback (int) : The lookback window for the smoothing.
Returns: filter The smoothed hyperbolic tangent of the input series.
tanhTransform(src, smoothingFrequency, quadraticMeanLength)
Returns the tanh transform of the input series.
Parameters:
src (float) : The input series (i.e., the result of the tanh calculation).
smoothingFrequency (int)
quadraticMeanLength (int)
Returns: signal The smoothed hyperbolic tangent transform of the input series.
n_rsi(src, n1, n2)
Returns the normalized RSI ideal for use in ML algorithms.
Parameters:
src (float) : The input series (i.e., the result of the RSI calculation).
n1 (simple int) : The length of the RSI.
n2 (simple int) : The smoothing length of the RSI.
Returns: signal The normalized RSI.
n_cci(src, n1, n2)
Returns the normalized CCI ideal for use in ML algorithms.
Parameters:
src (float) : The input series (i.e., the result of the CCI calculation).
n1 (simple int) : The length of the CCI.
n2 (simple int) : The smoothing length of the CCI.
Returns: signal The normalized CCI.
n_wt(src, n1, n2)
Returns the normalized WaveTrend Classic series ideal for use in ML algorithms.
Parameters:
src (float) : The input series (i.e., the result of the WaveTrend Classic calculation).
n1 (simple int)
n2 (simple int)
Returns: signal The normalized WaveTrend Classic series.
n_adx(highSrc, lowSrc, closeSrc, n1)
Returns the normalized ADX ideal for use in ML algorithms.
Parameters:
highSrc (float) : The input series for the high price.
lowSrc (float) : The input series for the low price.
closeSrc (float) : The input series for the close price.
n1 (simple int) : The length of the ADX.
regime_filter(src, threshold, useRegimeFilter)
Parameters:
src (float)
threshold (float)
useRegimeFilter (bool)
filter_adx(src, length, adxThreshold, useAdxFilter)
filter_adx
Parameters:
src (float) : The source series.
length (simple int) : The length of the ADX.
adxThreshold (int) : The ADX threshold.
useAdxFilter (bool) : Whether to use the ADX filter.
Returns: The ADX.
filter_volatility(minLength, maxLength, sensitivityMultiplier, useVolatilityFilter)
filter_volatility
Parameters:
minLength (simple int) : The minimum length of the ATR.
maxLength (simple int) : The maximum length of the ATR.
sensitivityMultiplier (float) : Multiplier for the historical ATR to control sensitivity.
useVolatilityFilter (bool) : Whether to use the volatility filter.
Returns: Boolean indicating whether or not to let the signal pass through the filter.