Amirreza_ahli v2Amirrezaahli-v2
This indicator is designed for technical analysis, providing buy and sell signals based on multiple confirmations from various well-known indicators. The indicator generates a signal only when at least 7 confirmations from 10 different indicators are met, ensuring higher reliability.
Features:
• Utilizes EMA, MACD, RSI, Stochastic Oscillator, SAR, CCI, Keltner Channels, and Volume to generate signals.
• Includes Divergence Detection for multiple indicators like RSI, MACD, Stochastic, and CCI, enhancing the quality of signals.
• Green Rocket symbols for buy signals and Red Rocket symbols for sell signals, with the number of confirmations displayed on the rockets.
• Alerts for buy and sell signals are available on TradingView, providing notifications whenever a signal is triggered.
• Separate buy and sell confirmations are set for each condition, and a signal is generated only when the minimum number of confirmations is met.
How to Use:
1. This indicator analyzes signals based on 10 different indicators by default.
2. A buy signal is triggered when at least 7 confirmations from the 10 indicators are met, and it is displayed on the chart as a green rocket.
3. A sell signal is triggered when at least 7 confirmations from the 10 indicators are met, and it is displayed on the chart as a red rocket.
4. Alerts for buy and sell signals are preset, so you can receive notifications as soon as a signal is generated.
Note:
This indicator can be used as a supplemental tool for decision-making in trading. However, it is recommended to test the indicator in demo markets before using it for live trading.
or.
Statistics
Heikin Ashi inside candle breakout signal
Heikin Ashi Inside Candle Breakout Signal
This custom Pine Script indicator displays Heikin Ashi candles alongside breakout signals based on inside bars. Inside bars occur when the current candle's high is lower than the previous candle's high, and the current candle's low is higher than the previous candle's low. These inside bars indicate a consolidation period, often followed by a strong breakout in either direction.
Key Features:
Heikin Ashi Candles: The indicator plots Heikin Ashi candles, which are calculated using the open, high, low, and close values of the regular candlesticks, providing a smoothed representation of price action.
Green Candles: Indicate bullish price action (when the Heikin Ashi close is higher than the open).
Red Candles: Indicate bearish price action (when the Heikin Ashi close is lower than the open).
Inside Bar Condition: Identifies when a candle's high is lower than the previous high, and its low is higher than the previous low. This signifies a consolidation pattern that might be followed by a breakout.
Breakout Signals:
Buy Signal: Triggered when the price breaks above the previous high after an inside bar.
Sell Signal: Triggered when the price breaks below the previous low after an inside bar.
Background Color: The chart background color is shaded to indicate the presence of inside bars, making it easy to spot consolidation zones.
How to Use:
Buy Signal: A breakout above the previous high is a potential buy signal.
Sell Signal: A breakout below the previous low is a potential sell signal.
This indicator is ideal for traders looking to capture breakouts after periods of consolidation. It can be used for both short-term and long-term trading strategies.
Combined DCA StrategyThis script compares two investment strategies:
Fixed DCA Strategy: Invests a fixed amount monthly, regardless of market conditions.
Dynamic DCA Strategy: Invests only when a price drop (event) meets defined thresholds (daily, weekly, or monthly).
Parameters:
Start Date: When investments begin.
Monthly Budget: Amount allocated for dynamic investments.
Drop Thresholds: % price drops to trigger dynamic investments.
Fixed Investment: Monthly fixed amount.
Results:
Dynamic Strategy: Total invested and portfolio value when investing during events.
Fixed Strategy: Total invested and portfolio value with regular monthly investments.
Perfect for comparing reactive (event-based) and systematic (fixed) investment strategies.
Market Correlation AnalysisMarket Correlation Analysis is an indicator that measures the correlation of any two instruments.
To express price changes in a way that is comparable, this indicator uses a percentage of the ATR as a unit.
User Inputs:
Other Symbol - the symbol which we want to compare with the symbol of the main chart.
ATR for Price Movement Normalisation - I recommend high values to get the ATR more stable across time - if the ATR drastically changes, the indicator will register that as a price movement, because the unit in which price movements are measured itself changed by a lot. However, with higher values the ATR is stable and, in my opinion, more reliable than simply a percentage change of the current price.
Correlation Length - this is the number of bars for which the correlation coefficient will be calculated.
About The Indicator:
Market Correlation Analysis expresses the price changes of both instruments in question on the same histogram.
By default, the price changes that represent the instrument of the main chart are expressed with thinner bars of stronger colour, while the price changes that represent the other instrument are expressed with much thicker bars, which are of more pale colour.
The correlation coefficient is not expressed on the histogram, as it has a different scale. Therefore, it is only showed as a number.
I hope this indicator can make it easier to understand just how much two instruments have been similar to one another over a certain period of time. The possibility to see the correlation for any given time frame can give information that very specific to any trading style.
RSI CAPITAL CRYPTO//@version=5
indicator("RSI with Arrows", overlay=true)
// Configuração do RSI
rsiLength = 14
rsiSource = close
rsiValue = ta.rsi(rsiSource, rsiLength)
// Condições para as setas
arrowDown = rsiValue > 85
arrowUp = rsiValue < 20
// Plotando setas no gráfico
plotshape(arrowDown, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, text="↓")
plotshape(arrowUp, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, text="↑")
// Plotando o RSI
hline(80, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
plot(rsiValue, "RSI", color=color.blue)
Market Correlation AnalysisMarket Correlation Analysis is an indicator that measures the correlation of any two instruments.
To express price changes in a way that is comparable, this indicator uses a percentage of the ATR as a unit.
User Inputs:
Other Symbol - the symbol which we want to compare with the symbol of the main chart.
ATR for Price Movement Normalisation - I recommend high values to get the ATR more stable across time - if the ATR drastically changes, the indicator will register that as a price movement, because the unit in which price movements are measured itself changed by a lot. However, with higher values the ATR is stable and, in my opinion, more reliable than simply a percentage change of the current price.
Correlation Length - this is the number of bars for which the correlation coefficient will be calculated.
About The Indicator:
Market Correlation Analysis expresses the price changes of both instruments in question on the same histogram.
By default, the price changes that represent the instrument of the main chart are expressed with thinner bars of stronger colour, while the price changes that represent the other instrument are expressed with much thicker bars, which are of more pale colour.
The correlation coefficient is not expressed on the histogram, as it has a different scale. Therefore, it is only showed as a number.
I hope this indicator can make it easier to understand just how much two instruments have been similar to one another over a certain period of time. The possibility to see the correlation for any given time frame can give information that very specific to any trading style.
Enhanced Price Z-Score OscillatorThe Enhanced Price Z-Score Oscillator by tkarolak is a powerful tool that transforms raw price data into an easy-to-understand statistical visualization using Z-Score-derived candlesticks. Simply put, it shows how far prices stray from their average in terms of standard deviations (Z-Scores), helping traders identify when prices are unusually high (overbought) or unusually low (oversold).
The indicator’s default feature displays Z-Score Candlesticks, where each candle reflects the statistical “distance” of the open, high, low, and close prices from their average. This creates a visual map of market extremes and potential reversal points. For added flexibility, you can also switch to Z-Score line plots based on either Close prices or OHLC4 averages.
With clear threshold lines (±2σ and ±3σ) marking moderate and extreme price deviations, and color-coded zones to highlight overbought and oversold areas, the oscillator simplifies complex statistical concepts into actionable trading insights.
Temporary Help Services Jobs - Trend Allocation StrategyThis strategy is designed to capitalize on the economic trends represented by the Temporary Help Services (TEMPHELPS) index, which is published by the Federal Reserve Economic Data (FRED). Temporary Help Services Jobs are often regarded as a leading indicator of labor market conditions, as changes in temporary employment levels frequently precede broader employment trends.
Methodology:
Data Source: The strategy uses the FRED dataset TEMPHELPS for monthly data on temporary help services.
Trend Definition:
Uptrend: When the current month's value is greater than the previous month's value.
Downtrend: When the current month's value is less than the previous month's value.
Entry Condition: A long position is opened when an uptrend is detected, provided no position is currently held.
Exit Condition: The long position is closed when a downtrend is detected.
Scientific Basis:
The TEMPHELPS index serves as a leading economic indicator, as noted in studies analyzing labor market cyclicality (e.g., Katz & Krueger, 1999). Temporary employment is often considered a proxy for broader economic conditions, particularly in predicting recessions or recoveries. Incorporating this index into trading strategies allows for aligning trades with potential macroeconomic shifts, as suggested by research on employment trends and market performance (Autor, 2001; Valetta & Bengali, 2013).
Usage:
This strategy is best suited for long-term investors or macroeconomic trend followers who wish to leverage labor market signals for equity or futures trading. It operates exclusively on end-of-month data, ensuring minimal transaction costs and noise.
Option Time ValueThis TradingView script calculates and visualizes the time value of an option (Call or Put) based on its market price and intrinsic value. The time value represents the premium paid for the option above its intrinsic value, and it is a key metric for analyzing the cost of holding an option.
This script is suitable for traders analyzing options on indices or stocks, such as the NIFTY 50, and supports both Call and Put options. By dynamically extracting the strike price and option type from the input symbol, it adapts seamlessly to the selected instrument.
Key Features:
Dynamic Instrument Selection:
Users can input the underlying asset (e.g., NSE:NIFTY) and the specific option instrument (e.g., NSE:NIFTY250327C24000 for a Call or NSE:NIFTY250327P24000 for a Put).
Automatic Option Type Detection:
The script detects whether the option is a Call or a Put by parsing the input symbol for the characters "C" (Call) or "P" (Put).
Dynamic Strike Price Extraction:
The strike price is dynamically extracted from the input option symbol, eliminating the need for hardcoding and reducing user errors.
Key Metrics Plotted:
Time Value: The premium paid above the intrinsic value, plotted in blue.
Intrinsic Value: The calculated intrinsic value of the option, plotted in green.
Seamless Integration:
Designed for ease of use and integration into existing TradingView setups.
Automatically adjusts to the timeframe and pricing data of the selected instruments.
McClellan A-D Volume Integration ModelThe strategy integrates the McClellan A-D Oscillator with an adjustment based on the Advance/Decline (A-D) volume data. The McClellan Oscillator is calculated by taking the difference between the short-term and long-term exponential moving averages (EMAs) of the A-D line. This strategy introduces an enhancement where the A-D volume (the difference between the advancing and declining volume) is factored in to adjust the oscillator value.
Inputs:
• ema_short_length: The length for the short-term EMA of the A-D line.
• ema_long_length: The length for the long-term EMA of the A-D line.
• osc_threshold_long: The threshold below which the oscillator must drop for an entry signal to trigger.
• exit_periods: The number of periods after which the position is closed.
• Data Sources:
• ad_advance and ad_decline are the data sources for advancing and declining issues, respectively.
• vol_advance and vol_decline are the volume data for the advancing and declining issues. If volume data is unavailable, it defaults to na (Not Available), and the fallback logic ensures that the strategy continues to function.
McClellan Oscillator with Volume Adjustment:
• The A-D line is calculated by subtracting the declining issues from the advancing issues. Then, the volume difference is applied to this line, creating a “weighted” A-D line.
• The short and long EMAs are calculated for the weighted A-D line to generate the McClellan Oscillator.
Entry Condition:
• The strategy looks for a reversal signal, where the oscillator falls below the threshold and then rises above it again. The condition is designed to trigger a long position when this reversal happens.
Exit Condition:
• The position is closed after a set number of periods (exit_periods) have passed since the entry.
Plotting:
• The McClellan Oscillator and the threshold are plotted on the chart for visual reference.
• Entry and exit signals are highlighted with background colors to make the signals more visible.
Scientific Background:
The McClellan A-D Oscillator is a popular market breadth indicator developed by Sherman and Marian McClellan. It is used to gauge the underlying strength of a market by analyzing the difference between the number of advancing and declining stocks. The oscillator is typically calculated using exponential moving averages (EMAs) of the A-D line, with the idea being that crossovers of these EMAs indicate potential changes in the market’s direction.
The integration of A-D volume into this model adds another layer of analysis, as volume is often considered a leading indicator of price movement. By factoring in volume, the strategy becomes more sensitive to not just the number of advancing or declining stocks but also how significant those movements are based on trading volume, as discussed in Schwager, J. D. (1999). Technical Analysis of the Financial Markets. This enhanced version aims to capture stronger and more sustainable trends in the market, helping to filter out false signals.
Additionally, volume analysis is often used to confirm price movements, as described in Wyckoff, R. (1931). The Day Trading System. Therefore, incorporating the volume of advancing and declining stocks in the McClellan Oscillator offers a more robust signal for trading decisions.
Z-Strike RecoveryThis strategy utilizes the Z-Score of daily changes in the VIX (Volatility Index) to identify moments of extreme market panic and initiate long entries. Scientific research highlights that extreme volatility levels often signal oversold markets, providing opportunities for mean-reversion strategies.
How the Strategy Works
Calculation of Daily VIX Changes:
The difference between today’s and yesterday’s VIX closing prices is calculated.
Z-Score Calculation:
The Z-Score quantifies how far the current change deviates from the mean (average), expressed in standard deviations:
Z-Score=(Daily VIX Change)−MeanStandard Deviation
Z-Score=Standard Deviation(Daily VIX Change)−Mean
The mean and standard deviation are computed over a rolling period of 16 days (default).
Entry Condition:
A long entry is triggered when the Z-Score exceeds a threshold of 1.3 (adjustable).
A high positive Z-Score indicates a strong overreaction in the market (panic).
Exit Condition:
The position is closed after 10 periods (days), regardless of market behavior.
Visualizations:
The Z-Score is plotted to make extreme values visible.
Horizontal threshold lines mark entry signals.
Bars with entry signals are highlighted with a blue background.
This strategy is particularly suitable for mean-reverting markets, such as the S&P 500.
Scientific Background
Volatility and Market Behavior:
Studies like Whaley (2000) demonstrate that the VIX, known as the "fear gauge," is highly correlated with market panic phases. A spike in the VIX is often interpreted as an oversold signal due to excessive hedging by investors.
Source: Whaley, R. E. (2000). The investor fear gauge. Journal of Portfolio Management, 26(3), 12-17.
Z-Score in Financial Strategies:
The Z-Score is a proven method for detecting statistical outliers and is widely used in mean-reversion strategies.
Source: Chan, E. (2009). Quantitative Trading. Wiley Finance.
Mean-Reversion Approach:
The strategy builds on the mean-reversion principle, which assumes that extreme market movements tend to revert to the mean over time.
Source: Jegadeesh, N., & Titman, S. (1993). Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. Journal of Finance, 48(1), 65-91.
MA Deviation Suite [InvestorUnknown]This indicator combines advanced moving average techniques with multiple deviation metrics to offer traders a versatile tool for analyzing market trends and volatility.
Moving Average Types :
SMA, EMA, HMA, DEMA, FRAMA, VWMA: Standard moving averages with different characteristics for smoothing price data.
Corrective MA: This method corrects the MA by considering the variance, providing a more responsive average to price changes.
f_cma(float src, simple int length) =>
ma = ta.sma(src, length)
v1 = ta.variance(src, length)
v2 = math.pow(nz(ma , ma) - ma, 2)
v3 = v1 == 0 or v2 == 0 ? 1 : v2 / (v1 + v2)
var tolerance = math.pow(10, -5)
float err = 1
// Gain Factor
float kPrev = 1
float k = 1
for i = 0 to 5000 by 1
if err > tolerance
k := v3 * kPrev * (2 - kPrev)
err := kPrev - k
kPrev := k
kPrev
ma := nz(ma , src) + k * (ma - nz(ma , src))
Fisher Least Squares MA: Aims to reduce lag by using a Fisher Transform on residuals.
f_flsma(float src, simple int len) =>
ma = src
e = ta.sma(math.abs(src - nz(ma )), len)
z = ta.sma(src - nz(ma , src), len) / e
r = (math.exp(2 * z) - 1) / (math.exp(2 * z) + 1)
a = (bar_index - ta.sma(bar_index, len)) / ta.stdev(bar_index, len) * r
ma := ta.sma(src, len) + a * ta.stdev(src, len)
Sine-Weighted MA & Cosine-Weighted MA: These give more weight to middle bars, creating a smoother curve; Cosine weights are shifted for a different focus.
Deviation Metrics :
Average Absolute Deviation (AAD) and Median Absolute Deviation (MAD): AAD calculates the average of absolute deviations from the MA, offering a measure of volatility. MAD uses the median, which can be less sensitive to outliers.
Standard Deviation (StDev): Measures the dispersion of prices from the mean.
Average True Range (ATR): Reflects market volatility by considering the day's range.
Average Deviation (adev): The average of previous deviations.
// Calculate deviations
float aad = f_aad(src, dev_len, ma) * dev_mul
float mad = f_mad(src, dev_len, ma) * dev_mul
float stdev = ta.stdev(src, dev_len) * dev_mul
float atr = ta.atr(dev_len) * dev_mul
float avg_dev = math.avg(aad, mad, stdev, atr)
// Calculated Median with +dev and -dev
float aad_p = ma + aad
float aad_m = ma - aad
float mad_p = ma + mad
float mad_m = ma - mad
float stdev_p = ma + stdev
float stdev_m = ma - stdev
float atr_p = ma + atr
float atr_m = ma - atr
float adev_p = ma + avg_dev
float adev_m = ma - avg_dev
// upper and lower
float upper = f_max4(aad_p, mad_p, stdev_p, atr_p)
float upper2 = f_min4(aad_p, mad_p, stdev_p, atr_p)
float lower = f_min4(aad_m, mad_m, stdev_m, atr_m)
float lower2 = f_max4(aad_m, mad_m, stdev_m, atr_m)
Determining Trend
The indicator generates trend signals by assessing where price stands relative to these deviation-based lines. It assigns a trend score by summing individual signals from each deviation measure. For instance, if price crosses above the MAD-based upper line, it contributes a bullish point; crossing below an ATR-based lower line contributes a bearish point.
When the aggregated trend score crosses above zero, it suggests a shift towards a bullish environment; crossing below zero indicates a bearish bias.
// Define Trend scores
var int aad_t = 0
if ta.crossover(src, aad_p)
aad_t := 1
if ta.crossunder(src, aad_m)
aad_t := -1
var int mad_t = 0
if ta.crossover(src, mad_p)
mad_t := 1
if ta.crossunder(src, mad_m)
mad_t := -1
var int stdev_t = 0
if ta.crossover(src, stdev_p)
stdev_t := 1
if ta.crossunder(src, stdev_m)
stdev_t := -1
var int atr_t = 0
if ta.crossover(src, atr_p)
atr_t := 1
if ta.crossunder(src, atr_m)
atr_t := -1
var int adev_t = 0
if ta.crossover(src, adev_p)
adev_t := 1
if ta.crossunder(src, adev_m)
adev_t := -1
int upper_t = src > upper ? 3 : 0
int lower_t = src < lower ? 0 : -3
int upper2_t = src > upper2 ? 1 : 0
int lower2_t = src < lower2 ? 0 : -1
float trend = aad_t + mad_t + stdev_t + atr_t + adev_t + upper_t + lower_t + upper2_t + lower2_t
var float sig = 0
if ta.crossover(trend, 0)
sig := 1
else if ta.crossunder(trend, 0)
sig := -1
Backtesting and Performance Metrics
The code integrates with a backtesting library that allows traders to:
Evaluate the strategy historically
Compare the indicator’s signals with a simple buy-and-hold approach
Generate performance metrics (e.g., mean returns, Sharpe Ratio, Sortino Ratio) to assess historical effectiveness.
Practical Usage and Calibration
Default settings are not optimized: The given parameters serve as a starting point for demonstration. Users should adjust:
len: Affects how smooth and lagging the moving average is.
dev_len and dev_mul: Influence the sensitivity of the deviation measures. Larger multipliers widen the bands, potentially reducing false signals but introducing more lag. Smaller multipliers tighten the bands, producing quicker signals but potentially more whipsaws.
This flexibility allows the trader to tailor the indicator for various markets (stocks, forex, crypto) and time frames.
Disclaimer
No guaranteed results: Historical performance does not guarantee future outcomes. Market conditions can vary widely.
User responsibility: Traders should combine this indicator with other forms of analysis, appropriate risk management, and careful calibration of parameters.
Ultra Trade JournalThe Ultra Trade Journal is a powerful TradingView indicator designed to help traders meticulously document and analyze their trades. Whether you're a novice or an experienced trader, this tool offers a clear and organized way to visualize your trading strategy, monitor performance, and make informed decisions based on detailed trade metrics.
Detailed Description
The Ultra Trade Journal indicator allows users to input and visualize critical trade information directly on their TradingView charts.
.........
User Inputs
Traders can specify entry and exit prices , stop loss levels, and up to four take profit targets.
.....
Dynamic Plotting
Once the input values are set, the indicator automatically plots horizontal lines for entry, exit, stop loss, and each take profit level on the chart. These lines are visually distinct, using different colors and styles (solid, dashed, dotted) to represent each element clearly.
.....
Live Position Tracking
If enabled, the indicator can adjust the exit price in real-time based on the current market price, allowing traders to monitor live positions effectively.
.....
Tick Calculations
The script calculates the number of ticks between the entry price and each exit point (stop loss and take profits). This helps in understanding the movement required for each target and assessing the potential risk and reward.
.....
Risk-Reward Ratios
For each take profit level, the indicator computes the risk-reward (RR) ratio by comparing the ticks at each target against the stop loss ticks. This provides a quick view of the potential profitability versus the risk taken.
.....
Comprehensive Table Display
A customizable table is displayed on the chart, summarizing all key trade details. This includes the entry and exit prices, stop loss and take profit levels, tick counts, and their respective RR ratios.
Users can adjust the table's Position and text color to suit their preferences.
.....
Visual Enhancements
The indicator uses adjustable background shading between entry and stop loss/take profit lines to visually represent potential trade outcomes. This shading adjusts based on whether the trade is long or short, providing an intuitive understanding of trade performance.
.........
Overall, the Ultra Trade Journal combines visual clarity with detailed analytics, enabling traders to keep a well-organized record of their trades and enhance their trading strategies through insightful data.
HPDR Bands IndicatorThe HPDR Bands indicator is a customizable tool designed to help traders visualize dynamic price action zones. By combining historical price ranges with adaptive bands, this script provides clear insights into potential support, resistance, and midline levels. The indicator is well-suited for all trading styles, including trend-following and range-bound strategies.
Features:
Dynamic Price Bands: Calculates price zones based on historical highs and lows, blending long-term and short-term price data for responsive adaptation to current market conditions.
Probability Enhancements: Includes a probability plot derived from the relative position of the closing price within the range, adjusted for volatility to highlight potential price movement scenarios.
Fibonacci-Like Levels: Highlights key levels (100%, 95%, 88%, 78%, 61%, 50%, and 38%) for intuitive visualization of price zones, aiding in identifying high-probability trading opportunities.
Midline Visualization: Displays a midline that serves as a reference for price mean reversion or breakout analysis.
How to Use:
Trending Markets: Use the adaptive upper and lower bands to gauge potential breakout or retracement zones.
Range-Bound Markets: Identify support and resistance levels within the defined price range.
Volatility Analysis: Observe the probability plot and its sensitivity to volatility for informed decision-making.
Important Notes:
This script is not intended as investment advice. It is a tool to assist with market analysis and should be used alongside proper risk management and other trading tools.
The script is provided as-is and without warranty. Users are encouraged to backtest and validate its suitability for their specific trading needs.
Happy Trading!
If you find this script helpful, consider sharing your feedback or suggestions for improvement. Collaboration strengthens the TradingView community, and your input is always appreciated!
Bitcoin Premium [SAKANE]Overview
"Bitcoin Premium " is an indicator designed to analyze the price differences (premiums) of Bitcoin between major exchanges. By using this tool, you can visualize these differences and trends across exchanges, helping you make more informed trading decisions.
Features
1. Premium Calculation and Display
- Calculates and visualizes the price differences between major exchanges like Coinbase, Bitfinex, Upbit, and Binance.
- Premiums are displayed in a histogram format for intuitive analysis.
2. Forex Rate Adjustment
- Prices quoted in KRW (e.g., from Upbit) are converted to USD using real-time KRW/USD forex rates.
3. Moving Average Option
- Displays moving averages (SMA or EMA) of premiums for a clearer view of long-term trends.
4. Customizable Settings
- Toggle the premium display for each exchange on or off.
- Includes label displays to support visual analysis.
What Can It Do for You?
1. Identify Arbitrage Opportunities
By observing price differences (premiums) between exchanges, you can identify arbitrage opportunities.
Example: If Bitcoin is cheaper on Binance and more expensive on Coinbase, you could buy on Binance and sell on Coinbase to capture the price difference.
2. Understand Regional Supply and Demand Trends
Each exchange's premium reflects the supply and demand dynamics of its respective region.
Example: A high premium on Upbit may indicate excess demand or regulatory impacts in the South Korean market.
3. Analyze Liquidity
Price differences often highlight liquidity disparities between exchanges. Markets with lower trading volumes tend to have larger premiums due to price distortions.
4. Evaluate Macroeconomic Impacts
Premium movements may reflect changes in macroeconomic factors, such as exchange rates, regulations, or financial conditions specific to each region.
5. Analyze Trends and Market Sentiment
By tracking premium trends, you can gauge market sentiment and understand regional or exchange-specific behaviors to inform your investment decisions.
6. Support Strategic Trading
This tool is useful for short-term arbitrage strategies as well as long-term evaluations of market health.
Exchange Characteristics and Premium Implications
The meaning of premiums varies by exchange.
- Coinbase (US Market)
Primarily used by investors buying directly with fiat currency (USD). A higher premium often signals bullish sentiment among institutional and retail investors.
- Bitfinex (Global Market)
A trader-focused exchange with active large-scale and leveraged trading. Premiums may reflect liquidity and risk appetite.
- Upbit (South Korean Market)
Priced in KRW, making it subject to forex rates and local market dynamics. High premiums may indicate strong demand or regulatory influences in South Korea.
- Binance (Global Market)
The largest exchange by trading volume. Premiums here are often a reflection of the overall market balance.
Notes
- This indicator is for reference only and does not guarantee trading decisions.
- Please consider the characteristics and conditions of each exchange when using this tool.
VIX Spike StrategyThis script implements a trading strategy based on the Volatility Index (VIX) and its standard deviation. It aims to enter a long position when the VIX exceeds a certain number of standard deviations above its moving average, which is a signal of a volatility spike. The position is then exited after a set number of periods.
VIX Symbol (vix_symbol): The input allows the user to specify the symbol for the VIX index (typically "CBOE:VIX").
Standard Deviation Length (stddev_length): The number of periods used to calculate the standard deviation of the VIX. This can be adjusted by the user.
Standard Deviation Multiplier (stddev_multiple): This multiplier is used to determine how many standard deviations above the moving average the VIX must exceed to trigger a long entry.
Exit Periods (exit_periods): The user specifies how many periods after entering the position the strategy will exit the trade.
Strategy Logic:
Data Loading: The script loads the VIX data, both for the current timeframe and as a rescaled version for calculation purposes.
Standard Deviation Calculation: It calculates both the moving average (SMA) and the standard deviation of the VIX over the specified period (stddev_length).
Entry Condition: A long position is entered when the VIX exceeds the moving average by a specified multiple of its standard deviation (calculated as vix_mean + stddev_multiple * vix_stddev).
Exit Condition: After the position is entered, it will be closed after the user-defined number of periods (exit_periods).
Visualization:
The VIX is plotted in blue.
The moving average of the VIX is plotted in orange.
The threshold for the VIX, which is the moving average plus the standard deviation multiplier, is plotted in red.
The background turns green when the entry condition is met, providing a visual cue.
Sources:
The VIX is often used as a measure of market volatility, with high values indicating increased uncertainty in the market.
Standard deviation is a statistical measure of the variability or dispersion of a set of data points. In financial markets, it is used to measure the volatility of asset prices.
References:
Bollerslev, T. (1986). "Generalized Autoregressive Conditional Heteroskedasticity." Journal of Econometrics.
Black, F., & Scholes, M. (1973). "The Pricing of Options and Corporate Liabilities." Journal of Political Economy.
Enhanced Effort vs Result Analysis V.2How to Use in Trading
A. Confirm Breakouts
Check if the Effort-Result Ratio or Z-Score spikes above the Upper Band or Z > +2:
Suggests a strong, efficient price move.
Supports breakout continuation.
B. Identify Reversal or Exhaustion
Look for Effort-Result Ratio or Z-Score dropping below the Lower Band or Z < -2:
Indicates high effort but low price movement (inefficiency).
Often signals potential trend reversal or consolidation.
C. Assess Efficiency of Trends
Use Relative Efficiency Index (REI):
REI near 1 during a trend → Confirms strength (efficient movement).
REI near 0 → Weak or inefficient movement, likely signaling exhaustion.
D. Evaluate Volume-Price Relationship
Monitor the Volume-Price Correlation:
Positive correlation (+1): Confirms price is driven by volume.
Negative correlation (-1): Indicates divergence; price moves independently of volume (potential warning signal).
3. Example Scenarios
Scenario 1: Breakout Confirmation
Effort-Result Ratio spikes above the Upper Band.
Z-Score exceeds +2.
REI approaches 1.
Volume-Price Correlation is positive (near +1).
Action: Strong breakout confirmation → Trend continuation likely.
Scenario 2: Reversal or Exhaustion
Effort-Result Ratio drops below the Lower Band.
Z-Score is below -2.
REI approaches 0.
Volume-Price Correlation weakens or turns negative.
Action: Signals trend exhaustion → Watch for reversal or consolidation.
Scenario 3: Range-Bound Market
Effort-Result Ratio stays within the Bollinger Bands.
Z-Score remains between -1 and +1.
REI fluctuates around 0.5 (neutral efficiency).
Volume-Price Correlation hovers near 0.
Action: Normal conditions → Look for breakout signals before acting.
*IMPORTANT*
There is a problem with the overlay ... How to fix some of it
The Standard Deviation bands dont work while the other variable activated so Id suggest deselecting them. The fix for this is to make sure you have the background selected and by doing this it will highlight on the chart ( you may need to increase the opacity ) when the bands ( Second standard deviation) are touched.
- Also you can use them all at once if you can but you do not need to
Market Flow Volatility Oscillator (AiBitcoinTrend)The Market Flow Volatility Oscillator (AiBitcoinTrend) is a cutting-edge technical analysis tool designed to evaluate and classify market volatility regimes. By leveraging Gaussian filtering and clustering techniques, this indicator provides traders with clear insights into periods of high and low volatility, helping them adapt their strategies to evolving market conditions. Built for precision and clarity, it combines advanced mathematical models with intuitive visual feedback to identify trends and volatility shifts effectively.
👽 How the Indicator Works
👾 Volatility Classification with Gaussian Filtering
The indicator detects volatility levels by applying Gaussian filters to the price series. Gaussian filters smooth out noise while preserving significant price movements. Traders can adjust the smoothing levels using sigma parameters, enabling greater flexibility:
Low Sigma: Emphasizes short-term volatility.
High Sigma: Captures broader trends with reduced sensitivity to small fluctuations.
👾 Clustering Algorithm for Regime Detection
The core of this indicator is its clustering model, which classifies market conditions into two distinct regimes:
Low Volatility Regime: Calm periods with reduced market activity.
High Volatility Regime: Intense periods with heightened price movements.
The clustering process works as follows:
A rolling window of data is analyzed to calculate the standard deviation of price returns.
Two cluster centers are initialized using the 25th and 75th percentiles of the data distribution.
Each price volatility value is assigned to the nearest cluster based on its distance to the centers.
The cluster centers are refined iteratively, providing an accurate and adaptive classification.
👾 Oscillator Generation with Slope R-Values
The indicator computes Gaussian filter slopes to generate oscillators that visualize trends:
Oscillator Low: Captures low-frequency market behavior.
Oscillator High: Tracks high-frequency, faster-changing trends.
The slope is measured using the R-value of the linear regression fit, scaled and adjusted for easier interpretation.
👽 Applications
👾 Trend Trading
When the oscillator rises above 0.5, it signals potential bullish momentum, while dips below 0.5 suggest bearish sentiment.
👾 Pullback Detection
When the oscillator peaks, especially in overbought or oversold zones, provide early warnings of potential reversals.
👽 Indicator Settings
👾 Oscillator Settings
Sigma Low/High: Controls the smoothness of the oscillators.
Smaller Values: React faster to price changes but introduce more noise.
Larger Values: Provide smoother signals with longer-term insights.
👾 Window Size and Refit Interval
Window Size: Defines the rolling period for cluster and volatility calculations.
Shorter windows: adapt faster to market changes.
Longer windows: produce stable, reliable classifications.
Disclaimer: This information is for entertainment purposes only and does not constitute financial advice. Please consult with a qualified financial advisor before making any investment decisions.
Intrabar DistributionThe Intrabar Distribution publication is an extension of the Intrabar BoxPlot publication. Besides a boxplot, it showcases price and volume distribution using intrabar Lower Timeframe (LTF) values (close) which can be displayed on the chart or in a separate pane.
🔶 USAGE
Intrabar Distribution has several features, users can display:
Recent candle for comparison against the other features
Boxplot of recent candle
Price distribution (optionally displayed as a curve)
Volume distribution
🔹 Recent candle / Boxplot
The middle 50% intrabar close values (Interquartile range, or IQR) are shown as a box, where the upper limit is percentile 75 (p75), and the lower limit is percentile 25 (p25). The dashed lines show the addition/subtraction of 1.5*IQR. All values out of range are considered outliers. They are displayed as white dots within the IQR*1.5 range or white X's when beyond the IQR*3 range (extreme outliers).
By showing the middle 50% intrabar values through a box, we can more easily see where the intrabar activity is mainly situated.
Note in the example above an upward-directed candle with a negative volume delta, displayed as a red box and dot (see further).
As seen in the following example, compared against the recent candle (grey candle at the left), most of the intrabar activity lies just beneath the opening price.
Note that results will be more accurate when more data is available, which can be done by making the difference between the current timeframe and the intrabar timeframe large enough.
🔹 Price / Volume distribution
The price and volume distribution can be helpful for highlighting areas of interest.
Here, we can see two areas where intrabar closing prices are mainly positioned.
The following example shows three successive bars. The recent bar is displayed on the left side, together with the volume distribution. The boxplot and price distribution are displayed on the right.
You can see the difference between volume and price distribution.
At the first bar, most price activity is at the top, while most of the volume was generated at the bottom; in other words, the price got briefly in the bottom region, with high volume before it returned.
At the second bar, price and volume are relatively equally distributed, which fits for indecisiveness.
The third bar shows more volume at a higher region; most intrabar closing prices are above the closing price.
Following example shows the same with 'Curve shaped' enabled (Settings: 'Price Distribution')
When 'Curve shaped' is enabled, lines/labels are shown with the standard deviation distance.
A blue 'guide line' can be enabled for easier interpretation.
🔹 Volume Delta
When there is a discrepancy between the delta volume and direction of the candle, this will be displayed as follows:
Red candle: when the sum of the volume of green intrabars is higher than the sum of the volume of red intrabars, the 'mean dot' will be coloured green.
Green candle: when the sum of the volume of red intrabars is higher than the sum of the volume of green intrabars, the 'mean dot' will be coloured red.
🔶 DETAILS
The intrabar values are sorted and split in parts/sections. The number of values in each section is displayed as a white line
The same principle applies to volume distribution, where the sum of volume per section is displayed as an orange area.
The boxplot displays several price values
Last close price
Highest / lowest intrabar close price
Median
p25 / p75
🔹 LTF settings
When 'Auto' is enabled (Settings, LTF), the LTF will be the nearest possible x times smaller TF than the current TF. When 'Premium' is disabled, the minimum TF will always be 1 minute to ensure TradingView plans lower than Premium don't get an error.
Examples with current Daily TF (when Premium is enabled):
500 : 3 minute LTF
1500 (default): 1 minute LTF
5000: 30 seconds LTF (1 minute if Premium is disabled)
🔶 SETTINGS
Location: Chart / Pane (when pane is opted, move the indicator to a separate pane as well)
Parts: divides the intrabar close values into parts/sections
Offset: offsets every drawing at once
Width: width of drawings, only applicable on "location: chart"
Label size: size of price labels
🔹 LTF
LTF: LTF setting
Auto + multiple: Adjusts the initial set LTF
Premium: Enable when your TradingView plan is Premium or higher
🔹 Current Bar
Display toggle + color setting
Offset: offsets only the 'Current Bar' drawing
🔹 Intrabar Boxplot
Display toggle + Colors, dependable on different circumstances.
Up: Price goes up, with more bullish than bearish intrabar volume.
Up-: Price goes up, with more bearish than bullish intrabar volume.
Down: Price goes down, with more bearish than bullish intrabar volume.
Down+: Price goes down, with more bullish than bearish intrabar volume.
Offset: offsets only the 'Boxplot' drawing
🔹 Price distribution
Display toggle + Color.
Curve Shaped
Guide Lines: Display 2 blue lines
Display Price: Show price of 'x' standard deviation
Offset: offsets only the 'Price distribution' drawing
Label size: size of price labels (standard deviation)
🔹 Volume distribution
Display toggle + Color.
Offset: offsets only the 'Volume distribution' drawing
🔹 Table
Show TF: Show intrabar Timeframe.
Textcolor
Size Table: Text Size
Intrabar BoxPlotThe Intrabar BoxPlot publication highlights an uncommon technique by displaying statistical intrabar Lower Timeframe (LTF) values on the chart.
🔶 USAGE
🔹 Middle 50% Boxes
By showing the middle 50% intrabar values through a box, we can more easily see where the intrabar activity is mainly situated.
The middle 50% intrabar values are referred to from here on as Interquartile range (IQR).
In this example, the successive IQRs form a channel where the price eventually breaks out.
Disproportionately distributed values can give insights which can be used to find potential support/resistance areas.
IQR gaps can give valuable information as well. Potentially, the price can return to these gaps.
Seeing the IQR areas against regular candles gives an alternative image of the underlying price movements.
🔹 Highest volume Price level
The script displays the price level with the highest volume situated, dependable on the user's source setting. Setting the source at 'close' will only display intrabar close values; the same goes for high, low, ...
As seen in the above example, the volume levels can aid in finding support/resistance.
🔹 Median
The location of the median off all intrabar values is displayed as a coloured dot: green when the close price is higher than the opening price and red if otherwise. The median can give valuable insights into price movements.
🔹 Outliers
Medium (white dots) and extreme (white X) outliers, in combination with the IQR box, can help identify potential areas of interest.
🔹 Volume Delta
When there is a discrepancy between the delta volume and direction of the candle, this will be displayed as follows:
Green candle: when the sum of the volume of red intrabars is higher than the sum of the volume of green intrabars, the candle will be coloured orange.
Red candle: when the sum of the volume of green intrabars is higher than the sum of the volume of red intrabars, the candle will be coloured blue.
🔹 Highlight Boxplot only
Probably the easiest way to display boxplot only is by changing the Bar's style to Bars .
🔶 DETAILS
All intrabar values (Lower TimeFrame - LTF) are sorted and evaluated. Values can be close , high , low , ... by selecting this in Settings ( source ).
The middle 50% of all values are displayed as a box; this contains the values between percentile 25 (p25) and percentile 75 (p75). The value of percentile rank 75 means 75% of all values are lower. The value of percentile rank 25 means 25% of all values are lower, or 75% is higher.
The difference between p75 and p25 is also known as Interquartile range (IQR)
IQR is used to check for outliers.
Wiki: Boxplot , Interquartile range
Extreme high: maximum value, higher than p75 + IQR*3
Max outlier high: maximum value, higher than p75 + IQR*1.5 but lower than p75 + IQR*3
Max: maximum value, lower than p75 + IQR*1.5
Min: minimum value, higher than p25 - IQR*1.5
Min outlier low: minimum value, lower than p25 - IQR*1.5 but higher than p25 - IQR*3
Extreme low: minimum value, lower than p25 - IQR*3
Max and min must not be interpreted with the current candle high/low.
🔹 Example: Length of chart-puppets
The following example can make it easier to digest. Forty "chart-puppets" are sorted by their length.
The p25 value is 97
The p50 value is 120
The p75 value is 149
75% of all "chart-puppets" are smaller than p75, and 25% is larger than p75.
50% of all "chart-puppets" are smaller than p50, and 50% is larger than p50 (= median).
25% of all "chart-puppets" are smaller than p25, and 75% is larger than p25.
IQR = 149 - 97 = 52
Extreme outlier limit max: p75 + IQR*3 = 149 + 52*3 = 305
Mild outlier limit max: p75 + IQR*1.5 = 149 + 52*1.5 = 227
Mild outlier limit min: p25 - IQR*1.5 = 97 - 52*1.5 = 19
Extreme outlier limit min: p25 - IQR*3 = 97 - 52*3 = -59
In this example there are no outliers to be found, all values are located between p25 - IQR*1.5 (19) and p75 + IQR*1.5. (227)
🔹 Source settings
Note that results are dependable on the chosen source (settings). When, for example, close is chosen as the source, only intrabar close prices are included. This means a low or high can stretch further then the min or max.
Here we can see different results with different source settings
🔹 LTF settings
When 'Auto' is enabled (Settings, LTF), the LTF will be the nearest possible x times smaller TF than the current TF. When 'Premium' is disabled, the minimum TF will always be 1 minute to ensure TradingView plans lower than Premium don't get an error.
Examples with current Daily TF (when Premium is enabled):
500 : 3 minute LTF
1500 (default): 1 minute LTF
5000: 30 seconds LTF (1 minute if Premium is disabled)
🔶 SETTINGS
Source: Set source at close, high, low,...
🔹 LTF
LTF: LTF setting
Auto + multiple: Adjusts the initial set LTF
Premium: Enable when your TradingView plan is Premium or higher
🔹 Intrabar Delta : Colors, dependable on different circumstances.
Up: Price goes up, with more bullish than bearish intrabar volume.
Up-: Price goes up, with more bearish than bullish intrabar volume.
Down: Price goes down, with more bearish than bullish intrabar volume.
Down+: Price goes down, with more bullish than bearish intrabar volume.
🔹 Table
Show table: Show details at the top right corner
Show TF: Show LTF at the bottom right corner
Text color/table size
See DETAILS for more information
Future Interest Indexed by AssetEste script em Pine Script calcula e exibe o índice dos juros futuros (DI1) em relação ao preço de um ativo, utilizando o preço de fechamento do ativo e a taxa de juros futuros (DI1). O cálculo é realizado dividindo a taxa de juros pelos preços do ativo, resultando no índice indice_juros. Para evitar a divisão por zero, o script verifica se o preço do ativo é válido e não nulo. O índice calculado é então plotado em um painel inferior no gráfico, representado por uma linha azul, permitindo aos usuários observar a relação entre a taxa de juros futuros e o preço do ativo de forma clara e intuitiva.
This Pine Script script calculates and displays the future interest rate (DI1) in relation to the price of an asset, using the asset's closing price and the future interest rate (DI1). The calculation is carried out by dividing the interest rate by the asset prices, resulting in the index_interest index. To avoid division by zero, the script checks that the asset's price is valid and not null. The calculated index is then plotted in a lower panel on the chart, represented by a blue line, allowing users to observe the relationship between the future interest rate and the asset price clearly and intuitively.