CCI Histogram with Color### CCI Histogram with Color Gradients
A custom Commodity Channel Index (CCI) indicator that transforms the traditional line-based CCI into an easy-to-read histogram with color gradients. This visualization enhancement helps traders quickly identify overbought and oversold conditions through intuitive color coding.
#### Key Features
• **Enhanced Visualization**: Displays CCI as color-coded histogram bars instead of traditional lines
• **Adaptive Color Scheme**: Uses optimized colors for better visibility on light backgrounds
• **Customizable Parameters**: Easily adjust period length, source, and histogram width
• **Reference Lines**: Clear dotted lines at key levels for quick reference
#### Color Interpretation
• **Deep Forest Green** (≥ +200): Strong overbought condition
• **Medium Green** (≥ +100): Moderate overbought condition
• **Dark Slate Gray** (-100 to +100): Neutral zone
• **Indian Red** (≤ -100): Moderate oversold condition
• **Dark Red** (≤ -200): Strong oversold condition
#### Customizable Inputs
• **CCI Length**: Default 20 periods (adjustable)
• **Source**: Default close price (adjustable)
• **Multiplier**: Default 0.015 (standard CCI constant)
• **Histogram Width**: Default 4 (adjustable 1-10)
#### Trading Usage
1. **Overbought/Oversold Signals**:
- Strong signals above +200 or below -200
- Moderate signals between +100 to +200 and -100 to -200
2. **Trend Confirmation**:
- Green histograms indicate bullish momentum
- Red histograms indicate bearish momentum
- Gray indicates consolidation or neutral trend
3. **Divergence Analysis**:
- Compare histogram peaks/troughs with price action
- Look for potential reversals when divergences occur
#### Notes
• Optimized for light theme backgrounds (#d7d6d0)
• Includes value labels for precise readings
• Reference lines help identify key levels
• Dotted reference lines ensure histogram visibility
#### Best Practices
• Use in conjunction with other indicators for confirmation
• Monitor histogram color changes for potential trend shifts
• Pay attention to extreme readings (beyond ±200)
• Watch for histogram height and color intensity changes
#### Updates
Version 1.0
- Initial release with basic color coding
Version 1.1
- Added customizable histogram width
- Optimized colors for light backgrounds
- Added value labels
#### Author's Note
This indicator is designed to make CCI analysis more intuitive through visual enhancement while maintaining the reliability of the traditional CCI calculation method.
D-histogram
Multi-Step FlexiSuperTrend - Indicator [presentTrading]This version of the indicator is built upon the foundation of a strategy version published earlier. However, this indicator version focuses on providing visual insights and alerts for traders, rather than executing trades. This one is mostly for @thorcmt.
█ Introduction and How it is Different
The **Multi-Step FlexiSuperTrend Indicator** is a versatile tool designed to provide traders with a highly customizable and flexible approach to trend analysis. Unlike traditional supertrend indicators, which focus on a single factor or threshold, the **FlexiSuperTrend** allows users to define multiple levels of take-profit targets and incorporate different trend normalization methods.
It comes with several advanced customization features, including multi-step take profits, deviation plotting, and trend normalization, making it suitable for both novice and expert traders.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The **Multi-Step FlexiSuperTrend** works by calculating a supertrend based on multiple factors and incorporating oscillations from trend deviations. Here’s a breakdown of how it functions:
🔶 SuperTrend Calculation
At the heart of the indicator is the SuperTrend formula, which dynamically adjusts based on price movements.
🔶 Normalization of Deviations
To enhance accuracy, the **FlexiSuperTrend** calculates multiple deviations from the trend and normalizes them.
🔶 Multi-Step Take Profit Levels
The indicator allows setting up to three take profit levels, which are displayed via price level alerts. lows traders to exit part of their position at various profit intervals.
For more detail, please check the strategy version - Multi-Step-FlexiSuperTrend-Strategy:
and 'FlexiSuperTrend-Strategy'
█ Trade Direction
The **Multi-Step FlexiSuperTrend Indicator** supports both long and short trade directions.
This flexibility allows traders to adapt to trending, volatile, or sideways markets.
█ Usage
To use the **FlexiSuperTrend Indicator**, traders can set up their preferences for the following key features:
- **Trading Direction**: Choose whether to focus on long, short, or both signals.
- **Indicator Source**: The price source to calculate the trend (e.g., close, hl2).
- **Indicator Length**: The number of periods to calculate the ATR and trend (the larger the value, the smoother the trend).
- **Starting and Increment Factor**: These adjust how reactive the trend is to price movements. The starting factor dictates how far the initial trend band is from the price, and the increment factor adjusts subsequent trend deviations.
The indicator then displays buy and sell signals on the chart, along with alerts for each take-profit level.
Local picture
█ Default Settings
The default settings of the **Multi-Step FlexiSuperTrend** are carefully designed to provide an optimal balance between sensitivity and accuracy. Let’s examine these default parameters and their effect on performance:
🔶 Indicator Length (Default: 10)
The **Indicator Length** determines the lookback period for the ATR calculation. A smaller value makes the indicator more reactive to price changes, but may generate more false signals. A longer length smooths the trend and reduces noise but may delay signals.
Effect on performance: Shorter lengths perform better in volatile markets, while longer lengths excel in trending markets.
🔶 Starting Factor (Default: 0.618)
This factor adjusts the starting distance of the SuperTrend from the current price. The smaller the starting factor, the closer the trend is to the price, making it more sensitive. Conversely, a larger factor allows more distance, reducing sensitivity but filtering out false signals.
Effect on performance: A smaller factor provides quicker signals but can lead to frequent false positives. A larger factor generates fewer but more reliable signals.
🔶 Increment Factor (Default: 0.382)
The **Increment Factor** controls how the trend bands adjust as the price moves. It increases the distance of the bands from the price with each iteration.
Effect on performance: A higher increment factor can result in wider stop-loss or trend reversal bands, allowing for longer trends to develop without frequent exits. A lower factor keeps the bands closer to the price and is more suited for shorter-term trades.
🔶 Take Profit Levels (Default: 2%, 8%, 18%)
The default take-profit levels are set at 2%, 8%, and 18%. These values represent the thresholds at which the trader can partially exit their positions. These multi-step levels are highly customizable depending on the trader’s risk tolerance and strategy.
Effect on performance: Lower take-profit levels (e.g., 2%) capture small, quick profits in volatile markets, while higher levels (8%-18%) allow for a more gradual exit in strong trends.
🔶 Normalization Method (Default: None)
The default normalization method is **None**, meaning the deviations are not normalized. However, enabling normalization (e.g., **Max-Min**) can improve the clarity of the indicator’s signals in volatile or choppy markets by smoothing out the noise.
Effect on performance: Using a normalization method can reduce the effect of extreme deviations, making signals more stable and less prone to false positives.
Multi-Step FlexiMA - Strategy [presentTrading]It's time to come back! hope I can not to be busy for a while.
█ Introduction and How It Is Different
The FlexiMA Variance Tracker is a unique trading strategy that calculates a series of deviations between the price (or another indicator source) and a variable-length moving average (MA). Unlike traditional strategies that use fixed-length moving averages, the length of the MA in this system varies within a defined range. The length changes dynamically based on a starting factor and an increment factor, creating a more adaptive approach to market conditions.
This strategy integrates Multi-Step Take Profit (TP) levels, allowing for partial exits at predefined price increments. It enables traders to secure profits at different stages of a trend, making it ideal for volatile markets where taking full profits at once might lead to missed opportunities if the trend continues.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
🔶 FlexiMA Concept
The FlexiMA (Flexible Moving Average) is at the heart of this strategy. Unlike traditional MA-based strategies where the MA length is fixed (e.g., a 50-period SMA), the FlexiMA varies its length with each iteration. This is done using a **starting factor** and an **increment factor**.
The formula for the moving average length at each iteration \(i\) is:
`MA_length_i = indicator_length * (starting_factor + i * increment_factor)`
Where:
- `indicator_length` is the user-defined base length.
- `starting_factor` is the initial multiplier of the base length.
- `increment_factor` increases the multiplier in each iteration.
Each iteration applies a **simple moving average** (SMA) to the chosen **indicator source** (e.g., HLC3) with a different length based on the above formula. The deviation between the current price and the moving average is then calculated as follows:
`deviation_i = price_current - MA_i`
These deviations are normalized using one of the following methods:
- **Max-Min normalization**:
`normalized_i = (deviation_i - min(deviations)) / range(deviations)`
- **Absolute Sum normalization**:
`normalized_i = deviation_i / sum(|deviation_i|)`
The **median** and **standard deviation (stdev)** of the normalized deviations are then calculated as follows:
`median = median(normalized deviations)`
For the standard deviation:
`stdev = sqrt((1/(N-1)) * sum((normalized_i - mean)^2))`
These values are plotted to provide a clear indication of how the price is deviating from its variable-length moving averages.
For more detail:
🔶 Multi-Step Take Profit
This strategy uses a multi-step take profit system, allowing for exits at different stages of a trade based on the percentage of price movement. Three take-profit levels are defined:
- Take Profit Level 1 (TP1): A small, quick profit level (e.g., 2%).
- Take Profit Level 2 (TP2): A medium-level profit target (e.g., 8%).
- Take Profit Level 3 (TP3): A larger, more ambitious target (e.g., 18%).
At each level, a corresponding percentage of the trade is exited:
- TP Percent 1: E.g., 30% of the position.
- TP Percent 2: E.g., 20% of the position.
- TP Percent 3: E.g., 15% of the position.
This approach ensures that profits are locked in progressively, reducing the risk of market reversals wiping out potential gains.
Local
🔶 Trade Entry and Exit Conditions
The entry and exit signals are determined by the interaction between the **SuperTrend Polyfactor Oscillator** and the **median** value of the normalized deviations:
- Long entry: The SuperTrend turns bearish, and the median value of the deviations is positive.
- Short entry: The SuperTrend turns bullish, and the median value is negative.
Similarly, trades are exited when the SuperTrend flips direction.
* The SuperTrend Toolkit is made by @EliCobra
█ Trade Direction
The strategy allows users to specify the desired trade direction:
- Long: Only long positions will be taken.
- Short: Only short positions will be taken.
- Both: Both long and short positions are allowed based on the conditions.
This flexibility allows the strategy to adapt to different market conditions and trading styles, whether you're looking to buy low and sell high, or sell high and buy low.
█ Usage
This strategy can be applied across various asset classes, including stocks, cryptocurrencies, and forex. The primary use case is to take advantage of market volatility by using a flexible moving average and multiple take-profit levels to capture profits incrementally as the market moves in your favor.
How to Use:
1. Configure the Inputs: Start by adjusting the **Indicator Length**, **Starting Factor**, and **Increment Factor** to suit your chosen asset. The defaults work well for most markets, but fine-tuning them can improve performance.
2. Set the Take Profit Levels: Adjust the three **TP levels** and their corresponding **percentages** based on your risk tolerance and the expected volatility of the market.
3. Monitor the Strategy: The SuperTrend and the FlexiMA variance tracker will provide entry and exit signals, automatically managing the positions and taking profits at the pre-set levels.
█ Default Settings
The default settings for the strategy are configured to provide a balanced approach that works across different market conditions:
Indicator Length (10):
This controls the base length for the moving average. A lower length makes the moving average more responsive to price changes, while a higher length smooths out fluctuations, making the strategy less sensitive to short-term price movements.
Starting Factor (1.0):
This determines the initial multiplier applied to the moving average length. A higher starting factor will increase the average length, making it slower to react to price changes.
Increment Factor (1.0):
This increases the moving average length in each iteration. A larger increment factor creates a wider range of moving average lengths, allowing the strategy to track both short-term and long-term trends simultaneously.
Normalization Method ('None'):
Three methods of normalization can be applied to the deviations:
- None: No normalization applied, using raw deviations.
- Max-Min: Normalizes based on the range between the maximum and minimum deviations.
- Absolute Sum: Normalizes based on the total sum of absolute deviations.
Take Profit Levels:
- TP1 (2%): A quick exit to capture small price movements.
- TP2 (8%): A medium-term profit target for stronger trends.
- TP3 (18%): A long-term target for strong price moves.
Take Profit Percentages:
- TP Percent 1 (30%): Exits 30% of the position at TP1.
- TP Percent 2 (20%): Exits 20% of the position at TP2.
- TP Percent 3 (15%): Exits 15% of the position at TP3.
Effect of Variables on Performance:
- Short Indicator Lengths: More responsive to price changes but prone to false signals.
- Higher Starting Factor: Slows down the response, useful for longer-term trend following.
- Higher Increment Factor: Widens the variability in moving average lengths, making the strategy adapt to both short-term and long-term price trends.
- Aggressive Take Profit Levels: Allows for quick profit-taking in volatile markets but may exit positions prematurely in strong trends.
The default configuration offers a moderate balance between short-term responsiveness and long-term trend capturing, suitable for most traders. However, users can adjust these variables to optimize performance based on market conditions and personal preferences.
Multi-Step FlexiSuperTrend - Strategy [presentTrading]At the heart of this endeavor is a passion for continuous improvement in the art of trading
█ Introduction and How it is Different
The "Multi-Step FlexiSuperTrend - Strategy " is an advanced trading strategy that integrates the well-known SuperTrend indicator with a nuanced and dynamic approach to market trend analysis. Unlike conventional SuperTrend strategies that rely on static thresholds and fixed parameters, this strategy introduces multi-step take profit mechanisms that allow traders to capitalize on varying market conditions in a more controlled and systematic manner.
What sets this strategy apart is its ability to dynamically adjust to market volatility through the use of an incremental factor applied to the SuperTrend calculation. This adjustment ensures that the strategy remains responsive to both minor and major market shifts, providing a more accurate signal for entries and exits. Additionally, the integration of multi-step take profit levels offers traders the flexibility to scale out of positions, locking in profits progressively as the market moves in their favor.
BTC 6hr Long/Short Performance
█ Strategy, How it Works: Detailed Explanation
The Multi-Step FlexiSuperTrend strategy operates on the foundation of the SuperTrend indicator, but with several enhancements that make it more adaptable to varying market conditions. The key components of this strategy include the SuperTrend Polyfactor Oscillator, a dynamic normalization process, and multi-step take profit levels.
🔶 SuperTrend Polyfactor Oscillator
The SuperTrend Polyfactor Oscillator is the heart of this strategy. It is calculated by applying a series of SuperTrend calculations with varying factors, starting from a defined "Starting Factor" and incrementing by a specified "Increment Factor." The indicator length and the chosen price source (e.g., HLC3, HL2) are inputs to the oscillator.
The SuperTrend formula typically calculates an upper and lower band based on the average true range (ATR) and a multiplier (the factor). These bands determine the trend direction. In the FlexiSuperTrend strategy, the oscillator is enhanced by iteratively applying the SuperTrend calculation across different factors. The iterative process allows the strategy to capture both minor and significant trend changes.
For each iteration (indexed by `i`), the following calculations are performed:
1. ATR Calculation: The Average True Range (ATR) is calculated over the specified `indicatorLength`:
ATR_i = ATR(indicatorLength)
2. Upper and Lower Bands Calculation: The upper and lower bands are calculated using the ATR and the current factor:
Upper Band_i = hl2 + (ATR_i * Factor_i)
Lower Band_i = hl2 - (ATR_i * Factor_i)
Here, `Factor_i` starts from `startingFactor` and is incremented by `incrementFactor` in each iteration.
3. Trend Determination: The trend is determined by comparing the indicator source with the upper and lower bands:
Trend_i = 1 (uptrend) if IndicatorSource > Upper Band_i
Trend_i = 0 (downtrend) if IndicatorSource < Lower Band_i
Otherwise, the trend remains unchanged from the previous value.
4. Output Calculation: The output of each iteration is determined based on the trend:
Output_i = Lower Band_i if Trend_i = 1
Output_i = Upper Band_i if Trend_i = 0
This process is repeated for each iteration (from 0 to 19), creating a series of outputs that reflect different levels of trend sensitivity.
Local
🔶 Normalization Process
To make the oscillator values comparable across different market conditions, the deviations between the indicator source and the SuperTrend outputs are normalized. The normalization method can be one of the following:
1. Max-Min Normalization: The deviations are normalized based on the range of the deviations:
Normalized Value_i = (Deviation_i - Min Deviation) / (Max Deviation - Min Deviation)
2. Absolute Sum Normalization: The deviations are normalized based on the sum of absolute deviations:
Normalized Value_i = Deviation_i / Sum of Absolute Deviations
This normalization ensures that the oscillator values are within a consistent range, facilitating more reliable trend analysis.
For more details:
🔶 Multi-Step Take Profit Mechanism
One of the unique features of this strategy is the multi-step take profit mechanism. This allows traders to lock in profits at multiple levels as the market moves in their favor. The strategy uses three take profit levels, each defined as a percentage increase (for long trades) or decrease (for short trades) from the entry price.
1. First Take Profit Level: Calculated as a percentage increase/decrease from the entry price:
TP_Level1 = Entry Price * (1 + tp_level1 / 100) for long trades
TP_Level1 = Entry Price * (1 - tp_level1 / 100) for short trades
The strategy exits a portion of the position (defined by `tp_percent1`) when this level is reached.
2. Second Take Profit Level: Similar to the first level, but with a higher percentage:
TP_Level2 = Entry Price * (1 + tp_level2 / 100) for long trades
TP_Level2 = Entry Price * (1 - tp_level2 / 100) for short trades
The strategy exits another portion of the position (`tp_percent2`) at this level.
3. Third Take Profit Level: The final take profit level:
TP_Level3 = Entry Price * (1 + tp_level3 / 100) for long trades
TP_Level3 = Entry Price * (1 - tp_level3 / 100) for short trades
The remaining portion of the position (`tp_percent3`) is exited at this level.
This multi-step approach provides a balance between securing profits and allowing the remaining position to benefit from continued favorable market movement.
█ Trade Direction
The strategy allows traders to specify the trade direction through the `tradeDirection` input. The options are:
1. Both: The strategy will take both long and short positions based on the entry signals.
2. Long: The strategy will only take long positions.
3. Short: The strategy will only take short positions.
This flexibility enables traders to tailor the strategy to their market outlook or current trend analysis.
█ Usage
To use the Multi-Step FlexiSuperTrend strategy, traders need to set the input parameters according to their trading style and market conditions. The strategy is designed for versatility, allowing for various market environments, including trending and ranging markets.
Traders can also adjust the multi-step take profit levels and percentages to match their risk management and profit-taking preferences. For example, in highly volatile markets, traders might set wider take profit levels with smaller percentages at each level to capture larger price movements.
The normalization method and the incremental factor can be fine-tuned to adjust the sensitivity of the SuperTrend Polyfactor Oscillator, making the strategy more responsive to minor market shifts or more focused on significant trends.
█ Default Settings
The default settings of the strategy are carefully chosen to provide a balanced approach between risk management and profit potential. Here is a breakdown of the default settings and their effects on performance:
1. Indicator Length (10): This parameter controls the lookback period for the ATR calculation. A shorter length makes the strategy more sensitive to recent price movements, potentially generating more signals. A longer length smooths out the ATR, reducing sensitivity but filtering out noise.
2. Starting Factor (0.618): This is the initial multiplier used in the SuperTrend calculation. A lower starting factor makes the SuperTrend bands closer to the price, generating more frequent trend changes. A higher starting factor places the bands further away, filtering out minor fluctuations.
3. Increment Factor (0.382): This parameter controls how much the factor increases with each iteration of the SuperTrend calculation. A smaller increment factor results in more gradual changes in sensitivity, while a larger increment factor creates a wider range of sensitivity across the iterations.
4. Normalization Method (None): The default is no normalization, meaning the raw deviations are used. Normalization methods like Max-Min or Absolute Sum can make the deviations more consistent across different market conditions, improving the reliability of the oscillator.
5. Take Profit Levels (2%, 8%, 18%): These levels define the thresholds for exiting portions of the position. Lower levels (e.g., 2%) capture smaller profits quickly, while higher levels (e.g., 18%) allow positions to run longer for more significant gains.
6. Take Profit Percentages (30%, 20%, 15%): These percentages determine how much of the position is exited at each take profit level. A higher percentage at the first level locks in more profit early, reducing exposure to market reversals. Lower percentages at higher levels allow for a portion of the position to benefit from extended trends.
MTF-Colored EMA Difference and Stochastic indicatorThis indicator combines two popular technical analysis tools: the Exponential Moving Average (EMA) and the Stochastic Oscillator, with the added flexibility of analyzing them across multiple time frames. It visually represents the difference between two EMAs and the crossover signals from the Stochastic Oscillator, providing a comprehensive view of the market conditions.
Components:
EMA Difference Histogram :
EMA Calculation : The indicator calculates two EMAs (EMA1 and EMA2) for the selected time frame.
EMA Difference : The difference between EMA1 and EMA2 is plotted as a 4 coloured histogram.
Stochastic Oscillato r:
Calculation : The %K and %D lines of the Stochastic Oscillator are calculated for the selected time frame.
Additional Confirmation via Colors :
Green: %K is above %D, indicating a bullish signal.
Red: %K is below %D, indicating a bearish signal.
Entry and Exit Strategies
Entry Strategy :
Bullish Entry :
Condition 1: The histogram is Dark green (indicating a strong upward trend).
Condition 2: The Stochastic colour is green (%K is above %D).
Bearish Entry :
Condition 1: The histogram is Dark Red (indicating a strong downward trend).
Condition 2: The Stochastic colour is red (%K is below %D).
Exit Strategy:
Bullish Exit:
Condition: The Stochastic colour turns red (%K crosses below %D).
Bearish Exit:
Condition: The Stochastic colour turns green (%K crosses above %D).
Additional Considerations:
Time Frame Selection : The chosen time frame for both the EMA and Stochastic calculations should align with the trader’s strategy (e.g., daily for swing trading, hourly for intraday trading).
Risk Management : Implement stop-loss orders to manage risk effectively. The stop-loss can be placed below the recent swing low for long positions and above the recent swing high for short positions.
Confirmation : Consider using this indicator in conjunction with other technical analysis tools to confirm signals and reduce the likelihood of false entries and exits.
Multi Asset Histogram [ChartPrime]Multi Asset Histogram Indicator
Overview:
The "Multi Asset Histogram" indicator provides a comprehensive visualization of the performance of multiple assets relative to each other. By calculating a score for each asset and displaying it in a histogram format, this indicator helps traders quickly identify the trends, dominant asset and the average performance of the assets in the selected group.
Key Features:
◆ Multi-Asset Score Calculation:
The indicator calculates a trend score for each selected asset based on the price source (e.g., hl2).
The trend score is determined by comparing the current price to the prices over the past bars back defined by user, adding or subtracting points based on whether the current price is higher or lower than previous prices.
// Score Function
trscore(src) =>
total = 0.0
for i = 1 to 50
total += (src >= nz(src ) ? 1 : -1)
total
◆ Flexible Symbol Input:
Traders can input up to 10 different symbols (e.g., BTCUSD, ETHUSD, etc.) to be included in the histogram analysis.
◆ Dynamic Visualization:
A histogram is plotted for each asset, with bars colored based on the score, providing a clear visual representation of the relative performance.
Color gradients from red to aqua indicate the performance, with red representing negative scores and aqua representing positive scores.
◆ Adaptive Histogram Lines:
The width and placement of histogram lines adapt based on the calculated scores, ensuring clear visualization regardless of the values.
Dashed lines represent the mean score of all assets, helping traders identify the overall market trend.
◆Detailed Labels and Values:
Labels are placed on the histogram to display the exact score for each asset.
Mean value and zero line labels provide additional context for the overall performance.
◆ Visual Scaling Lines:
Zero line and mean line are clearly marked, helping traders understand the distribution and scale of scores.
Scales on the left and right of the histogram indicate the performance range.
◆ Informative Table:
A table is displayed on the chart, showing the dominant asset (the one with the highest score) and the mean score of all assets.
The table updates dynamically to reflect real-time changes in asset performance.
◆ Settings:
Length: The value of number bars back is greater or less than the current value of the source
Source: The price source to be used for score calculation (e.g., hl2).
Symbols: Up to 10 different asset symbols can be input for analysis.
Usage Notes:
This indicator is useful for traders who monitor multiple assets simultaneously and need a quick visual reference to identify the strongest and weakest performers.
The color coding and dynamic labels make it easy to interpret the relative performance and make informed trading decisions.
This indicator is designed to enhance multi-asset analysis by providing a clear, visual representation of each asset's performance relative to the others, making it easier to identify trends and dominant assets in the market.
ADR Study [TFO]This indicator is focused on the Average Daily Range (ADR), with the goal of collecting data to show how often price reaches/closes through these levels, as well as a look at historical moves that reached ADR and at similar times of day to study how price moved for the remainder of the session.
The ADR here (blue line) is calculated using the difference between a day's highest and lowest points. If our ADR length is 5, then we are taking this difference from the last 5 days and averaging them together. At the following day's open, we take half of this average and plot it above and below the daily opening price to place theoretical limits on how far price may move according to the lookback period. The triangles indicate when price has reached ADR (either +ADR or -ADR), and alerts can be created for these events.
The Scale Factor is an optional parameter to scale the ADR by a certain amount. If set to 2 for example, then the ADR would be 2x the average daily range. This value will be reflected in the statistics options so that users can see how different values affect the outcomes.
Show Table will display data collected on how often price reaches these levels, and how often price closes through them, for each day of the week. By default, these are colored as blue and red, respectively. From the following chart of NQ1!, we can see for example that on Mondays, price reached +ADR 38% of the time and closed through it 23% of the time. Note that the statistics for closing through the ADR levels are derived from all instances, not just those that reached ADR.
Show Sample Sizes will display how many instances were collected for all given sets of data. Referring to the same example of NQ1!, we can see that this particular chart has collected data from 109 Mondays. From those Mondays, 41 reached +ADR (38%, verifying our initial claim) and 25 closed through it (23%). This is important to understand the scope of the data that we're working with, as percentages can be misleading for smaller sample sizes.
Show Histogram will plot the same exact data as the table, just in a histogram form to visually emphasize the differences on a day-by-day basis. On this chart of RTY1!, we can see for example from the top histogram that on Wednesdays, 40% reached +ADR and only 22% closed through it. Similarly if we look at the bottom histogram, we can see that Wednesdays reached -ADR 46% of the time and closed through it only 28% of the time.
We can also use Show Sample Sizes to display the same information that would be in the table, showing how many instances were collected for each event. In this case we can see that we observed 175 Fridays, where 76 reached +ADR (43%) and 44 closed above it (25%).
Show Historical Moves is an interesting feature of this script. When enabled, if price has reached +/- ADR in the current session, the indicator will plot the evolution of the close prices from all past sessions that reached +/- ADR to see how they traded for the remainder of the session. These calculations are made with respect to the ADR range at the time that price traded through these levels.
Historical Proximity (Bars) allows the user to observe historical moves where price reached ADR within this many bars of the current session (assuming price has reached an ADR level in the current session). In the above chart, this is set to 1000 so that we can observe each and every instance where price reached an ADR level. However, we can refine this a bit more.
By limiting the Historical Proximity to something like 20, we are only considering historical moves that reached ADR within 20 bars of todays +ADR reach (9:50 am EST, noted by the blue triangle up). We can enable Show Average Move to display the average move by the filtered dataset, and Match +/-ADR to only observe moves inline with the current day's price action (in this case, only moves that reached +ADR, since price has not reached -ADR).
We can add one more filter to this data with the setting Only Show Days That: closed through ADR; closed within ADR; or either. The option either is what you see above, as we are considering both days that closed through ADR and days that closed within it (note that in this case, closing within ADR simply means that price reached +ADR and closed the day below it, and vice versa for -ADR; this does not mean that price must have closed in between +ADR and -ADR). If we set this to only show instances that closed within ADR, we see the following data.
Alternatively, we can choose to Only Show Days That closed through ADR, where we would see the following data. In this case, the average move very much resembles the price action that occurred on this particular day. This is in no way guaranteed, but it makes an interesting case for how we could use this data in our analysis by observing similar, historical price action.
Please note that this data will change over time on a rolling basis due to TradingView's bar lookback, and that for this same reason, lower timeframes will yield less data than larger timeframes.
Discovery IndexThe Discovery Index is an original technical indicator which attempts to display directional market pressure and momentum based on accumulated candle-over-candle measurements.
Discovery , in this context, is the act of finding (discovering) New Highs and Lows.
> What is 'Discovery'
Not to be confused with "Price Discovery", the term for setting the spot price of an asset.
The term 'Discovery' in Discovery Index is used based on the literal definition of 'Discovery', such as, the action of finding what was previously unknown.
Given this definition,
Discovery is the difference between highs or lows only when the current high is higher than the previous high or the current low is lower than the previous low.
Below is a visual example of exactly where Discovery is seen from each candle.
Since discovery is only based on points of the candle, and not specifically the direction of the candle; it is possible for discovery to occur in both directions from the same candle.
It is also possible for no discovery to occur from a candle.
> Calculation
The Discovery Index is the Net Total of discovery data over a specified length of bars.
Discovery Index = Sum of Upwards Discovery + Sum of Downwards Discovery
Note: Upwards Discovery is always Positive, and Downwards Discovery is always Negative. By adding both together, their Net Total is produced. This value is the "Discovery Index".
Wick Calculation Example
> Volume Discovery
Using Volume for the Discovery Index Calculation allows for a different dimension to be added to the data for new analysis opportunities.
While volume data is only a single value, by accumulating this data over time, we are able to fabricate a candle body from the data by accounting for the direction of the chart candles.
This allows for the Calculation of the Discovery Index based on volume data.
Volume Example
> Display
The display uses a "Candlestick histogram" display. The bodies and wicks from the display represent the discovery data from the respective points in each candle. (Wick Discovery & Candle Body Discovery).
This style of histogram allows for the display of both data sources, preserving the accuracy and distinction between each type, while also providing a clean display.
> Considerations
Discovery index is not an Oscillator, since there are no upper or lower boundaries to its rotations.
There are not (at this time) any "Over-bought" or "Over-sold" Areas, this is partially due to the previous consideration since any levels for these could potentially change from chart to chart. Additionally, it would generally be better to read the data based on the context of the current market.
Non-directional movements effect the Discovery Index as well. Since Discovery does not occur from every bar, the Index reflects hesitations as well as movements in market direction.
With the option to input a symbol, the Discovery Index Indicator is not constrained to one chart ticker for its calculation and could help to see shifts between different symbols, making it easier to compare different assets.
With the separation of wicks and candle body data, a stronger move may be observed by its full-bodied movements, while a potentially more speculative move may be seen from large wick movements. Since wicks are often interpreted as either, Rejection for reversal OR as Testing for continuation, the interpretation for Wick Discovery generally varies based on context.
Discovery Index ⇾ Divergences! Due to its calculation, price (and/or volume) data is displayed in such a way that makes it useful as a tool for identifying divergence opportunities.
Remember, this indicator is lookback based. An immediate significant change from the data source (if not offset by a similar opposite change) will be represented for multiple bars after its occurrence. Due to this, data is likely to be skewed or biased from these occurrences for a period of time after.
Throughout development, "Discovery" has been shortened to just "Disco", therefore, this indicator is also an attempt to bring Disco Back.
Enjoy!
Average Directional Index ProThe Average Directional Index (ADX) is a moving average of a range, usually 14 days, that's used to quantify the strength and direction of a trend. ADX values are significant in that lower values indicate a weak to non-existent trend, i.e. ADX=14, whereas an ADX=40 is indicative of a strong trend. Additionally, a weak trend could signal that price has entered in to a consolidation phase. A trader could wait for price to rise or fall out of a supply zone while simultaneously looking for ADX values to climb up and over the 25 level, since the ADX could be strong enough for price to trend after the breakout. As a result, this type of setup could be an excellent entry for a trade. Keep in mind that price is the signal most important value on a chart so it's important to use an indicator like this to confirm a particular bias that you may have.
💥💥💥💥💥
Instead of using a single line as most ADX indicators do, I thought that showing the values in terms of histogram bars would be highly intuitive and provide an interesting visual that would illustrate with varying degrees of color where the strength (or lack thereof) lies at any given time. The following are some of the characteristics that I feel make this script stand out from the pack.
💡Histogram plots. ADX values range from 0-100 and it may seem counterintuitive to see an ADX value below a 0 line. With this approach, I've divided up the ADX values between "bull" and "bear", meaning if an ADX histogram bar is above the 0 line (no matter if the value is 5 or 50), it's because the DMI+ value is ABOVE the DMI- value. Conversely, if the ADX histogram bar is below the 0 line, it's because the DMI- value is ABOVE the DMI+ value. DMI and ADX go hand-in-hand and while DMI values do not play a prominent role here, you'll see their values in the Main Label.
💡Main label. The main label's color will correspond to that of the histogram bar. The DMI and ADX values are listed along with the current price of the asset. Whichever DMI value is higher will be listed ahead of the lower value. In other words, from left to right, you'll see the ADX value followed by the higher of the 2 DMI values followed by the lesser of the 2 DMI values. The ADX value will be followed by an icon showing you if the value is rising or falling. Additionally, the main label has some extras: both buy/sell % on the current chart as well as daily chart along with total volume and average volume for the respective time frames. You can also change the MA lengths for the chart and daily TF averages. Both buy/sell % and total/avg volume values come with their own significant values inputs.
💡Color coded histogram bars dependent on ADX values. A few examples: an ADX value between 30 and 40 when DI+ > DI-, you'll see a dark green bar. Conversely, if the ADX value is > 70 and DI- > DI+, you'll get a dark purple bar. All in all, there's 18 possible colors denoted within the histogram.
💡Momentum arrows. There's 4 colors for the up/down arrows that populate above the histogram bar when DI+ and DI- combined with ADX values are showing extreme values. An example would be when DI+ is between 30 and 50 and ADX is greater than 30, you'll get a green arrow. On the flipside, when DI- is greater than -50 and ADX is greater than 40, you'll see a dark red arrow.
💡ADX and price shown on the histogram. You can choose to have the price and ADX values side by side or on top of one another as well as change the decimal value with a "significant figure" input. You can also opt to have neither value shown. The values will show above or below their respective bar dependent upon if DMI+ or DMI- is the dominant value, which in turn determines if the histogram is above or below the 0 line.
💡Weak trend colors. Any ADX values between 0 to 23 will give varying degrees of black to light gray indicating a weak or no trend. An ADX value of 17 could indicate a weak trend but the value could be rising as buyers push price higher. As the ADX approaches 25, wait for price confirmation (and volume) to validate if momentum could continue.
💡Threshold lines. ADX values above +/- 25-30 tend to show a strengthening of trend and you can choose to include these lines or not in your charts.
💡ADX value follow line. Determined by DMI+ being > or < than DMI-. For instance, if the trend changes and DMI- crosses over DMI+, the follow line will switch to follow the ADX histogram bar as it falls below 0. You can choose to enable/disable this line.
💡Colored bars. You can choose to enable the ADX color schemes to your candles further providing an easy view of the current trend.
💥💥💥💥💥
Remember to use any indicator together with price action to confirm a particular bias you may have! You could also use this indicator in confluence with my Directional Movement Pro script for an extra visual on trend direction and strength.
💥💥💥💥💥
Should you have any questions, feedback etc, please do not hesitate to contact the script's author. My hope is that this indicator becomes an invaluable resource to you and you're able to integrate it in to your everyday trading tool bag to make more informed decisions.
SimpleCryptoLife helped me code up this script and he's been an incredible source of knowledge in my trading journey. Without his patience and pine script expertise, this script would not have been possible!
Momentum Ghost Machine [ChartPrime]Momentum Ghost Machine (ChartPrime) is designed to be the next generation in momentum/rate of change analysis. This indicator utilizes the properties of one of our favorite filters to create a more accurate and stable momentum oscillator by using a high quality filtered delayed signal to do the momentum comparison.
Traditional momentum/roc uses the raw price data to compare current price to previous price to generate a directional oscillator. This leaves the oscillator prone to false readings and noisy outputs that leave traders unsure of the real likelihood of a future movement. One way to mitigate this issue would be to use some sort of moving average. Unfortunately, this can only go so far because simple moving average algorithms result in a poor reconstruction of the actual shape of the underlying signal.
The windowed sinc low pass filter is a linear phase filter, meaning that it doesn't change the shape or size of the original signal when applied. This results in a faithful reconstruction of the original signal, but without the "high frequency noise". Just like any filter, the process of applying it requires that we have "future" samples resulting in a time delay for real time applications. Fortunately this is a great thing in the context of a momentum oscillator because we need some representation of past price data to compare the current price data to. By using an ideal low pass filter to generate this delayed signal we can super charge the momentum oscillator and fix the majority of issues its predecessors had.
This indicator has a few extra features that other momentum/roc indicators dont have. One major yet simple improvement is the inclusion of a moving average to help gauge the rate of change of this indicator. Since we included a moving average, we thought it would only be appropriate to add a histogram to help visualize the relationship between the signal and its average. To go further with this we have also included linear extrapolation to further help you predict the momentum and direction of this oscillator. Included with this extrapolation we have also added the histogram in the extrapolation to further enhance its visual interpretation. Finally, the inclusion of a candle coloring feature really drives how the utility of the Momentum Machine .
There are three distinct options when using the candle coloring feature: Direct, MA, and Both. With direct the candles will be colored based on the indicators direction and polarity. When it is above zero and moving up, it displays a green color. When it is above zero and moving down it will display a light green color. Conversely, when the indicator is below zero and moving down it displays a red color, and when it it moving up and below zero it will display a light red color. MA coloring will color the candles just like a MACD. If the signal is above its MA and moving up it will display a green color, and when it is above its MA and moving down it will display a light green color.
When the signal is below its MA and moving down it will display a red color, and when its below its ma and moving up it will display a light red color. Both combines the two into a single color scheme providing you with the best of both worlds. If the indicator is above zero it will display the MA colors with a slight twist. When the indicator is moving down and is below its MA it will display a lighter color than before, and when it is below zero and is above its MA it will display a darker color color.
Length of 50 with a smoothing of 100
Length of 50 with a smoothing of 25
By default, the indicator is set to a momentum length of 50, with a post smoothing of 2. We have chosen the longer period for the momentum length to highlight the performance of this indicator compared to its ancestors. A major point to consider with this indicator is that you can only achieve so much smoothing for a chosen delay. This is because more data is required to produce a smoother signal at a specified length. Once you have selected your desired momentum length you can then select your desired momentum smoothing . This is made possible by the use of the windowed sinc low pass algorithm because it includes a frequency cutoff argument. This means that you can have as little or as much smoothing as you please without impacting the period of the indicator. In the provided examples above this paragraph is a visual representation of what is going on under the hood of this indicator. The blue line is the filtered signal being compared to the current closing price. As you can see, the filtered signal is very smooth and accurately represents the underlying price action without noise.
We hope that users can find the same utility as we did in this indicator and that it levels up your analysis utilizing the momentum oscillator or rate of change.
Enjoy
Percent Rank HistogramThis Pine script indicator is designed to create a visual representation of the percent rank for multiple financial instruments. Here's a breakdown of its key features:
Percent Rank Calculation:
The core functionality of this Pine script indicator revolves around the calculation of the percent rank for each selected financial instrument.
The percent rank is a statistical measure that indicates the percentage of historical data points that are less than or equal to the current value in a given series.
Symbol Selection:
The script allows the user to select up to 10 financial instruments (tickers) for analysis. The default symbols include various cryptocurrencies such as BTCUSD, ETHUSD etc., and TOTAL market cap at ticker 1, to show overal trend of crypto market.
(Top 9 Coins by market cap).
Columns and Colors:
The script visually represents the percent rank using columns based on lines.
The color of each column is determined by a gradient from red to green based on the calculated percent rank, providing a quick visual indication of the instrument's relative performance.
BTC Trending Up while other coins are underperformance:
Labels:
Labels are displayed on the chart, indicating the symbol name and the corresponding percent rank percentage.
The labels include directional arrows (▲ or ▼) to denote whether the percent rank is increasing or decreasing.
Customization:
Users can customize parameters such as the percent rank length and column width to adapt the indicator to their specific preferences, or select needed assets to compare them to each other.
Chart Desk and Scales:
The script includes the visualization of a chart desk with scale lines to provide additional context to the chart. When Percent Rank above middle scale line (50) usually it signaling about asset trending up and below 50 asset trending down.
Mozilla Public License:
The script is subject to the terms of the Mozilla Public License 2.0.
This indicator is useful for traders and analysts interested in visually assessing the percent rank of multiple financial instruments simultaneously, helping them identify potential opportunities or trends in the market.
Emibap's Uniswap V3 HEX/WETH 0.3% Liquidity PoolThis script will display a histogram of the Uniswap V3 HEX / WETH 3% liquidity pool.
Similar to what you can see in the liquidity section of the Uniswap pool page but conveniently rendered alongside your chart.
It's meant to be used on a HEX / WETH chart only. The price should be expressed in WETH for it to work.
One of the main motivations for using this in your chart is to get an idea of the current sentiment: If most of the volume is below the price it might be an indication of an upcoming move up, for instance.
I'll try to update the liquidity regularly.
Using the 4h, daily, or weekly time frames is highly recommended.
The options are straightforward:
Histogram bars color. Default is blue
Histogram background color. Default is black at 20% opacity
Upper price limit of the diagram: Visible upper bound price limit for the histogram, based on the current price. I.E: 200%: If the price is 1, the histogram will show 3 as the upper bound
Lower price limit of the diagram. Visible lower bound price limit for the histogram, based on the current price. I.E: 99%: If the price is 1, the histogram will show 0. 01 as the upper bound
Width of the widest bar: Width (in bars) for the widest bar of the histogram. The more the higher resolution you'll get
FlexiMA x FlexiST - Strategy [presentTrading]█ Introduction and How it is Different
The FlexiMA x FlexiST Strategy blends two analytical methods - FlexiMA and FlexiST, which are opened in my early post.
- FlexiMA calculates deviations between an indicator source and a dynamic moving average, controlled by a starting factor and increment factor.
- FlexiST, on the other hand, leverages the SuperTrend model, adjusting the Average True Range (ATR) length for a comprehensive trend-following oscillator.
This synergy offers traders a more nuanced and multifaceted tool for market analysis.
BTC 6H L/S Performance
Local
█ Strategy, How It Works: Detailed Explanation
The strategy combines two components: FlexiMA and FlexiST, each utilizing unique methodologies to analyze market trends.
🔶FlexiMA Component:
- Calculates deviations between an indicator source and moving averages of variable lengths.
- Moving average lengths are dynamically adjusted using a starting factor and increment factor.
- Deviations are normalized and analyzed to produce median and standard deviation values, forming the FlexiMA oscillator.
Length indicator (50)
🔶FlexiST Component:
- Uses SuperTrend indicators with varying ATR (Average True Range) lengths.
- Trends are identified based on the position of the indicator source relative to the SuperTrend bands.
- Deviations between the indicator source and SuperTrend values are calculated and normalized.
Starting Factor (5)
🔶Combined Strategy Logic:
- Entry Signals:
- Long Entry: Triggered when median values of both FlexiMA and FlexiST are positive.
- Short Entry: Triggered when median values of both FlexiMA and FlexiST are negative.
- Exit Signals:
- Long Exit: Triggered when median values of FlexiMA or FlexiST turn negative.
- Short Exit: Triggered when median values of FlexiMA or FlexiST turn positive.
This strategic blend of FlexiMA and FlexiST allows for a nuanced analysis of market trends, providing traders with signals based on a comprehensive view of market momentum and trend strength.
█ Trade Direction
The strategy is designed to cater to various trading preferences, offering "Long", "Short", and "Both" options. This flexibility allows traders to align the strategy with their specific market outlook, be it bullish, bearish, or a combination of both.
█ Usage
Traders can effectively utilize the FlexiMA x FlexiST Strategy by first selecting their desired trade direction. The strategy then generates entry signals when the conditions for either the FlexiMA or FlexiST are met, indicating potential entry points in the market. Conversely, exit signals are generated when the conditions for these indicators diverge, thus signaling a potential shift in market trends and suggesting a strategic exit point.
█ Default Settings
1. Indicator Source (HLC3): Provides a balanced and stable price source, reducing the impact of extreme market fluctuations.
2. Indicator Lengths (20 for FlexiMA, 10 for FlexiST): Longer FlexiMA length smooths out short-term fluctuations, while shorter FlexiST length allows for quicker response to market changes.
3. Starting Factors (1.0 for FlexiMA, 0.618 for FlexiST): Balanced start for FlexiMA and a harmonized approach for FlexiST, resonating with natural market cycles.
4. Increment Factors (1.0 for FlexiMA, 0.382 for FlexiST): FlexiMA captures a wide range of market behaviors, while FlexiST provides a gradual transition to capture finer trend shifts.
5. Normalization Methods ('None'): Uses raw deviations, suitable for markets where absolute price movements are more significant.
6. Trade Direction ('Both'): Allows strategy to consider both long and short opportunities, ideal for versatile market engagement.
*More details:
1. FlexiMA
2. FlexiST
Split VolumeThe Split Volume indicator displays 'Upwards' and 'Downwards' volume with an additional method for distributing 'split' candle volume.
A 'split' candle is a candle whose direction is...'Split'...since the open and close are equal. (Ex. Doji)
Upwards and Downwards Volume is tracked by comparing the Open and Closes of the Lower Timeframes.
If the Close is Greater-than the Open, we track the Volume as 'Upwards' Volume.
If the Close is Less-than the Open, we track the Volume as 'Downwards' Volume.
If the Close and Open are Equal, we assume that the Volume is an even split 50/50, and track it as such.
The indicator pulls data from lower timeframes to achieve more granular Open,Close,& Volume Data
Specifically:
<5m Timeframe: 1 Second LTF
<60m Timeframe: 5 Second LTF
<1D Timeframe: 1 Minute LTF
>1D Timeframe: 60m LTF
We have also included some nice-to-have features
50% Volume Line: This line splits each columns in half, this is used as quick reference to see exactly which side the volume is on.
High Volume Candle Identification: We are detecting bars with high relative volume and coloring them on the upper chart for use as important zones.
Status Line Readouts: The Status line for this indicator is formatted for simple reading. It Reads(Left-to-Right):Total Volume, Downwards Volume, 50% Value, Upwards Volume
FlexiSuperTrend - Strategy [presentTrading]█ Introduction and How it is Different
The "FlexiSuperTrend - Strategy" by PresentTrading is a cutting-edge trading strategy that redefines market analysis through the integration of the SuperTrend indicator and advanced variance tracking.
BTC 6H L/S
This strategy stands apart from conventional methods by its dynamic adaptability, capturing market trends and momentum shifts with increased sensitivity. It's designed for traders seeking a more responsive tool to navigate complex market movements.
Local
█ Strategy, How It Works: Detailed Explanation
The "FlexiSuperTrend - Strategy" employs a multifaceted approach, combining the adaptability of the SuperTrend indicator with variance tracking. The strategy's core lies in its unique formulation and application of these components:
🔶 SuperTrend Polyfactor Oscillator:
- Basic Concept: The oscillator is a series of SuperTrend calculations with varying ATR lengths and multipliers. This approach provides a broader and more nuanced perspective of market trends.
- Calculation:
- For each iteration, `i`, the SuperTrend is calculated using:
- `ATR Length = indicatorLength * (startingFactor + i * incrementFactor)`.
- `Multiplier = dynamically adjusted based on market conditions`.
- The SuperTrend output for each iteration is compared with the indicator source (like hlc3), and the deviation is recorded.
SuperTrend Calculation:
- `Upper Band (UB) = hl2 + (ATR Length * Multiplier)`
- `Lower Band (LB) = hl2 - (ATR Length * Multiplier)`
- Where `hl2` is the average of high and low prices.
Deviation Calculation:
- `Deviation = indicatorSource - SuperTrend Value`
- This value is calculated for each SuperTrend setting in the oscillator series.
🔶 Indicator Source (`hlc3`):
- **Usage:** The strategy uses the average of high, low, and close prices, providing a balanced representation of market activity.
🔶 Adaptive ATR Lengths and Factors:
- Dynamic Adjustment: The strategy adjusts the ATR length and multiplier based on the `startingFactor` and `incrementFactor`. This adaptability is key in responding to changing market volatilities.
- Equation: ATR Length at each iteration `i` is given by `len = indicatorLength * (startingFactor + i * incrementFactor)`.
incrementFactor - 1
incrementFactor - 2
🔶 Normalization Methods:
Purpose: To standardize the deviations for comparability.
- Methods:
- 'Max-Min': Scales the deviation based on the range of values.
- 'Absolute Sum': Uses the sum of absolute deviations for normalization.
Normalization 'Absolute Sum'
- For 'Max-Min': `Normalized Deviation = (Deviation - Min(Deviations)) / (Max(Deviations) - Min(Deviations))`
- For 'Absolute Sum': `Normalized Deviation = Deviation / Sum(Absolute(Deviations))`
🔶 Trading Logic:
The strategy integrates the SuperTrend indicator, renowned for its effectiveness in identifying trend direction and reversals. The SuperTrend's incorporation enhances the strategy's ability to filter out false signals and confirm genuine market trends. * The SuperTrend Toolkit is made by @QuantiLuxe
- Long Entry Conditions: A buy signal is generated when the current trend, as indicated by the SuperTrend Polyfactor Oscillator, turns positive.
- Short Entry Conditions: A sell signal is triggered when the current trend turns negative.
- Entry and Exit Strategy: The strategy opens or closes positions based on these signals, aligning with the selected trade direction (long, short, or both).
█ Trade Direction
The strategy is versatile, allowing traders to choose their preferred trading direction: long, short, or both. This flexibility enables traders to tailor their strategies to their market outlook and risk appetite.
█ Usage
The FlexiSuperTrend strategy is suitable for various market conditions and can be adapted to different asset classes and time frames. Traders should set the strategy parameters according to their risk tolerance and trading goals. It's particularly useful for capturing long-term movements, ideal for swing traders, yet adaptable for short-term trading strategies.
█ Default Settings
1. Trading Direction: Choose from "Long", "Short", or "Both" to define the trade type.
2. Indicator Source (HLC3): Utilizes the HLC3 as the primary price reference.
3. Indicator Length (Default: 10): Influences the moving average calculation and trend sensitivity.
4. Starting Factor (0.618): Initiates the ATR length, influenced by Fibonacci ratios.
5. Increment Factor (0.382): Adjusts the ATR length incrementally for dynamic trend tracking.
6. Normalization Method: Options include "None", "Max-Min", and "Absolute Sum" for scaling deviations.
7. SuperTrend Settings: Varied ATR lengths and multipliers tailor the indicator's responsiveness.
8. Additional Settings: Features mesh style plotting and customizable colors for visual distinction.
The default settings provide a balanced approach, but users are encouraged to adjust them based on their individual trading style and market analysis.
FlexiMA Variance Tracker - Strategy [presentTrading]█ Introduction and How It Is Different
The FlexiMA Variance Tracker by PresentTrading introduces a novel approach to technical trading strategies. Unlike traditional methods, it calculates deviations between a chosen indicator source (such as price or average) and a moving average with a variable length. This flexibility is achieved through a unique combination of a starting factor and an increment factor, allowing the moving average to adapt dynamically within a specified range. This strategy provides a more responsive and nuanced view of market trends, setting it apart from standard trading methodologies.
BTC 8h L/S
Local
█ Strategy, How It Works: Detailed Explanation
The FlexiMA Variance Tracker, developed by PresentTrading, stands at the forefront of trading strategies, distinguished by its adaptive and multifaceted approach to market analysis. This strategy intricately weaves various technical elements to construct a comprehensive trading logic. Here's an in-depth professional breakdown:
🔶Foundation on Variable-Length Moving Averages:
Central to this strategy is the concept of variable-length Moving Averages (MAs). Unlike traditional MAs with a fixed period, this strategy dynamically adjusts the length of the MA based on a starting factor and an incremental factor. This approach allows the strategy to adapt to market volatility and trend strength more effectively.
Each MA iteration offers a distinct temporal perspective, capturing short-term price movements to long-term trends. This aggregation of various time frames provides a richer and more nuanced market analysis, essential for making informed trading decisions.
🔶Deviation Analysis and Normalization:
The strategy calculates deviations of the price (or the chosen indicator source) from each of these MAs. These deviations are pivotal in identifying the immediate market direction relative to the average trend captured by each MA.
To standardize these deviations for comparability, they undergo a normalization process. The choice of normalization method (Max-Min or Absolute Sum) can significantly influence the interpretation of market conditions, offering distinct insights into price movements and trend strength.
🔹Normalization: Absolute Sum
🔶Composite Oscillator Construction:
A composite oscillator is derived from the median of these normalized deviations. The median serves as a balanced and robust central trend indicator, minimizing the impact of outliers and market noise.
Additionally, the standard deviation of these deviations is computed, providing a measure of market volatility. This volatility indicator is crucial for assessing market risk and can guide traders in setting appropriate stop-loss and take-profit levels.
🔶Integration with SuperTrend Indicator:
The FlexiMA strategy integrates the SuperTrend indicator, renowned for its effectiveness in identifying trend direction and reversals. The SuperTrend's incorporation enhances the strategy's ability to filter out false signals and confirm genuine market trends.
* The SuperTrend Toolkit is made by @QuantiLuxe
This combination of the variable-length MA oscillator with the SuperTrend indicator forms a potent duo, offering traders a dual-confirmation mechanism for trade signals.
🔹Supertrend's incorporation
🔶Strategic Trade Signal Generation:
Trade signals are generated when there is a confluence between the composite oscillator and the SuperTrend indicator. For example, a long position signal might be considered when the oscillator suggests an uptrend, and the SuperTrend flips to bullish.
The strategy's parameters are fully customizable, enabling traders to tailor the signal generation process to their specific trading style, risk tolerance, and market conditions.
█ Usage
To effectively employ the FlexiMA Variance Tracker strategy:
Traders should set their desired trade direction and fine-tune the starting and increment factors according to their market analysis and risk tolerance.
Indicator Length: 5
Indicator Length: 40
The strategy is suitable for a wide range of markets and can be adapted to different time frames, making it a versatile tool for various trading scenarios.
█ Default Settings Impact on Performance: FlexiMA Variance Tracker
1. Trade Direction (Configurable: Long, Short, Both): Determines trade types. 'Long' for buying, 'Short' for selling, 'Both' adapts to market trends.
2. Indicator Source: HLC3: Balances market sentiment by considering high, low, and close, providing comprehensive period analysis.
4. Indicator Length (Default: 10): Baseline for moving averages. Shorter lengths increase responsiveness but add noise, while longer lengths favor trends.
5. Starting and Increment Factor (Default: 1.0): Adjusts MA lengths range. Higher values capture broad market dynamics, lower values focus analysis.
6. Normalization Method (Options: None, Max-Min, Absolute Sum): Standardizes deviations. 'None' for raw deviations, 'Max-Min' for relative scaling, 'Absolute Sum' emphasizes relative strength.
7. SuperTrend Settings (ATR Length: 10, Multiplier: 15.0): Influences indicator sensitivity. Short ATR or high multiplier for short-term, long ATR or low multiplier for long-term trends.
8. Additional Settings (Mesh Style, Color Customization): Enhances visual clarity. Mesh style for detailed deviation view, colors for quick market condition identification.
FlexiMA Variance Tracker [presentTrading]🔶 Introduction and How it is Different
The FlexiMA Variance Tracker (FlexiMA-VT) represents a novel approach in technical analysis, distinctively standing out in the realm of financial market indicators. It leverages the concept of a variable Length Moving Average (MA) to create a versatile and dynamic oscillator. Unlike traditional oscillators that rely on a fixed-length MA, the FlexiMA-VT adapts to market conditions by varying the length of the MA, offering a more responsive and nuanced view of market trends. (*The achieved method took reference from SuperTrend Polyfactor Oscillator)
This innovative design allows the FlexiMA-VT to capture a broader spectrum of market movements, making it highly effective in diverse trading environments. Whether in stable or volatile markets, its adaptability ensures consistent relevance, providing traders with deeper insights into potential market swings.
The proposed oscillator accentuates several key aspects through a distinctive mesh of bars, which are derived from the differences between the price and a set of 20 Moving Averages, each altered by varying factors. The intensity of the mesh's colors serves as an indicator, with brighter hues signifying a greater convergence of Moving Average signals.
Starting Length = 5
Starting Length = 40
🔶 Strategy, How it Works: Detailed Explanation
1. Core Concept:
The FlexiMA-VT operates by comparing the price or an average value (indicator source) against a set of moving averages with varying lengths.
These lengths are dynamically adjusted through a starting factor and multiple increment factors, ensuring a comprehensive analysis over different time scales.
2. Normalization and Standard Deviation Calculation:
Once deviations are calculated, they undergo a normalization process, which can be set to 'None', 'Max-Min', or 'Absolute Sum'.
This step is crucial as it standardizes the deviations, allowing for a consistent scale of comparison.
The standard deviation of these normalized deviations is then calculated, offering insights into the market’s volatility and potential trend strength.
🔹Normalization
3. Median Value and Oscillator Creation:
The median of the normalized deviations forms the core of the FlexiMA-VT oscillator.
This median value provides a balanced central point, reflecting the consensus of various MA lengths.
The standard deviation bands plotted around the median enhance the interpretative power of the oscillator, indicating potential overbought or oversold conditions.
4. Multi-Factor Analysis:
The FlexiMA-VT uses multiple increment factors to generate a range of MAs, each factor representing a different scale of trend analysis.
By averaging the results from these different scales, the FlexiMA-VT forms a more comprehensive and reliable oscillator.
🔹Consensus
5. Practical Application:
Traders can use the FlexiMA-VT for various purposes, including identifying trend reversals, gauging market momentum, and determining overbought or oversold conditions.
Its dynamic nature makes it adaptable to different trading strategies, from short-term scalping to long-term position trading.
🔶 Settings
1. Indicator Source (indicatorSource): Determines the base data for calculations, typically a price average (HLC3).
2. Indicator Length (indicatorLength): Sets the base length for Moving Averages, influencing initial calculations.
3. Starting Factor (startingFactor): Initial multiplier for MA length, impacting the starting point of analysis.
4. Increment Factors (incrementFactor_1, incrementFactor_2, incrementFactor_3): Modulate the rate of change in MA lengths, adding variability.
5. Normalization Method (normalizeMethod): Standardizes deviations, with methods like 'Max-Min' and 'Absolute Sum' for comparability.
Enhanced McClellan Summation Index
The Enhanced McClellan Summation Index (MSI) is a comprehensive tool that transforms the MSI indicator with Heikin-Ashi visualization, offering improved trend analysis and momentum insights. This indicator includes MACD and it's histogram calculations to refine trend signals, minimize false positives and offer additional momentum analysis.
Methodology:
McClellan Summation Index (MSI) -
The MSI begins by calculating the ratio between advancing and declining issues in the specified index.
float decl = 𝘐𝘯𝘥𝘪𝘤𝘦 𝘥𝘦𝘤𝘭𝘪𝘯𝘪𝘯𝘨 𝘪𝘴𝘴𝘶𝘦𝘴
float adv = 𝘐𝘯𝘥𝘪𝘤𝘦 𝘢𝘥𝘷𝘢𝘯𝘤𝘪𝘯𝘨 𝘪𝘴𝘴𝘶𝘦𝘴
float ratio = (adv - decl) / (adv + decl)
It then computes a cumulative sum of the MACD (the difference between a 19-period EMA and a 39-period EMA) of this ratio. The result is a smoothed indicator reflecting market breadth and momentum.
macd(float r) =>
ta.ema(r, 19) - ta.ema(r, 39)
float msi = ta.cum(macd(ratio))
Heikin-Ashi Transformation -
Heikin-Ashi is a technique that uses a modified candlestick formula to create a smoother representation of price action. It averages the open, close, high, and low prices of the current and previous periods. This transformation reduces noise and provides a clearer view of trends.
type bar
float o = open
float h = high
float l = low
float c = close
bar b = bar.new()
float ha_close = math.avg(b.o, b.h, b.l, b.c)
MACD and Histogram -
The Enhanced MSI incorporates MACD and histogram calculations to provide additional momentum analysis and refine trend signals. The MACD represents the difference between the 12-period EMA and the 26-period EMA of the MSI. The histogram is the visual representation of the difference between the MACD and its signal line.
Options:
Index Selection - Choose from TVC:NYA , NASDAQ:NDX , or TVC:XAX to tailor the MSI-HA to the desired market index.
MACD Settings - Adjust the parameters for the MACD calculation to fine-tune the indicator's responsiveness.
Ratio Multiplier - Apply scaling to the MSI to suit different market conditions and indices.
Benefits of Heikin-Ashi -
Smoothed Trends - Heikin-Ashi reduces market noise, providing a more apparent and smoothed representation of trends.
Clearer Patterns - Candlestick patterns are more distinct, aiding in the identification of trend reversals and continuations.
Utility and Use Cases:
Trend & Momentum Analysis - Utilize the tool's Heikin-Ashi visualization for clearer trend identification in confluence with it's MACD and histogram to gain additional insights into the strength and direction of trends, while filtering out potential false positives.
Breadth Analysis - Explore market breadth through the MSI's cumulative breadth indicator, gauging the overall health and strength of the underlying market.
- Alerts Setup Guide -
The Enhanced MSI is a robust indicator that combines the breadth analysis of the McClellan Summation Index with the clarity of Heikin-Ashi visualization and additional momentum insights from MACD and histogram calculations. Its customization options make it adaptable to various indices and market conditions, offering traders a comprehensive tool for trend and momentum analysis.
SuperTrend Polyfactor Oscillator [LuxAlgo]The SuperTrend Polyfactor Oscillator is an oscillator based on the popular SuperTrend indicator that aims to highlight information returned by a collection of SuperTrends with varying factors inputs.
A general consensus is calculated from all this information, returning an indication of the current market sentiment.
🔶 USAGE
Multiple elements are highlighted by the proposed oscillator. A mesh of bars is constructed from the difference between the price and a total of 20 SuperTrends with varying factors. Brighter colors of the mesh indicate a higher amount of aligned SuperTrends indications.
The factor input of the SuperTrends is determined by the user from the Starting Factor setting which determines the factor of the shorter-term SuperTrend, and the Increment settings which control the step between each factor inputs.
Using higher values for these settings will return information for longer-term term price variations.
🔹 Consensus
From the collection of SuperTrends, a consensus is obtained. It is calculated as the median of all the differences between the price and the collection of SuperTrends.
This consensus is highlighted in the script by a blue and orange line, with a blue color indicating an overall bullish market, and orange indicating a bearish market.
Both elements can be used together to highlight retracements within a trend. If we see various red bars while the general consensus is bullish, we can interpret it as the presence of a retracement.
🔹 StDev Area
The indicator includes an area constructed from the standard deviation of all the differences between the price and the collection of SuperTrends.
This area can be useful to see if the market is overall trending or ranging, with a consensus over the area indicative of a trending market.
🔹 Normalization
Users can decide to normalize the results and constrain them within a specific range, this can allow obtaining a lower degree of variations of the indicator outputs. Two methods are proposed "Absolute Sum", and "Max-Min".
The "Absolute Sum" method will divide any output returned by the indicator by the absolute sum of all the differences between the price and SuperTrends. This will constrain all the indicator elements in a (1, -1) scale.
The "Max-Min" method will apply min-max normalization to the indicator outputs (with the exception of the stdev area). This will constrain all the indicator elements in a (0, 1) scale.
🔶 SETTINGS
Length: ATR Length of all calculated SuperTrends.
Starting Factor: Factor input of the shorter-term SuperTrend.
Increment: Step value between all SuperTrends factors.
Normalize: Normalization method used to rescale the indicator output.
Histogram-based price zonesThis indicator provides a new approach to creating price zones that can be used as support and resistance. The approach does not use pivot points or Fibonacci levels. Instead, it uses the frequency of occurence of local maxima and minima to determine zones of interest where price often changed direction.
The algorithm is as follows:
- Gather price data from the last Lookback trading periods
- Calculate rolling minima and rolling maxima along the price points with window size Window size
- Build a histogram from the rolling extrema which are binned into different zones. The number of bins and therefore the width of a zone can be adjusted with the parameter Zone width factor
- Select only the top fullest bins. The number of bins selected for plotting can be controlled with Zone multiplier
The result are a number of boxes that appear on the chart which mark levels of interest to watch for. You can combine multiple instances of this indicator on different settings to find zones that are very relevant.
Shown as an example is the Nasdaq 100 futures ( NQ1! ) on the D timeframe with levels built from the last 100 periods with default settings. The boxes are the only output of the indicator, no signals are created.
Weighted Bulls-Bears Variety Smoothed [Loxx]Weighted Bulls-Bears Variety Smoothed highlights potential buy and sell moments in the market. Users can customize the data source and select their preferred type of moving average for calculations. The resulting visualization is a column-style plot that changes color based on bullish or bearish market conditions. Additionally, the script can color chart bars and provide visual markers to indicate buying ("Long") or selling ("Short") opportunities. Alerts can also be set for these trading signals.
█ Inputs:
Users can choose the source for calculations (e.g., closing price).
They can set periods for calculations and smoothing.
They can select the type of moving average they prefer for smoothing: EMA, FEMA, LWMA, SMA, or SMMA.
█ Weighted Bulls-Bears Calculation:
It determines the highest and lowest prices over a user-defined period.
Then, it calculates the 'bull' and 'bear' values based on these highest and lowest prices. These values are weighted based on their distance from the current price.
█ Extras
Alerts
Signals
[volfgang] WAVEA compass to the financial charts.
The Volfgang WAVE Indicator helps you to decode complex market trends and make informed decisions in your trading.
Quick Summary
The WAVE has a signal line which alternates between Red or Blue.
Red is bearish and Blue is bullish.
It turns Blue when the WAVE line crosses above the signal and holds for 1 bar.
it turns Red when the WAVE line crosses below the signal and holds for 1 bar.
(You can change the signal line’s length in the settings, the default is 3 which is suited towards Day Trading – For Swing Traders I recommend 4 or 5 – For Investors 6 to 9).
The WAVE line will change colour to alert you when price is potentially pivoting.
When the WAVE is WHITE, the trend is currently Bearish but could flip bullish soon.
When the WAVE is GREEN, the trend is Bullish and there is strong Bullish momentum.
When the WAVE is ORANGE, it means trend is bullish but there is danger of a Bearish Reversal.
When the WAVE is PINK it means there is strong Bearish Momentum.
WAVETrend Scanner
The WAVETrend Scanner can be enabled in the settings and gives you a quick overview of the current trend across 8 potential timeframes:
You can use this to make sure the trades you are taking on lower timeframes align with the current bias on higher term timeframes, thus ensuring a higher chance of success.
WAVE Colours
The background colour of the WAVE also changes according to the current trend across multiple timeframes. The scanner is constantly measuring the current trend across 7 timeframes;
When 4 timeframes line up Bullish, the WAVE is LIGHT BLUE (Cyan)
When 5 timeframes line up Bullish, the WAVE is DARK BLUE (Navy)
When 6+ timeframes line up Bullish, the WAVE is GREEN
When 4 timeframes line up Bearish, the WAVE is ORANGE
When 5 timeframes line up Bearish, the WAVE is RED
When 6+ timeframes line up Bearish, the WAVE is PINK
Divergence Checker & Buy/Sell Signals
The BUY and SELL Signals are represented by a BLUE or RED Histogram line that extends from the WAVE to the 0 Line.
A BUY signal shows when a Crossover occurs & there is a Bullish Diversion Present within the last 50 bars.
A SELL signal appears when a Crossunder occurs & there is Bearish Diversion present within the last 50 bars.
You can change the length of the Divergence Checker in the settings, default is 50 bars.
Under The Hood
The WAVE pulls information from multiple sources within a set period such as;
Close Price
Highest Price
Lowest Price
EMA
The script applies a set of complicated algebraic equations. Which essentially measures the and of recent price action.
Then it uses EMA's to measure from the and , whilst applying more weight to recent price action.
The functions then calculate more averages which measure the difference from and .
Next, it uses all of these calculated averages to create a value that represents the current WAVE condition. This calculation will determine whether the WAVE is in a bullish or bearish trend.
This sum is then smoothed out to get one more value, which is used to display the info box content that allows us to see exactly at what price the WAVE will keep rising or keep falling.
One final calculation also predicts the point at which the WAVE will flip trend. It uses similar calculations to the "Keep Rising/Falling" prediction function, but its aim is to predict the exact price at which the WAVE will cross.
What gives the WAVE indicator an edge over most Stochastic Indicators, is how it uses Pinescript's "request.security" function to pull information from multiple timeframes in order to generate plots, info data and colours to add much more relevant information to the chart which you can use to make informed trading decisions. This is what allows the WAVETrend Scanner to work.
The WAVE indicator is designed to work with all markets and asset types.
MACD-AS MTF [JoseMetal]============
ENGLISH
============
- Description:
This script is a modification of the Moving Average Convergence Divergence (MACD) of Thomas Aspray, and called as MACD-AS and you may get earlier signals than MACD.
On this (my version) you have several extra elements and customization.
Foremost (of course) you have the MACD-AS, which is the HISTOGRAM, also, it has a SIGNAL line (which smooths the MACD-AS), and finally, a higher timeframe oscillator based on one of the previous values (custom).
- Visuals, features, customization:
You can show/hide any of the components with a checkbox (MACD-AS, Signal and HTF Oscillator).
The timeframe for the higher timeframe oscillator is customizable, but by default is automatic and multiplies the chart timeframe by 3: 5m > 15m, 15m > 45m etc.
So we have the MACD-AS as a histogram, with 2 optional color schemes and custom transparency, it works similar to the original MACD, oscillating around the 0 level. Green colors (bull) if above 0, red (bear) below 0.
Smoothed MACD-AS makes the Signal line, going up (bull) shows green color, down (bear) red, changes from one to another also prints a colored dot. There's another feature which darkens the color when the momentum is losing strength, a strength filter input is available for that purpose but the default 0.5 works well.
The higher timeframe oscillator (it's called "oscillator" because you can pick if you want to show the MACD-AS or Signal line of the higher timeframe), is always shown as a line, colors work similar to the Signal line, but BLUE for bull and PINK for bear.
Finally, the background color just changes from green (bull) to red (bear) and vice versa if the Signal line is above or below the 0 line to show bull/bear trend too, this is slower than other indicator signals as well.
- Usage and recommendations:
You can use this script as default MACD, the difference is that you'll use the DOTs of the Signal line (when changing green to red and vice versa) as crossovers on the classic MACD.
You can also use the higher timeframe oscillator as a trend filter to not to trade against it, ex: if the HTF is bull, don't try to SHORT.
My favorite usage is to find DIVERGENCES with the MACD-AS (histogram) with the HTF MACD-AS histogram as well, having 2 confirmations, ex: 5m divergence + 15m divergence.
As always, suggestions are welcome.
Enjoy!
============
ESPAÑOL
============
- Descripción:
Este script es una modificación del Moving Average Convergence Divergence (MACD) de Thomas Aspray, y llamado como MACD-AS, se pueden obtener señales más tempranas que con el MACD.
En ésta (mi versión) tiene varios elementos adicionales y personalización.
En primer lugar (por supuesto) tienes el MACD-AS, que es el HISTOGRAMA, también, tiene una línea de SEÑAL (que suaviza el MACD-AS), y por último, un oscilador de marco de tiempo superior basado en uno de los valores anteriores (personalizado).
- Visuales, características, personalización:
Puedes mostrar/ocultar cualquiera de los componentes con un checkbox (MACD-AS, Señal y Oscilador HTF).
La temporalidad para el oscilador HTF es personalizable, pero por defecto es automático y multiplica la temporalidad del gráfico por 3: 5m > 15m, 15m > 45m etc.
El MACD-AS (histograma), con 2 esquemas de color opcionales y transparencia personalizada, funciona de forma similar al MACD original, oscilando alrededor del nivel 0. Colores verdes (alcista) si está por encima de 0, rojo (bajista) por debajo de 0.
El suavizado del MACD-AS hace la línea de señal, subiendo (alcista) muestra color verde, bajando (bajista) rojo, cambios de uno a otro también imprime un punto de color. Hay otra característica que oscurece el color cuando el impulso está perdiendo fuerza, una entrada de filtro de fuerza está disponible para ese propósito, pero el valor predeterminado 0,5 funciona bien.
El oscilador de temporalidad superior (se llama "oscilador" porque puedes elegir si quieres mostrar el MACD-AS o la línea de señal), siempre se muestra como una línea, los colores funcionan de forma similar a la línea de señal, pero AZUL para alcista y ROSA para bajista.
Por último, el color de fondo sólo cambia de verde (alcista) a rojo (bajista) y viceversa si la línea de señal está por encima o por debajo de la línea 0 para mostrar la tendencia alcista / bajista también, eso si, resulta más lento que otros avisos del indicador.
- Uso y recomendaciones:
Puedes usar este script como el MACD clásico, la diferencia es que usarán los PUNTOS de la línea de Señal (cuando cambie de verde a rojo y viceversa) como cruces en el MACD clásico.
También puedes usar el oscilador de mayor temporalidad como filtro de tendencia para no operar en contra de ella, ej: si el HTF es alcista, no intentes SHORTs.
Mi uso favorito es encontrar DIVERGENCIAS con el MACD-AS (histograma) y el HTF MACD-AS, teniendo 2 confirmaciones, ej: 5m divergencia + 15m divergencia.
Como siempre, las sugerencias son bienvenidas.
¡Que lo disfrutéis!