Hybrid Adaptive Double Exponential Smoothing🙏🏻 This is HADES (Hybrid Adaptive Double Exponential Smoothing) : fully data-driven & adaptive exponential smoothing method, that gains all the necessary info directly from data in the most natural way and needs no subjective parameters & no optimizations. It gets applied to data itself -> to fit residuals & one-point forecast errors, all at O(1) algo complexity. I designed it for streaming high-frequency univariate time series data, such as medical sensor readings, orderbook data, tick charts, requests generated by a backend, etc.
The HADES method is:
fit & forecast = a + b * (1 / alpha + T - 1)
T = 0 provides in-sample fit for the current datum, and T + n provides forecast for n datapoints.
y = input time series
a = y, if no previous data exists
b = 0, if no previous data exists
otherwise:
a = alpha * y + (1 - alpha) * a
b = alpha * (a - a ) + (1 - alpha) * b
alpha = 1 / sqrt(len * 4)
len = min(ceil(exp(1 / sig)), available data)
sig = sqrt(Absolute net change in y / Sum of absolute changes in y)
For the start datapoint when both numerator and denominator are zeros, we define 0 / 0 = 1
...
The same set of operations gets applied to the data first, then to resulting fit absolute residuals to build prediction interval, and finally to absolute forecasting errors (from one-point ahead forecast) to build forecasting interval:
prediction interval = data fit +- resoduals fit * k
forecasting interval = data opf +- errors fit * k
where k = multiplier regulating intervals width, and opf = one-point forecasts calculated at each time t
...
How-to:
0) Apply to your data where it makes sense, eg. tick data;
1) Use power transform to compensate for multiplicative behavior in case it's there;
2) If you have complete data or only the data you need, like the full history of adjusted close prices: go to the next step; otherwise, guided by your goal & analysis, adjust the 'start index' setting so the calculations will start from this point;
3) Use prediction interval to detect significant deviations from the process core & make decisions according to your strategy;
4) Use one-point forecast for nowcasting;
5) Use forecasting intervals to ~ understand where the next datapoints will emerge, given the data-generating process will stay the same & lack structural breaks.
I advise k = 1 or 1.5 or 4 depending on your goal, but 1 is the most natural one.
...
Why exponential smoothing at all? Why the double one? Why adaptive? Why not Holt's method?
1) It's O(1) algo complexity & recursive nature allows it to be applied in an online fashion to high-frequency streaming data; otherwise, it makes more sense to use other methods;
2) Double exponential smoothing ensures we are taking trends into account; also, in order to model more complex time series patterns such as seasonality, we need detrended data, and this method can be used to do it;
3) The goal of adaptivity is to eliminate the window size question, in cases where it doesn't make sense to use cumulative moving typical value;
4) Holt's method creates a certain interaction between level and trend components, so its results lack symmetry and similarity with other non-recursive methods such as quantile regression or linear regression. Instead, I decided to base my work on the original double exponential smoothing method published by Rob Brown in 1956, here's the original source , it's really hard to find it online. This cool dude is considered the one who've dropped exponential smoothing to open access for the first time🤘🏻
R&D; log & explanations
If you wanna read this, you gotta know, you're taking a great responsability for this long journey, and it gonna be one hell of a trip hehe
Machine learning, apprentissage automatique, машинное обучение, digital signal processing, statistical learning, data mining, deep learning, etc., etc., etc.: all these are just artificial categories created by the local population of this wonderful world, but what really separates entities globally in the Universe is solution complexity / algorithmic complexity.
In order to get the game a lil better, it's gonna be useful to read the HTES script description first. Secondly, let me guide you through the whole R&D; process.
To discover (not to invent) the fundamental universal principle of what exponential smoothing really IS, it required the review of the whole concept, understanding that many things don't add up and don't make much sense in currently available mainstream info, and building it all from the beginning while avoiding these very basic logical & implementation flaws.
Given a complete time t, and yet, always growing time series population that can't be logically separated into subpopulations, the very first question is, 'What amount of data do we need to utilize at time t?'. Two answers: 1 and all. You can't really gain much info from 1 datum, so go for the second answer: we need the whole dataset.
So, given the sequential & incremental nature of time series, the very first and basic thing we can do on the whole dataset is to calculate a cumulative , such as cumulative moving mean or cumulative moving median.
Now we need to extend this logic to exponential smoothing, which doesn't use dataset length info directly, but all cool it can be done via a formula that quantifies the relationship between alpha (smoothing parameter) and length. The popular formulas used in mainstream are:
alpha = 1 / length
alpha = 2 / (length + 1)
The funny part starts when you realize that Cumulative Exponential Moving Averages with these 2 alpha formulas Exactly match Cumulative Moving Average and Cumulative (Linearly) Weighted Moving Average, and the same logic goes on:
alpha = 3 / (length + 1.5) , matches Cumulative Weighted Moving Average with quadratic weights, and
alpha = 4 / (length + 2) , matches Cumulative Weighted Moving Average with cubic weghts, and so on...
It all just cries in your shoulder that we need to discover another, native length->alpha formula that leverages the recursive nature of exponential smoothing, because otherwise, it doesn't make sense to use it at all, since the usual CMA and CMWA can be computed incrementally at O(1) algo complexity just as exponential smoothing.
From now on I will not mention 'cumulative' or 'linearly weighted / weighted' anymore, it's gonna be implied all the time unless stated otherwise.
What we can do is to approach the thing logically and model the response with a little help from synthetic data, a sine wave would suffice. Then we can think of relationships: Based on algo complexity from lower to higher, we have this sequence: exponential smoothing @ O(1) -> parametric statistics (mean) @ O(n) -> non-parametric statistics (50th percentile / median) @ O(n log n). Based on Initial response from slow to fast: mean -> median Based on convergence with the real expected value from slow to fast: mean (infinitely approaches it) -> median (gets it quite fast).
Based on these inputs, we need to discover such a length->alpha formula so the resulting fit will have the slowest initial response out of all 3, and have the slowest convergence with expected value out of all 3. In order to do it, we need to have some non-linear transformer in our formula (like a square root) and a couple of factors to modify the response the way we need. I ended up with this formula to meet all our requirements:
alpha = sqrt(1 / length * 2) / 2
which simplifies to:
alpha = 1 / sqrt(len * 8)
^^ as you can see on the screenshot; where the red line is median, the blue line is the mean, and the purple line is exponential smoothing with the formulas you've just seen, we've met all the requirements.
Now we just have to do the same procedure to discover the length->alpha formula but for double exponential smoothing, which models trends as well, not just level as in single exponential smoothing. For this comparison, we need to use linear regression and quantile regression instead of the mean and median.
Quantile regression requires a non-closed form solution to be solved that you can't really implement in Pine Script, but that's ok, so I made the tests using Python & sklearn:
paste.pics
^^ on this screenshot, you can see the same relationship as on the previous screenshot, but now between the responses of quantile regression & linear regression.
I followed the same logic as before for designing alpha for double exponential smoothing (also considered the initial overshoots, but that's a little detail), and ended up with this formula:
alpha = sqrt(1 / length) / 2
which simplifies to:
alpha = 1 / sqrt(len * 4)
Btw, given the pattern you see in the resulting formulas for single and double exponential smoothing, if you ever want to do triple (not Holt & Winters) exponential smoothing, you'll need len * 2 , and just len * 1 for quadruple exponential smoothing. I hope that based on this sequence, you see the hint that Maybe 4 rounds is enough.
Now since we've dealt with the length->alpha formula, we can deal with the adaptivity part.
Logically, it doesn't make sense to use a slower-than-O(1) method to generate input for an O(1) method, so it must be something universal and minimalistic: something that will help us measure consistency in our data, yet something far away from statistics and close enough to topology.
There's one perfect entity that can help us, this is fractal efficiency. The way I define fractal efficiency can be checked at the very beginning of the post, what matters is that I add a square root to the formula that is not typically added.
As explained in the description of my metric QSFS , one of the reasons for SQRT-transformed values of fractal efficiency applied in moving window mode is because they start to closely resemble normal distribution, yet with support of (0, 1). Data with this interesting property (normally distributed yet with finite support) can be modeled with the beta distribution.
Another reason is, in infinitely expanding window mode, fractal efficiency of every time series that exhibits randomness tends to infinitely approach zero, sqrt-transform kind of partially neutralizes this effect.
Yet another reason is, the square root might better reflect the dimensional inefficiency or degree of fractal complexity, since it could balance the influence of extreme deviations from the net paths.
And finally, fractals exhibit power-law scaling -> measures like length, area, or volume scale in a non-linear way. Adding a square root acknowledges this intrinsic property, while connecting our metric with the nature of fractals.
---
I suspect that, given analogies and connections with other topics in geometry, topology, fractals and most importantly positive test results of the metric, it might be that the sqrt transform is the fundamental part of fractal efficiency that should be applied by default.
Now the last part of the ballet is to convert our fractal efficiency to length value. The part about inverse proportionality is obvious: high fractal efficiency aka high consistency -> lower window size, to utilize only the last data that contain brand new information that seems to be highly reliable since we have consistency in the first place.
The non-obvious part is now we need to neutralize the side effect created by previous sqrt transform: our length values are too low, and exponentiation is the perfect candidate to fix it since translating fractal efficiency into window sizes requires something non-linear to reflect the fractal dynamics. More importantly, using exp() was the last piece that let the metric shine, any other transformations & formulas alike I've tried always had some weird results on certain data.
That exp() in the len formula was the last piece that made it all work both on synthetic and on real data.
^^ a standalone script calculating optimal dynamic window size
Omg, THAT took time to write. Comment and/or text me if you need
...
"Versace Pip-Boy, I'm a young gun coming up with no bankroll" 👻
∞
Indicators and strategies
Buy Low Sell High Composite Upgraded V6 [kristian6ncqq]NOTICE: This script is an upgraded and enhanced version of the original "Buy Low Sell High Composite" indicator by (published in 2017).
The original script provided a composite indicator combining multiple technical analysis metrics such as RSI, MACD, and MFI.
Why I Republished This Script
I found the original indicator to be exceptionally useful for identifying optimal accumulation zones for stocks or assets when prices are low (red area) and potential profit-taking zones when prices are high (green area).
To ensure it remains accessible and functional for modern trading strategies, I have updated and enhanced the original version with additional features and flexibility.
Intended Use
This indicator is designed for traders and investors looking to:
Accumulate stocks or assets when the price is in the low (red) zone.
Take profits or reduce positions when the price is in the high (green) zone.
The composite score provides a clear visualization of multiple technical indicators combined into a single actionable signal.
Enhancements in This Version
Updated to Pine Script v6 (from version 3).
Added input parameters for key settings (e.g., RSI length, MACD parameters, smoothing).
Introduced Chande Momentum Oscillator (CMO) and directional ADX for improved trend detection.
Implemented slope-based trend coloring for outer edges to highlight significant changes in trend direction.
Enhanced visualizations with customizable thresholds and smoothing for improved usability.
Credits
Original script: "Buy Low Sell High Composite" by , 2017.
URL to the original script: Buy Low Sell High Composite.
This script is designed to build upon the strengths of the original while adding flexibility and new features to meet the needs of modern traders.
MES Position Sizing EstimatorDescription and Use:
Here is an indicator which aims to help all Micro-ES futures traders who struggle with risk management! I created this indicator designed as a general guideline to help short term traders (designed for 1 minute candles) determine how many contracts to trade on the MES for their desired profit target.
To use the indicator, simply go to MES on the 1 minute timeframe, apply the indicator, and enter your Holding Period (how long you want to have your position open for), Value Per Tick
(usually 1.25 for MES since one point is $5) and your target PnL for the trade in the inputs tab.
It will then show in a table the recommended position sizing, as well as the estimated price change for your holding period. Additionally, there are two plotted lines also showing the position sizing and estimated price change historically.
How the indicator works
On the technical level, I made calculations for this indicator using Python. I downloaded 82 days of 1 minute OHLC data from TradingView, and then ran regression (log-transformed linear regression specifically) to calculate how the average price change in MES futures scales with the amount of time a position is held for, and then ran these regressions for every hour of the day. I then copied the equations from those regressions into Pinescript, and used the assumption that:
position size = target PnL / (estimated price change for time * tick value)
Therefore, Choosing the number of contracts to trade position sizing for Micro E-mini S&P 500 Futures (MES) based on time of day, holding period, and tick value. This tool leverages historical volatility patterns and log-transformed linear regression models to provide precise recommendations tailored to your trading strategy.
If you want to check out how the regression code worked in python, it is all open source and available on my Github repository for it .
Notes:
The script assumes a log-normal distribution of price movements and is intended as an educational tool to aid in risk management.
It is not a standalone trading system and should be used in conjunction with other trading strategies and risk assessments.
Past performance is not indicative of future results, and traders should exercise caution and adjust their strategies based on personal risk tolerance.
This script is open-source and available for use and modification by the TradingView community. It aims to provide a valuable resource for traders seeking to enhance their risk management practices through data-driven insights.
2-Year MA Multiplier [UAlgo]The 2-Year MA Multiplier is a technical analysis tool designed to assist traders and investors in identifying potential overbought and oversold conditions in the market. By plotting the 2-year moving average (MA) of an asset's closing price alongside an upper band set at five times this moving average, the indicator provides visual cues to assess long-term price trends and significant market movements.
🔶 Key Features
2-Year Moving Average (MA): Calculates the simple moving average of the asset's closing price over a 730-day period, representing approximately two years.
Visual Indicators: Plots the 2-year MA in forest green and the upper band in firebrick red for clear differentiation.
Fills the area between the 2-year MA and the upper band to highlight the normal trading range.
Uses color-coded fills to indicate overbought (tomato red) and oversold (cornflower blue) conditions based on the asset's closing price relative to the bands.
🔶 Idea
The concept behind the 2-Year MA Multiplier is rooted in the cyclical nature of markets, particularly in assets like Bitcoin. By analyzing long-term price movements, the indicator aims to identify periods of significant deviation from the norm, which may signal potential buying or selling opportunities.
2-year MA smooths out short-term volatility, providing a clearer view of the asset's long-term trend. This timeframe is substantial enough to capture major market cycles, making it a reliable baseline for analysis.
Multiplying the 2-year MA by five establishes an upper boundary that has historically correlated with market tops. When the asset's price exceeds this upper band, it may indicate overbought conditions, suggesting a potential for price correction. Conversely, when the price falls below the 2-year MA, it may signal oversold conditions, presenting potential buying opportunities.
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Donchian Trend Ribbon (Gradient)Donchian Trend Ribbon (Gradient) Indicator
The Donchian Trend Ribbon (Gradient) uses Donchian Channels to visualize trend direction, strength, and market phases. Columns with varying colors and intensity help traders quickly assess trends.
Key Components:
Green Columns (Bullish):
Appear when price is above the upper Donchian Channel boundary.
Bright green in the top zone (25-50): Strong bullish trend.
Darker green in the lower zone (0-25): Weak/moderate bullish trend.
A full-height bright green column indicates a very strong upward move.
Red Columns (Bearish):
Appear when price is below the lower Donchian Channel boundary.
Bright red in the top zone (25-50): Strong bearish trend.
Darker red in the lower zone (0-25): Weak/moderate bearish trend.
A full-height bright red column indicates a very strong downward move.
Black Columns (Neutral):
Indicate no trend or market consolidation.
Signal to wait for trend emergence.
Expanding Steps:
Steps expanding downward from the upper edge (50) suggest diminishing momentum.
Steps expanding upward from the lower edge (0) indicate growing trend strength.
Methods of Use:
Identify Trends: Green (buy) or red (sell) columns in the top zone (25-50) signal strong trends.
Assess Strength: Bright colors = strong trends, darker colors = weaker trends. Full-height bright columns indicate very strong moves.
Neutral Phases: Black columns suggest waiting for a trend.
Example Strategy:
Buy when green columns appear in the 25-50 range with bright intensity.
Sell when red columns appear in the 25-50 range with bright intensity.
Exit positions if columns turn black or darker-colored.
Historical High/Lows Statistical Analysis(More Timeframe interval options coming in the future)
Indicator Description
The Hourly and Weekly High/Low (H/L) Analysis indicator provides a powerful tool for tracking the most frequent high and low points during different periods, specifically on an hourly basis and a weekly basis, broken down by the days of the week (DOTW). This indicator is particularly useful for traders seeking to understand historical behavior and patterns of high/low occurrences across both hourly intervals and weekly days, helping them make more informed decisions based on historical data.
With its customizable options, this indicator is versatile and applicable to a variety of trading strategies, ranging from intraday to swing trading. It is designed to meet the needs of both novice and experienced traders.
Key Features
Hourly High/Low Analysis:
Tracks and displays the frequency of hourly high and low occurrences across a user-defined date range.
Enables traders to identify which hours of the day are historically more likely to set highs or lows, offering valuable insights into intraday price action.
Customizable options for:
Hourly session start and end times.
22-hour session support for futures traders.
Hourly label formatting (e.g., 12-hour or 24-hour format).
Table position, size, and design flexibility.
Weekly High/Low Analysis by Day of the Week (DOTW):
Captures weekly high and low occurrences for each day of the week.
Allows traders to evaluate which days are most likely to produce highs or lows during the week, providing insights into weekly price movement tendencies.
Displays the aggregated counts of highs and lows for each day in a clean, customizable table format.
Options for hiding specific days (e.g., weekends) and customizing table appearance.
User-Friendly Table Display:
Both hourly and weekly data are displayed in separate tables, ensuring clarity and non-interference.
Tables can be positioned on the chart according to user preferences and are designed to be visually appealing yet highly informative.
Customizable Date Range:
Users can specify a start and end date for the analysis, allowing them to focus on specific periods of interest.
Possible Uses
Intraday Traders (Hourly Analysis):
Analyze hourly price action to determine which hours are more likely to produce highs or lows.
Identify intraday trading opportunities during statistically significant time intervals.
Use hourly insights to time entries and exits more effectively.
Swing Traders (Weekly DOTW Analysis):
Evaluate weekly price patterns by identifying which days of the week are more likely to set highs or lows.
Plan trades around days that historically exhibit strong movements or price reversals.
Futures and Forex Traders:
Use the 22-hour session feature to exclude the CME break or other session-specific gaps from analysis.
Combine hourly and DOTW insights to optimize strategies for continuous markets.
Data-Driven Trading Strategies:
Use historical high/low data to test and refine trading strategies.
Quantify market tendencies and evaluate whether observed patterns align with your strategy's assumptions.
How the Indicator Works
Hourly H/L Analysis:
The indicator calculates the highest and lowest prices for each hour in the specified date range.
Each hourly high and low occurrence is recorded and aggregated into a table, with counts displayed for all 24 hours.
Users can toggle the visibility of empty cells (hours with no high/low occurrences) and adjust the table's design to suit their preferences.
Supports both 12-hour (AM/PM) and 24-hour formats.
Weekly H/L DOTW Analysis:
The indicator tracks the highest and lowest prices for each day of the week during the user-specified date range.
Highs and lows are identified for the entire week, and the specific days when they occur are recorded.
Counts for each day are aggregated and displayed in a table, with a "Totals" column summarizing the overall occurrences.
The analysis resets weekly, ensuring accurate tracking of high/low days.
Code Breakdown:
Data Aggregation:
The script uses arrays to store counts of high/low occurrences for both hourly and weekly intervals.
Daily data is fetched using the request.security() function, ensuring consistent results regardless of the chart's timeframe.
Weekly Reset Mechanism:
Weekly high/low values are reset at the start of a new week (Monday) to ensure accurate weekly tracking.
A processing flag ensures that weekly data is counted only once at the end of the week (Sunday).
Table Visualization:
Tables are created using the table.new() function, with customizable styles and positions.
Header rows, data rows, and totals are dynamically populated based on the aggregated data.
User Inputs:
Customization options include text colors, background colors, table positioning, label formatting, and date ranges.
Code Explanation
The script is structured into two main sections:
Hourly H/L Analysis:
This section captures and aggregates high/low occurrences for each hour of the day.
The logic is session-aware, allowing users to define custom session times (e.g., 22-hour futures sessions).
Data is displayed in a clean table format with hourly labels.
Weekly H/L DOTW Analysis:
This section tracks weekly highs and lows by day of the week.
Highs and lows are identified for each week, and counts are updated only once per week to prevent duplication.
A user-friendly table displays the counts for each day of the week, along with totals.
Both sections are completely independent of each other to avoid interference. This ensures that enabling or disabling one section does not impact the functionality of the other.
Customization Options
For Hourly Analysis:
Toggle hourly table visibility.
Choose session start and end times.
Select hourly label format (12-hour or 24-hour).
Customize table appearance (colors, position, text size).
For Weekly DOTW Analysis:
Toggle DOTW table visibility.
Choose which days to include (e.g., hide weekends).
Customize table appearance (colors, position, text size).
Select values format (percentages or occurrences).
Conclusion
The Hourly and Weekly H/L Analysis indicator is a versatile tool designed to empower traders with data-driven insights into intraday and weekly market tendencies. Its highly customizable design ensures compatibility with various trading styles and instruments, making it an essential addition to any trader's toolkit.
With its focus on accuracy, clarity, and customization, this indicator adheres to TradingView's guidelines, ensuring a robust and valuable user experience.
X4 Moving AverageThe X4 Moving Averages (X4MA) indicator is designed to provide traders with an enhanced view of market trends by combining multiple dimensions of price data. Unlike traditional moving averages that rely solely on closing prices, X4MA integrates high, low, open, and close values for a more nuanced analysis of market movements.
1- High-Low Average (HLAvg):
Captures the market's range during a given period:
HLAvg = (High + Low) / 2
2- Open-Close Average (OCAvg):
Reflects the directional momentum of the price during the same period:
OCAvg = (Open + Close) / 2
3- Combined Average (CMA):
Combines the range (HLAvg) and momentum (OCAvg) for a balanced view of price behavior:
CMA = (HLAvg + OCAvg) / 2
4- Exponential Moving Average (X4MA):
Smooths the combined average using an EMA for better responsiveness to recent price changes while filtering noise:
X4MA = EMA(CMA, Length)
20 Pips Candle Finder for XAUUSD20 Pips Candle Finder for XAUUSD
This custom Pine Script indicator is specifically designed for XAUUSD (Gold) price action analysis. It identifies and visually marks candles with a body size of 20 pips or more, which can be important for traders focusing on strong momentum or significant price movement.
Key Features:
Dynamic Detection:
The script dynamically identifies candles whose body size exceeds 20 pips.
Calculations are based on XAUUSD's pip size of 0.1.
Visual Markers:
Candles meeting the 20-pip threshold are labeled with a green marker above the candle for quick identification.
Background Highlighting:
The candles meeting the condition are also visually highlighted with a transparent green background, making them easier to spot on the chart.
Debugging Tools:
The indicator plots:
A blue line showing the size of the candle bodies over time for better visibility.
A red dotted horizontal line showing the 20-pip threshold for quick reference.
Ideal Use Case:
This indicator is particularly useful for:
Traders focusing on momentum-based strategies.
Spotting candles with significant price movement.
Assessing market volatility during key trading hours or events.
By visually spotting these candles, traders can identify entry and exit opportunities, support/resistance breakouts, or potential reversals.
Inputs & Customization:
Currently, the indicator is set for XAUUSD's standard pip value (0.1) but can be adjusted if you plan to use it on other symbols. You can fine-tune the 20 pips threshold or other parameters to align with your trading strategy.
CauchyTrend [InvestorUnknown]The CauchyTrend is an experimental tool that leverages a Cauchy-weighted moving average combined with a modified Supertrend calculation. This unique approach provides traders with insight into trend direction, while also offering an optional ATR-based range analysis to understand how often the market closes within, above, or below a defined volatility band.
Core Concepts
Cauchy Distribution and Gamma Parameter
The Cauchy distribution is a probability distribution known for its heavy tails and lack of a defined mean or variance. It is characterized by two parameters: a location parameter (x0, often 0 in our usage) and a scale parameter (γ, "gamma").
Gamma (γ): Determines the "width" or scale of the distribution. Smaller gamma values produce a distribution more concentrated near the center, giving more weight to recent data points, while larger gamma values spread the weight more evenly across the sample.
In this indicator, gamma influences how much emphasis is placed on values closer to the current price versus those further away in time. This makes the resulting weighted average either more reactive or smoother, depending on gamma’s value.
// Cauchy PDF formula used for weighting:
// f(x; γ) = (1/(π*γ)) *
f_cauchyPDF(offset, gamma) =>
numerator = gamma * gamma
denominator = (offset * offset) + (gamma * gamma)
pdf = (1 / (math.pi * gamma)) * (numerator / denominator)
pdf
A chart showing different Cauchy PDFs with various gamma values, illustrating how gamma affects the weight distribution.
Cauchy-Weighted Moving Average (CWMA)
Using the Cauchy PDF, we calculate normalized weights to create a custom Weighted Moving Average. Each bar in the lookback period receives a weight according to the Cauchy PDF. The result is a Cauchy Weighted Average (cwm_avg) that differs from typical moving averages, potentially offering unique sensitivity to price movements.
// Summation of weighted prices using Cauchy distribution weights
cwm_avg = 0.0
for i = 0 to length - 1
w_norm = array.get(weights, i) / sum_w
cwm_avg += array.get(values, i) * w_norm
Supertrend with a Cauchy Twist
The indicator integrates a modified Supertrend calculation using the cwm_avg as its reference point. The Supertrend logic typically sets upper and lower bands based on volatility (ATR), and flips direction when price crosses these bands.
In this case, the Cauchy-based average replaces the usual baseline, aiming to capture trend direction via a different weighting mechanism.
When price closes above the upper band, the trend is considered bullish; closing below the lower band signals a bearish trend.
ATR Stats Range (Optional)
Beyond the fundamental trend detection, the indicator optionally computes ATR-based stats to understand price distribution relative to a volatility corridor centered on the cwm_avg line:
Volatility Range:
Defined as cwm_avg ± (ATR * atr_mult), this range creates upper and lower bands. Turning on atr_stats computes how often the daily close falls: Within the range, Above the upper ATR boundary, Below the lower ATR boundary, Within the range but above cwm_avg, Within the range but below cwm_avg
These statistics can help traders gauge how the market behaves relative to this volatility envelope and possibly identify if the market tends to revert to the mean or break out more often.
Backtesting and Performance Metrics
The code is integrated with a backtesting library that allows users to assess strategy performance historically:
Equity Curve Calculation: Compares CauchyTrend-based signals against the underlying asset.
Performance Metrics Table: Once enabled, displays key metrics such as mean returns, Sharpe Ratio, Sortino Ratio, and more, comparing the strategy to a simple Buy & Hold approach.
Alerts and Notifications
The indicator provides Alerts for key events:
Long Alert: Triggered when the trend flips bullish.
Short Alert: Triggered when the trend flips bearish.
Customization and Calibration
Important: The default parameters are not optimized for any specific instrument or time frame. Traders should:
Adjust the length and gamma parameters to influence how sharply or broadly the cwm_avg reacts to price changes.
Tune the atr_len and atr_mult for the Supertrend logic to better match the asset’s volatility characteristics.
Experiment with atr_stats on/off to see if that additional volatility distribution information provides helpful insights.
Traders may find certain sets of parameters that align better with their preferred trading style, risk tolerance, or asset volatility profile.
Disclaimer: This indicator is for educational and informational purposes only. Past performance in backtesting does not guarantee future results. Always perform due diligence, and consider consulting a qualified financial advisor before trading.
Blue Sniper V.1Overview
This Pine Script indicator is designed to generate Buy and Sell signals based on proximity to the 50 EMA, stochastic oscillator levels, retracement conditions, and EMA slopes. It is tailored for trending market conditions, making it ideal for identifying high-probability entry points during strong bullish or bearish trends.
Key Features:
Filters out signals in non-trending conditions.
Focuses on retracements near the 50 EMA for precise entries.
Supports alert notifications for Buy and Sell signals.
Includes a cooldown mechanism to prevent signal spamming.
Allows time-based filtering to restrict signals to a specific trading window.
How It Works
Trending Market Conditions
The indicator is most effective when the market exhibits a clear trend. It uses two exponential moving averages (50 EMA and 200 EMA) to determine the overall market trend:
Bullish Trend: 50 EMA is above the 200 EMA, and both EMAs have upward slopes.
Bearish Trend: 50 EMA is below the 200 EMA, and both EMAs have downward slopes.
Buy and Sell Conditions
Buy Signal:
The market is in a bullish trend.
Stochastic oscillator is in the oversold zone.
Price retraces upwards, breaking away from the recent low by more than 1.5 ATR.
Price is near the 50 EMA (within the defined proximity percentage).
Sell Signal:
The market is in a bearish trend.
Stochastic oscillator is in the overbought zone.
Price retraces downwards, breaking away from the recent high by more than 1.5 ATR.
Price is near the 50 EMA.
Outputs
Signals:
Buy Signal: Green "BUY" label below the price bar.
Sell Signal: Red "SELL" label above the price bar.
Alerts:
Alerts are triggered for Buy and Sell signals if conditions are met within the specified time window (if enabled).
EMA Visualization:
50 EMA (blue line).
200 EMA (red line).
Limitations
Not Suitable for Non-Trending Markets: This script is designed for trending conditions. Sideways or choppy markets may produce false signals.
Proximity Tolerance: Adjust the proximityPercent to prevent signals from triggering too frequently during minor oscillations around the 50 EMA.
No Guarantee of Accuracy: As with any technical indicator, it should be used in conjunction with other tools and analysis.
TLA20 - Multi-Session Box and Level ToolTLA20 is a highly customizable indicator designed to enhance intraday analysis by marking predefined trading sessions, key levels, and midpoints directly on your charts. With its versatile features, TLA20 is ideal for traders looking to visualize multiple time zones, daily price ranges, and historical reference levels efficiently.
Key Features:
Session Visualization: Mark up to three custom trading sessions with distinct start and end times, adjustable for different time zones and weekend inclusions.
Dynamic Highlights: Automatically draw session highs, lows, midlines, and open prices with options to extend beyond session bounds.
Custom Styling: Configure border colors, styles, and fill options for each session box to match your chart preferences.
Historical Levels: Highlight previous daily highs/lows, weekly highs/lows, and monthly highs/lows for improved context in your trading.
Intuitive Adjustments: Enable or disable each feature and customize settings for precise alignment with your trading strategy.
Use Cases:
Track trading sessions across different markets and time zones.
Identify key price levels like session midpoints and opens for entry/exit strategies.
Overlay historical levels to recognize potential support and resistance areas.
This indicator does not provide direct trading signals but serves as a robust tool for enhancing technical analysis.
Disclaimer: The script is provided “as is” without warranties of any kind. Always test on a demo account before applying in live markets.
Enhanced Reversal DetectorEnhanced Reversal Detector - Script Description
Overview:
The Enhanced Reversal Detector is a highly refined indicator designed to identify precise trend reversals in financial markets. It improves upon the original reversal detection logic by incorporating additional filters for trend confirmation (using EMA), volume spikes, and candle patterns. These enhancements significantly increase the reliability and accuracy of reversal signals, making it an excellent tool for both short-term and long-term traders.
Key Features
Candle Lookback Logic:
The indicator evaluates historical price action over a user-defined lookback period to detect potential reversal zones.
Bullish reversal conditions are met when price consistently tests lows, and bearish reversal conditions are met when price tests highs.
Trend Confirmation (EMA Filter):
To ensure that reversal signals align with the broader market trend, the indicator incorporates an Exponential Moving Average (EMA) filter.
Bullish signals are only triggered when the price is above the EMA, while bearish signals are only triggered when the price is below the EMA.
Volume Spike Filter:
The indicator checks for significant increases in trading volume to confirm that the reversal is supported by strong market activity.
Volume spikes are calculated as trading volume exceeding a multiple of the 20-bar average volume (default: 1.5x).
Confirmation Period:
Users can define a confirmation window within which reversal signals must be validated.
This reduces false positives and ensures only strong reversals are considered.
Non-Repainting Mode:
Offers a non-repainting option, where signals are based on confirmed conditions from previous bars, ensuring reliability for backtesting.
Visual and Alert Features:
Clear visual markers on the chart indicate bullish (green triangle) and bearish (red triangle) reversal points.
Alert notifications can be enabled for both bullish and bearish reversals, keeping traders informed in real-time.
Inputs
Candle Lookback: Number of candles to evaluate for reversal conditions.
Confirm Within: Number of candles within which a reversal must be validated.
Non-Repainting Mode: Option to enable or disable repainting for signals.
EMA Length: The length of the Exponential Moving Average used for trend confirmation.
Volume Spike Multiplier: Multiplier for identifying significant increases in trading volume.
How It Works
Reversal Detection:
Bullish signals are triggered when:
Price consistently tests recent lows (lookback period).
Price closes above the EMA.
A significant volume spike occurs.
Bearish signals are triggered under opposite conditions (price testing highs, closing below EMA, and volume spike).
Signal Filtering:
Incorporates EMA and volume-based filters to eliminate false positives and focus on high-confidence reversal signals.
Alert Notifications:
Alerts notify users of bullish or bearish reversal opportunities as soon as they are detected.
Use Cases
Scalping and Day Trading:
Ideal for identifying reversals on lower timeframes (e.g., 1-minute or 5-minute charts).
Swing Trading:
Works effectively on higher timeframes (e.g., 1-hour or daily charts) for capturing significant
trend reversals.
Volatile Markets:
Particularly useful in high-volatility markets like cryptocurrencies or forex.
Customization Tips
Adjust the lookback period to fine-tune the sensitivity of the reversal detection.
Increase the volume spike multiplier for markets with irregular trading volumes to focus on significant moves.
Experiment with the EMA length to align signals with your trading strategy's preferred trend duration.
Conclusion
The Enhanced Reversal Detector combines advanced price action analysis, trend confirmation, and market participation filters to deliver high-accuracy reversal signals. With its customizable settings and robust filtering mechanisms, this indicator is an invaluable tool for identifying profitable trading opportunities while minimizing noise and false signals.
Average Price Range Screener [KFB Quant]Average Price Range Screener
Overview:
The Average Price Range Screener is a technical analysis tool designed to provide insights into the average price volatility across multiple symbols over user-defined time periods. The indicator compares price ranges from different assets and displays them in a visual table and chart for easy reference. This can be especially helpful for traders looking to identify symbols with high or low volatility across various time frames.
Key Features:
Multiple Symbols Supported:
The script allows for analysis of up to 10 symbols, such as major cryptocurrencies and market indices. Symbols can be selected by the user and configured for tracking price volatility.
Dynamic Range Calculation:
The script calculates the average price range of each symbol over three distinct time periods (default are 30, 60, and 90 bars). The price range for each symbol is calculated as a percentage of the bar's high-to-low difference relative to its low value.
Range Visualization:
The results are visually represented using:
- A color-coded table showing the calculated average ranges of each symbol and the current chart symbol.
- A line plot that visually tracks the volatility for each symbol on the chart, with color gradients representing the range intensity from low (red/orange) to high (blue/green).
Customizable Inputs:
- Length Inputs: Users can define the time lengths (default are 30, 60, and 90 bars) for calculating average price ranges for each symbol.
- Symbol Inputs: 10 symbols can be tracked at once, with default values set to popular crypto pairs and indices.
- Color Inputs: Users can customize the color scheme for the range values displayed in the table and chart.
Real-Time Ranking:
The indicator ranks symbols by their average price range, providing a clear view of which assets are exhibiting higher volatility at any given time.
Each symbol's range value is color-coded based on its relative volatility within the selected symbols (using a gradient from low to high range).
Data Table:
The table shows the average range values for each symbol in real-time, allowing users to compare volatility across multiple assets at a glance. The table is dynamically updated as new data comes in.
Interactive Labels:
The indicator adds labels to the chart, showing the average range for each symbol. These labels adjust in real-time as the price range values change, giving users an immediate view of volatility rankings.
How to Use:
Set Time Periods: Adjust the time periods (lengths) to match your trading strategy's timeframe and volatility preference.
Symbol Selection: Add and track the price range for your preferred symbols (cryptocurrencies, stocks, indices).
Monitor Volatility: Use the visual table and plot to identify symbols with higher or lower volatility, and adjust your trading strategy accordingly.
Interpret the Table and Chart: Ranges that are color-coded from red/orange (lower volatility) to blue/green (higher volatility) allow you to quickly gauge which symbols are most volatile.
Disclaimer: This tool is provided for informational and educational purposes only and should not be considered as financial advice. Always conduct your own research and consult with a licensed financial advisor before making any investment decisions.
Volume Spike DetectorVolume Spike Detector
This script is designed to identify significant spikes in trading volume and visually represent them on the chart. It calculates the 20-period simple moving average (SMA) of the trading volume and multiplies it by a user-defined threshold to determine the spike threshold. When the current volume exceeds this threshold, the script detects and highlights a volume spike.
Key Features:
Dynamic Spike Threshold:
The script calculates the spike threshold dynamically based on the average trading volume. Users can customize the threshold multiplier using an input setting.
Example: A threshold multiplier of 2.0 means the current volume must be twice the 20-period SMA to trigger a detection.
Visual Representation:
The current volume is plotted in blue bars.
The spike threshold is plotted as a red line, making it easy to visually identify when the volume crosses the threshold.
Alert Notification:
When a volume spike is detected, an alert is triggered to notify the user.
This feature is useful for real-time monitoring and spotting potential trading opportunities.
Use Case:
Traders can use this tool to identify sudden increases in trading activity, which may indicate a significant market move or event. It’s suitable for all markets, including cryptocurrencies, stocks, and forex.
Scatter PlotThe Price Volume Scatter Plot publication aims to provide intrabar detail as a Scatter Plot .
🔶 USAGE
A dot is drawn at every intrabar close price and its corresponding volume , as can seen in the following example:
Price is placed against the white y-axis, where volume is represented on the orange x-axis.
🔹 More detail
A Scatter Plot can be beneficial because it shows more detail compared with a Volume Profile (seen at the right of the Scatter Plot).
The Scatter Plot is accompanied by a "Line of Best Fit" (linear regression line) to help identify the underlying direction, which can be helpful in interpretation/evaluation.
It can be set as a screener by putting multiple layouts together.
🔹 Easier Interpretation
Instead of analysing the 1-minute chart together with volume, this can be visualised in the Scatter Plot, giving a straightforward and easy-to-interpret image of intrabar volume per price level.
One of the scatter plot's advantages is that volumes at the same price level are added to each other.
A dot on the scatter plot represents the cumulated amount of volume at that particular price level, regardless of whether the price closed one or more times at that price level.
Depending on the setting "Direction" , which sets the direction of the Volume-axis, users can hoover to see the corresponding price/volume.
🔹 Highest Intrabar Volume Values
Users can display up to 5 last maximum intrabar volume values, together with the intrabar timeframe (Res)
🔹 Practical Examples
When we divide the recent bar into three parts, the following can be noticed:
Price spends most of its time in the upper part, with relative medium-low volume, since the intrabar close prices are mostly situated in the upper left quadrant.
Price spends a shorter time in the middle part, with relative medium-low volume.
Price moved rarely below 61800 (the lowest part), but it was associated with high volume. None of the intrabar close prices reached the lowest area, and the price bounced back.
In the following example, the latest weekly candle shows a rejection of the 45.8 - 48.5K area, with the highest volume at the 45.8K level.
The next three successive candles show a declining maximum intrabar volume, after which the price broke through the 45.8K area.
🔹 Visual Options
There are many visual options available.
🔹 Change Direction
The Scatter Plot can be set in 4 different directions.
🔶 NOTES
🔹 Notes
The script uses the maximum available resources to draw the price/volume dots, which are 500 boxes and 500 labels. When the population size exceeds 1000, a warning is provided ( Not all data is shown ); otherwise, only the population size is displayed.
The Scatter Plot ideally needs a chart which contains at least 100 bars. When it contains less, a warning will be shown: bars < 100, not all data is shown
🔹 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
Direction: Direction of Volume-axis; Left, Right, Up or Down
🔹 LTF
LTF: LTF setting
Auto + multiple: Adjusts the initial set LTF
Premium: Enable when your TradingView plan is Premium or higher
🔹 Character
Character: Style of Price/Volume dot
Fade: Increasing this number fades dots at lower price/volume
Color
🔹 Linear Regression
Toggle (enable/disable), color, linestyle
Center Cross: Toggle, color
🔹 Background Color
Fade: Increasing this number fades the background color near lower values
Volume: Background color that intensifies as the volume value on the volume-axis increases
Price: Background color that intensifies as the price value on the price-axis increases
🔹 Labels
Size: Size of price/volume labels
Volume: Color for volume labels/axis
Price: Color for price labels/axis
Display Population Size: Show the population size + warning if it exceeds 1000
🔹 Dashboard
Location: Location of dashboard
Size: Text size
Display LTF: Display the intrabar Lower Timeframe used
Highest IB volume: Display up to 5 previous highest Intrabar Volume values
Romantic Information CoefficientThis script calculates the Mutual Information (MI) between the closing prices of two assets over a defined lookback period. Mutual Information is a measure of the shared information between two time-series datasets. A higher MI indicates a stronger relationship between the two assets.
Key Features:
Ticker Inputs: You can select the tickers for two assets. For example, SPY (S&P 500 ETF) and AAPL (Apple stock) can be compared.
Lookback Period: Choose the number of bars to look back and calculate the Mutual Information. A larger lookback period incorporates more data, but may be less responsive to recent price changes.
Bins for Discretization: Control the level of granularity for discretizing the asset prices. More bins result in a more detailed MI calculation but can also reduce the signal-to-noise ratio.
Color Coded MI: The MI plot dynamically changes color to provide visual feedback on whether the relationship between the two assets is strengthening (red) or weakening (blue).
Only for educational purposes. Not in anyway, investment advice.
Time Appliconic Macro | ForTF5m (Fixed)The Time Appliconic Macro (TAMcr) is a custom-built trading indicator designed for the 5-minute time frame (TF5m), providing traders with clear Buy and Sell signals based on precise technical conditions and specific time windows.
Key Features:
Dynamic Moving Average (MA):
The indicator utilizes a Simple Moving Average (SMA) to identify price trends.
Adjustable length for user customization.
Custom STARC Bands:
Upper and lower bands are calculated using the SMA and the Average True Range (ATR).
Includes a user-defined multiplier to adjust the band width for flexibility across different market conditions.
RSI Integration:
Signals are filtered using the Relative Strength Index (RSI), ensuring they align with overbought/oversold conditions.
Time-Based Signal Filtering:
Signals are generated only during specific time windows, allowing traders to focus on high-activity periods or times of personal preference.
Supports multiple custom time ranges with automatic adjustments for UTC-4 or UTC-5 offsets.
Clear Signal Visualization:
Buy Signals: Triggered when the price is below the lower band, RSI indicates oversold conditions, and the time is within the defined range.
Sell Signals: Triggered when the price is above the upper band, RSI indicates overbought conditions, and the time is within the defined range.
Signals are marked directly on the chart for easy identification.
Customizability:
Adjustable parameters for the Moving Average length, ATR length, and ATR multiplier.
Time zone selection and defined trading windows provide a tailored experience for global users.
Who is this Indicator For?
This indicator is perfect for intraday traders who operate in the 5-minute time frame and value clear, filtered signals based on price action, volatility, and momentum indicators. The time window functionality is ideal for traders focusing on specific market sessions or personal schedules.
How to Use:
Adjust the MA and ATR parameters to match your trading style or market conditions.
Set the desired time zone and time ranges to align with your preferred trading hours.
Monitor the chart for Buy (green) and Sell (red) signals, and use them as a guide for entering or exiting trades.
faiz MACDMACD: Moving Average Convergence Divergence
The Moving Average Convergence Divergence (MACD) is a popular momentum indicator used in technical analysis to gauge the strength, direction, and potential reversal points of a trend in a financial asset's price movement. Developed by Gerald Appel in the late 1970s, MACD is particularly favored by traders for its ability to capture both trend-following and momentum aspects of price behavior.
Components of the MACD
The MACD is derived from two exponential moving averages (EMAs) of a security's price:
MACD Line: This is the difference between the 12-day and 26-day EMAs. The shorter 12-day EMA reacts more quickly to price changes, while the 26-day EMA smooths out price fluctuations, offering a longer-term perspective.
Formula: MACD Line = 12-day EMA - 26-day EMA
Signal Line: This is the 1-day EMA of the MACD Line itself. The signal line is used to generate buy and sell signals when it crosses the MACD line.
Formula: Signal Line = 1-day EMA of the MACD Line
MACD Histogram: The histogram represents the difference between the MACD Line and the Signal Line. It is displayed as bars that oscillate above and below a zero line, helping to visualize the convergence or divergence between the two lines.
Formula: Histogram = MACD Line - Signal Line
Interpretation of MACD
The MACD indicator is used to identify potential buy and sell signals based on the following observations:
MACD Line and Signal Line Crossovers:
Bullish Crossover: A buy signal occurs when the MACD Line crosses above the Signal Line. This suggests that the momentum is shifting in favor of the bulls, indicating a potential upward price movement.
Bearish Crossover: A sell signal occurs when the MACD Line crosses below the Signal Line. This suggests a bearish trend may be emerging, signaling a potential downward movement.
Divergence:
Bullish Divergence: Occurs when the price of the asset is making new lows, but the MACD is forming higher lows. This suggests that the downward momentum is weakening and a potential reversal to the upside may be imminent.
Bearish Divergence: Occurs when the price is making new highs, but the MACD is forming lower highs. This suggests that the upward momentum is weakening and a reversal to the downside may occur.
Only use it in timeframe m1, and solely use for XAUUSD pair.
Advisable to use it as a confirmation with other indicator such as
BBMA, SMC, SUPPORT RESISTANCE, SUPPLY AND DEMAND.
how to use :
MA 5 Crossing above MA9, will generate BUY signals
MA 5 Crossing below MA9, will generate SELL signals
Trade at your own SKILLS.
I dont mind people using this script for free.
All I want is just prayer for me and my family success.
Thank You and Have a nice and pleasant day :-)
Stablecoin Delta [SAKANE]Overview
Stablecoin Delta is an indicator designed to provide a detailed analysis of the market trends of major stablecoins (USDT and USDC). Stablecoins play a crucial role in supporting the liquidity of the cryptocurrency market, and fluctuations in their supply significantly impact the prices of Bitcoin and other cryptocurrencies.
This indicator leverages data from CryptoCap to visualize the daily changes in the market capitalization of stablecoins. Traders can use this tool to understand the effects of stablecoin supply fluctuations on the market in a timely manner, enabling more strategic investment decisions.
The key benefits include the ability to quickly monitor stablecoin supply changes, utilize this data as a supplementary tool for predicting Bitcoin price movements, and identify both short-term market movements and long-term trends. This indicator is valuable for traders of all levels, from beginners to seasoned professionals.
Features
- Support for USDT and USDC Market Cap
Monitor the market trends of these two major stablecoins using data from CryptoCap. Users can also choose to analyze only one of them.
- Daily Net Change Calculation
Calculates the daily change in market capitalization compared to the previous day, providing a clear view of trends.
- Flexible Smoothing Options
Apply either SMA or EMA smoothing for both the histogram and the line chart, based on user preference.
- Customizable Colors
Customize the colors for the histogram (positive/negative) and line chart for better visualization.
Visualization
- Histogram
Displays daily net changes as a histogram, with positive changes (green) and negative changes (red) clearly differentiated.
- Smoothed Line Chart
Provides a smoothed line chart to make trend identification easier.
Use Cases
- In-depth Analysis of the Cryptocurrency Market
The supply of stablecoins is a critical factor influencing the price of Bitcoin and other cryptocurrencies. This indicator helps traders understand overall market liquidity, enabling more effective investment decisions.
- Short-Term and Long-Term Strategy Development
Trends derived from stablecoin supply fluctuations are essential for traders to gauge short-term price movements and long-term market flows.
- Real-Time Market Adjustment
In times of sudden market shifts, this tool enables traders to quickly assess changes in stablecoin supply and adjust their positions accordingly.
Future Plans
- Additional stablecoins will be considered for inclusion if their market share grows significantly.
Disclaimer
- This indicator relies on data from CryptoCap. The results are subject to the accuracy and timeliness of the data and should be used as reference information only.
Force Volume GradientThis Pine Script is a technical indicator designed for trading platforms, specifically TradingView. It plots the Force Volume Gradient (FVG) and generates buy/sell signals based on the crossover of the FVG line and a signal line.
Key Components:
Force Index: Calculates the exponential moving average (EMA) of the product of the close price and volume.
Force Volume Gradient (FVG): Calculates the EMA of the Force Index.
Signal Line: A simple moving average (SMA) of the FVG.
Buy/Sell Signals: Generated when the FVG line crosses above/below the signal line.
How it Works:
The script calculates the Force Index, which measures the amount of energy or "force" behind price movements.
The FVG is then calculated by applying an EMA to the Force Index, smoothing out the values.
The signal line is a SMA of the FVG, providing a benchmark for buy/sell signals.
When the FVG line crosses above the signal line, a buy signal is generated. Conversely, when the FVG line crosses below the signal line, a sell signal is generated.
Trading Strategy:
This script can be used as a momentum indicator to identify potential buying or selling opportunities. Traders can use the buy/sell signals as entry/exit points, or combine the FVG with other indicators to create a more comprehensive trading strategy.
Customization:
Users can adjust the input parameters, such as the length of the Force Index and signal line, to suit their individual trading preferences.
Murad Picks Target MCThe Murad Picks Target Market Cap Indicator is a custom TradingView tool designed for crypto traders and enthusiasts tracking tokens in the Murad Picks list. This indicator dynamically calculates and visualizes the price targets based on Murad Mahmudov's projected market capitalizations, allowing you to gauge each token's growth potential directly on your charts.
Indicator support tokens:
- SPX6900
- GIGA
- MOG
- POPCAT
- APU
- BITCOIN
- RETARDIO
- LOCKIN
Key Features :
Dynamic Target Price Lines:
- Displays horizontal lines representing the price when the token reaches its projected market cap.
- Automatically adjusts for the active chart symbol (e.g., SPX, MOG, APU, etc.).
X Multiplier Calculation:
- Shows how many times the current price must multiply to achieve the target price.
- Perfect for understanding relative growth potential.
Customizable Inputs:
- Easily update target market caps and circulating supply for each token.
- Adjust visuals such as line colors and styles.
Seamless Integration:
- Automatically adapts to the token you’re viewing (e.g., SPX, MOG, APU).
- Clean and visually intuitive, with labels marking targets.
Multi-Timeframe Stochastic Alert [tradeviZion]# Multi-Timeframe Stochastic Alert : Complete User Guide
## 1. Introduction
### What is the Multi-Timeframe Stochastic Alert?
The Multi-Timeframe Stochastic Alert is an advanced technical analysis tool that helps traders identify potential trading opportunities by analyzing momentum across multiple timeframes. It combines the power of the stochastic oscillator with multi-timeframe analysis to provide more reliable trading signals.
### Key Features and Benefits
- Simultaneous analysis of 6 different timeframes
- Advanced alert system with customizable conditions
- Real-time visual feedback with color-coded signals
- Comprehensive data table with instant market insights
- Motivational trading messages for psychological support
- Flexible theme support for comfortable viewing
### How it Can Help Your Trading
- Identify stronger trends by confirming momentum across multiple timeframes
- Reduce false signals through multi-timeframe confirmation
- Stay informed of market changes with customizable alerts
- Make more informed decisions with comprehensive market data
- Maintain trading discipline with clear visual signals
## 2. Understanding the Display
### The Stochastic Chart
The main chart displays three key components:
1. ** K-Line (Fast) **: The primary stochastic line (default color: green)
2. ** D-Line (Slow) **: The signal line (default color: red)
3. ** Reference Lines **:
- Overbought Level (80): Upper dashed line
- Middle Line (50): Center dashed line
- Oversold Level (20): Lower dashed line
### The Information Table
The table provides a comprehensive view of stochastic readings across all timeframes. Here's what each column means:
#### Column Explanations:
1. ** Timeframe **
- Shows the time period for each row
- Example: "5" = 5 minutes, "15" = 15 minutes, etc.
2. ** K Value **
- The fast stochastic line value (0-100)
- Higher values indicate stronger upward momentum
- Lower values indicate stronger downward momentum
3. ** D Value **
- The slow stochastic line value (0-100)
- Helps confirm momentum direction
- Crossovers with K-line can signal potential trades
4. ** Status **
- Shows current momentum with symbols:
- ▲ = Increasing (bullish)
- ▼ = Decreasing (bearish)
- Color matches the trend direction
5. ** Trend **
- Shows the current market condition:
- "Overbought" (above 80)
- "Bullish" (above 50)
- "Bearish" (below 50)
- "Oversold" (below 20)
#### Row Explanations:
1. ** Title Row **
- Shows "🎯 Multi-Timeframe Stochastic"
- Indicates the indicator is active
2. ** Header Row **
- Contains column titles
- Dark blue background for easy reading
3. ** Timeframe Rows **
- Six rows showing different timeframe analyses
- Each row updates independently
- Color-coded for easy trend identification
4. **Message Row**
- Shows rotating motivational messages
- Updates every 5 bars
- Helps maintain trading discipline
### Visual Indicators and Colors
- ** Green Background **: Indicates bullish conditions
- ** Red Background **: Indicates bearish conditions
- ** Color Intensity **: Shows strength of the signal
- ** Background Highlights **: Appear when alert conditions are met
## 3. Core Settings Groups
### Stochastic Settings
These settings control the core calculation of the stochastic oscillator.
1. ** Length (Default: 14) **
- What it does: Determines the lookback period for calculations
- Higher values (e.g., 21): More stable, fewer signals
- Lower values (e.g., 8): More sensitive, more signals
- Recommended:
* Day Trading: 8-14
* Swing Trading: 14-21
* Position Trading: 21-30
2. ** Smooth K (Default: 3) **
- What it does: Smooths the main stochastic line
- Higher values: Smoother line, fewer false signals
- Lower values: More responsive, but more noise
- Recommended:
* Day Trading: 2-3
* Swing Trading: 3-5
* Position Trading: 5-7
3. ** Smooth D (Default: 3) **
- What it does: Smooths the signal line
- Works in conjunction with Smooth K
- Usually kept equal to or slightly higher than Smooth K
- Recommended: Keep same as Smooth K for consistency
4. ** Source (Default: Close) **
- What it does: Determines price data for calculations
- Options: Close, Open, High, Low, HL2, HLC3, OHLC4
- Recommended: Stick with Close for most reliable signals
### Timeframe Settings
Controls the multiple timeframes analyzed by the indicator.
1. ** Main Timeframes (TF1-TF6) **
- TF1 (Default: 10): Shortest timeframe for quick signals
- TF2 (Default: 15): Short-term trend confirmation
- TF3 (Default: 30): Medium-term trend analysis
- TF4 (Default: 30): Additional medium-term confirmation
- TF5 (Default: 60): Longer-term trend analysis
- TF6 (Default: 240): Major trend confirmation
Recommended Combinations:
* Scalping: 1, 3, 5, 15, 30, 60
* Day Trading: 5, 15, 30, 60, 240, D
* Swing Trading: 15, 60, 240, D, W, M
2. ** Wait for Bar Close (Default: true) **
- What it does: Controls when calculations update
- True: More reliable but slightly delayed signals
- False: Faster signals but may change before bar closes
- Recommended: Keep True for more reliable signals
### Alert Settings
#### Main Alert Settings
1. ** Enable Alerts (Default: true) **
- Master switch for all alert notifications
- Toggle this off when you don't want any alerts
- Useful during testing or when you want to focus on visual signals only
2. ** Alert Condition (Options) **
- "Above Middle": Bullish momentum alerts only
- "Below Middle": Bearish momentum alerts only
- "Both": Alerts for both directions
- Recommended:
* Trending Markets: Choose direction matching the trend
* Ranging Markets: Use "Both" to catch reversals
* New Traders: Start with "Both" until you develop a specific strategy
3. ** Alert Frequency **
- "Once Per Bar": Immediate alerts during the bar
- "Once Per Bar Close": Alerts only after bar closes
- Recommended:
* Day Trading: "Once Per Bar" for quick reactions
* Swing Trading: "Once Per Bar Close" for confirmed signals
* Beginners: "Once Per Bar Close" to reduce false signals
#### Timeframe Check Settings
1. ** First Check (TF1) **
- Purpose: Confirms basic trend direction
- Alert Triggers When:
* For Bullish: Stochastic is above middle line (50)
* For Bearish: Stochastic is below middle line (50)
* For Both: Triggers in either direction based on position relative to middle line
- Settings:
* Enable/Disable: Turn first check on/off
* Timeframe: Default 5 minutes
- Best Used For:
* Quick trend confirmation
* Entry timing
* Scalping setups
2. ** Second Check (TF2) **
- Purpose: Confirms both position and momentum
- Alert Triggers When:
* For Bullish: Stochastic is above middle line AND both K&D lines are increasing
* For Bearish: Stochastic is below middle line AND both K&D lines are decreasing
* For Both: Triggers based on position and direction matching current condition
- Settings:
* Enable/Disable: Turn second check on/off
* Timeframe: Default 15 minutes
- Best Used For:
* Trend strength confirmation
* Avoiding false breakouts
* Day trading setups
3. ** Third Check (TF3) **
- Purpose: Confirms overall momentum direction
- Alert Triggers When:
* For Bullish: Both K&D lines are increasing (momentum confirmation)
* For Bearish: Both K&D lines are decreasing (momentum confirmation)
* For Both: Triggers based on matching momentum direction
- Settings:
* Enable/Disable: Turn third check on/off
* Timeframe: Default 30 minutes
- Best Used For:
* Major trend confirmation
* Swing trading setups
* Avoiding trades against the main trend
Note: All three conditions must be met simultaneously for the alert to trigger. This multi-timeframe confirmation helps reduce false signals and provides stronger trade setups.
#### Alert Combinations Examples
1. ** Conservative Setup **
- Enable all three checks
- Use "Once Per Bar Close"
- Timeframe Selection Example:
* First Check: 15 minutes
* Second Check: 1 hour (60 minutes)
* Third Check: 4 hours (240 minutes)
- Wider gaps between timeframes reduce noise and false signals
- Best for: Swing trading, beginners
2. ** Aggressive Setup **
- Enable first two checks only
- Use "Once Per Bar"
- Timeframe Selection Example:
* First Check: 5 minutes
* Second Check: 15 minutes
- Closer timeframes for quicker signals
- Best for: Day trading, experienced traders
3. ** Balanced Setup **
- Enable all checks
- Use "Once Per Bar"
- Timeframe Selection Example:
* First Check: 5 minutes
* Second Check: 15 minutes
* Third Check: 1 hour (60 minutes)
- Balanced spacing between timeframes
- Best for: All-around trading
### Visual Settings
#### Alert Visual Settings
1. ** Show Background Color (Default: true) **
- What it does: Highlights chart background when alerts trigger
- Benefits:
* Makes signals more visible
* Helps spot opportunities quickly
* Provides visual confirmation of alerts
- When to disable:
* If using multiple indicators
* When preferring a cleaner chart
* During manual backtesting
2. ** Background Transparency (Default: 90) **
- Range: 0 (solid) to 100 (invisible)
- Recommended Settings:
* Clean Charts: 90-95
* Multiple Indicators: 85-90
* Single Indicator: 80-85
- Tip: Adjust based on your chart's overall visibility
3. ** Background Colors **
- Bullish Background:
* Default: Green
* Indicates upward momentum
* Customizable to match your theme
- Bearish Background:
* Default: Red
* Indicates downward momentum
* Customizable to match your theme
#### Level Settings
1. ** Oversold Level (Default: 20) **
- Traditional Setting: 20
- Adjustable Range: 0-100
- Usage:
* Lower values (e.g., 10): More conservative
* Higher values (e.g., 30): More aggressive
- Trading Applications:
* Potential bullish reversal zone
* Support level in uptrends
* Entry point for long positions
2. ** Overbought Level (Default: 80) **
- Traditional Setting: 80
- Adjustable Range: 0-100
- Usage:
* Lower values (e.g., 70): More aggressive
* Higher values (e.g., 90): More conservative
- Trading Applications:
* Potential bearish reversal zone
* Resistance level in downtrends
* Exit point for long positions
3. ** Middle Line (Default: 50) **
- Purpose: Trend direction separator
- Applications:
* Above 50: Bullish territory
* Below 50: Bearish territory
* Crossing 50: Potential trend change
- Trading Uses:
* Trend confirmation
* Entry/exit trigger
* Risk management level
#### Color Settings
1. ** Bullish Color (Default: Green) **
- Used for:
* K-Line (Main stochastic line)
* Status symbols when trending up
* Trend labels for bullish conditions
- Customization:
* Choose colors that stand out
* Match your trading platform theme
* Consider color blindness accessibility
2. ** Bearish Color (Default: Red) **
- Used for:
* D-Line (Signal line)
* Status symbols when trending down
* Trend labels for bearish conditions
- Customization:
* Choose contrasting colors
* Ensure visibility on your chart
* Consider monitor settings
3. ** Neutral Color (Default: Gray) **
- Used for:
* Middle line (50 level)
- Customization:
* Should be less prominent
* Easy on the eyes
* Good background contrast
### Theme Settings
1. **Color Theme Options**
- Dark Theme (Default):
* Dark background with white text
* Optimized for dark chart backgrounds
* Reduces eye strain in low light
- Light Theme:
* Light background with black text
* Better visibility in bright conditions
- Custom Theme:
* Use your own color preferences
2. ** Available Theme Colors **
- Table Background
- Table Text
- Table Headers
Note: The theme affects only the table display colors. The stochastic lines and alert backgrounds use their own color settings.
### Table Settings
#### Position and Size
1. ** Table Position **
- Options:
* Top Right (Default)
* Middle Right
* Bottom Right
* Top Left
* Middle Left
* Bottom Left
- Considerations:
* Chart space utilization
* Personal preference
* Multiple monitor setups
2. ** Text Sizes **
- Title Size Options:
* Tiny: Minimal space usage
* Small: Compact but readable
* Normal (Default): Standard visibility
* Large: Enhanced readability
* Huge: Maximum visibility
- Data Size Options:
* Recommended: One size smaller than title
* Adjust based on screen resolution
* Consider viewing distance
3. ** Empowering Messages **
- Purpose:
* Maintain trading discipline
* Provide psychological support
* Remind of best practices
- Rotation:
* Changes every 5 bars
* Categories include:
- Market Wisdom
- Strategy & Discipline
- Mindset & Growth
- Technical Mastery
- Market Philosophy
## 4. Setting Up for Different Trading Styles
### Day Trading Setup
1. **Timeframes**
- Primary: 5, 15, 30 minutes
- Secondary: 1H, 4H
- Alert Settings: "Once Per Bar"
2. ** Stochastic Settings **
- Length: 8-14
- Smooth K/D: 2-3
- Alert Condition: Match market trend
3. ** Visual Settings **
- Background: Enabled
- Transparency: 85-90
- Theme: Based on trading hours
### Swing Trading Setup
1. ** Timeframes **
- Primary: 1H, 4H, Daily
- Secondary: Weekly
- Alert Settings: "Once Per Bar Close"
2. ** Stochastic Settings **
- Length: 14-21
- Smooth K/D: 3-5
- Alert Condition: "Both"
3. ** Visual Settings **
- Background: Optional
- Transparency: 90-95
- Theme: Personal preference
### Position Trading Setup
1. ** Timeframes **
- Primary: Daily, Weekly
- Secondary: Monthly
- Alert Settings: "Once Per Bar Close"
2. ** Stochastic Settings **
- Length: 21-30
- Smooth K/D: 5-7
- Alert Condition: "Both"
3. ** Visual Settings **
- Background: Disabled
- Focus on table data
- Theme: High contrast
## 5. Troubleshooting Guide
### Common Issues and Solutions
1. ** Too Many Alerts **
- Cause: Settings too sensitive
- Solutions:
* Increase timeframe intervals
* Use "Once Per Bar Close"
* Enable fewer timeframe checks
* Adjust stochastic length higher
2. ** Missed Signals **
- Cause: Settings too conservative
- Solutions:
* Decrease timeframe intervals
* Use "Once Per Bar"
* Enable more timeframe checks
* Adjust stochastic length lower
3. ** False Signals **
- Cause: Insufficient confirmation
- Solutions:
* Enable all three timeframe checks
* Use larger timeframe gaps
* Wait for bar close
* Confirm with price action
4. ** Visual Clarity Issues **
- Cause: Poor contrast or overlap
- Solutions:
* Adjust transparency
* Change theme settings
* Reposition table
* Modify color scheme
### Best Practices
1. ** Getting Started **
- Start with default settings
- Use "Both" alert condition
- Enable all timeframe checks
- Wait for bar close
- Monitor for a few days
2. ** Fine-Tuning **
- Adjust one setting at a time
- Document changes and results
- Test in different market conditions
- Find your optimal timeframe combination
- Balance sensitivity with reliability
3. ** Risk Management **
- Don't trade against major trends
- Confirm signals with price action
- Use appropriate position sizing
- Set clear stop losses
- Follow your trading plan
4. ** Regular Maintenance **
- Review settings weekly
- Adjust for market conditions
- Update color scheme for visibility
- Clean up chart regularly
- Maintain trading journal
## 6. Tips for Success
1. ** Entry Strategies **
- Wait for all timeframes to align
- Confirm with price action
- Use proper position sizing
- Consider market conditions
2. ** Exit Strategies **
- Trail stops using indicator levels
- Take partial profits at targets
- Honor your stop losses
- Don't fight the trend
3. ** Psychology **
- Stay disciplined with settings
- Don't override system signals
- Keep emotions in check
- Learn from each trade
4. ** Continuous Improvement **
- Record your trades
- Review performance regularly
- Adjust settings gradually
- Stay educated on markets
Enigma End Game Indicator
Enigma End Game Indicator Description
The Enigma End Game indicator is a powerful tool designed to enhance the way traders approach support and resistance, combining mainstream technical analysis with a unique, dynamic perspective. At its core, this indicator enables traders to adapt to market conditions in real time by applying a blend of classic and modern interpretations of support and resistance levels.
In traditional support and resistance analysis, we recognize the significant price points where the market has historically reversed or consolidated. However, the *Enigma End Game* indicator takes this one step further by analyzing each individual candle's high as a potential resistance level and each low as support. This allows the trader to stay more agile, as the market constantly updates and evolves. The dynamic nature of this method acknowledges that price movements are fractal in nature, meaning that these levels are not static but adjust in response to price action on multiple timeframes.
### How It Works:
When using the *Enigma End Game* indicator, it doesn't simply plot buy and sell signals automatically. Instead, the indicator highlights key levels based on the interaction between price and historical price action. Here's how it operates:
1. **Buy Logic:**
The indicator identifies bullish signals based on the *Enigma* logic, but it does not trigger an immediate buy. Instead, it plots arrows above or below the candles, indicating the key price levels where price action has shifted. Traders then focus on these areas, particularly looking for buy opportunities *below* these levels during key market sessions (such as London or New York) while aligning with both mainstream support and resistance and *Enigma* levels.
2. **Sell Logic:**
Similarly, when the indicator identifies a sell signal, it plots an arrow above the candle where price action has reversed. This does not immediately suggest selling. Traders wait for a price retracement back to the previously breached low (for a sell order) or high (for a buy order), observing price action closely on lower timeframes (such as the 1-minute chart) to refine entry points. The entry is triggered when price starts to show signs of reversing at these levels, further validated by mainstream and *Enigma* support/resistance.
### Practical Example – XAU/USD (Gold):
For instance, in the settings of the *Enigma End Game* indicator, if we select the 5-minute (5MN) timeframe as the key level, the indicator will only plot the first 3 arrows following the *Enigma* logic. The arrows will appear above or below the candle that was breached, indicating a potential trend reversal. In this scenario, the first arrow marks the point where price broke a significant support or resistance level. Afterward, the trader watches for a subsequent candle to close below (in the case of a sell) the previous candle’s low, confirming a bearish bias.
Now, the trader does not rush into a sell order. Instead, they wait for the price to pull back towards the previously breached low. At this point, the trader can use a lower timeframe (like the 1-minute chart) to identify both mainstream support and resistance levels and *Enigma* levels above the main 5-minute key level. These additional levels provide a clearer understanding of where price might reverse and give the trader a stronger edge in refining their entry point.
The trader then sets a sell order *above* the price level of the previous low, but only once signs show that price is retracing and ready to fall again. The price point where this retracement occurs, confirmed by both mainstream and *Enigma* levels, becomes the entry signal for the trade.
### Summary:
The *Enigma End Game* indicator combines time-tested principles of support and resistance with a more modern, adaptive view, empowering traders to read the market with greater precision. It guides you to wait for optimal entries, based on dynamic support and resistance levels that change with each price movement. By combining signals on higher timeframes with refined entries on lower timeframes, traders gain a unique advantage in navigating both obvious and hidden levels of support and resistance, ultimately improving their ability to time trades with higher probability of success.
This indicator allows for a more calculated, strategic approach to trading—highlighting the right moments to enter the market while providing the flexibility to adjust to different market conditions.
The *ENIGMA Signals with Retests* indicator is a versatile trading tool that combines key market sessions with dynamic support and resistance levels. It uses logic to identify potential buy and sell signals based on the behavior of recent price swings (highs and lows) and offers flexibility with the number of arrows plotted per session. The user can customize settings like arrow frequency, line styles, and session times, allowing for personalized trading strategies.
The indicator detects buy and sell signals by checking if the price breaks the previous swing high (for buy signals) or swing low (for sell signals). It then stores these levels and draws horizontal lines on the chart, representing critical price levels where traders can expect potential price reactions.
A key feature of this indicator is its ability to limit the number of arrows per session, ensuring a cleaner chart and reducing signal clutter. Horizontal lines are drawn at the identified buy or sell levels, with the option to display labels like "BUY - AT OR BELOW" and "SELL - AT OR ABOVE" to further clarify entry points.
The indicator also incorporates session filtering, allowing traders to focus on specific market sessions (Asia, London, and New York) for more relevant signals, and it ensures that no more than a user-defined number of arrows are plotted within a session.