Exponentially Weighted Moving Average Oscillator [BackQuant]Exponentially Weighted Moving Average (EWMA)
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, the main applications being technical analysis and volatility modeling.
The moving average is designed as such that older observations are given lower weights. The weights fall exponentially as the data point gets older – hence the name exponentially weighted.
Applications of the EWMA
The EWMA is widely used in technical analysis. It may not be used directly, but it is used in conjunction with other indicators to generate trading signals. A well-known example is the Negative Volume Index (NVI), which is used in conjunction with its EWMA.
Why is it different from the In-Built TradingView EWMA
Adaptive Algorithms: If your strategy requires the alpha parameter to change adaptively based on certain conditions (for example, based on market volatility), a for loop can be used to adjust the weights dynamically within the loop as opposed to the fixed decay rate in the standard EWMA.
Customization: A for loop allows for more complex and nuanced calculations that may not be directly supported by built-in functions. For example, you might want to adjust the weights in a non-standard way that the typical EWMA calculation doesn't allow for.
Use of the Oscillator
This mainly comes from 3 main premises, this is something I like to do personally since it is easier to work with them in the context of my system. E.g. Using them to spot clear trends without noise on longer timeframes.
Clarity: Plotting the EWMA as an oscillator provides a clear visual representation of the momentum or trend strength. It allows traders to see overbought or oversold conditions relative to a normalized range.
Comparison: An oscillator can make it easier to compare different securities or timeframes on a similar scale, especially when normalized. This is because the oscillator values are typically bounded within a range (like -1 to 1 or 0 to 100), whereas the actual price series can vary significantly.
Focus on Change: When plotted as an oscillator, the focus is on the rate of change or the relative movement of the EWMA, not on the absolute price levels. This can help traders spot divergences or convergences that may not be as apparent when the EWMA is plotted directly on the price chart. This is also one reason there is a conditional plotting on the chart.
Trend Strength: When normalized, the distance of the oscillator from its midpoint can be interpreted as the strength of the trend, providing a quantitative measure that can be used to make systematic trading decisions.
Here are the backtests on the 1D Timeframe for
BITSTAMP:BTCUSD
BITSTAMP:ETHUSD
COINBASE:SOLUSD
When using this script the user is able to define a source and period, which by extension calculates the alpha. An option to colour the bars accord to trend.
This makes it super easy to use in a system.
I recommend using this as above the midline (0) for a positive trend and below the midline for negative trend.
Hence why I put a label on the last bar to ensure it is easier for traders to read.
Lastly, The decreasing colour relative to RoC, this also helps traders to understand the strength of the indicator and gain insight into when to potentially reduce position size.
This indicator is best used in the medium timeframe.
Volatility
Reversal Zones [UAlgo]🔶Description:
"Reversal Zones " aims to identify potential reversal zones in price movements. The indicator provides visual signals on the chart, indicating potential overbought and oversold conditions based on the calculated values. It offers traders insights into possible turning points in the market, aiding in decision-making processes regarding entry and exit points.
🔶Key Features:
Bollinger Bands Percentile (BB Percentile):
Bollinger Bands Percentile is utilized in this script to gauge the current price position relative to its recent volatility. By calculating the percentile rank of the current price within the Bollinger Bands, traders can identify extreme price levels. This assists in recognizing potential overbought or oversold conditions, where price may be due for a reversal.
Choppiness Index (CI):
The Choppiness Index is employed here to measure the market's trendiness or choppiness. By evaluating the efficiency of the price movement, CI helps traders determine whether the market is trending or consolidating.
Commodity Channel Index (CCI):
The Commodity Channel Index is integrated into this script to capture price momentum. CCI quantifies the relationship between the current price, a moving average, and standard deviation. Traders use CCI to identify overbought or oversold conditions and potential trend reversals.
By averaging and smoothing these values, traders can obtain a clearer picture of potential turning points in the market. The final smoothed combination signal aims to reduce noise and provide more reliable insights.
🔶Disclaimer:
Please note that this script is provided for informational and educational purposes only and should not be considered as financial advice.
Trading in financial markets involves risk, and past performance is not necessarily indicative of future results.
Users should conduct their own research and analysis or consult with a qualified financial advisor before making any investment decisions based on this indicator.
The creators of this script are not liable for any losses incurred from trading activities.
Shadow Range IndexShadow Range Index (SRI) introduces a new concept to calculate momentum, shadow range.
What is range?
Traditionally, True Range (TR) is the current high minus the current low of each bar in the timeframe. This is often used successfully on its own in indicators, or as a moving average in ATR (Average True Range).
To calculate range, SRI uses an innovative calculation of current bar range that also considers the previous bar. It calculates the difference between its maximum upward and maximum downward values over the number of bars the user chooses (by adjusting ‘Range lookback’).
What is shadow range?
True Range (TR) uses elements in its calculation (the highs and lows of the bar) that are also visible on the chart bars. Shadow range does not, though.
SRI calculates shadow range in a similar formula to range, except that this time it works out the difference between the minimum upward and minimum downward movement. This movement is by its nature less than the maximums, hence a shadow of it. Although more subtle, shadow range is significant, because it is quantifiable, and goes in one direction or another.
Finally, SRI smoothes shadow range and plots it as a histogram, and also smoothes and plots range as a signal line. Useful up and down triangles show trend changes, which optionally colour the chart bars.
Here’s an example of a long trade setup:
In summary, Shadow Range Index identifies and traces maximum and minimum bar range movement both up and down, and plots them as centred oscillators. The dynamics between the two can provide insights into the chart's performance and future direction.
Credit to these authors, whose MA or filters form part of this script:
@balipour - Super Smoother MA
@cheatcountry - Hann window smoothing
@AlgoAlpha - Gaussian filter
Foxy's Z-ScoreIntroducing Foxy's Z-Score Indicator, a powerful tool for identifying potential trend reversals and market anomalies. This indicator calculates the Z-Score of the closing price, which represents the number of standard deviations from the mean, providing valuable insights into the market's behavior.
Key Features:
Auto Length Selection: The script automatically selects the optimal length based on the selected timeframe, ensuring accurate calculations and relevant signals.
Customizable Length and Standard Deviations: Users can manually input their preferred length and standard deviation values, offering flexibility to adapt to various trading strategies and market conditions.
Visual Representation: The indicator plots the Z-Score line along with three horizontal lines representing the standard deviation values, making it easy to identify overbought and oversold conditions.
Multiple Timeframes: The indicator works seamlessly across different timeframes, allowing traders to analyze short-term and long-term trends.
By incorporating Foxy's Z-Score Indicator into your trading toolkit, you can enhance your ability to spot potential market reversals and make more informed trading decisions.
Donchian channels / Connectable [Azullian]Refine your breakout trading techniques with Donchian Channels. Accurately pinpoint significant highs and lows, enhancing your capacity to detect and react to key market movements.
This connectable Donchian channels indicator is part of an indicator system designed to help test, visualize and build strategy configurations without coding. Like all connectable indicators , it interacts through the TradingView input source, which serves as a signal connector to link indicators to each other. All connectable indicators send signal weight to the next node in the system until it reaches either a connectable signal monitor, signal filter and/or strategy.
█ UNIFORM SETTINGS AND A WAY OF WORK
Although connectable indicators may have specific weight scoring conditions, they all aim to follow a standardized general approach to weight scoring settings, as outlined below.
■ Connectable indicators - Settings
• 🗲 Energy: Energy applies an ATR multiplier to the plotted shapes on the chart. A higher value plots shapes farther away from the candle, enhancing visibility.
• ☼ Brightness: Brightness determines the opacity of the shape plotted on the chart, aiding visibility. Indicator weight also influences opacity.
• → Input: Use the input setting to specify a data source for the indicator. Here you can connect the indicator to other indicators.
• ⌥ Flow: Determine where you want to receive signals from:
○ Both: Weights from this indicator and the connected indicator will apply
○ Indicator only: Only weights from this indicator will apply
○ Input only: Only weights from the connected indicator will apply
• ⥅ Weight multiplier: Multiply all weights in the entire indicator by a given factor, useful for quickly testing different indicators in a granular setup.
• ⥇ Threshold: Set a threshold to indicate the minimum amount of weight it should receive to pass it through to the next indicator.
• ⥱ Limiter: Set a hard limit to the maximum amount of weight that can be fed through the indicator.
■ Connectable indicators - Weight scoring settings
▢ Weight scoring conditions
• SM – Signal mode: Enable specific conditions for weight scoring
○ All: All signals will be scored.
○ Entries only: Only entries will score
○ Exits only: Only exits will score.
○ Entries & exits: Both entries and exits will score.
○ Zone: Continuous scoring for each candle within the zone.
• SP – Signal period: Defines a range of candles within which a signal can score.
• SC - Signal count: Specifies the number of bars to retrospectively examine and score.
○ Single: Score for a single occurrence
○ All occurrences: Score for all occurrences
○ Single + Threshold: Score for single occurrences within the signal period (SP)
○ Every + Threshold: Score for all occurrences within the signal period (SP)
▢ Weight scoring direction
• ES: Enter Short weight
• XL: Exit long weight
• EL: Enter Long weight
• XS: Exit Short weight
▢ Weight scoring values
• Weights can hold either positive or negative scores. Positive weights enhance a particular trading direction, while negative weights diminish it.
█ Donchian channels - INDICATOR SETTINGS
■ Main settings
• Enable/Disable Indicator: Toggle the entire indicator on or off.
• S - Source: Choose an alternative data source for the Donchian channels calculation.
• T - Timeframe: Select an alternative timeframe for the Donchian channels calculation.
• LE - Length: Determine the period the Donchian channels are calculated on
• Enable/Disable plotting: Toggle the plotting of the Donchian channels
• U: Choose a color for the upper band
• B: Choose a color for the basis
• L: Choose a color for the lower band
• BG: Choose a color for Donchian channels background
■ Scoring functionality
• The Donchian channels score long entries when the current low price is equal to lower band.
• The Donchian channels score long exits when the current high price is equal to the upper band.
• The Donchian channels score long zones the entire time the current low price is equal to the lower band.
• The Donchian channels score short entries when the current high is equal to the upper band.
• The Donchian channels score short exits when the current low is equal to the lower band.
• The Donchian channels score short zones the entire time the current high price is equal to the upper band.
█ PLOTTING
• Standard: Symbols (EL, XS, ES, XL) appear relative to candles based on set conditions. Their opacity and position vary with weight.
• Conditional Settings: A larger icon appears if global conditions are met. For instance, with a Threshold(⥇) of 12, Signal Period (SP) of 3, and Scoring Condition (SC) set to "EVERY", a Donchian channels signaling over two times in 3 candles (scoring 6 each) triggers a larger icon.
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up this indicator with a signal filter and strategy
The indicator provides visual cues based on signal conditions. However, its weight system is best utilized when paired with a connectable signal filter, signal monitor, or strategy .
Let's connect the Donchian channels to a connectable signal filter and a strategy :
1. Load all relevant indicators
• Load Donchian channels / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the Donchian channels to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : Donchian channels / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter signals settings if needed
• The default settings of the filter enable EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit Short).
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) is set at 5. This allows each occurrence to score, as the default score in each connectable indicator is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select a strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• Set the signal mode of the strategy to a compatible direction with the signal filter.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES, CLARIFICATIONS AND TIPS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
Bollinger bands / Connectable [Azullian]Deepen your understanding of market volatility using Bollinger Bands. This tool helps in discerning price movements and volatility trends, essential for crafting effective strategies.
This connectable Bollinger bands indicator is part of an indicator system designed to help test, visualize and build strategy configurations without coding. Like all connectable indicators , it interacts through the TradingView input source, which serves as a signal connector to link indicators to each other. All connectable indicators send signal weight to the next node in the system until it reaches either a connectable signal monitor, signal filter and/or strategy.
█ UNIFORM SETTINGS AND A WAY OF WORK
Although connectable indicators may have specific weight scoring conditions, they all aim to follow a standardized general approach to weight scoring settings, as outlined below.
■ Connectable indicators - Settings
• 🗲 Energy: Energy applies an ATR multiplier to the plotted shapes on the chart. A higher value plots shapes farther away from the candle, enhancing visibility.
• ☼ Brightness: Brightness determines the opacity of the shape plotted on the chart, aiding visibility. Indicator weight also influences opacity.
• → Input: Use the input setting to specify a data source for the indicator. Here you can connect the indicator to other indicators.
• ⌥ Flow: Determine where you want to receive signals from:
○ Both: Weights from this indicator and the connected indicator will apply
○ Indicator only: Only weights from this indicator will apply
○ Input only: Only weights from the connected indicator will apply
• ⥅ Weight multiplier: Multiply all weights in the entire indicator by a given factor, useful for quickly testing different indicators in a granular setup.
• ⥇ Threshold: Set a threshold to indicate the minimum amount of weight it should receive to pass it through to the next indicator.
• ⥱ Limiter: Set a hard limit to the maximum amount of weight that can be fed through the indicator.
■ Connectable indicators - Weight scoring settings
▢ Weight scoring conditions
• SM – Signal mode: Enable specific conditions for weight scoring
○ All: All signals will be scored.
○ Entries only: Only entries will score
○ Exits only: Only exits will score.
○ Entries & exits: Both entries and exits will score.
○ Zone: Continuous scoring for each candle within the zone.
• SP – Signal period: Defines a range of candles within which a signal can score.
• SC - Signal count: Specifies the number of bars to retrospectively examine and score.
○ Single: Score for a single occurrence
○ All occurrences: Score for all occurrences
○ Single + Threshold: Score for single occurrences within the signal period (SP)
○ Every + Threshold: Score for all occurrences within the signal period (SP)
▢ Weight scoring direction
• ES: Enter Short weight
• XL: Exit long weight
• EL: Enter Long weight
• XS: Exit Short weight
▢ Weight scoring values
• Weights can hold either positive or negative scores. Positive weights enhance a particular trading direction, while negative weights diminish it.
█ Bollinger bands - INDICATOR SETTINGS
■ Main settings
• Enable/Disable Indicator: Toggle the entire indicator on or off.
• S - Source: Choose an alternative data source for the Bollinger bands calculation.
• T - Timeframe: Select an alternative timeframe for the Bollinger bands calculation.
• LE - Length: Determine the period the bollinger bands are calculated on
• SD - Standard deviation: Determine the standard deviation for the bollinger bands.
• Enable/Disable plotting: Toggle the plotting of the Bollinger bands
• U: Choose a color for the upper band
• B: Choose a color for the basis
• L: Choose a color for the lower band
• BG: Choose a color for Bollinger bands background
■ Scoring functionality
• The Bollinger bands score long entries when the current low price is smaller than the lower band.
• The Bollinger bands score long exits when the current high price is higher than the upper band.
• The Bollinger bands score long zones the entire time the current low price is smaller than the lower band.
• The Bollinger bands score short entries when the current high is higher than the upper band.
• The Bollinger bands score short exits when the current low is smaller than the lower band.
• The Bollinger bands score short zones the entire time the current high price is higher than the upper band.
█ PLOTTING
• Standard: Symbols (EL, XS, ES, XL) appear relative to candles based on set conditions. Their opacity and position vary with weight.
• Conditional Settings: A larger icon appears if global conditions are met. For instance, with a Threshold(⥇) of 12, Signal Period (SP) of 3, and Scoring Condition (SC) set to "EVERY", a Bollinger bands signaling over two times in 3 candles (scoring 6 each) triggers a larger icon.
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up this indicator with a signal filter and strategy
The indicator provides visual cues based on signal conditions. However, its weight system is best utilized when paired with a connectable signal filter, signal monitor, and/or strategy .
Let's connect the Bollinger bands to a connectable signal filter and a strategy :
1. Load all relevant indicators
• Load Bollinger bands / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the Bollinger bands to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : Bollinger bands / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter signals settings if needed
• The default settings of the filter enable EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit Short).
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) is set at 5. This allows each occurrence to score, as the default score in each connectable indicator is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select a strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• Set the signal mode of the strategy to a compatible direction with the signal filter.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES, CLARIFICATIONS AND TIPS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
Bitcoin Leverage Sentiment - Strategy [presentTrading]█ Introduction and How it is Different
The "Bitcoin Leverage Sentiment - Strategy " represents a novel approach in the realm of cryptocurrency trading by focusing on sentiment analysis through leveraged positions in Bitcoin. Unlike traditional strategies that primarily rely on price action or technical indicators, this strategy leverages the power of Z-Score analysis to gauge market sentiment by examining the ratio of leveraged long to short positions. By assessing how far the current sentiment deviates from the historical norm, it provides a unique lens to spot potential reversals or continuation in market trends, making it an innovative tool for traders who wish to incorporate market psychology into their trading arsenal.
BTC 4h L/S Performance
local
█ Strategy, How It Works: Detailed Explanation
🔶 Data Collection and Ratio Calculation
Firstly, the strategy acquires data on leveraged long (**`priceLongs`**) and short positions (**`priceShorts`**) for Bitcoin. The primary metric of interest is the ratio of long positions relative to the total of both long and short positions:
BTC Ratio=priceLongs / (priceLongs+priceShorts)
This ratio reflects the prevailing market sentiment, where values closer to 1 indicate a bullish sentiment (dominance of long positions), and values closer to 0 suggest bearish sentiment (prevalence of short positions).
🔶 Z-Score Calculation
The Z-Score is then calculated to standardize the BTC Ratio, allowing for comparison across different time periods. The Z-Score formula is:
Z = (X - μ) / σ
Where:
- X is the current BTC Ratio.
- μ is the mean of the BTC Ratio over a specified period (**`zScoreCalculationPeriod`**).
- σ is the standard deviation of the BTC Ratio over the same period.
The Z-Score helps quantify how far the current sentiment deviates from the historical norm, with high positive values indicating extreme bullish sentiment and high negative values signaling extreme bearish sentiment.
🔶 Signal Generation: Trading signals are derived from the Z-Score as follows:
Long Entry Signal: Occurs when the BTC Ratio Z-Score crosses above the thresholdLongEntry, suggesting bullish sentiment.
- Condition for Long Entry = BTC Ratio Z-Score > thresholdLongEntry
Long Exit/Short Entry Signal: Triggered when the BTC Ratio Z-Score drops below thresholdLongExit for exiting longs or below thresholdShortEntry for entering shorts, indicating a shift to bearish sentiment.
- Condition for Long Exit/Short Entry = BTC Ratio Z-Score < thresholdLongExit or BTC Ratio Z-Score < thresholdShortEntry
Short Exit Signal: Happens when the BTC Ratio Z-Score exceeds the thresholdShortExit, hinting at reducing bearish sentiment and a potential switch to bullish conditions.
- Condition for Short Exit = BTC Ratio Z-Score > thresholdShortExit
🔶Implementation and Visualization: The strategy applies these conditions for trade management, aligning with the selected trade direction. It visualizes the BTC Ratio Z-Score with horizontal lines at entry and exit thresholds, illustrating the current sentiment against historical norms.
█ Trade Direction
The strategy offers flexibility in trade direction, allowing users to choose between long, short, or both, depending on their market outlook and risk tolerance. This adaptability ensures that traders can align the strategy with their individual trading style and market conditions.
█ Usage
To employ this strategy effectively:
1. Customization: Begin by setting the trade direction and adjusting the Z-Score calculation period and entry/exit thresholds to match your trading preferences.
2. Observation: Monitor the Z-Score and its moving average for potential trading signals. Look for crossover events relative to the predefined thresholds to identify entry and exit points.
3. Confirmation: Consider using additional analysis or indicators for signal confirmation, ensuring a comprehensive approach to decision-making.
█ Default Settings
- Trade Direction: Determines if the strategy engages in long, short, or both types of trades, impacting its adaptability to market conditions.
- Timeframe Input: Influences signal frequency and sensitivity, affecting the strategy's responsiveness to market dynamics.
- Z-Score Calculation Period: Affects the strategy’s sensitivity to market changes, with longer periods smoothing data and shorter periods increasing responsiveness.
- Entry and Exit Thresholds: Set the Z-Score levels for initiating or exiting trades, balancing between capturing opportunities and minimizing false signals.
- Impact of Default Settings: Provides a balanced approach to leverage sentiment trading, with adjustments needed to optimize performance across various market conditions.
Sessions Lite [TradingFinder] New York, London, Asia, NYSE Forex🔵 Introduction
A trading session is one of the basic concepts in the financial market that refers to specific time periods. In fact, a session means hours during the day and night, during which traders in a certain part of the world conduct their transactions.
Although the "Forex" and "CFDs" market is open 24 hours a day and it is possible to trade in it, but in some hours the activity in this market decreases so much that many traders prefer not to trade and only watch the market. On the other hand, there are specific times when the market is very busy and dynamic, and many traders tend to trade during these hours of the day and night.
Trading sessions are usually divided into three main categories, which are "Asian", "European" and "North American" sessions. These trading sessions are also called the "Tokyo", "London" and "New York" sessions, respectively. But they also categorized these sessions in more detailed ways such as "Sydney session", "Shanghai session" or "NYSE session".
🔵 Tokyo trading session (Asian session)
After the weekend that happens on Saturday and Sunday, the Forex market starts with the Asian session. In this continent, most of the transactions are done in the Tokyo session, and for this reason, it is usually called the Asian session or the Tokyo session. However, other countries such as Australia, China and Singapore also do a lot of trading in this session.
The Tokyo session has a lower volume of transactions compared to the London and New York sessions, and therefore the liquidity is lower. In this session, most of the Forex currency pairs move in a price range. For this reason, different people use the ups and downs with the trading strategy in the range and get profit.
The low liquidity of the Tokyo session means that trading spreads are also higher during these hours. Besides, most of the transactions of this session are done in the early hours and at the same time as the planned news release.
In the Tokyo or Asia session, the best currency pairs to trade are the "Japanese yen", the "Australian dollar", and the "New Zealand dollar".
"Nikkei" index is also a good option for trading. If you trade in the Tokyo session, you should also be aware of the release of economic news and data from Australian, New Zealand and Japanese financial institutions.
🔵 London trading session (European session)
After the Asian session, it is time for the European session. In this period of time, transactions are very large and many European markets are involved. However, the European session is usually known as the London session.
Because of its specific time zone, London is not only known as the Forex trading center in Europe, but it is also known as the Forex trading center in the world. The London session overlaps with two other major trading sessions in the world, Asia and America. This means that most of the Forex transactions are done in this session. According to the latest statistics, 32% of Forex transactions are related to the London session, which shows that about a third of the activity performed in Forex takes place during this period.
This will increase the volume of Forex transactions and increase liquidity. An event that causes the spread of transactions to decrease. Of course, high liquidity also leads to greater volatility, which is desirable for many traders.
In the European session, the pound and euro currencies and the "DAX", "FTSE100", and "CAC40" indices are known as the best tradable assets. Also, traders of this session should pay attention to the news and data published by the "European Central Bank" and the "Bank of England". The news of countries like Germany, France and Italy are also very important.
🔵 American trading session (New York session)
When the New York session begins, several hours have passed since the end of the Tokyo session, but the European session is in the middle. In this session, they usually affect the financial activities carried out in America, but they also affect other countries such as Canada, Mexico and several South American countries.
The "US dollar" and stock indices such as "S&P", "Dow Jones" and "Nasdaq" are the most important assets that are traded in this session.
The early hours of the American session have a lot of liquidity and volatility due to the overlap with the European session, but with the end of the European session, the activity in the American session also decreases.
You can trade all major Forex currency pairs in the New York trading session. In this session, the "Federal Reserve", as the most important central bank in the world, is the institution that you should pay attention to its news and data.
The trading session indicator is an analytical tool in the financial markets that is used to display and analyze specific trading periods during a day. These indicators are generally useful for determining support and resistance levels during any trading session and for detecting different trading patterns.
For example, usually these indicators display the open and close price levels, the highest and lowest prices during a trading session. Also, you may notice various price patterns such as price channels, price phase phases and market trend changes during different trading sessions using these indicators.
🔵 cause of construction
In particular, the session light indicator version is designed and built for those traders who use many different tools on their chart at the same time. These traders can include "Volume Traders", "ICT traders", "Day Traders" and... These individuals can use "Session Lite" without disturbing the display of their other trading tools such as "Order Blocks", "Liquidity", "Zigzag", "FVG" etc.
But in general, there are several reasons for making tools like trading session indicators in financial markets, some of which include the following :
1. Analysis of specific time frames : Some traders and investors like to consider specific time frames for price analysis and review. For example, analyzing price changes during each trading session can help analyze trading patterns and identify trading opportunities.
2. Recognize different price patterns : Different price patterns may be observed during trading sessions. Trading session indicators can help to make better trading decisions by analyzing these patterns and their strengths and weaknesses.
3. Identifying Support and Resistance Levels : These tools may help to identify support and resistance levels during any trading session which can be helpful in deciding whether to enter or exit the market.
🔵 How to use
The Session Lite indicator displays 8 sessions by default. Asia session, Sydney session, Tokyo session, Shanghai session, Europe session, London session, New York session and New York Stock Exchange (NYSE) session are the sessions that are displayed.
You can activate or deactivate the display of each session by using the tick button next to the name of each session.
Two gray vertical dashes are also displayed by default, which indicate the beginning of the European session and the New York session. This feature is available for all sessions, but it is enabled by default only for these two sessions, and you can activate it for the rest of the session. You can enable or disable the display of this line by using the Start Session tick key.
Likewise, the information table is displayed by default, which includes the open or closed information of each session and the start and end times of each session. These timings are based on the UTC time zone.
Accordingly, the schedule of trading sessions is as follows :
Asia session from 23:00 to 06:00
Sydney session from 23:00 to 05:00
Tokyo session from 00:00 to 00:06
Shanghai session from 01:30 to 06:57
European session from 07:00 to 16:30
London session from 08:00 to 16:30
New York session from 13:00 to 22:00
New York Stock Exchange (NYSE) session from 14:30 to T 22:00
Important note : the beginning of the European session coincides with the opening of the Frankfurt market.
🔵 Settings
• In the settings section, there are customization capabilities according to the type of use of each user. The settings related to showing or not showing the box of each session, the start indicator of each session, setting the start and end time of the session and choosing the desired color to display each session are among the things that can be set from this section.
• At the end of the settings, you will see the "Info Table" option; By disabling this option, the "sessions" clock table displayed on the upper right side will be disabled.
Crypto Punk [Bot] (Zeiierman)█ Overview
The Crypto Punk (Zeiierman) is a trading strategy designed for the dynamic and volatile cryptocurrency market. It utilizes algorithms that incorporate price action analysis and principles inspired by Geometric Brownian Motion (GBM). The bot's core functionality revolves around analyzing differences in high and low prices over various timeframes, estimating drift (trend) and volatility, and applying this information to generate trading signals.
█ How to use the Crypto Punk Bot
Utilize the Crypto Punk Bot as a technical analysis tool to enhance your trading strategy. The signals generated by the bot can serve as a confirmation of your existing approach to entering and exiting the market. Additionally, the backtest report provided by the bot is a valuable resource for identifying the optimal settings for the specific market and timeframe you are trading in.
One method is to use the bot's signals to confirm entry points around key support and resistance levels.
█ Key Features
Let's explain how the core features work in the strategy.
⚪ Strategy Filter
The strategy filter plays a vital role in the entries and exits. By setting this filter, the bot can identify higher or lower price points at which to execute trades. Opting for higher values will make the bot target more long-term extreme points, resulting in fewer but potentially more significant signals. Conversely, lower values focus on short-term extreme points, offering more frequent signals focusing on immediate market movements.
How is it calculated?
This filter identifies significant price points within a specified dynamic range by applying linear regression to the absolute deviation of the range, smoothing out fluctuations, and determining the trend direction. The algorithm then normalizes the data and searches for extreme points.
⚪ External AI filter
The external AI filter allows traders to incorporate two external sources as signal filters. This feature is particularly useful for refining their signal accuracy with additional data inputs.
External sources can include any indicator applied to your TradingView chart that produces a plot as an output, such as a moving average, RSI, supertrend, MACD, etc. Traders can use these indicators of their choice to set filters for screening signals within the strategy.
This approach offers traders increased flexibility to select filters that align with their trading style. For instance, one trader might prefer to take trades when the price is above a moving average, while another might opt for trades when the MACD is below the MACD signal line. These external filters enable traders to choose options that best fit their trading strategies. See the example below. Note that the input sources for the External AI filter can be any indicator applied to the chart, and the input source per se does not make this strategy unique. The AI filter takes the selected input source and applies our function to it. So, if a trader selects RSI as an input filter, RSI is not unique, but how the source is computed within the AI functions is.
How is it calculated?
Once the external filters are selected and enabled within the settings panel, our AI function is applied to enhance the filter's ability to execute trades, even when the set conditions of the filter are not met. For instance, if a trader wants to take trades only when the price is above a moving average, the AI filter can actually execute trades even if the price is below the moving average.
The filter works by combining k-nearest Neighbors (KNN) with Geometric Brownian Motion (GBM) involves first using GBM to model the historical price trends of an asset, identifying patterns of drift and volatility. KNN is then applied to compare the current market conditions with historical instances, identifying the closest matches based on similar market behaviors. By examining the drift values of these nearest historical neighbors, KNN predicts the current trend's direction.
The AI adaptability value is a setting that determines how flexible the AI algorithm is when applying the external AI filter. Setting the adaptability to 10 indicates minimal adaptability, suggesting that the bot will strictly adhere to the set filter criteria. On the other hand, a higher adaptability value grants the algorithm more leeway to "think outside the box," allowing it to consider signals that may not strictly meet the filter criteria but are deemed viable trading opportunities by the AI.
█ Examples
In this example, the RSI is used to filter out signals when the RSI is below the smoothing line, indicating that prices are declining.
Note that the external filter is specifically designed to work with either 'LONG ONLY' or 'SHORT ONLY' modes; it does not apply when the bot is set to trade on 'BOTH' modes. For 'LONG ONLY' positions, the filter criteria are met when source 1 is greater than source 2 (source 1 >= source 2). Conversely, for 'SHORT ONLY' positions, the filter criteria require source 1 to be less than source 2 (source 1 <= source 2).
Examples of Filter Usage:
Long Signals: To receive long signals when the closing price is higher than a moving average, set Source 1 to the 'close' price and Source 2 to a moving average value. This setup ensures that signals are generated only when the closing price exceeds the moving average, indicating a potential upward trend.
█ Settings
⚪ Set Timeframe
Choosing the correct entry and exit timeframes is crucial for the bot's performance. The general guideline is to select a timeframe that is higher than the one currently displayed on the trading chart but still relatively close in duration. For instance, if trading on a 1-minute chart, setting the bot's Timeframe to 5 minutes is advisable.
⚪ Entry
Traders have the flexibility to configure the bot according to their trading strategy, allowing them to choose whether the bot should engage in long positions only, short positions only or both. This customization ensures that the bot aligns with the trader's market outlook and risk tolerance.
⚪ Pyramiding
Pyramiding functionality is available to enhance the bot's trading strategy. If the current position experiences a drawdown by a specified number of points, the bot is programmed to add new positions to the existing one, potentially capitalizing on lower prices to average down the entry cost. To utilize this feature, access the settings panel, navigate to 'Properties,' and look for 'Pyramiding' to specify the number of times the bot can re-enter the market (e.g., setting it to 2 allows for two additional entries).
⚪ Risk Management
The bot incorporates several risk management methods, including a regular stop loss, trailing stop, and risk-reward-based stop loss and exit strategies. These features assist traders in managing their risk.
Stop Loss
Trailing Stop
⚪ Trading on specific days
This feature allows trading on specific days by setting which days of the week the bot can execute trades on. It enables traders to tailor their strategies according to market behavior on particular days.
⚪ Alerts
Alerts can be set for entry, exit, and risk management. This feature allows traders to automate their trading strategy, ensuring timely actions are taken according to predefined criteria.
█ How is Crypto Punk calculated?
The Crypto Punk Bot is a trading bot that utilizes a combination of price action analysis and elements inspired by Geometric Brownian Motion (GBM) to generate buy and sell signals for cryptocurrencies. The bot focuses on analyzing the difference between high and low prices over various timeframes, alongside estimates of drift (trend) and volatility derived from GBM principles.
Timeframe Analysis for Price Action
The bot examines multiple timeframes (e.g., daily, weekly) to identify the range between the highest and lowest prices within each period. This range analysis helps in understanding market volatility and the potential for significant price movements. The algorithm calculates the trading range by applying maximum and minimum functions to the set of prices over your selected timeframe. It then subtracts these values to determine the range's width. This method offers a quantitative measure of the asset's price volatility for the specified period.
Estimating Drift (Trend)
The bot estimates the drift component, which reflects the underlying trend or expected return of the cryptocurrency. The algorithm does this by estimating the drift (trend) using Geometric Brownian Motion (GBM), which involves determining an asset's average rate of return over time, reflecting the asset's expected direction of movement.
Estimating Volatility
Volatility is estimated by calculating the standard deviation of the logarithmic returns of the cryptocurrency's price over the same timeframe used for the drift calculation. Geometric Brownian Motion (GBM) involves measuring the extent of variation or dispersion in the returns of an asset over time. In the context of GBM, volatility quantifies the degree to which the price of an asset is expected to fluctuate around its drift.
Combining Drift and Volatility for Signal Generation
The bot uses the calculated drift and volatility to understand the current market conditions. A higher drift coupled with manageable volatility may indicate a strong upward trend, suggesting a potential buy signal. Conversely, a low or negative drift with increasing volatility might suggest a weakening market, triggering a sell signal.
█ Strategy Properties
This script backtest is done on the 1 hour chart Bitcoin, using the following backtesting properties:
Balance (default): 10 000 (default base currency)
Order Size: 10% of the equity
Commission: 0.05 %
Slippage: 500 ticks
Stop Loss: Risk Reward set to 1
These parameters are set to provide an accurate representation of the backtesting environment. It's important to recognize that default settings may vary for several reasons outlined below:
Order Size: The standard is set at one contract to facilitate compatibility with a wide range of instruments, including futures.
Commission: This fee is subject to fluctuation based on the specific market and financial instrument, and as such, there isn't a standard rate that will consistently yield accurate outcomes.
We advise users to customize the Script Properties in the strategy settings to match their personal trading accounts and preferred platforms. This adjustment is crucial for obtaining practical insights from the deployed strategies.
-----------------
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!
ATR Bands with Optional Risk/Reward Colors█ OVERVIEW
This indicator projects ATR bands and, optionally, colors them based on a risk/reward advantage for those who trade breakouts/breakdowns using moving averages as partial or full exit points.
█ DEFINITIONS
► True Range
The True Range is a measure of the volatility of a financial asset and is defined as the maximum difference among one of the following values:
- The high of the current period minus the low of the current period.
- The absolute value of the high of the current period minus the closing price of the previous period.
- The absolute value of the low of the current period minus the closing price of the previous period.
► Average True Range
The Average True Range was developed by J. Welles Wilder Jr. and was introduced in his 1978 book titled "New Concepts in Technical Trading Systems". It is calculated as an average of the true range values over a certain number of periods (usually 14) and is commonly used to measure volatility and set stop-loss and profit targets (1).
For example, if you are looking at a daily chart and you want to calculate the 14-day ATR, you would take the True Range of the previous 14 days, calculate their average, and this would be the ATR for that day. The process is then repeated every day to obtain a series of ATR values over time.
The ATR can be smoothed using different methods, such as the Simple Moving Average (SMA), the Exponential Moving Average (EMA), or others, depending on the user's preferences or analysis needs.
► ATR Bands
The ATR bands are created by adding or subtracting the ATR from a reference point (usually the closing price). This process generates bands around the central point that expand and contract based on market volatility, allowing traders to assess dynamic support and resistance levels and to adapt their trading strategies to current market conditions.
█ INDICATOR
► ATR Bands
The indicator provides all the essential parameters for calculating the ATR: period length, time frame, smoothing method, and multiplier.
It is then possible to choose the reference point from which to create the bands. The most commonly used reference points are Open, High, Low, and Close, but you can also choose the commonly used candle averages: HL2, HLC3, HLCC4, OHLC4. Among these, there is also a less common "OC2", which represents the average of the candle body. Additionally, two parameters have been specifically created for this indicator: Open/Close and High/Low.
With the "Open/Close" parameter, the upper band is calculated from the higher value between Open and Close, while the lower one is calculated from the lower value between Open and Close. In the case of bullish candles, therefore, the Close value is taken as the starting point for the upper band and the Open value for the lower one; conversely, in bearish candles, the Open value is used for the upper band and the Close value for the lower band. This setting can be useful for precautionally generating broader bands when trading with candlesticks like hammers or inverted hammers.
The "High/Low" parameter calculates the upper band starting from the High and the lower band starting from the Low. Among all the available options, this one allows drawing the widest bands.
Other possible options to improve the drawing of ATR bands, aligning them with the price action, are:
• Doji Smoothing: When the current candle is a doji (having the same Open and Close price), the bands assume the values they had on the previous candle. This can be useful to avoid steep fluctuations of the bands themselves.
• Extend to High/Low: Extends the bands to the High or Low values when they exceed the value of the band.
• Round Last Cent: Expands the upper band by one cent if the price ends with x.x9, and the lower band if the price ends with x.x1. This function only works when the asset's tick is 0.01.
► Risk/Reward Advantage
The indicator optionally colors the ATR bands after setting a breakpoint, one or two risk/reward ratios, and a series of moving averages. This function allows you to know in advance whether entering a trade can provide an advantage over the risk. The band is colored when the ratio between the distance from the break point to the band and the distance from the break point to the first available moving average reaches at least the set ratio value. It is possible to set two colorings, one for a minimum risk/reward ratio and one for an optimal risk/reward ratio.
The break point can be chosen between High/Low (High in case of breakout, Low in case of breakdown) or Open/Close (on breakouts, Close with bullish candles or Open with bearish candles; on breakdowns, Close with bearish candles or Open with bullish candles).
It is possible to choose up to 10 moving averages of various types, including the VWAP with the Anchor Period (2).
Depending on the "Price to MA" setting, the bands can be individually or simultaneously colored.
By selecting "Single Direction," the risk/reward calculation is performed only when all moving averages are above or below the break point, resulting in only one band being colored at a time. For this reason, when the break point is in between the moving averages, the calculation is not executed. This setting can be useful for strategies involving price movement from a level towards a series of specific moving averages (for example, in reversals starting from a certain level towards the VWAP with possible partial take profits on some previous moving averages, or simply in trend following towards one or more moving averages).
Choosing "Both Directions" the risk/reward ratio is calculated based on the first available moving averages both above and below the price. This setting is useful for those who operate in range bound markets or simply take advantage of movements between moving averages.
█ NOTE
This script may not be suitable for scalping strategies that require immediate entries due to the inability to know the ATR of a candle in advance until its closure. Once the candle is closed, you should have time to place a stop or stop-limit order, so your strategy should not anticipate an immediate start with the next candle. Even more conveniently, if your strategy involves an entry on a pullback, you can place a limit order at the breakout level.
(1) www.tradingview.com
(2) For convenience, the code for the Anchor Period has been entirely copied from the VWAP code provided by TradingView.
Urika Trend StrengthThe Urika Directional Strength (UDS) indicator calculates and visualizes the strength of the directional trend in the price data. It helps traders see the strength and direction of the trend and allows them to make informed trading decisions based on trend changes.
Calculation:
The Simple Moving Average is used to determine the upper and lower directional bands by adding and subtracting the product of the standard deviation of the price data and the multiplier of the moving average.
Direction: The upward directional trend and downward directional trend are calculated by taking the absolute value of the difference between the price data and the upper and lower directional bands, divided by the product of the standard deviation and the multiplier.
Strength: It is calculated by taking the absolute value of the difference between the price data and the moving average, divided by the product of the standard deviation and the multiplier.
Interpretation:
Direction: The position of the long and short lines at the top indicates the direction of the ticker. Long line for long position and Short line for short position.
Strength: When the Strength line is below the directional lines, it is a weak trend or consolidating. If it stays in between the two directional lines, it is a strong trend.
Squeeze Momentum DeluxeThe Squeeze Momentum Deluxe is a comprehensive trading toolkit built with features of momentum, volatility, and price action. This script offers a suite for both mean reversion and trend-following analysis. Developed based on the original TTM Squeeze implementation by @LazyBear, this indicator introduces several innovative components to enhance your trading insights.
🔲 Components and Features
Momentum Oscillator - as rooted in the TTM Squeeze, quantifies the relationship between price and its extremes over a defined period. By normalizing the calculation, the values become comparable throughout time and across securities, allowing for a nuanced assessment of Bullish and Bearish momentum. Furthermore, by presenting it as a ribbon with a signal line we gain additional information about the direction of price swings.
Squeeze Bars - The original squeeze concept is based on the relationship between the Bollinger Bands and Keltner Channel , once the BB resides inside the KC a squeeze occurs. By understanding their fundamentals a new form of calculation can be inferred.
method bb(float src, simple int len, simple float mult) => method kc(float src, simple int len, simple float mult) =>
float basis = ta.sma (src, len) float basis = ta.sma (src, len)
float dev = ta.stdev(src, len) float rng = ta.atr ( len)
float upper = basis + dev * mult float upper = basis + rng * mult
float lower = basis - dev * mult float lower = basis - rng * mult
Both BB and KC are constructed upon a moving average with the addition of Standard Deviation and Average True Range respectively. Therefore, the calculation can be transformed to when the Stdev is lower than the ATR a squeeze occurs.
method sqz(float src, simple int len) =>
float dev = ta.stdev(src, len)
float atr = ta.atr ( len)
dev < atr ? true : false
This indicator uses three different thresholds for the ATR to gain three levels of price "Squeeze" for further analysis.
Directional Flux- This component measures the overall direction of price volatility, offering insights into trend sentiment. Presented as waves in the background, it includes an OverFlux feature to signal extreme market bias in a particular direction which can signal either exhaustion or vital continuation. Additionally, the user can choose if to base the calculation on Heikin-Ashi Candles to bias the tool toward trend assessment.
Confluence Gauges - Placed at the top and bottom of the indicator, these gauges measure confluence in the relationship between the Momentum Oscillator and Directional Flux. They provide traders with an easily interpretable visual aid for detecting market sentiment. Reversal doritos displayed alongside them contribute to mean reversion analysis.
Divergences (Real-Time) - Equipped with a custom algorithm, the indicator detects real-time divergences between price and the oscillator. This dynamic feature enhances your ability to spot potential trend reversals as they occur.
🔲 Settings
Directional Flux Length - Adjusts the period of which the background volatility waves operate on.
Trend Bias - Bases the calculation of the Flux to HA candles to bias its behavior toward the trend of price action.
Squeeze Momentum Length - Calibrates the length of the main oscillator ribbon as well as the period for the squeeze algorithm.
Signal - Controls the width of the ribbon. Lower values result in faster responsiveness at the cost of premature positives.
Divergence Sensitivity - Adjusts a threshold to limit the amount of divergences detected based on strength. Higher values result in less detections, stronger structure.
🔲 Alerts
Sell Signal
Buy Signal
Bullish Momentum
Bearish Momentum
Bullish Flux
Bearish Flux
Bullish Swing
Bearish Swing
Strong Bull Gauge
Strong Bear Gauge
Weak Bull Gauge
Weak Bear Gauge
High Squeeze
Normal Squeeze
Low Squeeze
Bullish Divergence
Bearish Divergence
As well as the option to trigger 'any alert' call.
The Squeeze Momentum Deluxe is a comprehensive tool that goes beyond traditional momentum indicators, offering a rich set of features to elevate your trading strategy. I recommend using toolkit alongside other indicators to have a wide variety of confluence to therefore gain higher probabilistic and better informed decisions.
Volatility Visualizer by Oddbeaker LLCUse this to determine if a crypto pair has volatility suitable for your Oddbeaker Synthetic Miner. Draws entry/exit lines over the candles.
"Show me every place on the chart where I could have made X percent gains in Y days or less."
Inputs :
Percent Gain : Minimum percent gains to show on the chart.
Scan Bars : Maximum number of bars allowed to reach the profit target.
Notes :
Lines drawn on the chart indicate the entry and exit times and prices to reach the exact profit target.
The indicator only uses the low price of each candle to determine entry. It does not show every possible entry point.
When counting lines, count any group of lines that cross each other as one. Also, count any group of lines that do not cross but overlap in price over the same time period as one.
Tips :
For best results, set Percent Gain to double the amount of the sum of Min Profit and Min Stash on your Synth Miner. Example: If you have minProfit=5 and minStash=5, 5+5=10, so percentGain should be 20 on the chart.
Use a daily chart and set Scan Bars to 7 or less on highly volatile pairs.
Look for charts with the highest number of lines that don't overlap.
Use this indicator combined with the Synthetic Mining Channel for best results.
[Spinn] LevelsThis is one of the best and most useful indicators I have ever created. It plots support and resistance levels at pivot points. The purpose of this indicator is to save the trader’s time on drawing levels and automate this routine process.
Support and resistance levels are a cornerstone of trading. Every seasoned trader can plot them on a chart, underscoring their significance for making trading decisions—they're visible to all, indicating areas dense with orders on both sides.
Despite the plethora of level indicators available, many of which are free, I found none that were convenient and fulfilled their intended purpose. Here are the key features and advantages of this indicator, setting it apart from others and deemed critically important:
Only Key Levels *
The main challenge in creating a levels indicator is ensuring only significant, key levels are displayed, avoiding clutter. This indicator achieves this by selectively filtering important levels from the noise and visually distinguishing confirmed levels (solid lines for tested or price-near levels) from unconfirmed (dashed lines for less important ones).
Visible Chart Fragment Only
It displays levels for only the visible part of the chart, avoiding an overload of lines across the entire history.
False Breakouts
Lines persist until a level is breached. Minor false breakouts are ignored.
Target Timeframe
Occasionally, viewing levels from a higher timeframe is necessary. This indicator can do so, highlighting target timeframe levels with thicker lines. It allows viewing levels from both the current and target timeframes simultaneously or just the target timeframe.
By Bodies or By Shadows
The indicator can draw support and resistance levels by both candle bodies and shadows, accommodating strategies based on breaking or bouncing off levels.
Level Price Tags
To avoid searching for the price at which a level is drawn, price tags are immediately visible near all currently relevant levels, simplifying and speeding up routine work.
Alerts
Setting alerts for approaching a level is a key feature. Haven't grasped its awesomeness? Here's why it's a game-changer: Set alerts on your favorite coins for each working timeframe. When the price approaches a level, you'll get a signal. Just open the chart to assess the situation and make a trading decision. This way, you don't waste time flipping through charts, searching for trading setups. Focus on your tasks, and let the indicator signal trading opportunities.
Three types of alerts are available: approaching a support level, a resistance level, or any level.
* Important (key) levels are the levels where the price reverses, or stops and “stomps around” for some time. This indicates that these places are an area of interest for a major seller or buyer. This effect is enhanced since such levels are visible to all market players, which means that even more traders can make trading decisions in these zones.
Three additional features enhance usability:
ATR in the Status Line: The indicator's status line displays four numbers - average price movement in points and percentages for both the current and target timeframes, invaluable for deciding stop and take-profit sizes if you base them on ATR. It works on historical data too—just hover over the desired chart section. Don't forget to enable indicator values display in its status line (right-click the indicator name to access the menu).
Visualize ATR: You can display the average price movement as a dotted line - one ATR up and one down from the current price. This visually indicates how close the price is to a level — whether within its average movement range. If you've enabled levels display for the higher timeframe, the average movement for it is also shown.
You can enable the mode for viewing historical levels. In this mode, when a level appears close to the historical one, a new level will not be drawn, but the historical level will continue. Use this option with caution, as the script will "pull out" too many old levels.
If you're interested in testing how effective this indicator is, send me a private message for free trial access. I believe it's a "must-have" for both beginners and experienced traders.
----------
Это один из самых лучших и полезных индикаторов, которые я когда-либо создавал. Он строит уровни поддержки и сопротивления в точках разворота. Задача данного индикатора - сэкономить время трейдера на прорисовку уровней и автоматизировать этот рутинный процесс.
Уровни поддержки и сопротивления - это одна из основ трейдинга. Каждый опытный трейдер может нарисовать их на графике, и в этом и заключается их важность для принятия торговых решений - их все видят, и все знают, что в зоне этих уровней располагается много ордеров в обе стороны.
Существует огромное количество индикаторов уровней, многие из которых бесплатны. Однако я не нашел ни одного индикатора, который бы был удобен в работе и делал бы именно то, ради чего он и нужен. Вот ключевые особенности и преимущества данного индикатора, которые отличают его от других индикаторов уровней. Я считаю их критически важными:
Только ключевые уровни *
Одна из главных проблем при написании индикатора уровней - как сделать так, чтобы на графике былы отображены только важные, ключевые уровни, и не было ничего лишнего. Данный индикатор делает это двумя способами. Во-первых, он не перегружает график лишними линиями, алгоритм умеет отбирать важные и отсекать шум. А во-вторых, подтвержденные уровни (если был тест или если цена подходила близко к уровню) визуально видны - они рисуются сплошной линией. Неподтвержденные (а значит, менее важные) уровни рисуются пунктиром.
Только видимый фрагмент графика
Показаны уровни лишь для видимого участка графика, а не огромное число линий одновременно для всей истории графика
Ложные пробои
Линии рисуются до того момента, пока уровень не будет пробит. Если происходят небольшие ложные пробои, они игнорируются.
Целевой таймфрейм
Иногда возникает необходимость увидеть уровни со старшего таймфрейма. Индикатор умеет это делать, при этом уровни целевого таймфрейма выделяются более толстыми линиями. Причем вы можете видеть как одновременно уровни с двух таймфреймов - с текущего и целевого, так и только с целевого.
По телам и по теням
Индикатор умеет рисовать уровни поддержки и сопротивления как по теням, так и по телам свечей. То есть, вы сможете применять его как для стратегии работы на пробой уровня, так и для стратегии работы на отбой от уровня.
На какой цене стоит уровень
Чтобы не искать цену, на которой нарисован уровень, вы сразу можете видеть метки с ценами возле всех актуальных на данный момент уровней. Это простая, но очень полезная функция, которая сильно облегчает и ускоряет рутинную работу.
Оповещения
Индикатор позволяет расставить оповещения о приближении к уровню. Это одна из ключевых особенностей индикаторы. Вы еще не поняли, насколько это крутая фишка? Объясняю. Добавляете оповещения на ваших любимых монетах на каждом из рабочих таймфреймов. Когда цена приблизится к одному из уровней, вы получите сигнал об этом. Достаточно будет открыть график и оценить ситуацию, чтобы принять торговое решение. Таким образом, вам не надо тратить время на перебор графиков и проводить часы в поисках торговой ситуации. Занимайтесь своими делами, а сигнал о торговой ситуации вам подаст индикатор.
Для облегчения работы доступны три вида оповещений - цена приближается к уровню поддержки, цена приближается к уровню сопротивления, цена приближается к одному из уровней.
* Важными (ключевыми) уровнями являются уровни, где цена разворачивается, либо останавливается и «топчется» некоторое время. Это свидетельствует о том, что эти места являются зоной интереса крупного продавца или покупателя. Этот эффект усиливается, так как такие уровни видны всем игрокам рынка, а, значит, еще больше трейдеров могут принимать торговые решения в этих зонах.
Я добавил три полезные фишки для удобства работы.
ATR в статусной строке. В статусной строке индикатора отображаются 4 числа - средний ход цены пунктах и в процентах для текущего ТФ, и то же самое для целевого ТФ. Очень удобно для принятия решения о размерах тейка и стопа, если вы привязываете их к ATR. Работает и на истории - просто подведите мышку к нужному участку графика. Не забудьте включить показ значений индикатора в его статусной строке (клик правой кнопкой мышки на названии индикатора вызовет нужное меню).
Можно отобразить средний ход цены пунктирной линией - один ATR вверх от текущей цены, и один ATR вниз. Таким образом, вы визуально сможете определить, насколько близко мы подошли к уровню - находится ли цена от уровня в пределах ее среднего хода, или нет. Если вы включили опцию отображения уровней для старшего ТФ, то будет показан средний ход и для него.
Можно включить режим просмотра исторических уровней. В этом режиме при появлении уровня, близкого к историческому, новый уровень рисоваться не будет, а будет продолжаться исторический уровень. Используйте эту опцию с осторожностью, так как скрипт "вытащит" слишком много старых уровней.
Если вы хотите попробовать, насколько хорош данный индикатор, напишите мне личное сообщение - я предоставлю вам бесплатный тестовый доступ. Я же считаю, что он относится к категории «маст хев» - как для новичков, так и для опытных трейдеров.
Grucha Percentage Index (GPI) V2Grucha Percentage Index originally created by Polish coder named Grzegorz Antosiewicz in 2011 as mql code. This code is adapted by his original code to tradingview's pinescript.
What Does it Do
GPI is an oscillator that finds the lowest/highest prices with certain depth and generates signals by comparing the bull and bear bars. It use two lines, one is the original GPI calculation, the other is the smoothed version of the original line.
How to Use
GPI can catch quick volatility based movements and can be used as a confirmation indicator along with your existing trading system. When GDI (default color yellow) crosses above the GDI MA (default colored blue) it can be considered as a bullish movement and reverse can be considered as bearish movement.
How does it Work
The main calculation is done via the code below:
for i=0 to length
if candleC < 0
minus += candleC
if candleC >= 0
plus -= candleC
Simply we are adding green and red bars seperately and then getting their percentage to the bullish movement to reflect correctly in a 0-100 z-score enviroment via the code below:
res = (math.abs(minus)/sum)*100
Rest is all about plotting the results and adding seperate line with smoothing.
Note
These kind of oscillators are not designed to be used alone for signal generation but rather should be used in combination with different indicators to increase reliability of your signals.
Happy Trading.
Weighted Average Volume Depth [QuantraSystems]Weighted Average Volume Depth
Introduction
The Weighted Average Volume Depth (𝓦𝓐𝓥𝓓) indicator is calibrated to provide extensive insights, calculated using volumetric price action and volume depth, and provides dynamic adjustments based upon historical volatility.
This indicator is a valuable asset for traders and investors, aiming to capture trends, measure dynamic volatility, and provide market reversion analysis in a systematic way.
Legend
Volumetric Top Cap: Plotted at y = 0, this line represents the probabilistic maximum value, or ‘cap’ for the signal line. It is colored using a binary color scheme, and indicates the dominant trend direction - green for an uptrend and purple for a downtrend.
Base Line: Calculated using a volume-weighted volatility measurement, this line is used as the benchmark to calculate momentum in the 𝓦𝓐𝓥𝓓 indicator.
Signal Line: The signal line represents the volume and volatility weighted measurements, and oscillates between the Base Line and Top Cap. Its position between these levels provides the depth of insights available in this script.
When the signal line is remaining in close proximity to the base line, this is indicative of a low volatility market environment. These periods are also reflected as muted bar coloring when the ‘Trend Intensity’ setting is enabled.
Conversely, when the signal line approaches, or even breaks above the Top Cap, this is characteristic of an unsustainable trending action - and probabilistically speaking, a reversion or consolation is likely to occur at these levels.
Highlighting: When this setting is enabled, background coloring is applied when the Signal Line breaks above the Top Cap. This highlights green as an oversold zone, and purple as an overbought zone.
Reversal Signals: When price begins to reverse from a zone of overextension, a signal is plotted when this reversion occurs from a high probability zone.
Circle - Shows a possible bullish reversal.
Cross - Shows a possible bearish reversal.
Case Study
In the above image, we showcase three distinct trades in short succession, showcasing the 𝓦𝓐𝓥𝓓’s speed and accuracy under the right conditions.
The first long trade was initiated upon receiving a bullish reversal signal. The trade was then closed after the price experienced a sharp upwards movement - and an overbought signal was indicated by the purple shading.
The second, short trade was entered on the next bar, after a bearish reversal signal was printed by the indicator (a white cross). Similarly, this trade was closed upon the oversold signal.
Once again, a reversal signal was indicated by the 𝓦𝓐𝓥𝓓 indicator. This time a bullish signal (a white circle), and hence a long position was opened. However, this trade was held until a negative trend confirmation (signaled by the Top Cap’s shift in color). This makes apparent the indicator’s flexible nature, and showcases the multiple signaling types available for traders to use.
Recommended Settings
The optimal settings for the 𝓦𝓐𝓥𝓓 indicator will vary upon the chosen asset’s average level volatility, as well as the timeframe it is applied to.
Due to increased volatility levels on lower timeframes, it is recommended to increase the 'Top Cap Multiplier' to take into account the increased frequency of false signals found in these trading environments. The same can be said when used on highly volatile assets - a trader will likely benefit from using a higher 'Top Cap Multiplier.'
On more price-stable assets, as well as any asset on higher timeframes, there is merit to tightening the length of the 'Top Cap Multiplier,' due to the slower nature of price action.
Methodology
The 𝓦𝓐𝓥𝓓 starts with calculating the volume weighted average price and the volume weighted variance - which is the expectation of the squared deviation of a variable from its mean, giving insights into the distribution of trading volume.
Using the volume weighted variance, a standard deviation value is calculated based on user input. This value acts as the ‘Volumetric Top Cap’ - seen in the 𝓦𝓐𝓥𝓓 indicator window as the zero line.
The signal line is calculated as the difference between the current price and the theoretical upper or lower VWAP deviation bands. This line acts as the trigger for identifying prevailing trends and high probability reversal points.
The base line serves as a reference point for historical momentum. It is calculated using an exponential moving average of the lowest signal line values over a defined lookback period. This baseline helps in assessing whether the current momentum is high or low relative to historical norms.
Notes
Bar coloring can be turned off - especially useful when stacking multiple indicators as recommended, or set to 'Trend Intensity,' or 'Binary Trend' (which reflects the top cap coloring).
It is always recommended to never rely on a single indicator - and instead build and test multiple strategies utilizing more than one indicator as confirmation.
TTP Intelligent AccumulatorThe intelligent accumulator is a proof of concept strategy. A hybrid between a recurring buy and TA-based entries and exits.
Distribute the amount of equity and add to your position as long as the TA condition is valid.
Use the exit TA condition to define your exit strategy.
Decide between adding only into losing positions to average down or take a riskier approach by allowing to add into a winning position as well.
Take full profit or distribute your exit into multiple take profit exists of the same size.
You can also decide if you allow your exit conditions to close your position in a loss or require a minimum take profit %.
The strategy includes a default built-in TA conditions just for showcasing the idea but the final intent of this script is to delegate the TA entries and exists to external sources.
The internal conditions use RSI length 7 crossing below the BB with std 1 for entries and above for exits.
To control the number of orders use the properties from settings:
- adjust the pyramiding
- adjust the percentage of equity
- make sure that pyramiding * % equity equals 100 to prevent over use of equity (unless using leverage)
The script is designed as an alternative to daily or weekly recurring buys but depending on the accuracy of your TA conditions it might prove profitable also in lower timeframes.
The reason the script is named Intelligent is because recurring buy is most commonly used without any decision making: buy no matter what with certain frequency. This strategy seeks to still perform recurring buys but filtering out some of the potential bad entries that can delay unnecessarily seeing the position in profits. The second reason is also securing an exit strategy from the beginning which no recurring buy option offers out-of-the-box.
Supertrended RSI [AlgoAlpha]🚀📈 Introducing the Supertrended RSI Indicator by AlgoAlpha!
Designed to empower your trading decisions, this innovative Pine Script™ creation marries the precision of the Relative Strength Index (RSI) with the dynamic prowess of the SuperTrend methodology. Whether you’re charting the course of cryptos, riding the waves of stock markets, or navigating the futures landscape, our SuperTrended RSI Indicator is your go-to tool for uncovering unique trend insights and crafting trading strategies. 🌟
Key Features:
🔍 Enhanced RSI Analysis: Combines the traditional RSI with a supertrend calculation for a dynamic look at market trends.
🔄 Multiple Moving Averages: Offers a selection of moving averages including SMA, HMA, EMA, and more for tailored analysis.
🎨 Customizable Visuals: Choose your own color scheme for uptrends and downtrends to match your trading dashboard.
📊 Flexible Input Settings: Tailor the indicator with customizable lengths, factors, and smoothing options.
⚡ Real-Time Alerts: Set alerts for bullish and bearish reversals to stay ahead of market movements.
Quick Guide to Using the Supertrended RSI Indicator
Maximize your trading with the Supertrended RSI by following these streamlined steps! 🚀✨
🛠 Add the Indicator: Search for "Supertrended RSI " in TradingView's Indicators & Strategies. Customize settings like RSI length, MA type, and Supertrend factors to fit your trading style.
🎨 Visual Customization: Adjust uptrend and downtrend colors for clear trend visualization.
📊 Market Analysis: Watch for the Supertrend color change for trend reversals. Use the 70 and 30 lines to spot overbought/oversold conditions.
🔔 Alerts: Enable notifications for reversal conditions to capture trading opportunities without constant chart monitoring.
How It Works:
At the core of this indicator is the combination of the Relative Strength Index (RSI) and the Supertrend framework, it does so by applying the SuperTrend on the RSI. The RSI settings can be adjusted for length and smoothing, with the option to select the data source. The Supertrend calculation takes into account a specified trend factor and the Average True Range (ATR) over a given period to determine trend direction.
Visual elements include plotting the RSI, its moving average, and the Supertrend line, with customizable colors for clarity. Overbought and oversold conditions are highlighted, and trend changes are filled with distinct colors.
🔔 Alerts: Enable alerts for crossover and crossunder events to catch every trading opportunity.
🌈 Whether you're a seasoned trader or just starting, the Supertrended RSI offers a fresh perspective on market trends. 📈
💡 Tip: Experiment with different settings to find the perfect balance for your trading style!
🔗 Explore, customize, and enhance your trading experience with the Supertrended RSI Indicator! Happy trading! 🎉
Pulse Profiler [QuantraSystems]Pulse Profiler
Introduction
The Pulse Profiler ( ℙℙ ) is specifically designed to unambiguously indicate weakening momentum after a strong impulse. The upper and lower standard deviation bands also allow the user to assess the strength of an impulse and differentiate it from general noise.
Due to the ℙℙ ’s rapid responsiveness to exhaustion in price movement it is ideally used for the trader to recognize when to start taking profit when combined with other indicators.
The novum is that by dynamically balancing its sensitivity to recent movements the ℙℙ considers the asset’s inherent volatility. By reducing noise without sacrificing signal, and by visualizing it in our typical modern QuantraAI style, the ℙℙ enhances the traders’ ability to distinguish impulses with weakening momentum from strong trending movements.
Legend
Impulse: The ℙℙ showing strength based on momentum and volume.
Dynamic standard deviation bands: Rolling probability based bands based on a rolling normal distribution. Adjustable, recommended are σ = 1.5 to σ = 2.5.
Neutral lines: Dynamic thresholds which get often respected as support or resistance.
Case Study
To properly employ the ℙℙ , the trader should use it to identify out-of-the-ordinary 𝓲𝓶𝓹𝓾𝓵𝓼𝓮𝓼 which cause a following exhaustion.
The rolling standard deviation bands incorporate the asset’s historical behavior in regards to its inherent volatility on a rolling basis. If the asset shows strong 𝓲𝓶𝓹𝓾𝓵𝓼𝓮𝓼 that go beyond the rolling standard deviation, the event has been highly improbable. The trader then needs to determine if the price change was caused by critical external factors. If not, it is highly probable that the momentum exhausts and that price movement plateaus to enter a range.
These signals indicate that it is highly probable that closing a position upon these conditions is the correct choice.
If the 𝓲𝓶𝓹𝓾𝓵𝓼𝓮 reverses and retraces into the opposite direction, while moving more than 1.5σ across just 3 bars on the 4H chart, the signal indicates that a reversal is pushing the price down – in both momentum and volume.
A sharp reversal thus becomes more probable than not.
The ℙℙ can also be calibrated to find possible trend exhaustions on a longer timeframe (1D).
Please always use multiple Quantra indicators to add confirmations to your signals.
Recommended Settings
Swing Trading (4H chart)
Standard Deviation Lookback: 150
Standard Deviation Multiplier (σ): 2.5
Display Variant: Classic
Choose Mode for Bar Coloring: Signal
Trend exhaustion (1D chart)
Standard Deviation Lookback: 200
Standard Deviation Multiplier (σ): 2.0
Display Variant: Classic
Choose Mode for Bar Coloring: Extremes
Notes
Quantra Standard Value Contents:
The Heikin-Ashi (HA) candle visualization smoothes out the signal line to provide more informative insights into momentum and trends. This allows earlier entries and exits by observing the indicator values transformed by the HA.
Various visualization options are available to adjust the indicator to the user’s preference: Aside from HA, a classic line, or a hybrid of both.
A special feature of Quantra’s indicators is that they are probabilistically built - therefore they work well as confluence and can easily be stacked to increase signal accuracy.
To add to Quantra's indicators’ utility we have added the option to change the price bars colors based on different signals:
Choose Mode for Coloring
Trend Following (Indicator above mid line counts as uptrend, below is downtrend)
Extremes (Everything beyond the SD bands is highlighted to signal mean reversion)
Candles (Color of HA candles as barcolor)
Reversions (Only for HA) (Reversion Signals via the triangles if HA candles change trend while beyond the SD bands, high probability entries/exits)
The ℙℙ is also sensitive to divergences for those interested in utilizing this feature.
Through a special combination of price, volume and momentum you get a holistic overview on the impulse strengths of movements.
The two neutral lines in the center act as dynamic, volume and volatility adjusted thresholds. Often the signal line respects them as support and resistance.
The upper and lower standard deviation lines express the rarity of an impulse based on the asset’s inherent volatility.
The indicator needs a long enough timespan to build up its probability estimation, therefore the asset needs sufficient price history.
The indicator requires thorough volume data. If the source of an asset pair does not forward it, try to find another source or exchange for the same pair.
Signal Mode on the 4H chart is a relevant part of this indicator when used in isolation and helps to analyze momentum adjusted by volatility.
Methodology
The ℙℙ combines the Arnaud Legoux Moving Average (ALMA) with a bespoke volume and momentum calculation, with a classical Exponential Moving Average (EMA) on price data.
The ℙℙ itself integrates ALMA for volume and momentum with an EMA calculation on price, creating a unique blend that expresses impulses using their three raw main components.
The indicator calculates dynamic standard deviation bands based on an adjustable lookback period and the adjustable sigma (σ), to signal when the impulse strength is just uncommon or even extraordinary when compared to the usual price movements:
σ = 1.5 the probability of similar impulse strength occuring is 13.37% / 2, hence ~ 6.69%
σ = 2.0 the probability of similar impulse strength occuring is ~ 2.28%
σ = 2.5 the probability of similar impulse strength occuring is ~ 0.62%
By detecting extremely improbable conditions the indicator can create an inversely highly probable signal to its user.
Neutral bands are calculated based on the ℙℙ alongside a rolling, dynamic multiplier. This effectively provides dynamic thresholds for approximating common volatility.
Heikin Ashi method: The indicator uses a custom function to calculate Heikin Ashi values, useful for smoothing impulse data and identifying trends.
Reversion Signals: Specifically for Heikin Ashi displays, we plot triangles as signals, useful to easily spot potential reversals.
The Signal Mode uses these different thresholds to highlight significant market moves.
Rate of Change Suite [QuantraSystems]Rate of Change Suite
Introduction
The "Rate of Change Suite" (𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮) refines traditional RoC concepts by incorporating additional elements that provide more nuanced views of market trends, potential reversions, and momentum shifts.
Its main benefits are that it allows traders to detect momentum changes and frontrun trend shifts.
The suite is designed to be highly adaptable, catering to various trading styles, timeframes and market conditions. It is comprised of 3 metrics:
The RoC base line plots the rate of change, the Signal Histogram to confirm trends, and the Signal Confirmation Oscillator to inform reversal probabilities. For the early detection of trend shifts, the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 is a comprehensive tool for the toolkit of modern traders.
A core component of the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 is the ability to apply its processing techniques to any other indicator found on TradingView - essentially leveraging the signal power of existing analysis methods. This is achieved by modifying the ‘Source’ input.
Legend
𝓡𝓸𝓒 base line: The primary component of the suite, the RoC Line, offers a direct view of market momentum. An upward trending RoC line informs the potential for a long position, while a downward trend might signal the opportunity for a short position. Both include a secondary confirmation by the color change of the line itself. The Heikin Ashi transformed version of the RoC line provides greater resistance to rapid movements, or outliers.
Signal Histogram: This feature works in tandem with the base RoC Line, providing an additional third confirmation of trends. A rising histogram supports the presence of an upward trend. Conversely, a declining histogram aligns with downward trends.
Signal Confirmation Oscillator: This dotted-line is crucial for detecting peaks or troughs in market momentum: These can precede reversals or shifts in the prevailing trend. Traders can use this signal to anticipate and prepare for potential changes quicker than others.
Case Study
Primarily a tool to follow trends, the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 implies much more – you can trade with a confirmed trend signal entry and a mean reversion signal for the exit:
Here we see two practical cases of the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 on the 1h BTC chart.
In the first scenario, the trader waits for three confirmations from the indicator.
The 𝓡𝓸𝓒 baseline to lead the run and looks for confirmation two and three:
𝓡𝓸𝓒 base line color shifts
and the Signal Histogram follows past the null midline.
The trader has adjusted their risk beforehand and enters the long position.
The 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 shows traders when to take profit:
The Signal Confirmation Oscillator (SCO, dotted line) moves beyond the 𝓡𝓸𝓒 baseline and the Signal Histogram. The trader can take 50% of the profit already.
The trader waits patiently, and if the SCO reverses, the rest of the position is closed.
The same works inversely for the second trade, which successfully frontran the decline shortly after.
Recommended Settings
Day Trading (1H chart)
Length: 30
Smooth Length: 10
Display Variant: Classic
Choose Mode: Trend Following
Investing – Follow Trend (1D chart)
Default settings
Notes
Quantra Standard Value Contents:
The Heikin-Ashi (HA) candle visualization smoothes out the signal line to provide more informative insights into momentum and trends. This allows earlier entries and exits by observing the indicator values transformed by the HA.
Various visualization options are available to adjust the indicator to the user’s preference: Aside from HA, a classic line, or a hybrid of both.
A special feature of Quantra’s indicators is that they are probabilistically built - therefore they work well as confluence and can easily be stacked to increase signal accuracy.
To add to Quantra's indicators’ utility we have added the option to change the price bars’ colors based on different signals:
Choose Mode for Coloring
Trend Following (Indicator above mid line counts as uptrend, below is downtrend)
Extremes (Everything beyond the SD bands is highlighted to signal mean reversion)
Candles (Color of HA candles as barcolor)
Reversions (Only for HA) (Reversion Signals via the triangles if HA candles change trend while beyond the SD bands, high probability entries/exits)
Divergence Sensitivity: Quantra’s 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 is finely tuned to detect divergences, a key feature for identifying possible trend reversals.
Trend Following and Reversions: Primarily a tool for trend following, the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 is also adept at spotting potential reversions and slowdowns in momentum.
Range Trading Compatibility: In its Heikin Ashi Candles mode, the suite becomes particularly effective for range trading strategies.
High Customizability: Traders can customize the suite with various visualization options, including classic line representation, HA transformation, and bar coloring. These can be based on Heikin Ashi Candles or Trend Following approaches, providing flexibility to adapt to different trading scenarios.
Methodology
The 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 is built on a foundation of functions that define and calculate the Rate of Change. They employ a variety of moving average types (SMA, EMA, DEMA, TEMA, WMA, etc.) which can be selected to optimize the RoC line.
A bespoke function to calculate Heikin-Ashi values is engineered to offer a more consistent view of the trend.
The Signal Histogram is derived by mathematically processing the base RoC signal. The Signal Confirmation Oscillator is based on a modified formula, adjusted to align with the RoC dynamics.
With a range of customization options for its visual presentation, including color schemes and display styles, the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 is designed to cater to both trend following indications as well as finding signals for mean reversion trades. This multifaceted approach enables the 𝓡𝓸𝓒 𝓢𝓾𝓲𝓽𝓮 to allow the trader to combine signals of both types to de-risk his positions.
BotDCA | Algorithmic Smart DCA Bot🌌 What the script does, how it does ?
At the heart of its algorithm, this script incorporates the concept of Dollar Cost Averaging (DCA), a method of periodically allocating funds to an asset to mitigate the effects of market volatility.
Before we start, it's important to clarify that the script is adapted for the cryptocurrency market on USDT & USDC pairs in Spot, and on the Daily timeframe (D).
For this reason, and to optimize profits, the script will generate very few buy and sell positions.
Please also note that the script does not repaint.
Essentially, BotDCA generates buy and sell orders.
These buy and sell orders are generated using the following logic :
BUYING LOGIC :
• Volume : Current volume is compared with a linear percentile of volume over a short period.
This means that if current volume is higher than observed volumes over this period, the volume criteria is considered valid.
• Momentum & Volatility : The Average True Range (ATR) indicator adjusted by a square root is used as a measure of volatility.
Momentum is then calculated as the difference between the current closing price and a short moving average, normalized by this adjusted volatility.
The oversold condition is validated when momentum exceeds a specific level.
For the buy order to be triggered, the volume, momentum and volatility criteria must be validated.
SELLING LOGIC :
• Volume : Similar to the buy logic, the volume criteria is validated when current volume is higher than previous volumes.
• Momentum & Volatility : Volatility is measured using the adjusted ATR indicator, similar to the buy logic.
An overbought condition is validated when normalized momentum, calculated as the difference between the current closing price and a volatility-adjusted short-period moving average, exceeds a specific level.
• Trend : The general market trend is considered for the sell logic.
The trend criteria is validated when the current moving average is higher than that of the previous period.
For the sell order to be triggered, the volume, momentum, volatility and trend criteria must be validated.
These orders are also adjusted according to what the user defines as buy and sell settings :
🔵 Buying settings
• Quantity per order ($) : Defines the amount in stable coins to be invested for each buy order.
• └> Mult. quantity (x) : Multiplication factor applied to the buy quantity for successive orders, enabling the investment to be increased in the event of a price fall.
Example : If Quantity per order is $200 and Mult. quantity is x2, then the second buy order will be $400, the third buy order will be $800, the fourth buy order will be $1600 ...
After a sell order, the multiplier is cancelled.
Note : If value is set to 1 : Disabled
• └> Max. quantity (x) : Sets a maximum purchase quantity limit, preventing orders from exceeding this amount.
Example : If Quantity per order is $200, Mult. quantity is x2, and Max. quantity is $700, then the second buy order will be $400, the third buy order will be $700, the fourth buy order will be $700 ...
Note : If value is less than Quantity or is set to 0 : Disabled
• └> If Price > Average price : Enable or disable quantity multiplier when current price exceeds average price.
• Min. delay (in days) : Establishes a minimum interval in days between two successive purchases to avoid investing too close together.
Example : By default the time interval for the bot is set to D, so if you set 20 as the value, the bot will wait at least 20 days between buy orders before entering a position.
Note : If value is set to 0 : Disabled
• └> Min. deviation (%) : Defines the minimum price difference in percent to trigger a new purchase after the first.
Note : If value is set to 0 : Disabled
• └> Mult. deviation (x) : Apply a multiplication factor to the price differential for successive buys, progressively increasing the purchase interval.
Example : If Mult. deviation is 10% and Min. deviation is x2, then between the first and second buy orders the minimum deviation will be 10%, between the second and third buy orders the minimum deviation will be 20%, between the third and fourth buy orders the minimum deviation will be 40%...
After a sell order, the multiplier is cancelled.
Note : If value is set to 1 : Disabled
• Display help for these settings : On chart, displays help text about buying settings.
🟢 Selling settings
• Quantity (% position) : Percentage of the position to be sold in each sell order.
Example : If the first buy order is 0.1 BTC and the second buy order is 0.2 BTC, then the position is 0.3 BTC.
If Quantity (% position) is set to 20, then the first sell order will be 0.06 BTC (20% of 0.3 BTC), the second sell order will be 0.048 BTC (20% of 0.24 BTC) ...
(Auto ?) : If this option is enabled, the bot will automatically sell part of your position.
The quantity sold depends on the volatility of the last 30 days : the higher the volatility, the more it sells, and the lower the volatility, the less it sells.
The minimum sale defined is 10%, while the maximum sale will not exceed 50%.
• └> Min. deviation (%) : Minimum percentage of price deviation to trigger a sale.
Example : If Average price of BTC is 30 000 USDT and Min. deviation is 10%, then the first sell order will be at least 33 000 USDT, the second sell order will be at least 36 300 USDT ...
Note : If value is set to 0 : Disabled
(Auto ?) : If this option is activated, the bot automatically determines the sell minimum deviation percentage.
The deviation set depends on the volatility of the last 30 days : the higher the volatility, the higher the deviation, and the lower the volatility, the lower the deviation.
A start and end date defines when the script should generate buy and sell positions :
📆 Date settings
• Start date : Indicate the script launch date (If it’s a new launch, you must choose today’s date before creating your TradingView alert).
• End date : Enter the date on which you want the script to stop.
Other parameters can be configured to fine-tune buys and sells :
⏲️ Trading session settings
• Days : Allows you to select the specific days on which the script will be active, offering the possibility of excluding certain days.
🏛️ Exchange settings
• Fees (%) : Indicate the percentage fee applied by the exchange platform on each transaction.
• Price spread (%) : Specifies the price spread to be considered for realistic order adjustment.
🤖 Bot settings
• Add to Position ? : Allows tokens to be manually added to the position when the script is launched.
• └> How much ? (Base) : Number of tokens to add.
• └> Cost ? ($) : Stable coins amount of addition to position.
These settings are included in the calculation when an order is triggered.
Advanced visual customization options can be modified :
🎨 Visual settings
• TradingView Theme : Choose between a light or dark theme for the bot interface.
• Panel : Enables or disables the display of the information panel on the graph, and modifies its size and alignment.
• Positions : Show or hide buy and sell position labels on the chart, and modify their size and appearance (several display modes : basic, simple, advanced).
• Average price : Enables or disables the display of the average price line and modifies its size and color.
• Simulator : Enables or disables the ATH percentage-based simulator line and modifies its size and color.
• Trading session : Displays or hides the background of specified trading sessions.
• Hide warning messages ? : Hide or show warning messages on graph.
A profit simulator can be configured :
🕹️ Simulator settings
• Price (% ATH) : Determines a percentage of the token's ATH to simulate potential gains if the token reaches this price level again.
Users can also activate buying and selling alerts in the settings :
🤖 Bot settings
• START THE BOT ? » ALERTS ON : REAL MODE : Enable or disable the bot to execute real orders based on alerts.
• Mode FULL Auto ? : Enables the Mode FULL Auto, requiring additional configuration for connection to exchange APIs.
• └> Password FULL Auto : Password required to activate the Mode FULL Auto.
By activating FULL Auto Mode with TradingView's webhook system, the user can connect the script to the APIs of compatible exchanges, and receive notifications of buy and sell orders by e-mail, Telegram or Discord.
On the chart, a panel displays a variety of information, and also a backtesting / result of the script.
Here is a list of elements displayed by the panel :
💻 Informations panel
General :
• Pair
• Exchange
• └> Fees
• └> Price spread
• Period
• Start date
• End date
• Trading days
Buying
• Quantity per order
• └> Mult. quantity
• └> Max. quantity
• └> If Price > Average price
• └> Min. deviation
• └> Mult. deviation
• Min. delay (in days)
Selling
• Quantity (% position)
• └> Min. deviation
Exchange
• Next buy
• Next sell
Backtesting / Results
• No. of buys
• No. of sells
• Average price
• Actual position
• Actual net profit
• └> Simulator
• Last buy
• Last sell
🌌 About default settings
Default settings are defined as an example.
Above in the description, you will find details of each setting.
Here's a description of how user-defined setting categories affect the script's buy and sell positions :
📆 Date : Determines between which time ranges buy and sell positions are generated.
⏲️ Trading session : Exclude selected days disables buy positions on deselected days.
🕹️ Simulator : Does not affect buying and selling. It is for information purposes only.
🏛️ Exchange : Fees should be as close as possible to your exchange and price spread depends on your tolerance. This affects buy and sell position.
🔵 Buy : Depending on your investment capacity and risk management, these settings have an impact on buy positions.
🟢 Sell : These settings determine profit-taking. This has an impact on sell positions.
🎨 Visual : Does not affect buy and sell positions. For information only.
🤖 Bot : This part is mainly used to use the script with TradingView alerts. Only the 'Add to position' option affects buy and sell positions.
Once you've set all your settings for the script, you can view the backtesting displayed in the panel on the chart.
🌌 How to use it ?
To summarize how to use this script successfully, please follow these steps :
1. First, choose a cryptocurrency pair (e.g. BTC/USDT).
2. Set a start date (preferably today's date if it's your first launch) and an end date.
3. According on your preferences, you can choose specific trading days, or default to all days of the week.
4. Depending on your exchange, you can set fees and a price spread.
5. Then, based on your portfolio management and investment capabilities, define buy and sell parameters.
6. You can set the bot's appearance on the chart.
7. Once you have configured your settings, you can choose a simulation price.
8. Finally, to activate TradingView Alerts, check the box START THE BOT ? ALERTS ON : REAL MODE.
🌌 Overview
Here's a preview of the script with a few screenshots :
BTC/USDT • Basic display
SOL/USDT • Simple display
XRP/USDT • Advanced display
MATIC/USDT • Light theme
Script settings
🌌 Why do I have to pay ?
BotDCA uses advanced indicators and complex calculations to identify buying and selling opportunities.
With TradingView's alert system, it automates your investment strategy, eliminating the need for constant manual analysis and constant market monitoring.
This saves you precious time.
With adjustable buy and sell settings, you can customize the script to suit your risk tolerance and investment objectives.
This flexibility adds considerable value, allowing you to optimize the script to suit your situation.
Paid access ensures that you benefit from ongoing support and updates, which are essential for maintaining the script's effectiveness.
🌌 Disclaimer
This script is provided for educational purposes only and should not be construed as investment advice.
Users should be aware that trading in the financial markets involves risks, and that past performance of a script does not guarantee future results.
It is strongly recommended that you carry out a detailed analysis and consider your financial situation and risk tolerance before committing yourself to trading/investing.
ATR Grid Levels [By MUQWISHI]▋ INTRODUCTION :
The “ATR Levels” produces a sequence of horizontal line levels above and below the Center Line (reference level). They are sized based on the instrument's volatility, representing the average historical price movement on a selected higher timeframe using the average true range (ATR) indicator.
_______________________
▋ OVERVIEW:
_______________________
▋ IMPLEMENTATION:
The indicator starts by drawing a Center Line that is selected by the user from a variety of common levels. Then, it draws a sequence of horizontal lines above and below the Center Line, which are sized based on the most confirmed average true range (ATR) at the selected higher timeframe.
In the top right corner of the chart, there is a table displaying both the selected ATR (in the right cell) and the ATR of the current bar (in the left cell). This feature enables users to compare these two values. It's important to note that the ATR of the current bar may not be confirmed yet, as the market is still active.
_______________________
▋ INDICATOR SETTINGS:
# Section (1): ATR Settings
(1) ATR Period & Smoothing.
(2) Timeframe where ATR value imported from.
(3) To show/hide the table comparison between the current ATR and the ATR for the selected period. Also, ability to color the current ATR cell if it’s greater.
# Section (2): Levels Settings
(1) Selecting a Center Line level among a variety of common levels, which is taken as reference level where a sequence of horizontal lines plot above and below it.
(2) Size of grid in ATR unit.
(3) Number of horizontal lines to plot in a single side.
(4) Grid Side. Ability to plot above or below the Center Line.
(5) Lines colors, and mode.
(6) Line style.
(7) Label style.
(8) Ability to remove old lines, from previous HTF.
_____________________
▋ COMMENT:
The ATR Levels should not be taken as a major concept to build a trading decision.
Please let me know if you have any questions.
Thank you.
Donchian Channel Trend MeterInspired by the Chande Trend Meter (this is not the Chande Trend Meter), this indicator aims to show the trend so you can make trading decisions accordingly. This is calculated by looking at Donchian Channels over a number of lengths (20, 40, 60 periods, etc.), converting them to percent, and then applying a weighting and smoothing similar to the Know Sure Thing Indicator. This results in smooth trend line that is not disturbed by large fluctuations in price action.
When the line is below 20%, you have a strong down trend. Values between 20 - 40% are a weak down trend. Values between 40 - 60% are no trend (slightly bullish or bearish if above or below 50%). Similarly, 60 - 80% is a weak uptrend, and above 80% is a strong uptrend. Trade signals can be turned on or off that correspond to crosses over 50%. It can be useful in spotting divergence.