MACD_base_and_reference_TF//====================================================================================================================
The "MACD_with_reference" indicator aims to illustrate the MACD (Moving Average Convergence Divergence) on two distinct timeframes: the base timeframe (typically the chart's timeframe, e.g., 1D) and the reference timeframe (defaulted to 1W). This tool provides a means to determine momentum shifts within the stock, potentially guiding traders in adjusting or trimming positions.
// ================================================== INFO ==================================================
Key Features of the Indicator:
- Dual Timeframe MACD: Displays MACD on both the primary (base) and higher (reference) timeframes - transparent.
- Momentum Analysis: indication of MACD crossdown of the signal line on the refenence TF to indicate momentum loss on the higher timeframe, guiding decisions to manage positions.
- MACD Line Status: Beneath the chart, a red/green bar line signifies the MACD line's position relative to the signal line on the higher timeframe.
- Alert Creation: Allows for alerts on the MACD and signal line crossdown on the higher timeframe, aiding in planning stop-loss settings for owned stocks.
// ================================================== NOTES ==================================================
The "MACD_with_reference" indicator finds optimal usage in several scenarios:
- Chart Analysis: Replacing the MACD indicator during chart reviews.
- Alert Setup: Setting alerts for owned stocks to plan ahead for stop-loss placements or position closures.
// ================================================== TODO ==================================================
//#endregion ========================================================================================================
// Continue the script code...
Centered Oscillators
Fisher+ [OSC]The Fisher Transform Indicator is classified as an oscillator, meaning that its value swings above and below a central point. This characteristic allows traders to identify overbought and oversold conditions, providing potential clues about market reversals. As mentioned previously, it is an oscillator so the strength of the move is displayed by how long the fisher line stays above/below zero. Indicator can be used to aid in confluence near supply/demand zones.
White Line = Fisher
Red/Blue Line = Moving Average
--Changes color whether fisher line is above/below the MA
Red/Blue Shaded Line = Moving Average
--Changes color based on a smoothing factor
Red/Blue Shaded Fill = Asset in Overbought/Oversold Conditions
Red/Blue Circles = Asset in Extreme Overbought/Oversold Conditions
Red/Blue Triangles = MACD Signals Below/Above "0"
Divergence Labels = Asset Signaling Divergence
The moving average line will turn red/blue as long as the fisher line is below/above the moving average. The shaded MA line will switch colors based on if it is moving in an up/down trend. The MA can also be used as a signal and treated similar to an oscillator. Market trending conditions will either keep the MA below/above the dashed zero line.
MACD code credited to LazyBear's MACD Leader indicator. It is used to filter out/confirm any signals such as divergences. As long as the MACD Leader line is above both the MACD line and signal lines then it'll signal with with a triangle. MACD divergences will be added at a later time.
Spot-Vol CorrelationSpot-Vol Correlation Script Guide
Purpose:
This TradingView script measures the correlation between percentage changes in the spot price (e.g., for SPY, an ETF that tracks the S&P 500 index) and the changes in volatility (e.g., as indicated by the VIX, the Volatility Index). Its primary objective is to discern whether the relationship between spot price and volatility behaves as expected ("normal" condition) or diverges from the expected pattern ("abnormal" condition).
Normal vs. Abnormal Correlation:
Normal Correlation: Historically, the VIX (or volatility) and the spot price of major indices like the S&P 500 have an inverse relationship. When the spot price of the index goes up, the VIX tends to go down, indicating lower volatility. Conversely, when the index drops, the VIX generally rises, signaling increased volatility.
Abnormal Correlation: There are instances when this inverse relationship doesn't hold, and both the spot price and the VIX move in the same direction. This is considered an "abnormal" condition and might indicate unusual market dynamics, potential uncertainty, or impending shifts in market sentiment.
Using the Script:
Inputs:
First Symbol: This is set by default to VIX, representing volatility. However, users can input any other volatility metric they prefer.
Second Symbol: This is set to SPY by default, representing the spot price of the S&P 500 index. Like the first symbol, users can substitute SPY with any other asset or index of their choice.
Length of Calculation Period: Users can define the lookback period for the correlation calculation. By default, it's set to 10 periods (e.g., days for a daily chart).
Upper & Lower Bounds of Normal Zone: These parameters define the range of correlation values that are considered "normal" or expected. By default, this is set between -0.60 and -1.00.
Visuals:
Correlation Line: The main line plot shows the correlation coefficient between the two input symbols. When this line is within the "normal zone", it indicates that the spot price and volatility are inversely correlated. If it's outside this zone, the correlation is considered "abnormal".
Green Color: Indicates a period when the spot price and VIX are behaving as traditionally expected (i.e., one rises while the other falls).
Red Color: Denotes a period when the spot price and VIX are both moving in the same direction, which is an abnormal condition.
Shaded Area (Normal Zone): The area between the user-defined upper and lower bounds is shaded in green, highlighting the range of "normal" correlation values.
Interpretation:
Monitor the color and position of the correlation line relative to the shaded area:
If the line is green and within the shaded area, the market dynamics are as traditionally expected.
If the line is red or outside the shaded area, users should exercise caution as this indicates a divergence from typical behavior, which can precede significant market moves or heightened uncertainty.
S/R and Reversal BarsToday I'm proposing an idea to form S/R with a slightly different basic idea. This is a combination of CCI and candlestick study, and we will use this to mark possible reversal candles and possible S/R lines.
This is nothing complicated, I've used a basic CCI indicator with certain rules/system to mark S/R levels on the chart. (Have loaded traditional CCI indicator on bottom for comparison)
S/R levels are market as followed
Cross -
Lime = Support
Red = Resistance
Zero/Balance line - Yellow circles
The idea is to use this indicator to trade sideways market more successfully, in trending market this can be futile if you are not waiting for the break-out or breakdowns with confirmation.
Since this is based on CCI, it will give static result only when bar is closed, till then it will be susceptible for repaint. This is inherited nature from CCI readings on current bar. I could change this to only making reading on closed bar (historical bar), but that takes away from the uniqueness of this indicator in giving early indications.
This is a great tool for intraday scalping, but it does work on all timeframes, it's not bound by granularity.
This is for education purpose only.
Past success or seemingly positive results on published posts are not indication of future success.
TASC 2023.11 VAcc█ OVERVIEW
The November 2023 edition of TASC's Traders' Tips features an article titled "VAcc: A Momentum Indicator Based On Velocity And Acceleration" by Scott Cong. This script implements the author's momentum indicator based on simple physics concepts.
█ CONCEPTS
The indicator is named VAcc as it is derived from the average velocity (V) and acceleration (Acc) over a specified lookback period. Consequently, its readings reflect two valuable characteristics of price data: rate (indicating the speed at which the price is moving) and rate of change (indicating whether the price is speeding up or slowing down).
In the article, the author reports that for longer periods, VAcc behaves similarly to the MACD , albeit with a more responsive nature. For shorter periods, VAcc exhibits characteristics reminiscent of the stochastic oscillator , but it trends more prominently and is less prone to overbought/oversold saturation.
To incorporate VAcc into trading strategies, the author suggests considering the following two permutations for the velocity and acceleration data series:
Strong upward condition: Velocity is rising, and acceleration is rising above zero.
Strong downward condition: Velocity is falling, and acceleration is falling.
In the current implementation, the chart displays the average velocity as a line, while the average acceleration is presented as a histogram.
█ CALCULATIONS
The calculation of VAcc involves the following steps:
For the current closing price, C , and for each bar C (i) within a specified lookback period from the current bar, the script calculates velocities, V (i) = ( C - C (i))/i. These velocities are then subjected to an exponential moving average to obtain the smoothed average velocity.
Similarly, for each bar within the lookback period, accelerations are calculated as Acc (i) = ( V - V (i))/i and then averaged without smoothing.
VAcc (Velocity & Acceleration)VAcc (Velocity & Acceleration) is a momentum indicator published by Scott Cong in Stocks & Commodities V. 41:09 (8–15). It applies concepts from physics, namely velocity and acceleration, to financial markets. VAcc functions similarly to the popular MACD (Moving Average Convergence Divergence) indicator when using a longer lookback period, but produces more responsive results. With shorter periods, VAcc exhibits characteristics reminiscent of the stochastic oscillator.
🟠 Algorithm
The average velocity over the past n periods is defined as
((C - C_n) / n + (C - C_{n-1}) / (n - 1) + … + (C - C_i) / i + (C - C_1) / 1) / n
At its core, the velocity is a weighted average of the rate of change over the past n periods.
The calculation of the acceleration follows a similar process, where it’s defined as
((V - V_n) / n + (V - V_{n - 1}) / (n - 1) + … + (V - V_i) / i + (V - V_1) / 1) / n
🟠 Comparison with MACD
A comparison of VAcc and MACD on the daily Nasdaq 100 (NDX) chart from August 2022 helps demonstrate VAcc's improved sensitivity. Both indicators utilized a lookback period of 26 days and smoothing of 9 periods.
The VAcc histogram clearly shows a divergence forming, with momentum weakening as prices reached new highs. In contrast, the corresponding MACD histogram significantly lagged in confirming the divergence, highlighting VAcc's ability to identify subtle shifts in trend momentum more immediately than the traditional MACD.
Ichimoku Oscillator With Divergences [ChartPrime]The Ichimoku Oscillator is a trading indicator designed to streamline the interpretation of Ichimoku clouds. It aims to refine and condense the complexities of the Chikou (the lag line), presenting its implications in real-time through an oscillator format, beneficial for those familiar with Ichimoku components but to have a new interpretation of their indicators.
The basics of an Ichimoku:
Conversion Line (Tenkan-Sen): It represents a midpoint of the highest and lowest prices over a specific period, usually 9 periods, reflecting short-term price movements.
Base Line (Kijun-Sen): It acts similarly to the Conversion Line but over a longer period, typically 26 periods, representing medium-term price movements.
Leading Span A & B (Kumo): Span A is the average of the Conversion Line and Base Line, and Span B is the midpoint of the highest and lowest prices over a usually longer period, typically 52 periods. Their interaction denotes trend direction, and the cloud color changes depending on whether Span A is above or below Span B, indicating bullish or bearish market conditions, respectively.
Lagging Span (Chikou Span): It is the current closing price plotted 26 periods behind, assisting in confirming the trend direction and potential momentum.
Advantage of an Oscillator:
Utilizing the oscillator format allows traders to interpret market dynamics more efficiently by visualizing the momentum and trend strength in a bounded range, enabling quick assessments of overbought or oversold conditions. Creating this oscillator provides multiple advantageous; particularly in sideway markets, helping to identify potential reversal points and offering insights on market entries and exits. When building this oscillator we've put a focus on unique interpretations such as overbought and sold areas and divergences; otherwise not found in traditional Ichimoku techniques. It is important to note these divergences are naturally not 100% real time.
When the oscillator turns green; the market is in an uptrend, red for downtrend and yellow for a transitioning market. The center line and the inner most cloud represent a balanced market state.
Key Features & Input Parameters:
Signal Source: Allows the selection of the price data source for signal generation, such as closing prices, and it’s the foundational parameter upon which the oscillator functions.
Normalization Settings: Users can select the normalization mode (“All”, “Window”, or “Disabled”), influencing how the oscillator scales its values. When enabled, it will scale from 100 to -100, allowing the user to understand better the relative positioning of price data.
Smoothing: This indicator offers advanced smoothing features, with options for additional smoothing, allowing traders to adjust the signal's sensitivity to price movements.
Kumo & Chikou Visibility: Traders can customize the visibility settings of Kumo and Chikou, tailoring the display of each component to their preference, enabling a cleaner and more intuitive view of market conditions.
Color Coding: Each component and condition, like bullish or bearish states, can be color-coded, providing visual cues to enhance the interpretability of market trends and states.
Color on Conversion: The oscillator provides an option to color the signal based on the crossover of the conversion and base lines.
Divergence: The oscillator can detect and highlight regular and hidden bullish and bearish divergences between the signal and price, aiding traders in identifying potential trend reversals or continuations.
Alerts:
The list of inbuilt alerts are provided below:
Inside Cloud: The signal line is inside the cloud.
Up Out of Cloud: The signal line crossed above the cloud.
Down Out of Cloud: The signal line crossed below the cloud.
Future Kumo Cross Bullish: The future Kumo lines have crossed in a bullish manner.
Future Kumo Cross Bearish: The future Kumo lines have crossed in a bearish manner.
Current Kumo Cross Bullish: The current Kumo lines have crossed in a bullish manner.
Current Kumo Cross Bearish: The current Kumo lines have crossed in a bearish manner.
Conversion Base Bullish: The conversion line crossed above the base line.
Conversion Base Bearish: The conversion line crossed below the base line.
Signal Bullish on Conversion Base: The signal line crossed above the maximum of conversion and base lines.
Signal Bearish on Conversion Base: The signal line crossed below the minimum of conversion and base lines.
Chikou Bullish: The Chikou line crossed above zero.
Chikou Bearish: The Chikou line crossed below zero.
Signal Over Max: The signal line crossed above the max level.
Signal Over High: The signal line crossed above the high level.
Signal Under Min: The signal line crossed below the min level.
Signal Under Low: The signal line crossed below the low level.
Chikou Over Max: The Chikou line crossed above the max level.
Chikou Over High: The Chikou line crossed above the high level.
Chikou Under Min: The Chikou line crossed below the min level.
Chikou Under Low: The Chikou line crossed below the low level.
Signal Crossover MA: The signal line crossed over the moving average.
Signal Crossunder MA: The signal line crossed under the moving average.
Regular Bullish Divergence: Regular bullish divergence detected.
Hidden Bullish Divergence: Hidden bullish divergence detected.
Regular Bearish Divergence: Regular bearish divergence detected.
Hidden Bearish Divergence: Hidden bearish divergence detected.
Bounce off of Kumo Up: Bullish Bounce off of Kumo.
Bounce off of Kumo Down: Bearish Bounce off of Kumo.
By providing a cohesive visualization of the Ichimoku elements and market momentum within a bounded range, this oscillator is a unique tool and insight into markets.
RVI_HTFThe "RVI_HTF" indicator is a tool designed to assist traders in analyzing market trends using the Relative Vigor Index (RVI) across different timeframes. It enables users to customize various aspects of the indicator's appearance and behavior. By monitoring the RVI on different timeframes, tracking its relationship with the moving average, and paying attention to extreme arrows above the 80 or below the 20 line, traders can anticipate potential reversals, trends, or changes in market momentum.
Above 80 Line: When the RVI moves above the 80 line, it suggests that the market may be overbought. Extreme upward arrows (indicating potential sell signals) can be a sign that a bullish trend might be reaching an exhaustion point. Traders may anticipate a possible trend reversal or pullback.
Below 20 Line: When the RVI dips below the 20 line, it implies that the market might be oversold. Extreme downward arrows (indicating potential buy signals) can be an early signal of a potential bullish reversal. Traders may anticipate an upcoming uptrend or bounce.
Crossing Above Moving Average: When the RVI crosses above its moving average on the selected timeframe, it can serve as an early indication of potential bullish strength in the market. This suggests that buying pressure may be increasing.
Crossing Below Moving Average: Conversely, when the RVI crosses below its moving average, it can signal potential bearish momentum. This indicates that selling pressure may be gaining strength.
Variables:
Timeframe (TF) Selection:
The indicator allows you to select the timeframe for the RVI calculation. You can choose from various options such as 1 minute (1), 5 minutes (5), 15 minutes (15), 30 minutes (30), 60 minutes (60), 240 minutes (240), Daily (D), Weekly (W), Monthly (M), or use "Auto" to automatically select a higher timeframe based on your current chart's timeframe.
Moving Average Type (MA_Type):
Function: Allows users to select the type of moving average used in RVI calculations.
Options: You can select from various moving average types, including:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
SMMA (Smoothed Moving Average, also known as RMA)
WMA (Weighted Moving Average)
VWMA (Volume Weighted Moving Average)
DEMA (Double Exponential Moving Average)
Moving Average Length (MA_Length):
Function: Permits users to set the number of periods for the selected moving average type.
Purpose: Controls the sensitivity of the RVI indicator. Longer lengths provide smoother results, while shorter lengths react more quickly to price changes.
Up Arrow Color (upArrowColor):
Function: Enables users to customize the color of arrows that indicate potential Overbought areas. (Only shown when the TF is same as or lower than the chart TF)
Down Arrow Color (downArrowColor):
Function: Allows users to specify the color of downward-pointing arrows signaling potential Oversold areas. (Only shown when the TF is same as or lower than the chart TF)
RVI Up Color (firstColor):
Function: Defines the color of the RVI line when it indicates a bullish condition on the higher timeframe.
RVI Down Color (secondColor):
Function: Specifies the color of the RVI line when it suggests a bearish condition on the higher timeframe.
RVI-Based Moving Average Up Color (firstColorMA):
Function: Customizes the color of the RVI-based moving average line when it indicates a bullish condition.
RVI-Based Moving Average Down Color (secondColorMA):
Function: Defines the color of the RVI-based moving average line when it suggests a bearish condition.
[blackcat] L3 CCI-RSI ComboCCI-RSI Combo indicator is a combination indicator that includes CCI and RSI. It uses some parameters to calculate the values of CCI and RSI, and generates corresponding charts based on these values. On the chart, when CCI exceeds 100 or falls below -100, yellow or magenta filling areas are displayed. Additionally, gradient colors are used on the RSI chart to represent different value ranges. Based on the values of CCI and RSI, buying or selling signals can be identified and "B" or "S" labels are displayed at the corresponding positions. It utilizes some technical indicators and logic to generate buying and selling signals, and displays the corresponding labels on the chart.
Here are the main parts of the code:
1. Definition of some variables:
- `N`, `M`, `N1`: Parameters used to calculate CCI and RSI.
- `xcn(cond, len)` and `xex(cond, len)`: Two functions used to calculate the number of times a condition is met.
2. Calculation of CCI (Commodity Channel Index):
- Calculate the CCI value based on the formula `(TYP - ta.sma(TYP, M)) / (0.015 * ta.stdev(TYP, M))`.
- Use the `plot()` function to plot CCI on the chart and set the color based on its value.
3. Calculation of RSI (Relative Strength Index):
- First calculate RSI1 by taking the average of positive differences between closing prices and the average of all absolute differences, and then multiplying by 100.
- Then use the ALMA function to transform RSI1 into a smoother curve.
- Use the `plot()` function to plot RSI on the chart and select gradient colors for shading based on its value.
4. Setting up the gradient color array:
- Create a color array using `array.new_color()` and add a series of color values to it.
5. Generating buying and selling signals based on conditions:
- Use logical operators and technical indicator functions to determine the conditions for buying and selling.
- Use the `label.new()` function to draw the corresponding labels on the chart to represent buying or selling signals.
MADALGO`s Enhanced OBV DivergencesDescription:
MADALGO's Enhanced OBV Divergences indicator is a unique tool designed for traders to visualize the divergences between price action and On Balance Volume (OBV), a fundamental aspect often indicative of underlying strength or weakness in the market. By keenly identifying these divergences, traders are better positioned to anticipate potential trend reversals or trend continuations, making this script an invaluable addition to their technical analysis toolkit.
This script meticulously scans for both regular and hidden bullish/bearish divergences, providing a comprehensive view of market sentiment. The core of this indicator is built around the OBV, which cumulatively adds or subtracts volume based on the price movement per period, thus providing a running total of volume and portraying the force behind the price movements.
The regular divergences are classic indicators of a potential reversal in the current trend, while hidden divergences are often indicative of trend continuation. These divergences are pinpointed based on the relative positions of the OBV and price highs/lows, over customizable lookback periods and within specified lookback ranges.
Features:
Regular and Hidden Divergences: Clearly marked bullish and bearish divergences provide insights into potential market turning points.
On Balance Volume (OBV) Line: Visualize the continuous flow of buying and selling pressure, enabling the identification of accumulation or distribution phases essential for understanding the market's strength or weakness.
Moving Average of OBV: An optional feature to smooth the OBV line, aiding in the identification of the overarching trend.
Dynamic Statistics Label: A floating label provides real-time updates on essential statistics like the Rate of Percentage Change (RPC) of OBV, the last divergences, and bars since the last divergences.
Inputs:
Pivot Lookback Right and Pivot Lookback Left: Define the lookback periods for identifying pivot points in the OBV line.
Max of Lookback Range and Min of Lookback Range: Define the range for considering divergences.
RPC Period: Defines the period for calculating the Rate of Percentage Change of the OBV.
MA Period: Defines the period for the optional moving average of the OBV.
Plot Bullish, Plot Hidden Bullish, Plot Bearish, Plot Hidden Bearish: Toggle visibility of respective divergences.
Plot Moving Average: Toggle visibility of the OBV moving average.
Usage:
Add the script to your TradingView chart.
Tailor the input parameters in the settings panel to align with your analysis requirements.
The divergences, OBV line, and optional moving average will be plotted on your chart, with a dynamic label displaying real-time statistics.
Set up alerts to be notified of identified divergences, enabling timely decision-making.
Alerts:
Regular bullish/bearish divergence in OBV found: Triggered when a regular bullish or bearish divergence is identified.
Hidden bullish/bearish divergence in OBV found: Triggered when a hidden bullish or bearish divergence is identified.
Underlying Concepts:
The OBV Divergences indicator is rooted in the principle that volume precedes price movement. When prices are rising with increased volume, it suggests that buying pressure is prevailing and may lead to continued upward momentum. Conversely, rising prices with decreasing volume might indicate a lack of buying conviction and could signal a potential price reversal. The identification of divergences between price and OBV can therefore serve as a powerful signal for traders. These examples can be seen below in the image
The Moving Average of the OBV further aids in understanding the prevailing trend by smoothing out the OBV line, providing a clearer picture of the market's longer-term momentum. The Rate of Percentage Change (RPC) provides insight into the momentum of volume, offering an additional layer of analysis. Together, these additional features enhance the core OBV analysis, enabling a more nuanced understanding of volume dynamics fundamental for making more informed trading decisions.
License:
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at Mozilla Public License 2.0.
PCA-Risk IndicatorOBJECTIVE:
The objective of this indicator is to synthesize, via PCA (Principal Component Analysis), several of the most used indicators with in order to simplify the reading of any asset on any timeframe.
It is based on my Bitcoin Risk Long Term indicator, and is the evolution of another indicator that I have not published 'Average Risk Indicator'.
The idea of this indicator is to use statistics, in this case the PCA, to reduce the number of dimensions (indicator) to aggregate them in some synthetic indicators (PCX)
I invite you to dig deeper into the PCA, but that is to try to keep as much information as possible from the raw data. The signal minus the noise.
I realized this indicator a year ago, but I publish it now because I do not see the interest to keep it private.
USAGE:
Unlike the Bitcoin Risk Long Term indicator, it does not make sense to change or disable the input indicators unless you use the 'Average Indicator' function. Because each input is weighted to generate the outputs, the PCX.
I extracted several courses (Bitcoin, Gold, S&P, CAC40) on several timeframes (W, D, 4h, 1h) of Trading view and use the Excel generated for the data on which I played the PCA analysis.
The results:
explained_variance_ratio: 0.55540809 / 0.13021972 / 0.07303142 / 0.03760925
explained_variance: 11.6639671 / 2.73470717 / 1.53371209 / 0.7898212
Interpretation:
Simply put, 55% of the information contained in each indicator can be represented with PC1, +13% with PC2, +7% with PC3, +3% with PC4.
What is important to understand is that PC1, which serves as a thermometer in a way, gives a simple indication of over-buying or over-selling area better than any other indicator.
PC2, difficult to interpret, is more reactive because precedes PC1, but can give false signals.
PC3 and PC4 do not seem relevant to me.
The way I use it is to take PC1 for Risk indicator, and display PC2 with 'Area'. When PC2 turns around and PC1 arrives on extremes, it can be good points to act.
NOTES :
- It is surprising that a simple average of all the indicators gives a fairly relevant result
- With Average indicator as Risk indicator, you can combine the indicators of your choice and see the predictive power with the staining of bars.
- You can add alerts on the levels of your choice on the Risk Indicator
- If you have any idea of adding an indicator, modification, criticism, bug found: share them, it’s appreciated!
---- FR ----
OBJECTIF :
L'objectif de cet indicateur est de synthétiser, via l'ACP (Analyse en Composantes Principales), plusieurs indicateurs parmi les plus utilisés avec afin de simplifier la lecture de n'importe quel actif sur n'importe quel timeframe.
Il est inspiré de mon indicateur 'Bitcoin Risk Long Term indicator', et est l'évolution d'un autre indicateur que je n'ai pas publié 'Average Risk Indicator'.
L'idée de cet indicateur est d'utiliser les statistiques, en l'occurence l'ACP, pour réduire le nombre de dimensions (indicateur) pour les agréger dans quelques indicateurs synthétiques (PCX)
Je vous invite à creuser l'ACP, mais c'est chercher à conserver un maximum d'informations à partir de la donnée brute. Le signal moins le bruit.
J'ai réalisé cet indicateur il y a un an, mais je le publie maintenant car je ne vois pas l'intérêt de le garder privé.
UTILISATION :
Contrairement à 'Bitcoin Risk Long Term indicator', il ne fait pas sens de modifier ou désactiver les indicateurs inputs, sauf si vous utiliser la fonction 'Average Indicator'. Car chaque input est pondéré pour générer les outputs, les PCX.
J'ai extrait plusieurs cours (Bitcoin, Gold, S&P, CAC40) sur plusieurs timeframes (W, D, 4h, 1h) de Trading view et utiliser les Excel généré pour la data sur laquelle j'ai joué l'analyse ACP.
Les résultats :
explained_variance_ratio : 0.55540809 / 0.13021972 / 0.07303142 / 0.03760925
explained_variance : 11.6639671 / 2.73470717 / 1.53371209 / 0.7898212
Interprétation :
Pour faire simple, 55% de l'information contenu dans chaque indicateur peut être représenté avec PC1, +13% avec PC2, +7% avec PC3, +3% avec PC4.
Ce qui faut y comprendre c'est que le PC1, qui sert de thermomètre en quelque sorte, donne une indication simple de zone de sur-achat ou sur-vente mieux que n'importe quel autre indicateur.
PC2, difficile à interpréter, est plus réactif car précède PC1, mais peut donner des faux signaux.
PC3 et PC4 ne me semble pas pertinent.
La manière dont je m'en sert c'est de prendre PC1 pour Risk indicator, et d'afficher PC2 avec 'Region'. Lorsque PC2 se retourne et que PC1 arrive sur des extrêmes, cela peut être des bons points pour agir.
NOTES :
- Il est étonnant de constater qu'une simple moyenne de tous les indicateurs donne un résultat assez pertinent
- Avec Average indicator comme Risk indicator, vous pouvez combiner les indicateurs de vos choix et voir la force prédictive avec la coloration des bars.
- Vous pouvez ajouter des alertes sur les niveaux de votre choix sur le Risk Indicator
- Si vous avez la moindre idée d'ajout d'indicateur, modification, critique, bug trouvé : partagez-les, c'est apprécié !
Triple Ehlers Market StateClear trend identification is an important aspect of finding the right side to trade, another is getting the best buying/selling price on a pullback, retracement or reversal. Triple Ehlers Market State can do both.
Three is always better
Ehlers’ original formulation produces bullish, bearish and trendless signals. The indicator presented here gate stages three correlation cycles of adjustable lengths and degree thresholds, displaying a more refined view of bullish, bearish and trendless markets, in a compact and novel way.
Stick with the default settings, or experiment with the cycle period and threshold angle of each cycle, then choose whether ‘Recent trend weighting’ is included in candle colouring.
John Ehlers is a highly respected trading maths head who may need no introduction here. His idea for Market State was published in TASC June 2020 Traders Tips. The awesome interpretation of Ehlers’ work on which Triple Ehlers Market State’s correlation cycle calculations are based can be found at:
DISCLAIMER: None of this is financial advice.
Crypto Spot/Futures Dominance Indicator with AlertsFutures/Spot Dominance Indicator:
Overview:
The futures/spot dominance indicator is a versatile tool used by traders and analysts to assess the relative strength or dominance of the futures market in relation to the spot (or cash) market for a specific asset. It offers insights into market sentiment, potential arbitrage opportunities, and risk management while incorporating the VWAP indicator for added context.
How It Works:
This indicator automatically detects and adapts to the futures symbol applied to the chart, simplifying the setup for traders. However, it still necessitates manual input of the corresponding spot pair to ensure accuracy.
Automatic Futures Symbol Detection: The indicator starts by automatically detecting the futures symbol on the trading chart, eliminating the need for manual configuration. This ensures that the indicator is applied to the correct futures contract.
Manual Spot Pair Entry: To provide a reliable reference point for the comparison, traders must manually input the corresponding spot symbol via the indicator's inputs. For instance, if the indicator detects the BTCUSDT.P futures symbol, traders would manually enter the BTCUSDT spot symbol.
Gathering Data: The indicator collects historical price data for both the detected futures contract and the manually specified spot symbol. This data includes open, high, low, and close prices, as well as trading volume.
VWAP Calculation: To gain a deeper understanding of price trends and market dynamics, the indicator calculates the VWAP (Volume Weighted Average Price) for both the futures and spot markets. The VWAP places more weight on prices with higher trading volume, offering a weighted average that reflects market consensus.
Premium/Discount Calculation: By subtracting the VWAP of the spot market from the VWAP of the futures market, the indicator quantifies the premium or discount of the futures price concerning the spot price. A positive value indicates a premium, while a negative value suggests a discount.
Plotting: The premium/discount value is displayed as a line on the chart, often alongside moving averages or other smoothing techniques for improved trend analysis.
Alerts: In addition to its analysis capabilities, this indicator now includes alerts to enhance your trading experience. It alerts you in the following scenarios:
Premium Above Average: Notifies you when the premium crosses above the average line.
Premium Below Average: Alerts you when the premium crosses below the average line.
Premium Above Zero: Provides an alert when the premium crosses above the zero line.
Premium Below Zero: Generates an alert when the premium crosses below the zero line.
Benefits of the Futures/Spot Dominance Indicator:
Sentiment Analysis: Traders use the indicator to assess market sentiment. A futures premium might signify bullish sentiment, while a discount could indicate bearish sentiment.
Arbitrage Opportunities: Identifying price discrepancies between futures and spot markets can help traders spot arbitrage opportunities, where they can profit from price differentials.
Risk Management: The indicator assists in evaluating risks associated with futures positions, helping traders manage their exposure effectively.
Trend Confirmation: When used in conjunction with other technical indicators, futures/spot dominance, along with VWAP, can provide additional confirmation of price trends.
Hedging: Investors and corporations use this tool to gauge the effectiveness of hedging strategies based on futures contracts.
Speculative Trading: Traders and investors use the indicator to inform speculative positions, aligning their trades with perceived market strength or weakness.
Insightful Analysis: Futures/spot dominance analysis, enriched by VWAP data, offers insights into market behavior during specific events or changes in economic conditions.
In summary, the futures/spot dominance indicator, with its integration of VWAP and automatic futures symbol detection, provides traders and investors with a comprehensive tool to assess market dynamics. It aids in sentiment analysis, risk management, and trend confirmation while offering potential arbitrage opportunities. The newly added alerts enhance the indicator's functionality, providing timely notifications of key market events. However, it relies on manual input of the corresponding spot pair to ensure precise comparisons between futures and spot markets. It should be used alongside other analysis techniques for a well-rounded view of the market.
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
Auto Fibo on IndicatorsThis drawing tool aims to draw auto Fibonacci Retracement Levels on desired indicators.
Users can define the target indicator to draw Auto Fibo Lines, from the "settings tab":
There are six commonly used indicators below the charts that can be selected to draw Fibonacci Retracement lines on:
RSI : Relative Strength Index
CCI : Commodity Channel Index
MFI : Money Flow Index
STOCHASTIC : Stochastic Oscillator
CMF : Chaikin Money Flow
CMO : Chande Momentum Oscillator
Fibonacci Retracement Levels will appear automatically after applying the indicator.
The "Auto Fibo on Indicators" tool looks back. It checks the indicator levels for a desired number of bars and then draws the Fibonacci Levels automatically in the right way, considering the final movements of the indicator.
There are five commonly used Fibonacci Levels added between the Highest and Lowest values such as:
%23.6
%38.2
%50 (Not precisely a Fibonacci Level, indeed)
%61.8 (Golden Ratio)
%78.6
Four extra levels can be added from the settings tab by checking their boxes:
%127.2 (adjustable level)
%161.8
%261.8
%361.8
Default lookback bars of Auto Fibo Levels: 144 (which is also a Fibonacci number)
Default Indicator: RSI
Default Indicator length: 14
Default data source: CLOSE
Users can also define and show overbought and oversold levels by unchecking the "Do not Show Indicator Overbought / Oversold Levels?" button from the settings menu.
In technical analysis, Fibonacci Levels on price can guide valuable trading signals for investors.
Levels can be significant support and resistance levels for breakouts and turning points.
This drawing tool aims to follow those necessary levels on indicators to observe critical levels and breakouts.
MACD AreaThis indicator calculates and displays the cumulative area for each region above and below the zero line in the MACD histogram. This area measurement serves as a momentum metric, where larger cumulative areas indicate stronger momentum. Divergences between the area and price can also potentially indicate an impending reversal. For example, when the stock price makes a higher high but the area makes a lower high, the current momentum may be unsustainable.
Double MACD Pattern 1.0This script is designed to assist traders in identifying potential trading signals and trends based on the MACD indicator. Users can adjust the input parameters to fine-tune the indicator to their trading preferences. When specific conditions are met, alerts are generated to notify the user of potential trading opportunities.
Indicator Description:
The script defines a custom indicator that calculates and plots two sets of Moving Average Convergence Divergence (MACD) lines along with their signal lines.
It allows users to configure various parameters for MACD calculation, such as fast and slow lengths for both MACD 1 and MACD 2, as well as signal lengths for both.
Plotting:
The script plots the MACD lines and signal lines for both MACD 1 and MACD 2 on the chart with different colors and line styles.
It also plots a middle line at zero for reference.
Alerts:
The script defines conditions for generating alerts based on MACD crossover and crossunder events for both MACD 1 and MACD 2.
Alerts are generated for the following scenarios:
A long signal is generated when MACD 1 crosses under its signal line while MACD 2 crosses over its signal line.
A short signal is generated when MACD 1 crosses over its signal line while MACD 2 crosses under its signal line.
An up trend signal is generated when MACD 2 crosses over MACD 1.
A down trend signal is generated when MACD 1 crosses over MACD 2.
Alerts are included in the script to notify users of these specific trading signals.
Please note that this script is meant for educational purposes and should be used cautiously in a real trading environment. It's important to have a thorough understanding of technical analysis and risk management when using such indicators in actual trading.
Weighted Oscillator Convergence DivergenceThe Weighted Oscillator Convergence Divergence (WOCD) aims to help traders identify potential trend reversals or momentum shifts in financial markets by calculating and visualizing the difference between a smoothed oscillator (WMA) value and its exponential moving average (EMA) and simple moving average (SMA) counterparts. This indicator is particularly useful for traders who want an alternative perspective on price momentum and divergence.
Key Features:
Inputs:
Length: The user can specify the number of bars to consider for calculations (default is 9).
Smoothing 1: Defines the smoothing factor for the first smoothed value (default is 5).
Smoothing 2: Specifies the smoothing factor for the second smoothed value (default is 7).
Ma Type: There are three types of moving averages you can choose (Wilder, non-lag, Weighted is by default).
Color Settings: Users can customize the indicator's colors for various elements, such as length, smoothing values, and different sections of the histogram.
Calculation:
WOCD calculates the raw oscillator value by subtracting the close price from a 3-period High, Low, Close (HLC3) moving average.
It then applies smoothing to this raw oscillator value using two different methods: exponential moving average (EMA) and simple moving average (SMA) with user-defined smoothing periods.
Histogram Plot:
The indicator plots a histogram based on the difference between the smoothed oscillator and the first smoothed value.
When the histogram is above zero and rising, it is colored according to the "Above Grow" color setting. When it's above zero and falling, it uses the "Fall" color for visualization.
Similarly, when the histogram is below zero and rising, it is colored according to the "Below Grow" color setting, and when it's below zero and falling, it uses the "Fall" color.
Oscillator and Smoothed Values:
The indicator also plots the smoothed oscillator, smoothed value 1 (EMA-based), and smoothed value 2 (SMA-based) on the chart.
Zero Line:
A horizontal line at zero is drawn on the chart for reference.
How to Use the WOCD Indicator:
Trend Identification: Observe the histogram's direction and color. A rising histogram above zero may indicate bullish momentum, while a falling histogram below zero could signal bearish momentum.
Divergence: Look for divergences between price action and the histogram. When the histogram and price move in opposite directions, it can be a potential reversal signal.
Crossovers: Pay attention to crossovers between the smoothed oscillator and its smoothed counterparts (EMA and SMA). These crossovers can indicate changes in trend strength or direction.
Zero Line: The zero line can act as a reference point. Positive histogram values suggest bullish sentiment, while negative values indicate bearish sentiment.
Comparison to MACD Indicator:
The WOCD indicator shares some similarities with the Moving Average Convergence Divergence (MACD) indicator but also has distinct differences:
Similarities:
Both WOCD and MACD are momentum oscillators designed to identify potential trend reversals and divergences.
They use moving averages (EMA in the case of MACD) to smooth the raw oscillator values.
Both indicators provide histogram representations of the difference between the oscillator and its smoothed counterpart.
Differences:
WOCD uses a 3-period High, Low, Close (HLC3) moving average to calculate the raw oscillator value, whereas MACD uses the difference between two exponential moving averages (usually 12-period and 26-period EMAs).
The smoothing in WOCD employs both EMA and SMA, while MACD exclusively uses EMA.
WOCD allows users to customize colors for various elements, enhancing visual clarity.
Momentum ChannelbandsThe "Momentum Channelbands" is indicator that measures and displays an asset's momentum. It includes options to calculate Bollinger Bands and Donchian Channels around the momentum. Users can customize settings for a comprehensive view of momentum-related insights. This tool helps assess trend strength, identify overbought/oversold conditions, and pinpoint highs/lows. It should be used alongside other indicators due to potential lag and false signals.
TASC 2023.10 COT Commercials Indicator█ OVERVIEW
This script implements the COT Commercials Indicator introduced by Alfred François Tagher in an article featured in TASC's October 2023 edition of Traders' Tips . The indicator is designed for use in futures markets and represents a fast stochastic (%K) calculated based on the commercial open interest values of an asset derived from the weekly Commitments Of Traders (COT) report .
█ CONCEPTS
The COT report, issued by the Commodity Futures Trading Commission (CFTC) , presents a breakdown of reportable open interest positions held by various trader groups—commercial, noncommercial, and nonreportable (small traders). Open interest reflects the total number of derivative contracts entered by market participants but not yet settled. Consequently, it can serve as a measure of market activity and liquidity.
The indicator showcased here aims to analyze changes in the reported net values of open interest for commercial traders/hedgers (often referred to as 'smart money', as they deal directly in underlying commodities). The net values are positive when the commercial traders have more long positions than short ones and negative when they hold more short positions than long ones. Positive net values indicate that commercial traders hold more long positions than short ones, while negative values indicate the opposite. Thus, overbought and oversold conditions of the COT Commercials Indicator potentially suggest collective bullish and bearish sentiments, respectively.
█ CALCULATIONS
The calculations involve these steps:
1. Net open interest values are extracted from COT data using the LibraryCOT library provided by TradingView.
2. A fast stochastic indicator (%K) is then applied to normalize these net values.
The script also provides an option of calculating and plotting the indicator curve for noncommercial (speculators) open interest.
Alxuse MACD for tutorialAll abilities of MACD, moreover :
Drawing upper band and lower band & the ability to change values, change colors, turn on/off show.
Crossing MACD line and SIGNAL line in multi timeframe & there are symbols (Circles) with green color (Buy) and red color (Sell) & the ability to change colors, turn on/off show.
Crossing MACD line and SIGNAL line in multi timeframe according to the values of upper band and lower band & there are symbols (Triangles) with green color (Long) and red color (Short) & the ability to change colors, turn on/off show.
The ability used in the alert section and create customized alerts.
To receive valid alerts the replay section , the timeframe of the chart must be the same as the timeframe of the indicator.
MACD (Moving Average Convergence/Divergence)
Definition
MACD is an extremely popular indicator used in technical analysis. MACD can be used to identify aspects of a security's overall trend. Most notably these aspects are momentum, as well as trend direction and duration. What makes MACD so informative is that it is actually the combination of two different types of indicators. First, MACD employs two Moving Averages of varying lengths (which are lagging indicators) to identify trend direction and duration. Then, MACD takes the difference in values between those two Moving Averages (MACD Line) and an EMA of those Moving Averages (Signal Line) and plots that difference between the two lines as a histogram which oscillates above and below a center Zero Line. The histogram is used as a good indication of a security's momentum.
MACD Line is a result of taking a longer term EMA and subtracting it from a shorter term EMA.The most commonly used values are 26 days for the longer term EMA and 12 days for the shorter term EMA, but it is the trader's choice.
The Signal Line.
The Signal Line is an EMA of the MACD Line described in Component 1. The trader can choose what period length EMA to use for the Signal Line however 9 is the most common.
The MACD Histogram.
As time advances, the difference between the MACD Line and Signal Line will continually differ. The MACD histogram takes that difference and plots it into an easily readable histogram. The difference between the two lines oscillates around a Zero Line.
A general interpretation of MACD is that when MACD is positive and the histogram value is increasing, then upside momentum is increasing. When MACD is negative and the histogram value is decreasing, then downside momentum is increasing.
What to look for
The MACD indicator is typically good for identifying three types of basic signals; Signal Line Crossovers, Zero Line Crossovers, and Divergence.
SIGNAL LINE CROSSOVERS
A Signal Line Crossover is the most common signal produced by the MACD. First one must consider that the Signal Line is essentially an indicator of an indicator. The Signal Line is calculating the Moving Average of the MACD Line. Therefore the Signal Line lags behind the MACD line. That being said, on the occasions where the MACD Line crosses above or below the Signal Line, that can signify a potentially strong move.
The strength of the move is what determines the duration of Signal Line Crossover. Understanding and being able to analyze move strength, as well as being able to recognize false signals, is a skill that comes with experience.
The first type of Signal Line Crossover to examine is the Bullish Signal Line Crossover. Bullish Signal Line Crossovers occur when the MACD Line crosses above the Signal Line.
The second type of Signal Line Crossover to examine is the Bearish Signal Line Crossover. Bearish Signal Line Crossovers occur when the MACD Line crosses below the Signal Line.
Zero line crossovers
Zero Line Crossovers have a very similar premise to Signal Line Crossovers. Instead of crossing the Signal Line, Zero Line Crossovers occur when the MACD Line crossed the Zero Line and either becomes positive (above 0) or negative (below 0).
The first type of Zero Line Crossover to examine is the Bullish Zero Line Crossover. Bullish Zero Line Crossovers occur when the MACD Line crosses above the Zero Line and go from negative to positive.
The second type of Zero Line Crossover to examine is the Bearish Zero Line Crossover. Bearish Zero Line Crossovers occur when the MACD Line crosses below the Zero Line and go from positive to negative.
Divergence
Divergence is another signal created by the MACD. Simply put, divergence is when the MACD and actual price are not in agreement.
For example, Bullish Divergence occurs when price records a lower low, but the MACD records a higher low. The movement of price can provide evidence of the current trend, however changes in momentum as evidenced by the MACD can sometimes precede a significant reversal.
Bearish Divergence is, of course, the opposite. Bearish Divergence occurs when price records a higher high while the MACD records a lower high.
Summary
What makes the MACD such a valuable tool for technical analysis is that it is almost like two indicators in one. It can help to identify not just trends, but it can measure momentum as well. It takes two separate lagging indicators and adds the aspect of momentum which is much more active or predictive That kind of versatility is why it has been and is used by trader's and analysts across the entire spectrum of finance.
Despite MACD's obvious attributes, just like with any indicator, the trader or analyst needs to exercise caution. There are just some things that MACD doesn't do well which may tempt a trader regardless. Most notably, traders may be tempted into using MACD as a way to find overbought or oversold conditions. This is not a good idea. Remember, MACD is not bound to a range, so what is considered to be highly positive or negative for one instrument may not translate well to a different instrument.
With sufficient time and experience, almost anybody who wants to analyze chart data should be able to make good use out of the MACD.
The added features to the indicator are made for training, it is advisable to use it with caution in tradings.
Rolling VWAP OscillatorTL;DR - TradingView's Rolling VWAP as centered oscillator
I really like TradingView's rolling VWAP (Rolling Volume-Weighted Average Price - RVWAP) indicator. But I also like clean charts that's why I'm mainly using indicators which are not displayed on the chart. Instead of simply moving the RVWAP to another pane I turned it into a centered oscillator. This allows me checking the RVWAP while having my chart clean.
You can find the oroginal RVWAP here .
Creds to TradingView for creating this indicator 👍
* I also added a fourth deviation band, gradient colors and the option to switch between candles and lines.
Math NeuronThis open source script uses the mathematical rules of a classic two-input neuron with two weights and one bias(x * w1 + y*w2 + b).
The two inputs are the rsi (length 14) of close and volume, The result that we try to anticipate is the development of a pivot high or a pivot low (high or low candle are the max or min of the previous n° )
The activation function is sigmoid(binary results).