Multi-Timeframe Trend Analysis [BigBeluga]Multi-Timeframe Trend Analysis
A powerful trend-following dashboard designed to help traders monitor and compare trend direction across multiple higher timeframes. By analyzing EMA conditions from five customizable timeframes, this tool gives a clear visual breakdown of short- to long-term trend alignment.
🔵Key Features:
Multi-Timeframe EMA Dashboard:
➣ Displays a table in the top-right corner showing trend direction across 5 user-defined timeframes.
➣ Each row shows whether ema is rising or falling its corresponding EMA for that timeframe.
➣ Green arrows (🢁) indicate uptrends, purple arrows (🢃) signal downtrends.
Custom Timeframe Selection:
➣ Traders can input any 5 timeframes (e.g., 1h, 2h, 3h, etc.) with individual EMA lengths for flexible trend mapping.
➣ The tool auto-adjusts to match and align external timeframe EMAs to the current chart for seamless overlay.
Dynamic Chart Arrows:
➣ On-chart arrows mark when EMA rising or falling EMAs from the current chart timeframe.
➣ Each EMA arrows has a unique transparency level—shorter EMA arrows are more transparent, longer EMA arrows are more vivid. (Hover Mouse over the arrow to see which EMAs it is)
Gradient EMA Plotting:
➣ All five EMAs are plotted with gradually increasing opacity.
➣ Gradient fills between EMAs enhance visual structure, making it easier to track convergence/divergence.
🔵Usage:
Trend Confirmation: Use the dashboard to confirm multi-timeframe trend alignment before entering trades.
Entry Filtering: Avoid countertrend trades by spotting when higher timeframes disagree with the current one.
Momentum Insight: Track the transition of arrows from lighter to stronger opacity to visualize trend shifts over time.
Scalping or Swinging: Customize timeframes depending on your strategy—from intraday scalps to longer-term swings.
Multi-Timeframe Trend Analysis is the ultimate visual companion for traders who want clarity on how price behaves across multiple time horizons. With its smart EMA mapping and dashboard feedback, it keeps you aligned with dominant trend directions and transition zones at all times.
Penunjuk dan strategi
RSI Support & Resistance Breakouts with OrderblocksThis tool is an overly simplified method of finding market squeeze and breakout completely based on a dynamic RSI calculation. It is designed to draw out areas of price levels where the market is pushing back against price action leaving behind instances of short term support and resistance levels you otherwise wouldn't see with the common RSI.
It uses the changes in market momentum to determine support and resistance levels in real time while offering price zone where order blocks exist in the short term.
In ranging markets we need to know a couple things.
1. External Zone - It's important to know where the highs and lows were left behind as they hold liquidity. Here you will have later price swings and more false breakouts.
2. Internal Zone - It's important to know where the highest and lowest closing values were so we can see the limitations of that squeeze. Here you will find the stronger cluster of orders often seen as orderblocks.
In this tool I've added a 200 period Smoothed Moving Average as a trend filter which causes the RSI calculation to change dynamically.
Regular Zones - without extending
The Zones draw out automatically but are often too small to work with.
To solve this problem, you can extend the zones into the future up to 40 bars.
This allows for more visibility against future price action.
--------------------------------------------
Two Types of Zones
External Zones - These zones give you positioning of the highest and lowest price traded within the ranging market. This is where liquidity will be swept and often is an ultimate breaking point for new price swings.
How to use them :
External Zones - External zones form at the top of a pullback. After this price should move back into its impulsive wave.
During the next corrective way, if price breaches the top of the previous External Zone, this is a sign of trend weakness. Expect a divergence and trend reversal.
Internal Zones - (OrderBlocks) Current price will move in relation to previous internal zones. The internal zone is where a majority of price action and trading took place. It's a stronger SQUEEZE area. Current price action will often have a hard time closing beyond the previous Internal Zones high or low. You can expect these zones to show you where the market will flip over. In these same internal zones you'll find large rejection candles.
**Important Note** Size Doesn't Matter
The size of the internal zone does not matter. It can be very small and still very powerful.
Once an internal zone has been hit a few times, its often not relevant any longer.
Order Block Zone Examples
In this image you can see the Internal Zone that was untouched had a STRONG price reaction later on.
Internal Zones that were touched multiple times had weak reactions later as price respected them less over time.
Zone Overlay Breakdown
The Zones form and update in real time until momentum has picked up and price begins to trend. However it leaves behind the elements of the inducement area and all the key levels you need to know about for future price action.
Resistance Fakeout : Later on after the zone has formed, price will return to this upper zone of price levels and cause fakeouts. A close above this zone implies the market moves long again.
Midline Equilibrium : This is simply the center of the strongest traded area. We can call this the Point of Control within the orderblock. If price expands through both extremes of this zone multiple times in the future, it eliminates the orderblock.
Support Fakeout : Just like its opposing brother, price will wick through this zone and rip back causing inducement to trap traders. You would need a clear close below this zone to be in a bearish trend.
BARCOLOR or Candle Color: (Optional)
Bars are colored under three conditions
Bullish Color = A confirmed bullish breakout of the range.
Bearish Color = A confirmed bearish breakout of the range.
Squeeze Color = Even if no box is formed a candle or candles can have a squeeze color. This means the ranging market happened within the high and low of that singular candle.
Order Flow Hawkes Process [ScorsoneEnterprises]This indicator is an implementation of the Hawkes Process. This tool is designed to show the excitability of the different sides of volume, it is an estimation of bid and ask size per bar. The code for the volume delta is from www.tradingview.com
Here’s a link to a more sophisticated research article about Hawkes Process than this post arxiv.org
This tool is designed to show how excitable the different sides are. Excitability refers to how likely that side is to get more activity. Alan Hawkes made Hawkes Process for seismology. A big earthquake happens, lots of little ones follow until it returns to normal. Same for financial markets, big orders come in, causing a lot of little orders to come. Alpha, Beta, and Lambda parameters are estimated by minimizing a negative log likelihood function.
How it works
There are a few components to this script, so we’ll go into the equation and then the other functions used in this script.
hawkes_process(params, events, lkb) =>
alpha = clamp(array.get(params, 0), 0.01, 1.0)
beta = clamp(array.get(params, 1), 0.1, 10.0)
lambda_0 = clamp(array.get(params, 2), 0.01, 0.3)
intensity = array.new_float(lkb, 0.0)
events_array = array.new_float(lkb, 0.0)
for i = 0 to lkb - 1
array.set(events_array, i, array.get(events, i))
for i = 0 to lkb - 1
sum_decay = 0.0
current_event = array.get(events_array, i)
for j = 0 to i - 1
time_diff = i - j
past_event = array.get(events_array, j)
decay = math.exp(-beta * time_diff)
past_event_val = na(past_event) ? 0 : past_event
sum_decay := sum_decay + (past_event_val * decay)
array.set(intensity, i, lambda_0 + alpha * sum_decay)
intensity
The parameters alpha, beta, and lambda all represent a different real thing.
Alpha (α):
Definition: Alpha represents the excitation factor or the magnitude of the influence that past events have on the future intensity of the process. In simpler terms, it measures how much each event "excites" or triggers additional events. It is constrained between 0.01 and 1.0 (e.g., clamp(array.get(params, 0), 0.01, 1.0)). A higher alpha means past events have a stronger influence on increasing the intensity (likelihood) of future events. Initial value is set to 0.1 in init_params. In the hawkes_process function, alpha scales the contribution of past events to the current intensity via the term alpha * sum_decay.
Beta (β):
Definition: Beta controls the rate of exponential decay of the influence of past events over time. It determines how quickly the effect of a past event fades away. It is constrained between 0.1 and 10.0 (e.g., clamp(array.get(params, 1), 0.1, 10.0)). A higher beta means the influence of past events decays faster, while a lower beta means the influence lingers longer. Initial value is set to 0.1 in init_params. In the hawkes_process function, beta appears in the decay term math.exp(-beta * time_diff), which reduces the impact of past events as the time difference (time_diff) increases.
Lambda_0 (λ₀):
Definition: Lambda_0 is the baseline intensity of the process, representing the rate at which events occur in the absence of any excitation from past events. It’s the "background" rate of the process. It is constrained between 0.01 and 0.3 .A higher lambda_0 means a higher natural frequency of events, even without the influence of past events. Initial value is set to 0.1 in init_params. In the hawkes_process function, lambda_0 sets the minimum intensity level, to which the excitation term (alpha * sum_decay) is added: lambda_0 + alpha * sum_decay
Alpha (α): Strength of event excitation (how much past events boost future events).
Beta (β): Rate of decay of past event influence (how fast the effect fades).
Lambda_0 (λ₀): Baseline event rate (background intensity without excitation).
Other parts of the script.
Clamp
The clamping function is a simple way to make sure parameters don’t grow or shrink too much.
ObjectiveFunction
This function defines the objective function (negative log-likelihood) to minimize during parameter optimization.It returns a float representing the negative log-likelihood (to be minimized).
How It Works:
Calls hawkes_process to compute the intensity array based on current parameters.Iterates over the lookback period:lambda_t: Intensity at time i.event: Event magnitude at time i.Handles na values by replacing them with 0.Computes log-likelihood: event_clean * math.log(math.max(lambda_t_clean, 0.001)) - lambda_t_clean.Ensures lambda_t_clean is at least 0.001 to avoid log(0).Accumulates into log_likelihood.Returns -log_likelihood (negative because the goal is to minimize, not maximize).
It is used in the optimization process to evaluate how well the parameters fit the observed event data.
Finite Difference Gradient:
This function calculates the gradient of the objective function we spoke about. The gradient is like a directional derivative. Which is like the direction of the rate of change. Which is like the direction of the slope of a hill, we can go up or down a hill. It nudges around the parameter, and calculates the derivative of the parameter. The array of these nudged around parameters is what is returned after they are optimized.
Minimize:
This is the function that actually has the loop and calls the Finite Difference Gradient each time. Here is where the minimizing happens, how we go down the hill. If we are below a tolerance, we are at the bottom of the hill.
Applied
After an initial guess the parameters are optimized with a mix of bid and ask levels to prevent some over-fitting for each side while keeping some efficiency. We initialize two different arrays to store the bid and ask sizes. After we optimize the parameters we clamp them for the calculations. We then get the array of intensities from the Hawkes Process of bid and ask and plot them both. When the bids are greater than the ask it represents a bullish scenario where there are likely to be more buy than sell orders, pushing up price.
Tool examples:
The idea is that when the bid side is more excitable it is more likely to see a bullish reaction, when the ask is we see a bearish reaction.
We see that there are a lot of crossovers, and I picked two specific spots. The idea of this isn’t to spot crossovers but avoid chop. The values are either close together or far apart. When they are far, it is a classification for us to look for our own opportunities in, when they are close, it signals the market can’t pick a direction just yet.
The value works just as well on a higher timeframe as on a lower one. Hawkes Process is an estimate, so there is a leading value aspect of it.
The value works on equities as well, here is NASDAQ:TSLA on a lower time frame with a lookback of 5.
Inputs
Users can enter the lookback value and timeframe.
No tool is perfect, the Hawkes Process value is also not perfect and should not be followed blindly. It is good to use any tool along with discretion and price action.
Correlation Heatmap█ OVERVIEW
This indicator creates a correlation matrix for a user-specified list of symbols based on their time-aligned weekly or monthly price returns. It calculates the Pearson correlation coefficient for each possible symbol pair, and it displays the results in a symmetric table with heatmap-colored cells. This format provides an intuitive view of the linear relationships between various symbols' price movements over a specific time range.
█ CONCEPTS
Correlation
Correlation typically refers to an observable statistical relationship between two datasets. In a financial time series context, it usually represents the extent to which sampled values from a pair of datasets, such as two series of price returns, vary jointly over time. More specifically, in this context, correlation describes the strength and direction of the relationship between the samples from both series.
If two separate time series tend to rise and fall together proportionally, they might be highly correlated. Likewise, if the series often vary in opposite directions, they might have a strong anticorrelation . If the two series do not exhibit a clear relationship, they might be uncorrelated .
Traders frequently analyze asset correlations to help optimize portfolios, assess market behaviors, identify potential risks, and support trading decisions. For instance, correlation often plays a key role in diversification . When two instruments exhibit a strong correlation in their returns, it might indicate that buying or selling both carries elevated unsystematic risk . Therefore, traders often aim to create balanced portfolios of relatively uncorrelated or anticorrelated assets to help promote investment diversity and potentially offset some of the risks.
When using correlation analysis to support investment decisions, it is crucial to understand the following caveats:
• Correlation does not imply causation . Two assets might vary jointly over an analyzed range, resulting in high correlation or anticorrelation in their returns, but that does not indicate that either instrument directly influences the other. Joint variability between assets might occur because of shared sensitivities to external factors, such as interest rates or global sentiment, or it might be entirely coincidental. In other words, correlation does not provide sufficient information to identify cause-and-effect relationships.
• Correlation does not predict the future relationship between two assets. It only reflects the estimated strength and direction of the relationship between the current analyzed samples. Financial time series are ever-changing. A strong trend between two assets can weaken or reverse in the future.
Correlation coefficient
A correlation coefficient is a numeric measure of correlation. Several coefficients exist, each quantifying different types of relationships between two datasets. The most common and widely known measure is the Pearson product-moment correlation coefficient , also known as the Pearson correlation coefficient or Pearson's r . Usually, when the term "correlation coefficient" is used without context, it refers to this correlation measure.
The Pearson correlation coefficient quantifies the strength and direction of the linear relationship between two variables. In other words, it indicates how consistently variables' values move together or in opposite directions in a proportional, linear manner. Its formula is as follows:
𝑟(𝑥, 𝑦) = cov(𝑥, 𝑦) / (𝜎𝑥 * 𝜎𝑦)
Where:
• 𝑥 is the first variable, and 𝑦 is the second variable.
• cov(𝑥, 𝑦) is the covariance between 𝑥 and 𝑦.
• 𝜎𝑥 is the standard deviation of 𝑥.
• 𝜎𝑦 is the standard deviation of 𝑦.
In essence, the correlation coefficient measures the covariance between two variables, normalized by the product of their standard deviations. The coefficient's value ranges from -1 to 1, allowing a more straightforward interpretation of the relationship between two datasets than what covariance alone provides:
• A value of 1 indicates a perfect positive correlation over the analyzed sample. As one variable's value changes, the other variable's value changes proportionally in the same direction .
• A value of -1 indicates a perfect negative correlation (anticorrelation). As one variable's value increases, the other variable's value decreases proportionally.
• A value of 0 indicates no linear relationship between the variables over the analyzed sample.
Aligning returns across instruments
In a financial time series, each data point (i.e., bar) in a sample represents information collected in periodic intervals. For instance, on a "1D" chart, bars form at specific times as successive days elapse.
However, the times of the data points for a symbol's standard dataset depend on its active sessions , and sessions vary across instrument types. For example, the daily session for NYSE stocks is 09:30 - 16:00 UTC-4/-5 on weekdays, Forex instruments have 24-hour sessions that span from 17:00 UTC-4/-5 on one weekday to 17:00 on the next, and new daily sessions for cryptocurrencies start at 00:00 UTC every day because crypto markets are consistently open.
Therefore, comparing the standard datasets for different asset types to identify correlations presents a challenge. If two symbols' datasets have bars that form at unaligned times, their correlation coefficient does not accurately describe their relationship. When calculating correlations between the returns for two assets, both datasets must maintain consistent time alignment in their values and cover identical ranges for meaningful results.
To address the issue of time alignment across instruments, this indicator requests confirmed weekly or monthly data from spread tickers constructed from the chart's ticker and another specified ticker. The datasets for spreads are derived from lower-timeframe data to ensure the values from all symbols come from aligned points in time, allowing a fair comparison between different instrument types. Additionally, each spread ticker ID includes necessary modifiers, such as extended hours and adjustments.
In this indicator, we use the following process to retrieve time-aligned returns for correlation calculations:
1. Request the current and previous prices from a spread representing the sum of the chart symbol and another symbol ( "chartSymbol + anotherSymbol" ).
2. Request the prices from another spread representing the difference between the two symbols ( "chartSymbol - anotherSymbol" ).
3. Calculate half of the difference between the values from both spreads ( 0.5 * (requestedSum - requestedDifference) ). The results represent the symbol's prices at times aligned with the sample points on the current chart.
4. Calculate the arithmetic return of the retrieved prices: (currentPrice - previousPrice) / previousPrice
5. Repeat steps 1-4 for each symbol requiring analysis.
It's crucial to note that because this process retrieves prices for a symbol at times consistent with periodic points on the current chart, the values can represent prices from before or after the closing time of the symbol's usual session.
Additionally, note that the maximum number of weeks or months in the correlation calculations depends on the chart's range and the largest time range common to all the requested symbols. To maximize the amount of data available for the calculations, we recommend setting the chart to use a daily or higher timeframe and specifying a chart symbol that covers a sufficient time range for your needs.
█ FEATURES
This indicator analyzes the correlations between several pairs of user-specified symbols to provide a structured, intuitive view of the relationships in their returns. Below are the indicator's key features:
Requesting a list of securities
The "Symbol list" text box in the indicator's "Settings/Inputs" tab accepts a comma-separated list of symbols or ticker identifiers with optional spaces (e.g., "XOM, MSFT, BITSTAMP:BTCUSD"). The indicator dynamically requests returns for each symbol in the list, then calculates the correlation between each pair of return series for its heatmap display.
Each item in the list must represent a valid symbol or ticker ID. If the list includes an invalid symbol, the script raises a runtime error.
To specify a broker/exchange for a symbol, include its name as a prefix with a colon in the "EXCHANGE:SYMBOL" format. If a symbol in the list does not specify an exchange prefix, the indicator selects the most commonly used exchange when requesting the data.
Note that the number of symbols allowed in the list depends on the user's plan. Users with non-professional plans can compare up to 20 symbols with this indicator, and users with professional plans can compare up to 32 symbols.
Timeframe and data length selection
The "Returns timeframe" input specifies whether the indicator uses weekly or monthly returns in its calculations. By default, its value is "1M", meaning the indicator analyzes monthly returns. Note that this script requires a chart timeframe lower than or equal to "1M". If the chart uses a higher timeframe, it causes a runtime error.
To customize the length of the data used in the correlation calculations, use the "Max periods" input. When enabled, the indicator limits the calculation window to the number of periods specified in the input field. Otherwise, it uses the chart's time range as the limit. The top-left corner of the table shows the number of confirmed weeks or months used in the calculations.
It's important to note that the number of confirmed periods in the correlation calculations is limited to the largest time range common to all the requested datasets, because a meaningful correlation matrix requires analyzing each symbol's returns under the same market conditions. Therefore, the correlation matrix can show different results for the same symbol pair if another listed symbol restricts the aligned data to a shorter time range.
Heatmap display
This indicator displays the correlations for each symbol pair in a heatmap-styled table representing a symmetric correlation matrix. Each row and column corresponds to a specific symbol, and the cells at their intersections correspond to symbol pairs . For example, the cell at the "AAPL" row and "MSFT" column shows the weekly or monthly correlation between those two symbols' returns. Likewise, the cell at the "MSFT" row and "AAPL" column shows the same value.
Note that the main diagonal cells in the display, where the row and column refer to the same symbol, all show a value of 1 because any series of non-na data is always perfectly correlated with itself.
The background of each correlation cell uses a gradient color based on the correlation value. By default, the gradient uses blue hues for positive correlation, orange hues for negative correlation, and white for no correlation. The intensity of each blue or orange hue corresponds to the strength of the measured correlation or anticorrelation. Users can customize the gradient's base colors using the inputs in the "Color gradient" section of the "Settings/Inputs" tab.
█ FOR Pine Script® CODERS
• This script uses the `getArrayFromString()` function from our ValueAtTime library to process the input list of symbols. The function splits the "string" value by its commas, then constructs an array of non-empty strings without leading or trailing whitespaces. Additionally, it uses the str.upper() function to convert each symbol's characters to uppercase.
• The script's `getAlignedReturns()` function requests time-aligned prices with two request.security() calls that use spread tickers based on the chart's symbol and another symbol. Then, it calculates the arithmetic return using the `changePercent()` function from the ta library. The `collectReturns()` function uses `getAlignedReturns()` within a loop and stores the data from each call within a matrix . The script calls the `arrayCorrelation()` function on pairs of rows from the returned matrix to calculate the correlation values.
• For consistency, the `getAlignedReturns()` function includes extended hours and dividend adjustment modifiers in its data requests. Additionally, it includes other settings inherited from the chart's context, such as "settlement-as-close" preferences.
• A Pine script can execute up to 40 or 64 unique `request.*()` function calls, depending on the user's plan. The maximum number of symbols this script compares is half the plan's limit, because `getAlignedReturns()` uses two request.security() calls.
• This script can use the request.security() function within a loop because all scripts in Pine v6 enable dynamic requests by default. Refer to the Dynamic requests section of the Other timeframes and data page to learn more about this feature, and see our v6 migration guide to learn what's new in Pine v6.
• The script's table uses two distinct color.from_gradient() calls in a switch structure to determine the cell colors for positive and negative correlation values. One call calculates the color for values from -1 to 0 based on the first and second input colors, and the other calculates the colors for values from 0 to 1 based on the second and third input colors.
Look first. Then leap.
Volumatic Trend [ChartPrime]
A unique trend-following indicator that blends trend logic with volume visualization, offering a dynamic view of market momentum and activity. It automatically detects trend shifts and paints volume histograms at key levels, allowing traders to easily spot strength or weakness within trends.
⯁ KEY FEATURES
Trend Detection System:
Uses a custom combination of weighted EMA (swma) and regular EMA to detect trend direction.
A diamond appears on trend shift, indicating the starting point of a new bullish or bearish phase.
Volume Histogram Zones:
At each new trend, the indicator draws two horizontal zones (top and bottom) and visualizes volume activity within that trend using dynamic histogram candles.
Gradient-Based Candle Coloring:
Candle color is blended with a gradient based on volume intensity. This helps highlight where volume spikes occurred, making it easy to identify pressure points.
Volume Summary Labels:
A label at the end of each trend zone displays two critical values:
- Delta: net volume difference between bullish and bearish bars.
- Total: overall volume accumulated during the trend.
⯁ HOW TO USE
Monitor diamond markers to identify when a new trend begins.
Use volume histogram spikes to assess if the trend is supported by strong volume or lacking participation.
A high delta with strong total volume in a trend indicates institutional support.
Compare gradient strength of candles—brighter areas represent higher-volume trading activity.
Can be used alone or combined with other confirmation tools like structure breaks, liquidity sweeps, or order blocks.
⯁ CONCLUSION
Volumatic Trend gives you more than just trend direction—it provides insight into the force behind it. With volume-graded candles and real-time histogram overlays, traders can instantly assess whether a trend is backed by conviction or fading strength. A perfect tool for swing traders and intraday strategists looking to add volume context to their directional setups.
Deadzone Pro @DaviddTechDeadzone Pro by @DaviddTech – Adaptive Multi-Strategy NNFX Trading System
Deadzone Pro by @DaviddTech is a meticulously engineered trading indicator that strictly adheres to the No-Nonsense Forex (NNFX) methodology. It integrates adaptive trend detection, dual confirmation indicators, advanced volatility filtering, and dynamic risk management into one powerful, visually intuitive system. Ideal for traders seeking precision and clarity, this indicator consistently delivers high-probability trade setups across all market conditions.
🔥 Key Features:
The Setup:
Adaptive Hull Moving Average Baseline: Clearly identifies trend direction using an advanced, gradient-colored Hull MA that intensifies based on trend strength, providing immediate visual clarity.
Dual Confirmation Indicators: Combines Waddah Attar Explosion (momentum detector) and Bull/Bear Power (strength gauge) for robust validation, significantly reducing false entries.
Volatility Filter (ADX): Ensures entries are only made during strong trending markets, filtering out weak, range-bound scenarios for enhanced trade accuracy.
Dynamic Trailing Stop Loss: Implements a SuperTrend-based trailing stop using adaptive ATR calculations, managing risk effectively while optimizing exits.
Dashboard:
💎 Gradient Visualization & User Interface:
Dynamic gradient colors enhance readability, clearly indicating bullish/bearish strength.
Comprehensive dashboard summarizes component statuses, real-time market sentiment, and entry conditions at a glance.
Distinct and clear buy/sell entry and exit signals, with adaptive stop-loss levels visually plotted.
Candlestick coloring based on momentum signals (Waddah Attar) for intuitive market reading.
📈 How to Interpret Signals:
Bullish Signal: Enter when Hull MA baseline trends upward, both confirmation indicators align bullish, ADX indicates strong trend (>25), and price breaks above the previous trailing stop.
Bearish Signal: Enter short or exit long when Hull MA baseline trends downward, confirmations indicate bearish momentum, ADX confirms trend strength, and price breaks below previous trailing stop.
📊 Recommended Usage:
Timeframes: Ideal on 1H, 4H, and Daily charts for swing trading; effective on shorter (5M, 15M) charts for day trading.
Markets: Compatible with Forex, Crypto, Indices, Stocks, and Commodities.
The Entry & Exit:
🎯 Trading Styles:
Choose from three distinct trading modes:
Conservative: Requires full alignment of all indicators for maximum accuracy.
Balanced (Default): Optimized balance between signal frequency and reliability.
Aggressive: Fewer confirmations needed for more frequent trading signals.
📝 Credits & Originality:
Deadzone Pro incorporates advanced concepts inspired by:
Hull Moving Average by @Julien_Eche
Waddah Attar Explosion by @LazyBear
Bull Bear Power by @Pinecoders
ADX methodology by @BeikabuOyaji
This system has been significantly refactored and enhanced by @DaviddTech to maximize synergy, clarity, and usability, standing apart distinctly from its original components.
Deadzone Pro exemplifies precision and discipline, aligning fully with NNFX principles to provide traders with a comprehensive yet intuitive trading advantage.
Bottom and Top finder [theUltimator5]🧭 Bottom and Top Finder — Multi-Symbol Momentum Divergence Detector
The Bottom and Top Finder by theUltimator5 is a highly configurable, momentum-based indicator designed to identify potential market reversal points using a multi-symbol relative strength comparison framework. It evaluates Directional Movement Index (DMI) values from up to three correlated or macro-influential assets to determine when the current instrument may be approaching a bottom (oversold exhaustion) or a top (overbought exhaustion).
🧠 How It Works
This script computes both the +DI (positive directional index) and -DI (negative directional index) for:
The currently selected chart symbol
Up to three user-defined reference symbols (e.g., sector leaders, macro ETFs, currencies, volatility proxies)
It uses a logarithmic percent-change approach to normalize all movement metrics, ensuring results are scale-invariant and price-neutral — meaning it works consistently whether a stock trades at $1 or $100,000. This makes the comparison between different assets meaningful, even if they trade on different scales or volatility levels.
The indicator then:
Compares the +DI values of the reference symbols to the current symbol’s +DI → seeking bottoming signals (suggesting the current symbol is unusually weak).
Compares the -DI values of the reference symbols to the current symbol’s -DI → seeking topping signals (suggesting the current symbol is unusually strong on the downside).
These comparisons are aggregated using a weighted average, where you control the influence (multiplier) of each reference symbol.
🔁 Trigger Logic
The indicator generates two dynamic lines:
Bot Line (Bottom Line): Based on reference +DI vs. current +DI
Top Line: Based on reference -DI vs. current -DI
If the Bot Line rises above the user-defined threshold, it may signal that capitulation or oversold conditions are developing. Similarly, if the Top Line rises above its threshold, it may indicate a blow-off top or overbought selling pressure.
To avoid false positives, a second smoothing-based condition must also be met:
The line must significantly exceed its moving average, confirming momentum divergence.
When both conditions are true, the indicator highlights the background in light red (bottom alert) or green (top alert) for easy visual scanning.
🔧 Key Inputs & Customization
You can fine-tune this tool using the following parameters:
Smoothing Length: Controls how smooth or sensitive the DI values are.
Reference Symbols: Up to 3 assets (default: RSP, HYG, DXY) — customizable for sector, macro, or inverse relationships.
Influence Multipliers: Adjust the weight each symbol has on the overall signal.
Display Options:
Toggle to highlight the chart background during trigger conditions.
Toggle to display a real-time table of reference symbols and their influence levels.
📈 Visual Output
Two plotted lines: One for bottoms and one for tops
Dynamically colored based on how far they exceed thresholds
Background highlights to mark trigger zones
Optional table displaying the current reference symbol setup and weights
🛠 Best Use Cases
This tool is ideal for:
Identifying short-term tops or bottoms using momentum exhaustion
Spotting divergences between an asset and broader market or sector health
Macro analysis with assets like SPY, QQQ, GME, MSFT, BTC, etc...
Pair trading signals or market breadth confirmation/disagreement
It complements other technical indicators like RSI, MACD, Bollinger Bands, or price structure patterns (double bottoms/tops, etc.)
BB Breakout + Momentum Squeeze [Strategy]This Strategy is Based on 3 free indicators
- Bollinger Bands Breakout Oscillator: Link
- TTM Squeeze Pro: Link
- Rolling ATR Bands: Link
Bollinger Bands Breakout Oscillator - This tool shows how strong a market trend is by measuring how often prices move outside their normal Bollinger bands range. It helps you see whether prices are strongly moving in one direction or just moving sideways. By looking at how much and how frequently prices push beyond their typical boundaries, you can identify which direction the market is heading over your selected time period.
TM Squeeze Pro - This is a custom version of the TTM Squeeze indicator.
It's designed to help traders spot consolidation phases in the market (when price is coiling or "squeezing") and to catch breakouts early when volatility returns. The logic is based on the relationship between Bollinger Bands and Keltner Channels, combined with a momentum oscillator to show direction and strength.
Rolling ATR Bands - This indicator combines volatility bands (ATR) with momentum and trend signals to show where the market might be breaking out, retesting, or trending. It's highly visual and helpful for traders looking to time entries/exits during trending or volatile moves.
Logic Of the Strategy:
We are going to use the Bollinger Bands Breakout to determine the direction of the market. Than check the Volatility of the price by looking at the TTM Squeeze indicator. And use the ATR Bands to determine dynamic Stop Losses and based on the calculate the Take Profit targets and quantity for each position dynamically.
For the Long Setup:
1. We need to see the that Bull Power (Green line of the Bollinger Bands Breakout Oscilator) is crossing the level of 50.
2. Check the presence of volatility (Green dot based on the TTM Squeeze indicator)
For the Short Setup:
1. We need to see the that Bear Power (Red line of the Bollinger Bands Breakout Oscilator) is crossing the level of 50.
2. Check the presence of volatility (Green dot based on the TTM Squeeze indicator)
Stop Loss is determined by the Lower ATR Band (for the Long entry) and Upper ATR Band (For the Short entry)
Take Profit is 1:1.5 risk reward ration, which means if the Stop loss is 1% the TP target will be 1.5%
Move stop Loss to Breakeven: If the price will go in the direction of the trade for at least half of the Risk Reward target then the stop will automatically be adjusted to the entry price. For Example: the Stop Loss is 1%, the price has move at least 0.5% in the direction of your trade and that will move the Stop Loss level to the Entry point.
You can Adjust the parameters for each indicator used in that script and also adjust the Risk and Money management block to see how the PnL will change.
Advanced Auto Zones + Smart Buy/Sell SignalsAdvanced Auto Zones + Smart RSI/EMA Signals
This indicator automatically draws dynamic support/resistance zones based on recent price action and confirms Buy/Sell signals using RSI crossovers with EMA trend filtering and candle confirmation.
🟥 Red Zone – Resistance
🟦 Blue Zone – Equilibrium
🟩 Green Zones – Support
✅ Buy Signal: RSI crosses above oversold + price above EMA + bullish candle
❌ Sell Signal: RSI crosses below overbought + price below EMA + bearish candle
Includes customizable zone width/height, real-time alerts, and clean visual design. Ideal for trend traders, scalpers, and zone-based strategies.
Institutional Quantum Momentum Impulse [BullByte]## Overview
The Institutional Quantum Momentum Impulse (IQMI) is a sophisticated momentum oscillator designed to detect institutional-level trend strength, volatility conditions, and market regime shifts. It combines multiple advanced technical concepts, including:
- Quantum Momentum Engine (Hilbert Transform + MACD Divergence + Stochastic Energy)
- Fractal Volatility Scoring (GARCH + Keltner-based volatility)
- Dynamic Adaptive Bands (Self-adjusting thresholds based on efficiency)
- Market Phase Detection (Volume + Momentum alignment)
- Liquidity & Cumulative Delta Analysis
The indicator provides a Z-score normalized momentum reading, making it ideal for mean-reversion and trend-following strategies.
---
## Key Features
### 1. Quantum Momentum Core
- Combines Hilbert Transform, MACD divergence, and Stochastic Energy into a single composite momentum score.
- Normalized using a Z-score for statistical significance.
- Smoothed with EMA/WMA/HMA for cleaner signals.
### 2. Dynamic Adaptive Bands
- Upper/Lower bands adjust based on volatility and efficiency ratio .
- Acts as overbought/oversold zones when momentum reaches extremes.
### 3. Market Phase Detection
- Identifies bullish , bearish , or neutral phases using:
- Volume-Weighted MA alignment
- Fractal momentum extremes
### 4. Volatility & Liquidity Filters
- Fractal Volatility Score (0-100 scale) shows market instability.
- Liquidity Check ensures trades are taken in favorable spread conditions.
### 5. Dashboard & Visuals
- Real-time dashboard with key metrics:
- Momentum strength, volatility, efficiency, cumulative delta, and market regime.
- Gradient coloring for intuitive momentum visualization .
---
## Best Trade Setups
### 1. Trend-Following Entries
- Signal :
- QM crosses above zero + Market Phase = Bullish + ADX > 25
- Cumulative Delta rising (buying pressure)
- Confirmation :
- Efficiency > 0.5 (strong momentum quality)
- Liquidity = High (tight spreads)
### 2. Mean-Reversion Entries
- Signal :
- QM touches upper band + Volatility expanding
- Market Regime = Ranging (ADX < 25)
- Confirmation :
- Efficiency < 0.3 (weak momentum follow-through)
- Cumulative Delta divergence (price high but delta declining)
### 3. Breakout Confirmation
- Signal :
- QM holds above zero after a pullback
- Market Phase shifts to Bullish/Bearish
- Confirmation :
- Volatility rising (expansion phase)
- Liquidity remains high
---
## Recommended Timeframes
- Intraday (5M - 1H): Works well for scalping & swing trades.
- Swing Trading (4H - Daily): Best for trend-following setups.
- Position Trading (Weekly+): Useful for macro trend confirmation.
---
## Input Customization
- Resonance Factor (1.0 - 3.618 ): Adjusts MACD divergence sensitivity.
- Entropy Filter (0.382/0.50/0.618) : Controls stochastic damping.
- Smoothing Type (EMA/WMA/HMA) : Changes momentum responsiveness.
- Normalization Period : Adjusts Z-score lookback.
---
The IQMI is a professional-grade momentum indicator that combines institutional-level concepts into a single, easy-to-read oscillator. It works across all markets (stocks, forex, crypto) and is ideal for traders who want:
✅ Early trend detection
✅ Volatility-adjusted signals
✅ Institutional liquidity insights
✅ Clear dashboard for quick analysis
Try it on TradingView and enhance your trading edge! 🚀
Happy Trading!
- BullByte
Smarter Money Concepts - OBs [PhenLabs]📊 Smarter Money Concepts - OBs
Version: PineScript™ v6
📌 Description
Smarter Money Concepts - OBs (Order Blocks) is an advanced technical analysis tool designed to identify and visualize institutional order zones on your charts. Order blocks represent significant areas of liquidity where smart money has entered positions before major moves. By tracking these zones, traders can anticipate potential reversals, continuations, and key reaction points in price action.
This indicator incorporates volume filtering technology to identify only the most significant order blocks, eliminating low-quality signals and focusing on areas where institutional participation is likely present. The combination of price structure analysis and volume confirmation provides traders with high-probability zones that may attract future price action for tests, rejections, or breakouts.
🚀 Points of Innovation
Volume-Filtered Block Detection : Identifies only order blocks formed with significant volume, focusing on areas with institutional participation
Advanced Break of Structure Logic : Uses sophisticated price action analysis to detect legitimate market structure breaks preceding order blocks
Dynamic Block Management : Intelligently tracks, extends, and removes order blocks based on price interaction and time-based expiration
Structure Recognition System : Employs technical analysis algorithms to find significant swing points for accurate order block identification
Dual Directional Tracking : Simultaneously monitors both bullish and bearish order blocks for comprehensive market structure analysis
🔧 Core Components
Order Block Detection : Identifies institutional entry zones by analyzing price action before significant breaks of structure, capturing where smart money has likely positioned before moves.
Volume Filtering Algorithm : Calculates relative volume compared to a moving average to qualify only order blocks formed with significant market participation, eliminating noise.
Structure Break Recognition : Uses price action analysis to detect legitimate breaks of market structure, ensuring order blocks are identified only at significant market turning points.
Dynamic Block Management : Continuously monitors price interaction with existing blocks, extending, maintaining, or removing them based on current market behavior.
🔥 Key Features
Volume-Based Filtering : Filter out insignificant blocks by requiring a minimum volume threshold, focusing only on zones with likely institutional activity
Visual Block Highlighting : Color-coded boxes clearly mark bullish and bearish order blocks with customizable appearance
Flexible Mitigation Options : Choose between “Wick” or “Close” methods for determining when a block has been tested or mitigated
Scan Range Adjustment : Customize how far back the indicator looks for structure points to adapt to different market conditions and timeframes
Break Source Selection : Configure which price component (close, open, high, low) is used to determine structure breaks for precise block identification
🎨 Visualization
Bullish Order Blocks : Blue-colored rectangles highlighting zones where bullish institutional orders were likely placed before upward moves, representing potential support areas.
Bearish Order Blocks : Red-colored rectangles highlighting zones where bearish institutional orders were likely placed before downward moves, representing potential resistance areas.
Block Extension : Order blocks extend to the right of the chart, providing clear visualization of these significant zones as price continues to develop.
📖 Usage Guidelines
Order Block Settings
Scan Range : Default: 25. Defines how many bars the indicator scans to determine significant structure points for order block identification.
Bull Break Price Source : Default: Close. Determines which price component is used to detect bullish breaks of structure.
Bear Break Price Source : Default: Close. Determines which price component is used to detect bearish breaks of structure.
Visual Settings
Bullish Blocks Color : Default: Blue with 85% transparency. Controls the appearance of bullish order blocks.
Bearish Blocks Color : Default: Red with 85% transparency. Controls the appearance of bearish order blocks.
General Options
Block Mitigation Method : Default: Wick, Options: Wick, Close. Determines how block mitigation is calculated - “Wick” uses high/low values while “Close” uses close values for more conservative mitigation criteria.
Remove Filled Blocks : Default: Disabled. When enabled, order blocks are removed once they’ve been mitigated by price action.
Volume Filter
Volume Filter Enabled : Default: Enabled. When activated, only shows order blocks formed with significant volume relative to recent average.
Volume SMA Period : Default: 15, Range: 1-50. Number of periods used to calculate the average volume baseline.
Min. Volume Ratio : Default: 1.5, Range: 0.5-10.0. Minimum volume ratio compared to average required to display an order block; higher values filter out more blocks.
✅ Best Use Cases
Identifying high-probability support and resistance zones for trade entries and exits
Finding optimal stop-loss placement behind significant order blocks
Detecting potential reversal areas where price may react after extended moves
Confirming breakout trades when price clears major order blocks
Building a comprehensive market structure map for medium to long-term trading decisions
Pinpointing areas where smart money may have positioned before major market moves
⚠️ Limitations
Most effective on higher timeframes (1H and above) where institutional activity is more clearly defined
Can generate multiple signals in choppy market conditions, requiring additional filtering
Volume filtering relies on accurate volume data, which may be less reliable for some securities
Recent market structure changes may invalidate older order blocks not yet automatically removed
Block identification is based on historical price action and may not predict future behavior with certainty
💡 What Makes This Unique
Volume Intelligence : Unlike basic order block indicators, this script incorporates volume analysis to identify only the most significant institutional zones, focusing on quality over quantity.
Structural Precision : Uses sophisticated break of structure algorithms to identify true market turning points, going beyond simple price pattern recognition.
Dynamic Block Management : Implements automatic block tracking, extension, and cleanup to maintain a clean and relevant chart display without manual intervention.
Institutional Focus : Designed specifically to highlight areas where smart money has likely positioned, helping retail traders align with institutional perspectives rather than retail noise.
🔬 How It Works
1. Structure Identification Process :
The indicator continuously scans price action to identify significant swing points and structure levels within the specified range, establishing a foundation for order block recognition.
2. Break Detection :
When price breaks an established structure level (crossing below a significant low for bearish breaks or above a significant high for bullish breaks), the indicator marks this as a potential zone for order block formation.
3. Volume Qualification :
For each potential order block, the algorithm calculates the relative volume compared to the configured period average. Only blocks formed with volume exceeding the minimum ratio threshold are displayed.
4. Block Creation and Management :
Valid order blocks are created, tracked, and managed as price continues to develop. Blocks extend to the right of the chart until they are either mitigated by price action or expire after the designated timeframe.
5. Continuous Monitoring :
The indicator constantly evaluates price interaction with existing blocks, determining when blocks have been tested, mitigated, or invalidated, and updates the visual representation accordingly.
💡 Note:
Order Blocks represent areas where institutional traders have likely established positions and may defend these zones during future price visits. For optimal results, use this indicator in conjunction with other confluent factors such as key support/resistance levels, trendlines, or additional confirmation indicators. The most reliable signals typically occur on higher timeframes where institutional activity is most prominent. Start with the default settings and adjust parameters gradually to match your specific trading instrument and style.
Half Causal EstimatorOverview
The Half Causal Estimator is a specialized filtering method that provides responsive averages of market variables (volume, true range, or price change) with significantly reduced time delay compared to traditional moving averages. It employs a hybrid approach that leverages both historical data and time-of-day patterns to create a timely representation of market activity while maintaining smooth output.
Core Concept
Traditional moving averages suffer from time lag, which can delay signals and reduce their effectiveness for real-time decision making. The Half Causal Estimator addresses this limitation by using a non-causal filtering method that incorporates recent historical data (the causal component) alongside expected future behavior based on time-of-day patterns (the non-causal component).
This dual approach allows the filter to respond more quickly to changing market conditions while maintaining smoothness. The name "Half Causal" refers to this hybrid methodology—half of the data window comes from actual historical observations, while the other half is derived from time-of-day patterns observed over multiple days. By incorporating these "future" values from past patterns, the estimator can reduce the inherent lag present in traditional moving averages.
How It Works
The indicator operates through several coordinated steps. First, it stores and organizes market data by specific times of day (minutes/hours). Then it builds a profile of typical behavior for each time period. For calculations, it creates a filtering window where half consists of recent actual data and half consists of expected future values based on historical time-of-day patterns. Finally, it applies a kernel-based smoothing function to weight the values in this composite window.
This approach is particularly effective because market variables like volume, true range, and price changes tend to follow recognizable intraday patterns (they are positive values without DC components). By leveraging these patterns, the indicator doesn't try to predict future values in the traditional sense, but rather incorporates the average historical behavior at those future times into the current estimate.
The benefit of using this "average future data" approach is that it counteracts the lag inherent in traditional moving averages. In a standard moving average, recent price action is underweighted because older data points hold equal influence. By incorporating time-of-day averages for future periods, the Half Causal Estimator essentially shifts the center of the filter window closer to the current bar, resulting in more timely outputs while maintaining smoothing benefits.
Understanding Kernel Smoothing
At the heart of the Half Causal Estimator is kernel smoothing, a statistical technique that creates weighted averages where points closer to the center receive higher weights. This approach offers several advantages over simple moving averages. Unlike simple moving averages that weight all points equally, kernel smoothing applies a mathematically defined weight distribution. The weighting function helps minimize the impact of outliers and random fluctuations. Additionally, by adjusting the kernel width parameter, users can fine-tune the balance between responsiveness and smoothness.
The indicator supports three kernel types. The Gaussian kernel uses a bell-shaped distribution that weights central points heavily while still considering distant points. The Epanechnikov kernel employs a parabolic function that provides efficient noise reduction with a finite support range. The Triangular kernel applies a linear weighting that decreases uniformly from center to edges. These kernel functions provide the mathematical foundation for how the filter processes the combined window of past and "future" data points.
Applicable Data Sources
The indicator can be applied to three different data sources: volume (the trading volume of the security), true range (expressed as a percentage, measuring volatility), and change (the absolute percentage change from one closing price to the next).
Each of these variables shares the characteristic of being consistently positive and exhibiting cyclical intraday patterns, making them ideal candidates for this filtering approach.
Practical Applications
The Half Causal Estimator excels in scenarios where timely information is crucial. It helps in identifying volume climaxes or diminishing volume trends earlier than conventional indicators. It can detect changes in volatility patterns with reduced lag. The indicator is also useful for recognizing shifts in price momentum before they become obvious in price action, and providing smoother data for algorithmic trading systems that require reduced noise without sacrificing timeliness.
When volatility or volume spikes occur, conventional moving averages typically lag behind, potentially causing missed opportunities or delayed responses. The Half Causal Estimator produces signals that align more closely with actual market turns.
Technical Implementation
The implementation of the Half Causal Estimator involves several technical components working together. Data collection and organization is the first step—the indicator maintains a data structure that organizes market data by specific times of day. This creates a historical record of how volume, true range, or price change typically behaves at each minute/hour of the trading day.
For each calculation, the indicator constructs a composite window consisting of recent actual data points from the current session (the causal half) and historical averages for upcoming time periods from previous sessions (the non-causal half). The selected kernel function is then applied to this composite window, creating a weighted average where points closer to the center receive higher weights according to the mathematical properties of the chosen kernel. Finally, the kernel weights are normalized to ensure the output maintains proper scaling regardless of the kernel type or width parameter.
This framework enables the indicator to leverage the predictable time-of-day components in market data without trying to predict specific future values. Instead, it uses average historical patterns to reduce lag while maintaining the statistical benefits of smoothing techniques.
Configuration Options
The indicator provides several customization options. The data period setting determines the number of days of observations to store (0 uses all available data). Filter length controls the number of historical data points for the filter (total window size is length × 2 - 1). Filter width adjusts the width of the kernel function. Users can also select between Gaussian, Epanechnikov, and Triangular kernel functions, and customize visual settings such as colors and line width.
These parameters allow for fine-tuning the balance between responsiveness and smoothness based on individual trading preferences and the specific characteristics of the traded instrument.
Limitations
The indicator requires minute-based intraday timeframes, securities with volume data (when using volume as the source), and sufficient historical data to establish time-of-day patterns.
Conclusion
The Half Causal Estimator represents an innovative approach to technical analysis that addresses one of the fundamental limitations of traditional indicators: time lag. By incorporating time-of-day patterns into its calculations, it provides a more timely representation of market variables while maintaining the noise-reduction benefits of smoothing. This makes it a valuable tool for traders who need to make decisions based on real-time information about volume, volatility, or price changes.
Dskyz Adaptive Futures Elite (DAFE)Dskyz Adaptive Futures Edge (DAFE)
imgur.com
A Dynamic Futures Trading Strategy
DAFE adapts to market volatility and price action using technical indicators and advanced risk management. It’s built for high-stakes futures trading (e.g., MNQ, BTCUSDT.P), offering modular logic for scalpers and swing traders alike.
Key Features
Adaptive Moving Averages
Dynamic Logic: Fast and slow SMAs adjust lengths via ATR, reacting to momentum shifts and smoothing in calm markets.
Signals: Long entry on fast SMA crossing above slow SMA with price confirmation; short on cross below.
RSI Filtering (Optional)
Momentum Check: Confirms entries with RSI crossovers (e.g., above oversold for longs). Toggle on/off with custom levels.
Fine-Tuning: Adjustable lookback and thresholds (e.g., 60/40) for precision.
Candlestick Pattern Recognition
Eng|Enhanced Detection: Identifies strong bullish/bearish engulfing patterns, validated by volume and range strength (vs. 10-period SMA).
Conflict Avoidance: Skips trades if both patterns appear in the lookback window, reducing whipsaws.
Multi-Timeframe Trend Filter
15-Minute Alignment: Syncs intrabar trades with 15-minute SMA trends; optional for flexibility.
Dollar-Cost Averaging (DCA) New!
Scaling: Adds up to a set number of entries (e.g., 4) on pullbacks/rallies, spaced by ATR multiples.
Control: Caps exposure and resets on exit, enhancing trend-following potential.
Trade Execution & Risk Management
Entry Rules: Prioritizes moving averages or patterns (user choice), with volume, volatility, and time filters.
Stops & Trails:
Initial Stop: ATR-based (2–3.5x, volatility-adjusted).
Trailing Stop: Locks profits with configurable ATR offset and multiplier.
Discipline
Cooldown: Pauses post-exit (e.g., 0–5 minutes).
Min Hold: Ensures trades last a set number of bars (e.g., 2–10).
Visualization & Tools
Charts: Overlays MAs, stops, and signals; trend shaded in background.
Dashboard: Shows position, P&L, win rate, and more in real-time.
Debugging: Logs signal details for optimization.
Input Parameters
Parameter Purpose Suggested Use
Use RSI Filter - Toggle RSI confirmation *Disable 4 price-only
trading
RSI Length - RSI period (e.g., 14) *7–14 for sensitivity
RSI Overbought/Oversold - Adjust for market type *Set levels (e.g., 60/40)
Use Candlestick Patterns - Enables engulfing signals *Disable for MA focus
Pattern Lookback - Pattern window (e.g., 19) *10–20 bars for balance
Use 15m Trend Filter - Align with 15-min trend *Enable for trend trades
Fast/Slow MA Length - Base MA lengths (e.g., 9/19) *10–25 / 30–60 per
timeframe
Volatility Threshold - Filters volatile spikes *Max ATR/close (e.g., 1%)
Min Volume - Entry volume threshold *Avoid illiquid periods
(e.g., 10)
ATR Length - ATR period (e.g., 14) *Standard volatility
measure
Trailing Stop ATR Offset - Trail distance (e.g., 0.5) *0.5–1.5 for tightness
Trailing Stop ATR Multi - Trail multiplier (e.g., 1.0) *1–3 for trend room
Cooldown Minutes - Post-exit pause (e.g., 0–5) *Prevents overtrading
Min Bars to Hold - Min trade duration (e.g., 2) *5–10 for intraday
Trading Hours - Active window (e.g., 9–16) *Focus on key sessions
Use DCA - Toggle DCA *Enable for scaling
Max DCA Entries - Cap entries (e.g., 4) *Limit risk exposure
DCA ATR Multiplier Entry spacing (e.g., 1.0) *1–2 for wider gaps
Compliance
Realistic Testing: Fixed quantities, capital, and slippage for accurate backtests.
Transparency: All logic is user-visible and adjustable.
Risk Controls: Cooldowns, stops, and hold periods ensure stability.
Flexibility: Adapts to various futures and timeframes.
Summary
DAFE excels in volatile futures markets with adaptive logic, DCA scaling, and robust risk tools. Currently in prop account testing, it’s a powerful framework for precision trading.
Caution
DAFE is experimental, not a profit guarantee. Futures trading risks significant losses due to leverage. Backtest, simulate, and monitor actively before live use. All trading decisions are your responsibility.
Multi-Factor Reversal AnalyzerMulti-Factor Reversal Analyzer – Quantitative Reversal Signal System
OVERVIEW
Multi-Factor Reversal Analyzer is a comprehensive technical analysis toolkit designed to detect market tops and bottoms with high precision. It combines trend momentum analysis, price action behavior, wave oscillation structure, and volatility breakout potential into one unified indicator.
This tool is ideal for traders seeking to catch reversals, filter false breakouts, and enhance entry/exit timing through a blend of leading and lagging signals. Whether you’re a discretionary trader or building a systematic strategy, this multi-dimensional model provides clarity across market regimes.
IMPLEMENTATION PRINCIPLES
1. Trend Strength Detector
Analyzes price and volume momentum using directional bias and volume-weighted trend scoring to quantify bullish or bearish strength.
2. Price Action Index
Measures trend stability and directional momentum through a composite score based on price volatility, stochastic behavior, and signal-to-noise dispersion metrics.
3. Wave Trend Oscillator
Identifies turning points and potential divergences using normalized smoothed lines and histogram differentials.
4. Volatility Gold Zone
Detects moments of extremely compressed volatility, signaling potential large-move breakout conditions.
5. Multi-Divergence Detection
Tracks regular and hidden bullish/bearish divergences across multiple oscillators for reversal confirmation.
KEY FEATURES
1. Multi-Layer Reversal Logic
• Combines trend scoring, oscillator divergence, and volatility squeezes for triangulated reversal detection.
• Helps traders distinguish between trend pullbacks and true reversals.
2. Advanced Divergence Detection
• Detects both regular and hidden divergences using pivot-based confirmation logic.
• Customizable lookback ranges and pivot sensitivity provide flexible tuning for different market styles.
3. Gold Zone Volatility Compression
• Highlights pre-breakout zones using custom oscillation models (RSI, harmonic, Karobein, etc.).
• Improves anticipation of breakout opportunities following low-volatility compressions.
4. Trend Direction Context
• PAI and Trend Score components provide top-down insight into prevailing bias.
• Built-in “Straddle Area” highlights consolidation zones; breakouts from this area often signal new trend phases.
5. Flexible Visualization
• Color-coded trend bars, reversal markers, normalized oscillator plots, and trend strength labels.
• Designed for both visual discretionary traders and data-driven system developers.
USAGE GUIDELINES
1. Applicable Markets
• Suitable for stocks, crypto, futures, and forex
• Supports reversal, mean-reversion, and breakout trading styles
2. Recommended Timeframes
• Short-term traders: 5m / 15m / 1H — use Wave Trend divergence + Gold Zone
• Swing traders: 4H / Daily — rely on Price Action Index and Trend Detector
• Macro trend context: use PAI HTF mode for higher timeframe overlays
3. Reversal Strategy Flow
• Watch for divergence (WT/PAI) + Gold Zone compression
• Confirm with Trend Score weakening or flipping
• Use Straddle Area breakout for final trigger
• Optional: enable bar coloring or labels for visual reinforcement
• The indicator performs optimally when used in conjunction with a harmonic pattern recognition tool
4. Additional Note on the Gold Zone
The “Gold Zone” does not directly indicate a market bottom. Since it is displayed at the bottom of the chart, it may be misunderstood as a bullish signal. In reality, the Gold Zone represents a compression of price momentum and volatility, suggesting that a significant directional move is about to occur. The direction of that move—upward or downward—should be determined by analyzing the histogram:
• If histogram momentum is weakening, the Gold Zone may precede a downward move.
• If histogram momentum is strengthening, it may signal an upcoming rebound or rally.
Treat the Gold Zone as a warning of impending volatility, and always combine it with trend indicators for accurate directional judgment.
RISK DISCLAIMER
• This indicator calculates trend direction based on historical data and cannot guarantee future market performance. When using this indicator for trading, always combine it with other technical analysis tools, fundamental analysis, and personal trading experience for comprehensive decision-making.
• Market conditions are uncertain, and trend signals may result in false positives or lag. Traders should avoid over-reliance on indicator signals and implement stop-loss strategies and risk management techniques to reduce potential losses.
• Leverage trading carries high risks and may result in rapid capital loss. If using this indicator in leveraged markets (such as futures, forex, or cryptocurrency derivatives), exercise caution, manage risks properly, and set reasonable stop-loss/take-profit levels to protect funds.
• All trading decisions are the sole responsibility of the trader. The developer is not liable for any trading losses. This indicator is for technical analysis reference only and does not constitute investment advice.
• Before live trading, it is recommended to use a demo account for testing to fully understand how to use the indicator and apply proper risk management strategies.
CHANGELOG
v1.0: Initial release featuring integrated Price Action Index, Trend Strength Scoring, Wave Trend Oscillator, Gold Zone Compression Detection, and dual-type divergence recognition. Supports higher timeframe (HTF) synchronization, visual signal markers, and diversified parameter configurations.
STK Scalping Signály (EMA + RSI + Objem) + Textový trendSTK Scalping Signály (EMA + RSI + Objem) + Textový trend
⚔️ ScalperX: Trap Sniper Pro
## ⚙️ **ScalperX: Trap Sniper Pro **
This script is a **smart money trap detector** built for scalpers and day traders who want to catch **reversals at liquidity sweeps** — before the big moves start.
It identifies **fakeouts**, **stop hunts**, and **trap wicks** by combining:
- Swing high/low sweeps
- Candle body confirmation
- VWAP bias
- Minimum volatility filter
---
### 🔍 Core Features:
- **Trap Wick Detection**
Detects if price sweeps a recent high or low and immediately rejects — classic liquidity grab behavior.
- **VWAP Trend Bias**
Ensures signals are only taken in the direction of institutional flow.
- **Minimum Movement Filter**
Filters out small or irrelevant candles — only signals when price range exceeds a set percentage (e.g., 0.3%).
- **Visual Debug Markers**
Triangles show sweep zones, circles show valid volatility — so you can see *why* a signal did or didn’t fire.
- **BUY / SELL Labels**
Signals are shown clearly when all trap and trend conditions align.
- **Alerts Built-In**
Set notifications for when trap signals appear in real time.
---
### 🧠 Strategy Logic:
**BUY Trap (Long Entry):**
- Price sweeps a recent low
- Candle closes bullish above VWAP
- Minimum range (e.g., 0.3%)
**SELL Trap (Short Entry):**
- Price sweeps a recent high
- Candle closes bearish below VWAP
- Minimum range (e.g., 0.3%)
---
### 🧪 Ideal For:
- Crypto scalpers (1m, 5m, 15m)
- Stop hunt reversal traders
- Smart money + liquidity-style systems
---
False Breakout PRO📌 False Breakout PRO – Enhanced False Breakout Detection Tool
False Breakout PRO is an advanced version of the original "False Breakout (Expo)" indicator by .
This tool is designed to help traders detect bullish and bearish false breakouts with high precision. By offering a more customizable and smarter interface, it helps reduce noise and false signals through various filtering and visualization options.
🔍 How It Works
The script continuously scans for new highs or lows based on a user-defined period.
It identifies false breakouts when price briefly breaks out of a recent high/low but then quickly reverses. These are often seen as market traps, and this indicator aims to highlight them early.
✅ Key Features in the PRO Version
📌 Toggle to display all signals or only the most recent one
💬 Price labels with clean text and optional visibility
📊 Smart summary table for instant signal reference
📈 Auto-extended lines that follow price action
⚡ Lightweight and optimized for speed and real-time responsiveness
🛠 Configurable Settings
False breakout detection period
Signal validity window (how long a signal is considered active)
Smoothing types: Raw (💎), WMA, or HMA
Aggressive mode for early signal generation
Enable or disable:
Price labels
Summary table
Only latest signal mode
⚠️ License Notice
This script is derived from @Zeiierman’s original work and is published under the Creative Commons BY-NC-SA 4.0 license.
🔒 Commercial use is NOT allowed. Attribution to the original author is required.
🇸🇦 False Breakout PRO – أداة متقدمة لكشف الكسر الكاذب
False Breakout PRO هو إصدار مطور من السكريبت الأصلي "False Breakout (Expo)" من تطوير ، وتم تحسينه لتقديم تجربة استخدام أكثر احترافية ومرونة للمستخدمين للكشف عن الكسر الكاذب
🔍 آلية العمل
يقوم السكريبت بمراقبة القمم والقيعان الجديدة بناءً على فترة يتم تحديدها من قبل المستخدم.
ثم يحدد الكسر الكاذب عندما يكسر السعر مستوى مرتفعًا أو منخفضًا ثم يعود بسرعة. هذه الحركة غالبًا ما تكون خداعًا للمضاربين، ويقوم المؤشر بكشفها مبكرًا.
✅ أهم ميزات النسخة PRO
📌 التبديل بين عرض جميع الإشارات أو أحدث إشارة فقط
💬 عرض سعر الإشارة بنص نظيف واختياري
📊 جدول ملخص ذكي لعرض آخر الإشارات بسرعة
📈 تمديد تلقائي للخطوط لمتابعة حركة السعر
⚡ واجهة خفيفة وسريعة ومناسبة للعرض اللحظي
🛠 الإعدادات القابلة للتعديل
فترة تحديد الكسر الكاذب
مدة صلاحية الإشارة
أنواع الفلترة: 💎 خام، WMA، أو HMA
وضع الكشف العدواني (Aggressive)
خيارات العرض:
إظهار أو إخفاء السعر
إظهار أو إخفاء الجدول
عرض آخر إشارة فقط
⚠️ رخصة الاستخدام
تم تطوير هذا السكريبت بالاعتماد على السكريبت الأصلي من @Zeiierman
وهو مرخص بموجب Creative Commons BY-NC-SA 4.0
🔒 الاستخدام التجاري غير مسموح. ويجب نسب الفضل للمطور الأصلي.
Cluster Price StepThis script allows you to calculate the optimal price step for current volatility when setting up cluster charts.
Delta vs Price Candle DivergenceDelta vs Price Candle Divergence
This indicator highlights potential turning points by identifying single-bar divergences between the direction of the price candle and the net volume delta for that same bar.
How it Works:
* Bearish Candle Divergence (Maroon Background): The background is highlighted when the main price candle closes higher than its open (a "green" price candle), but the net volume delta for that bar is negative (a "red" delta candle). This suggests buying activity lacked strong conviction, or significant selling occurred despite the upward price close.
* Bullish Candle Divergence (Lime Background): The background is highlighted when the main price candle closes lower than its open (a "red" price candle), but the net volume delta for that bar is positive (a "green" delta candle). This suggests selling activity lacked strong conviction, or significant buying occurred despite the downward price close.
The volume delta is calculated by analyzing data from a lower timeframe to approximate the buying and selling volume within each bar of the main chart. You can configure this lower timeframe in the settings; using a smaller timeframe (like the 10-seconds mentioned) provides more granular delta data.
Example Scenario:
Observing the London session today, instances of these divergences might appear. For example, using a 10-second lower timeframe setting for delta calculation, you might see several bars showing a Bearish Candle Divergence (price candle up, delta candle down) near a session high, potentially indicating weakening buying pressure and suggesting a possible reversal setup. Conversely, Bullish Candle Divergences near lows could signal potential exhaustion of selling pressure.
Important Note:
Divergences are signals of potential pressure shifts, not guaranteed reversal indicators. However, when used in conjunction with confirming lower timeframe price action following a signal, they can help identify potentially powerful entry opportunities. Always use these signals alongside other technical analysis methods, price action context, and robust risk management strategies.
Credits:
* The core concept of Volume Delta calculation builds upon the indicator by @TradingView
* Candle divergence logic and background color enhancement credit to smiley1910.
Explore More:
Feel free to check out my other indicators available on TradingView!
15 Minute Volume Reversal PointsVolume marks reversal points on 15-Minute chart. Tells Support and Resistance Levels.
SanAlgo V3This is an indicator which uses VWAP and ATR indicators.
Buy / Sell signals are plotted with the breakout of ATR deviations and filtered using VWAP.
You can change deviation as per your need.
Alerts have been added to suit your preference.
Explore additional settings, toggle between options
This indicator works on all types of assets, and all timeframes.
Multi Oscillator OB/OS Signals v3 - Scope TestIndicator Description: Multi Oscillator OB/OS Signals
Purpose:
The "Multi Oscillator OB/OS Signals" indicator is a TradingView tool designed to help traders identify potential market extremes and momentum shifts by monitoring four popular oscillators simultaneously: RSI, Stochastic RSI, CCI, and MACD. Instead of displaying these oscillators in separate panes, this indicator plots distinct visual symbols directly onto the main price chart whenever specific predefined conditions (typically related to overbought/oversold levels or line crossovers) are met for each oscillator. This provides a consolidated view of potential signals from these different technical tools.
How It Works:
The indicator calculates the values for each of the four oscillators based on user-defined settings (like length periods and price sources) and then checks for specific signal conditions on every bar:
Relative Strength Index (RSI):
It monitors the standard RSI value.
When the RSI crosses above the user-defined Overbought (OB) level (e.g., 70), it plots an "Overbought" symbol (like a downward triangle) above that price bar.
When the RSI crosses below the user-defined Oversold (OS) level (e.g., 30), it plots an "Oversold" symbol (like an upward triangle) below that price bar.
Stochastic RSI:
This works similarly to RSI but is based on the Stochastic calculation applied to the RSI value itself (specifically, the %K line of the Stoch RSI).
When the Stoch RSI's %K line crosses above its Overbought level (e.g., 80), it plots its designated OB symbol (like a downward arrow) above the bar.
When the %K line crosses below its Oversold level (e.g., 20), it plots its OS symbol (like an upward arrow) below the bar.
Commodity Channel Index (CCI):
It tracks the CCI value.
When the CCI crosses above its Overbought level (e.g., +100), it plots its OB symbol (like a square) above the bar.
When the CCI crosses below its Oversold level (e.g., -100), it plots its OS symbol (like a square) below the bar.
Moving Average Convergence Divergence (MACD):
Unlike the others, MACD signals here are not based on fixed OB/OS levels.
It identifies when the main MACD line crosses above its Signal line. This is considered a bullish crossover and is indicated by a specific symbol (like an upward label) plotted below the price bar.
It also identifies when the MACD line crosses below its Signal line. This is a bearish crossover, indicated by a different symbol (like a downward label) plotted above the price bar.
Visualization:
All these signals appear as small, distinct shapes directly on the price chart at the bar where the condition occurred. The shapes, their colors, and their position (above or below the bar) are predefined for each signal type to allow for quick visual identification. Note: In the current version of the underlying code, the size of these shapes is fixed (e.g., tiny) and not user-adjustable via the settings.
Configuration:
Users can access the indicator's settings to customize:
The calculation parameters (Length periods, smoothing, price source) for each individual oscillator (RSI, Stoch RSI, CCI, MACD).
The specific Overbought and Oversold threshold levels for RSI, Stoch RSI, and CCI.
The colors associated with each type of signal (OB, OS, Bullish Cross, Bearish Cross).
(Limitation Note: While settings exist to toggle the visibility of signals for each oscillator individually, due to a technical workaround in the current code, these toggles may not actively prevent the shapes from plotting if the underlying condition is met.)
Alerts:
The indicator itself does not automatically generate pop-up alerts. However, it creates the necessary "Alert Conditions" within TradingView's alert system. This means users can manually set up alerts for any of the specific signals generated by the indicator (e.g., "RSI Overbought Enter," "MACD Bullish Crossover"). When creating an alert, the user selects this indicator, chooses the desired condition from the list provided by the script, and configures the alert actions.
Intended Use:
This indicator aims to provide traders with convenient visual cues for potential over-extension in price (via OB/OS signals) or shifts in momentum (via MACD crossovers) based on multiple standard oscillators. These signals are often used as potential indicators for:
Identifying areas where a trend might be exhausted and prone to a pullback or reversal.
Confirming signals generated by other analysis methods or trading strategies.
Noting shifts in short-term momentum.
Disclaimer: As with any technical indicator, the signals generated should not be taken as direct buy or sell recommendations. They are best used in conjunction with other forms of analysis (price action, trend analysis, volume, fundamental analysis, etc.) and within the framework of a well-defined trading plan that includes risk management. Market conditions can change, and indicator signals can sometimes be false or misleading.
Scalping Strategy: EMA + RSIthis is best for 1 to 3 min scalping,this stratagy base on long ema and short ema, i use rsi level 30 to 70, fpr comfarmation .
MACD WIZARD v2 Modified
The “MACD WIZARD v2 Modified” indicator layers multiple techniques into one comprehensive tool:
- It uses the **Mayer Multiple** to assess overvaluation or undervaluation relative to a 200–period SMA.
- The core **MACD** calculation is enhanced by displaying its angular trend both on the current chart and across additional timeframes (1H, 4H, Daily).
- A floating dashboard neatly summarizes these angular values, adding clarity on momentum changes.
- The script also detects MACD crossovers, pivots, and even divergence between price and MACD, all while dynamically adjusting background colors to highlight key market zones.
- Alerts are integrated to notify you of potential buy, sell, and caution signals.
- Finally, the inclusion of **moon phase calculations** adds an extra layer of cyclical insight.
This multi–dimensional design makes the indicator not only a tool for MACD analysis but also an all–in–one system for visualizing market conditions and spotting early reversal signals. It’s a robust solution for traders looking to combine technical analysis with dynamic visual feedback.
## 1. Global Background Override
- **Inputs and Functionality:**
- **Use Global Background Override:** An option allowing you to force a uniform background color across the chart instead of using the indicator’s dynamic colors.
- **Global Background Color Override:** When enabled, all background color changes (for zones, moon phases, etc.) will use this input color.
- **Helper Function:**
A small function (`getBGColor(origColor)`) checks whether the global override is active. It returns the user–specified global color if enabled or falls back to the element’s default color.
---
## 2. Mayer Multiple Calculation
- **Purpose:**
The indicator computes the Mayer Multiple to gauge how the current price compares to its 200–period Simple Moving Average (SMA). This is a popular metric for assessing overvalued or undervalued conditions.
- **Steps Involved:**
- **Compute the SMA:** A 200–period SMA of the closing price is calculated.
- **Determine the Multiple:** The current price is divided by the SMA.
- **Squishing for Clarity:**
The multiple is “squished” by centering it around 1 and then scaling it down using a factor. This produces more compact values ideal for a histogram display.
- **Signal Generation:**
- **Sell Signal:** Generated if the multiple exceeds a user-defined threshold (indicating overvaluation).
- **Buy Signal:** Generated if the multiple falls below a user–defined undervalue point (indicating undervaluation).
- **Neutral:** If neither condition is met.
- **Visualization:**
The squished multiple is plotted as a histogram. Its color dynamically changes (red for sell, green for buy, yellow for neutral), while horizontal lines mark the threshold and undervalue levels.
---
## 3. MACD Calculation
- **Standard MACD Setup:**
- **Inputs:** Fast length (12), slow length (26), and signal smoothing (9) are used by the built–in MACD function.
- **Output:**
The script calculates the MACD line and its signal line, which serve as the basis for many of the later trend and divergence analyses.
---
## 4. MACD Angular Trend Calculation & Display
- **Dynamic Angular Measurement:**
- **Slope Determination:**
The indicator computes the slope by finding the difference between the current and previous MACD values.
- **Angle Calculation:**
Using the arctangent (`math.atan`) of the slope, the script converts this value into degrees (multiplied by 180/π) to represent the MACD’s angular direction.
- **Visual Representation:**
A line is drawn on the indicator pane to reflect this angular direction. It starts at the current bar’s MACD level and extends forward by 10 bars, scaled by the slope. This helps illustrate whether the MACD is trending upward or downward.
---
## 5. Additional Timeframe MACD Angles
- **Multi-Timeframe Analysis:**
The indicator enhances its trend analysis by requesting MACD calculations from three additional timeframes:
- **1-Hour (60 minutes)**
- **4-Hour (240 minutes)**
- **Daily (D)**
- **Angle Calculation in Each Timeframe:**
For each timeframe, the slope and corresponding angle (in degrees) are computed exactly as with the current timeframe. These extra angles provide broader context on longer–term momentum.
---
## 6. Floating Table (Dashboard)
- **Dashboard Creation:**
A floating table is created and positioned (default top right) to display the MACD angular values for:
- Current timeframe
- 1 Hour
- 4 Hour
- Daily
- **Color–Coded Data:**
Each cell displays the computed MACD angle for that timeframe. The text color changes dynamically:
- **Green:** When the angle is positive (upward momentum).
- **Red:** When the angle is negative (downward momentum).
- **White:** When the angle is neutral (zero change).
---
## 7. MACD Cross Signals
- **Crossover Detection:**
- **Bullish Cross:**
Detected when the MACD line crosses above the signal line.
- **Bearish Cross:**
Detected when the MACD line crosses below the signal line.
- **Visualization:**
Small “X” shapes are plotted above or below the bars when these crossover events occur, providing clear visual alerts for potential shifts in momentum.
---
## 8. Pivot Detection and Overbought/Oversold Zones
- **Pivot Calculation:**
Inputs define the lookback periods (left and right) to detect swing highs (pivot highs) and swing lows (pivot lows) in the MACD line.
- **Overbought/Oversold Levels:**
- **Calculation:**
Using a lookback window (default 100 bars), the highest and lowest MACD values are determined. A percentage (20%) of the range is then used to define:
- **Overbought Level:** Near the top of the range.
- **Oversold Level:** Near the bottom.
- **Plotting:**
Horizontal lines are drawn for these levels (with transparent red for overbought and green for oversold) and a dotted line is set at 0 for the MACD midpoint.
---
## 9. Adjustable Background Colors for Mayer Zones
- **Purpose:**
The script changes the background color to emphasize different market conditions as identified by the Mayer Multiple:
- **Buy Zone (Undervalued):**
Displays a translucent green background when the price is considered undervalued and the MACD is in an oversold region.
- **Sell Zone (Overvalued):**
Displays a translucent red background when the price is considered overvalued and the MACD is in an overbought region.
- **Neutral Zone:**
Displays a translucent yellow background when neither condition is met.
- **Global Override Option:**
If enabled, these zone backgrounds will all use the globally defined background color rather than their individual colors.
---
## 10. MACD Plotting and Pivots
- **MACD and Signal Line Plots:**
- The MACD line is plotted with a dynamic color:
- **Green:** When above the signal line.
- **Red:** When below the signal line.
- **White:** When the difference is nearly zero.
- The signal line is plotted in blue.
- **Pivot Markers:**
- Small circles denote MACD pivot highs (red) and pivot lows (green).
- Additional shapes are plotted to highlight significant pivot matches—such as “MACD Red Pivot Match” when certain sell conditions are met—and even a neutral overlap marker.
---
## 11. Divergence Detection
- **Divergence Logic:**
The script compares pivots between price and MACD:
- **Bullish Divergence:**
Occurs when the price makes a lower low but the MACD makes a higher low.
If this is combined with an undervalued Mayer signal and the MACD is in oversold territory, a label is drawn to indicate the divergence.
- **Bearish Divergence:**
Occurs when the price makes a higher high but the MACD makes a lower high.
Similar conditions apply for labeling bearish divergence.
- **Usage:**
This divergence detection helps identify potential reversals or changes in momentum.
---
## 12. Alerts
- **Unified Alerts:**
- **Buy Alert:**
An alert is set when the indicator detects that the price is undervalued (per the Mayer Multiple) and the MACD is below the oversold level.
- **Sell Alert:**
An alert is set when the price is overvalued and the MACD is above the overbought level.
- **Additional Conditions:**
Other alert conditions are included for cautionary signals (e.g., a red pivot in a neutral Mayer zone) and for potential take profit or reversal areas based on pivot detections.
---
## 13. Moon Phases
- **Astronomical Calculations:**
- **Functions:**
The script includes several functions to compute the day of the year and convert Julian dates to UNIX timestamps, which are then used to calculate the phase of the moon.
- **Moon Phase Detection:**
A function (`getLastNewMoon`) calculates the timing of the last new moon.
- **Visual Display:**
- **Moon Shapes:**
Plots circle shapes to indicate new moons (using a color for waxing) and full moons (using a color for waning).
- **Background Color:**
The chart background is subtly tinted based on whether the current phase is a new (waxing) or full (waning) moon. This can offer additional context for cycles or market sentiment according to lunar phases.