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.
Histogram
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!
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
Average Trend with Deviation Bands v2TL;DR: An average based trend incl. micro trend spotting and multiple display options.
This script is basically an update of my "Average Trend with Deviation Bands" script. I made the following changes:
Not an overlay anymore - The amount of drawn lines makes the chart pretty messy. That's why I moved it to a pane. If you preferred the overlay you can use my "Average Trend with Deviation Bands" script. *This is also the reason why I publish this script instead of updating the existing one.
I added an EMA to represent the price movement instead of candles
I added a signal (SMA) to spot micro trends and early entry/exit signals
I added the option to switch between a "line view" which shows the average trend and deviation bands and an "oscillator view" which shows an oscillator and histogram (MACD style)
General usage:
1. The white line is the average trend (which is an average of the last N bars open, close, high, low price).
2. Bands around the average trend are standard deviations which can be adjusted in the options menu and are only visible in "lines view". Basically they are like the clouds in the Ichimoku Cloud indicator - In big deviation bands the price movement needs more "power" to break through the average trend and vice versa.
3. Indicator line (blue line) - This is the EMA which represents the price. Crossing the average trend from below indicates an uptrend and vice versa (crossing from above indicates a down trend).
4. Signal line (red line) - This is a smoothed version of the indicator line which can be used to predict the movement of the price when crossed by the indicator line (like at MACD and many other indicators).
Oscillator usage:
When switched to "oscillator view" the indicator line oscillates around a zero line which can be seen as the average trend. The usage is basically the same as described above. However there is also the histogram which shows the difference between the indicator and signal. Of course the histogram can be deactivated. Additionally a color filling can be added to easily spot entry/exit signals.
As always: Code is free do whatever you like. If you have any questions/comments/etc. just drop it in the comment section.
SAR MACDSAR MACD is an idea of implementing Directional MACD with Parabolic SAR to exactly detect and confirm Trend. This p-SAR MACD consist of a HYBRID MACD which acts as MACD TREND oscillator, MACD Oscillator, PSAR Indicator combined with MA line. thus Fake MACD Signals can be eliminated using this SAR MACD. Sideways can be detected using Threshold Levels must be adjusted based on timeframe.
Indicators Hybrid model contains:
1.MACD (12,26,9) Standard with MA Crossovers
2.MACD Trend
3.Parabolic SAR with 0.02
4.Threshold level - indicates Sideways
How to use.
Histogram:
-> HIST MODE: normal MACD indicator
MA Line Color is based on PSAR Direction Blue-Up/ Pink -Down
A crossover upside with a Blue MA line denotes Up confirmation
A Crossover downwards with a red MA line denotes Down Confirmation
Additionally Histogram above zero line and below zero line are to be confirmed
-> MACD MODE: MACD Trend indicator
MA Line Color is based on PSAR Direction Blue-Up/ Pink -Down
A crossover upside with a Blue MA line denotes Up confirmation
A Crossover downwards with a red MA line denotes Down Confirmation
Additionally Histogram above zero line and below zero denotes long term Trend
-> Histogram Color: Indicates candles direction
Yellow indicates Unconfirmed Direction
Green Indicates up direction
Red Indicates Down Direction
Buy Condition:
MA Color - Blue
Histogram- Above Zero
Histogram/Candle -Green
MA Crossover is must
Sell Condition:
MA Color - Red
Histogram- Below Zero
Histogram/Candle -Red
MA Cross under is must
Warning: Must not be used as a standalone indicator. Use for confirmation of your Buy Sell Signals and Entry only.
1st Gray Cross Signals ━ Histogram SQZMOM [whvntr][LazyBear]This is the Histogram Version of one of my other indicators named: SQZ Momentum + 1st Gray Cross Signals (with arrows) Which is a modification of "Squeeze Momentum Indicator" by user: "LazyBear". In that indicator of his he described, and suggested, the use of his gray cross signals to find points of interest for trading based on the direction of momentum when the first gray cross appears... I have programmed these points, and highlighted them, for ease of use. The 1st gray cross strategy, he said , is from John F. Carter's book, Chapter 11, "Mastering the Trade".
Here we have the Histogram version, with background highlights only, and nothing on the chart, in true SQZ Momentum style.
Disclaimer: using this indicator, or any indicator anywhere, involves risk when trading and isn't a guarantee of 100% accurate results.
Quantum CDV HistogramThis script is an addition to Fixed Quantum Cdv.
It shows vector cdv ratio in columns.
You can select the length as an input to how many bars to look back for the whole calculation.
The green bars represent the bullish values and the red bars the bearish values.
The green line represents an ema of the bullish value and the red line the ema of the bearish value.
The momentum ema (in purple) represent the cdv ratio (bullish - bearish).
When the momentum ema is at 100% or more it’s a good sell opportunity and when the momentum ema is at or under 100% it’s a good buy opportunity. It is not financial advise. Make sure to make your own analysis. This script help to make entries, but do not enter positions only based on this signal.
In the inputs you can select the emas that you want to display on your histogram.
The original script is the Cumulative Delta Volume by LonesomeTheBlue.