Yearly Return % (Day-to-Day)How It Works:
It fetches the closing price from one year ago (using request.security with a daily lookback).
It calculates the percentage return relative to today’s closing price.
It plots the result in a separate pane.
Features:
Works on any timeframe but is more useful on daily or higher.
Automatically adjusts for different assets.
Zero Line for quick reference.
Clean, simple display without clutter.
Análise de Tendência
Liquidity Sweep Filter [AlgoAlpha]Unlock a deeper understanding of market liquidity with the Liquidity Sweep Filter by AlgoAlpha. This indicator identifies liquidity sweeps, highlighting key price levels where large liquidations have occurred. By visualizing major and minor liquidation events, traders can better anticipate potential reversals and market structure shifts, making this an essential tool for those trading in volatile conditions.
Key Features :
🔍 Liquidity Sweep Detection – Identifies and highlights areas where liquidity has been swept, distinguishing between major and minor liquidation events.
📊 Volume Profile Integration – Displays a volume profile overlay, helping traders spot high-activity price zones where the market is likely to react.
📈 Trend-Based Filtering – Utilizes an adaptive trend detection algorithm to refine liquidity sweeps based on market direction, reducing noise.
🎨 Customizable Visualization – Modify colors, thresholds, and display settings to tailor the indicator to your trading style.
🔔 Alerts for Liquidity Sweeps & Trend Changes – Stay ahead of the market by receiving alerts when significant liquidity events or trend shifts occur.
How to Use:
🛠 Add the Indicator : Add the Liquidity Sweep Filter to your chart and configure the settings based on your preferred sensitivity. Adjust the major sweep threshold to filter out smaller moves.
📊 Analyze Liquidity Zones and trend direction : Look for liquidation levels where large buy or sell stops have been triggered. Major sweeps indicate strong reactions, while minor sweeps show gradual liquidity absorption. You can also see which levels are high in liquidity by the transparency of the levels.
🔔 Set-Up Alerts : Use the in-built alerts so you don't miss a trading opportunity
How It Works :
The Liquidity Sweep Filter detects liquidity events by tracking swing highs and lows (defined as a pivot where neighboring candles are lower/higher than it) where traders are likely to have placed stop-loss orders. It evaluates volume and price action, marking areas where liquidity has been absorbed by the market. Additionally, the integrated trend filter ensures that only relevant liquidity sweeps are highlighted based on market direction, lows in an uptrend and highs in a downtrend. The trend filter works by calculating a basis, and defining trend shifts when the closing price crosses over the upper or lower bands.The included volume profile further enhances analysis by displaying key trading zones where price may react.
[3Commas] HA & MAHA & MA
🔷What it does: This tool is designed to test a trend-following strategy using Heikin Ashi candles and moving averages. It enters trades after pullbacks, aiming to let profits run once the risk-to-reward ratio reaches 1:1 while securing the position.
🔷Who is it for: It is ideal for traders looking to compare final results using fixed versus dynamic take profits by adjusting parameters and trade direction—a concept applicable to most trading strategies.
🔷How does it work: We use moving averages to define the market trend, then wait for opposite Heikin Ashi candles to form against it. Once these candles reverse in favor of the trend, we enter the trade, using the last swing created by the pullback as the stop loss. By applying the breakeven ratio, we protect the trade and let it run, using the slower moving average as a trailing stop.
A buy signal is generated when:
The previous candle is bearish (ha_bear ), indicating a pullback.
The fast moving average (ma1) is above the slow moving average (ma2), confirming an uptrend.
The current candle is bullish (ha_bull), showing trend continuation.
The Heikin Ashi close is above the fast moving average (ma1), reinforcing the bullish bias.
The real price close is above the open (close > open), ensuring bullish momentum in actual price data.
The signal is confirmed on the closed candle (barstate.isconfirmed) to avoid premature signals.
dir is undefined (na(dir)), preventing repeated signals in the same direction.
A sell signal is generated when:
The previous candle is bullish (ha_bull ), indicating a temporary upward move before a potential reversal.
The fast moving average (ma1) is below the slow moving average (ma2), confirming a downtrend.
The current candle is bearish (ha_bear), showing trend continuation to the downside.
The Heikin Ashi close is below the fast moving average (ma1), reinforcing bearish pressure.
The real price close is below the open (close < open), confirming bearish momentum in actual price data.
The signal is confirmed after the candle closes (barstate.isconfirmed), avoiding premature entries.
dir is undefined (na(dir)), preventing consecutive signals in the same direction.
In simple terms, this setup looks for trend continuation after a pullback, confirming entries with both Heikin Ashi and real price action, supported by moving average alignment to avoid false signals.
If the price reaches a 1:1 risk-to-reward ratio, the stop will be moved to the entry point. However, if the slow moving average surpasses this level, it will become the new exit point, acting as a trailing stop
🔷Why It’s Unique
Easily visualizes the benefits of using risk-to-reward ratios when trading instead of fixed percentages.
Provides a simple and straightforward approach to trading, embracing the "keep it simple" concept.
Offers clear visualization of DCA Bot entry and exit points based on user preferences.
Includes an option to review the message format before sending signals to bots, with compatibility for multi-pair and futures contract pairs.
🔷 Considerations Before Using the Indicator
⚠️Very important: The indicator must be used on charts with real price data, such as Japanese candlesticks, line charts, etc. Do not use it on Heikin Ashi charts, as this may lead to unrealistic results.
🔸Since this is a trend-following strategy, use it on timeframes above 4 hours, where market noise is reduced and trends are clearer. Also, carefully review the statistics before using it, focusing on pairs that tend to have long periods of well-defined trends.
🔸Disadvantages:
False Signals in Ranges: Consolidating markets can generate unreliable signals.
Lagging Indicator: Being based on moving averages, it may react late to sudden price movements.
🔸Advantages:
Trend Focused: Simplifies the identification of trending markets.
Noise Reduction: Uses Heikin Ashi candles to identify trend continuation after pullbacks.
Broad Applicability: Suitable for forex, crypto, stocks, and commodities.
🔸The strategy provides a systematic way to analyze markets but does not guarantee successful outcomes. Use it as an additional tool rather than relying solely on an automated system.
Trading results depend on various factors, including market conditions, trader discipline, and risk management. Past performance does not ensure future success, so always approach the market cautiously.
🔸Risk Management: Define stop-loss levels, position sizes, and profit targets before entering any trade. Be prepared for potential losses and ensure your approach aligns with your overall trading plan.
🔷 STRATEGY PROPERTIES
Symbol: BINANCE:BTCUSDT (Spot).
Timeframe: 4h.
Test Period: All historical data available.
Initial Capital: 10000 USDT.
Order Size per Trade: 1% of Capital, you can use a higher value e.g. 5%, be cautious that the Max Drawdown does not exceed 10%, as it would indicate a very risky trading approach.
Commission: Binance commission 0.1%, adjust according to the exchange being used, lower numbers will generate unrealistic results. By using low values e.g. 5%, it allows us to adapt over time and check the functioning of the strategy.
Slippage: 5 ticks, for pairs with low liquidity or very large orders, this number should be increased as the order may not be filled at the desired level.
Margin for Long and Short Positions: 100%.
Indicator Settings: Default Configuration.
MA1 Length: 9.
MA2 Length: 18.
MA Calculations: EMA.
Take Profit Ratio: Disable. Ratio 1:4.
Breakeven Ratio: Enable, Ratio 1:1.
Strategy: Long & Short.
🔷 STRATEGY RESULTS
⚠️Remember, past results do not guarantee future performance.
Net Profit: +324.88 USDT (+3.25%).
Max Drawdown: -81.18 USDT (-0.78%).
Total Closed Trades: 672.
Percent Profitable: 35.57%.
Profit Factor: 1.347.
Average Trade: +0.48 USDT (+0.48%).
Average # Bars in Trades: 13.
🔷 HOW TO USE
🔸 Adjust Settings:
The default values—MA1 (9) and MA2 (18) with EMA calculation—generally work well. However, you can increase these values, such as 20 and 40, to better identify stronger trends.
🔸 Choose a Symbol that Typically Trends:
Select an asset that tends to form clear trends. Keep in mind that the Strategy Tester results may show poor performance for certain assets, making them less suitable for sending signals to bots.
🔸 Experiment with Ratios:
Test different take profit and breakeven ratios to compare various scenarios—especially to observe how the strategy performs when only the trade is protected.
🔸This is an example of how protecting the trade works: once the price moves in favor of the position with a 1:1 risk-to-reward ratio, the stop loss is moved to the entry price. If the Slow MA surpasses this level, it will act as a trailing stop, aiming to follow the trend and maximize potential gains.
🔸In contrast, in this example, for the same trade, if we set a take profit at a 1:3 risk-to-reward ratio—which is generally considered a good risk-reward relationship—we can see how a significant portion of the upward move is left on the table.
🔸Results Review:
It is important to check the Max Drawdown. This value should ideally not exceed 10% of your capital. Consider adjusting the trade size to ensure this threshold is not surpassed.
Remember to include the correct values for commission and slippage according to the symbol and exchange where you are conducting the tests. Otherwise, the results will not be realistic.
If you are satisfied with the results, you may consider automating your trades. However, it is strongly recommended to use a small amount of capital or a demo account to test proper execution before committing real funds.
🔸Create alerts to trigger the DCA Bot:
Verify Messages: Ensure the message matches the one specified by the DCA Bot.
Multi-Pair Configuration: For multi-pair setups, enable the option to add the symbol in the correct format.
Signal Settings: Enable whether you want to receive long or short signals (Entry | TP | SL), copy and paste the the messages for the DCA Bots configured.
Alert Setup:
When creating an alert, set the condition to the indicator and choose "alert() function call only.
Enter any desired Alert Name.
Open the Notifications tab, enable Webhook URL, and paste the Webhook URL.
For more details, refer to the section: "How to use TradingView Custom Signals".
Finalize Alerts: Click Create, you're done! Alerts will now be sent automatically in the correct format.
🔷 INDICATOR SETTINGS
MA 1: Fast MA Length
MA 2: Slow MA Length
MA Calc: MA's Calculations (SMA,EMA, RMA,WMA)
TP Ratio: This is the take profit ratio relative to the stop loss, where the trade will be closed in profit.
BE Ratio: This is the breakeven ratio relative to the stop loss, where the stop loss will be updated to breakeven or if the MA2 is greater than this level.
Strategy: Order Type direction in which trades are executed.
Use Custom Test Period: When enabled signals only works in the selected time window. If disabled it will use all historical data available on the chart.
Test Start and End: Once the Custom Test Period is enabled, here you select the start and end date that you want to analyze.
Check Messages: Enable the table to review the messages to be sent to the bot.
Entry | TP | SL: Enable this options to send Buy Entry, Take Profit (TP), and Stop Loss (SL) signals.
Deal Entry and Deal Exit : Copy and paste the message for the deal start signal and close order at Market Price of the DCA Bot. This is the message that will be sent with the alert to the Bot, you must verify that it is the same as the bot so that it can process properly so that it executes and starts the trade.
DCA Bot Multi-Pair: You must activate it if you want to use the signals in a DCA Bot Multi-pair in the text box you must enter (using the correct format) the symbol in which you are creating the alert, you can check the format of each symbol when you create the bot.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc.
Timeframe Display Table with CustomizationsPlaces a single cell table in the top right of the chart to display the currently viewed timeframe at all times on the chart.
Midnight Range Standard DeviationsCredit to Lex Fx for the basic framework of this script
This indicator is designed to assist traders in identifying potential trading opportunities based on the Intraday Concurrency Technique (ICT) concepts, specifically the midnight range deviations and their relationship to Fibonacci levels. It builds upon the work of Lex-FX, whom we gratefully acknowledge for the original concept and inspiration for this indicator.
Core Concept: ICT Midnight Range
The core of this indicator revolves around the concept of the midnight range. According to ICT, the high and low formed in a specific time window (typically the first 30 minutes after midnight, New York Time) can serve as a key reference point for intraday price action. The indicator identifies this range and projects potential support and resistance levels based on deviations from this range, combined with Fibonacci ratios.
How ICT Uses Midnight Range Deviations
ICT methodology often involves looking for price to move away from the initial midnight range, then return to it, or deviate beyond it, as key areas for potential entries.
Range Identification: The indicator automatically identifies the high and low of the midnight range (00:00 - 00:30 NY Time).
Deviation Levels: The indicator calculates and displays deviation levels based on multiples of the initial midnight range. These levels are often used to identify potential areas of support and resistance, as well as potential targets for price movement. These levels can be set in the additional fib levels section, which can be configured in increments of .5 deviations all the way up to 12 deviations.
Fibonacci Confluence: ICT often emphasizes the confluence of multiple factors. This indicator adds Fibonacci levels to the midnight range deviations. This allows traders to identify areas where Fibonacci retracements or extensions align with the deviation levels, potentially creating stronger areas of support or resistance.
Looking for Sweeps: ICT often uses these levels to look for times that the high and low are swept as potential areas of liquidity, indicating the start of potential continuations.
Time-Based Analysis: The time at which price interacts with these levels can also be significant in ICT. The indicator provides options to extend the range lines to specific times (e.g., 3 hours, 6 hours, 10 hours, 12 hours, or a custom defined time) after midnight, allowing traders to focus on specific periods of the trading day.
Indicator Settings Explained:
Time Zone (TZ): Defines the time zone used for calculating the midnight range. The default is "America/New_York".
Range High Color, Range Low Color, Range Mid Color: Customize the colors of the high, low, and mid-range lines.
Range Fill Color: Sets the fill color for the area between the range high and low.
Line Style: Choose the style of the range lines (solid, dashed, dotted).
Range Line Thickness: Adjust the thickness of the range lines for better visibility.
Show Fibonacci Levels: Enable or disable the display of Fibonacci deviation levels.
Fib Up Color, Fib Down Color: Customize the colors of the Fibonacci levels above (up) and below (down) the midnight range.
Show Trendline: Enables a trendline that plots the close price, colored according to whether the price is above the high, below the low, or within the midnight range.
Show Range Lines, Show Range Labels: Toggles the visibility of the range lines and their associated labels.
Label Size: Adjust the size of the labels for better readability.
Hide Prices: Option to display only the deviation values on labels, hiding price values.
Place Fibonacci Labels on Left Side: Option to switch label position from right side to left side.
Extend Range To (Hours from Midnight): This section gives you a wide variety of options on how far you want to extend the range to, you can do 3,6,10,12, and 23 hours. Alternatively, you can select the "Use Custom Length" and set a specific time in hours.
Additional Fib Levels: This section allows the trader to set additional deviation points in increments of .5 deviations from .5 all the way up to 12 deviations
TradingView Community Guidelines Compliance:
This indicator description adheres to the TradingView community guidelines by:
Being educational: It explains the ICT methodology and how the indicator can be used in trading.
Being transparent: It clearly describes all the indicator's settings and their purpose.
Providing credit: It acknowledges Lex-FX as the original author of the concept.
Avoiding misleading claims: It does not guarantee profits or imply that the indicator is a "holy grail."
Disclaimer: Usage of this indicator and the information provided is at your own risk. The author is not responsible for any losses incurred as a result of using this indicator.
Important Considerations:
This indicator is intended for educational purposes and to assist in applying the ICT methodology.
It should not be used as a standalone trading system.
Always combine this indicator with other forms of technical analysis and risk management techniques.
Backtest thoroughly on your chosen market and timeframe before using in live trading.
Trading involves risk. Only trade with capital you can afford to lose.
Flux Charts - S&D Screener💎 GENERAL OVERVIEW
Introducing Supply & Demand Zones (S&D) Screener! This screener can spot trading opportunities for Supply & Demand traders across 8 different tickers and timeframes simultaneously! This screener offers a wide range of configurable settings, explained within this write-up.
S&D Screener Features:
Supply & Demand Zones : This tool can detect Supply & Demand zones using one of the two detection methods.
Highly Configurable : Offers multiple parameters for fine-tuning detection settings.
Up to 8 Tickers : Allows traders to analyze multiple tickers & timeframes simultaneously for enhanced accuracy.
🚩 UNIQUENESS
The S&D Screener is the first ever tool on TradingView that allows traders to screen 8 different tickers on different timeframes for Supply & Demand Zones. Key factors that make it unique include:
✅ Comprehensive Dashboard – This screener provides a complete and customizable dashboard designed to enhance traders' decision-making by consolidating crucial Supply & Demand insights into one user-friendly interface.
✅ Multi-Ticker & Multi-Timeframe Analysis – With support for up to 8 tickers and timeframes, traders can effortlessly analyze the bigger market picture, identifying trends and opportunities across different assets and timeframes.
By combining multiple analytical elements in a single view, this screener empowers traders with the insights needed to navigate the market more effectively.
📌 HOW DOES IT WORK ?
The S&D Screener helps traders identify Supply & Demand Zones on multiple tickers & timeframes. It offers customizable settings to adapt to different trading styles. The screener includes two zone detection methods. The Momentum Method identifies zones based on strong bullish or bearish price movements, making it ideal for traders who seek quick market reactions. The Regression Method uses statistical regression to detect zones by analyzing price deviations from the trend, which is more suitable for long-term traders. You can customize your zone preferences and enable up to 8 tickers and their respective timeframes. You'll be able to see the status of the latest detected zones on that ticker/timeframe. You can also see the distance from current price of the ticker to the zone and how many times price has retested that zone.
Supply Zone
In trading, a supply zone is a specific area on a price chart where selling interest surpasses buying interest, leading to a potential decline in asset prices. This zone typically forms after a price rally, indicating that sellers find the asset overvalued and are prepared to sell, creating downward pressure. Identifying supply zones can help traders anticipate potential price reversals or pullbacks.
Trading Possibilities with Supply Zones
Entering Short Positions -> When the price approaches a recognized supply zone, traders may consider initiating short positions, anticipating that increased selling pressure will drive prices down.
Setting Profit Targets -> For traders holding long positions, supply zones can serve as strategic points to set profit targets, as these areas may signal potential resistance and a subsequent price drop.
Demand Zone
In trading, a demand zone is a specific area on a price chart where buying interest is strong enough to halt a downtrend and potentially reverse it upward. This zone indicates a price level where demand exceeds supply, leading to a rise in price. Identifying these zones can provide traders with strategic entry points for potential long positions.
Trading Possibilities with Demand Zones
Entering Long Positions -> When the price approaches a recognized demand zone, traders may consider initiating long positions, anticipating that increased buying pressure will drive prices up.
Setting Profit Targets -> For traders holding short positions, demand zones can serve as strategic points to set profit targets, as these areas may signal potential resistance and a subsequent price increase.
Momentum Detection Method
The Momentum Detection Method identifies supply and demand zones by analyzing the strength and direction of price movements over a specified period. It looks for a sequence of strong bullish or bearish candles to determine potential zones. The method is sensitive to the ‘Sensitivity’ setting, which adjusts the threshold for what constitutes a "strong" candle.
Using the momentum method is ideal for traders looking to capitalize on immediate price reactions and momentum shifts.
Regression Detection Method
The Regression Method uses statistical regression to identify supply and demand zones by analyzing price consolidation patterns. It fits a regression line to price data and identifies zones where price deviates significantly from the trend. This method is more mathematical and less reliant on individual candle patterns. It focuses on the overall price structure and identifies zones based on statistical deviations from the trend.
This method is particularly useful for traders who focus on longer-term price trends and prefer a more statistical approach to pinpoint zones.
Using the momentum method is ideal for traders looking to capitalize on immediate price reactions and momentum shifts.
Status ->
Far -> This status indicates that the current price is significantly distant from any identified supply or demand zones. In this scenario, traders might exercise patience, waiting for the price to approach these zones before considering entry or exit points.
Approaching ⬆️ -> The price is rising towards a supply zone, suggesting potential selling opportunities as the price nears an area where selling pressure previously dominated.
Approaching ⬇️ -> The price is falling towards a demand zone, indicating potential buying opportunities as the price approaches an area known for strong buying interest.
Inside -> The current price is within the boundaries of a supply or demand zone. This status often signals a critical decision point:
Inside a Supply Zone: The area where selling pressure may increase, potentially leading to a price decline. Traders might look for confirmation before initiating short positions.
Inside a Demand Zone: The area where buying interest could surge, possibly resulting in a price increase. Traders might seek validation before entering long positions.
Being "inside" a zone suggests heightened market activity and potential volatility, warranting close monitoring for trading signals.
Retests -> A retest occurs when the price revisits a supply or demand zone but fails to break through it. Specifically, during a retest, the wick of a candlestick enters the zone, but the candle closes below the supply zone or above the demand zone. This price action suggests that the zone remains a strong area of resistance or support, as the market couldn't sustain movement beyond it. Traders often view such retests as confirmations to enter positions in the direction opposite to the zone's boundary. For instance, if the price retests a supply zone and fails to close above it, it may signal a selling opportunity. Conversely, a failed retest of a demand zone could indicate a buying opportunity. Monitoring the number of retests can provide insights into the strength of these zones; multiple retests without a breakout may reinforce the zone's significance. Here you can see how many times the price retested the supply or demand zone.
⚠ Timeframe Restriction : The selected timeframes for analysis cannot be lower than the chart’s current timeframe to ensure proper data alignment.
⏰ ALERTS
This screener supports alerts, so you never miss a key market move. You can choose to receive alerts when a new demand or supply zone is created, helping you spot potential trading opportunities. Additionally, you can enable alerts for retests, which notify you when the price returns to test a previously identified zone. The alerts will work for each enabled ticker in the settings.
⚙️ SETTINGS
1. General Configuration
Detection Method : There are two detection methods you can choose from for identifying Supply & Demand Zones. Both methods aim to identify key areas where price is likely to react, but they do so using different approaches. Traders can choose the method that aligns with their trading style and time horizon.
Sensitivity : The Sensitivity setting allows traders to adjust how aggressively the script identifies supply and demand zones when using the Momentum Detection Method. This setting directly impacts the threshold for detecting zones when using the momentum detection method.
High Sensitivity -> Detects smaller price movements, resulting in more zones being identified. This is ideal for traders who want to capture even minor supply and demand imbalances and prefer a higher frequency of potential trading opportunities.
Medium Sensitivity -> Balances between detecting significant price movements and avoiding excessive noise. This setting is suitable for most traders who want a moderate number of zones without being overwhelmed.
Low Sensitivity -> Focuses on larger, more significant price movements, resulting in fewer zones being identified. This is ideal for traders who prioritize quality over quantity and prefer to focus on the most impactful supply and demand areas.
Lowest Sensitivity -> Detects only the strongest and most pronounced price movements, identifying the most significant zones. This setting is best for traders who want to focus on high-probability, high-impact zones and avoid minor fluctuations.
Zone Invalidation : The Zone Invalidation setting determines how supply and demand zones are invalidated.
Wick -> A zone is invalidated if a candle’s wick goes below a demand zone or above a supply zone.
Close -> A zone is invalidated if a candle closes below a demand zone or above a supply zone.
Zone Visibility Range : The Zone Visibility Range setting controls how far from the current price supply and demand zones are displayed on the chart. It helps traders focus on relevant zones while avoiding clutter from distant or less impactful areas.
Minimum Zone Width : The Minimum Zone Width setting defines the smallest size a supply or demand zone must have to be displayed on the chart. It uses the Average True Range (ATR) as a reference to ensure zones are proportionate to current market volatility.
Minimum Zone Length : The Minimum Zone Length setting determines the minimum number of bars a supply or demand zone must span to be displayed on the chart. This setting helps filter out short-lived or insignificant zones, ensuring only meaningful areas of supply or demand are highlighted.
2. Tickers
You can set, then enable or disable up to 8 tickers in this section to get informed about their latest supply or demand zone.
Advanced Support & Resistance [Alpha Extract]🔶 AE - Advanced Support & Resistance
A sophisticated yet user-friendly tool designed to enhance your trading analysis by accurately identifying and plotting key support and resistance levels. Built on a unique pivot-based detection algorithm, this indicator provides clear visual cues in real time, helping traders stay ahead of potential market reversals and breakouts.
🔶 Pivot-Based Detection
Leverages pivot highs and lows along with a configurable threshold to filter out overlapping levels. This method helps the script stand out from simpler support/resistance indicators by focusing on the most significant price zones.
🔶 Multi-Timeframe Analysis
Pulls higher-timeframe data to ensure that critical levels remain visible and properly scaled, regardless of your current chart view. This prevents distortion and offers a more comprehensive perspective of market structure.
🔶 Break Signal Alerts
Generates breakout or breakdown signals whenever the price crosses above or below a detected level—labeled as RB (Resistance Break) or SB (Support Break)—so traders can quickly spot shifts in momentum or trend.
🔶 Customizable Parameters
Fine-tune sensitivity and appearance—adjust pivot bar settings, lookback periods, thresholds, and the maximum number of plotted levels to match your trading style and preferences.
// === USER INPUTS ===
pivotLeft = input.int(15, "Left Pivot Bars", minval=1)
pivotRight = input.int(15, "Right Pivot Bars", minval=1)
lookback = input.int(200, "Lookback Period", minval=50)
threshold = input.float(0.2, "Price Threshold %", minval=0.1, step=0.1)
maxLevels = input.int(10, "Maximum Levels", minval=1)
📊How It Works
🔶 Identifying Pivots
The script scans for pivot highs and lows within a user-defined range of bars (Left Pivot Bars and Right Pivot Bars). Each pivot is evaluated against a proximity threshold, ensuring that similar nearby levels are combined into a single zone rather than cluttering the chart.
// === SUPPORT & RESISTANCE DETECTION ===
ph = ta.pivothigh(high, pivotLeft, pivotRight)
pl = ta.pivotlow(low, pivotLeft, pivotRight)
🔶Automatic Updates & Removal
Levels that remain untested or break too frequently are automatically removed based on the configured lookback period, keeping your chart focused on the most relevant support/resistance zones.
🔶Fixed Scaling
Through the use of higher-timeframe anchoring, the indicator maintains consistent plot lines that won’t distort when you zoom in or out. This approach ensures you always see crucial levels clearly.
🔶Entry and Exit Points
Pinpoint potential entry and exit opportunities based on how price interacts with these zones.
🔶Risk Management
Place stop-loss and take-profit orders around these levels to manage trade risk more effectively.
🔶Trend Confirmation
Observe how price respects or breaks levels to confirm ongoing trends or detect early signs of reversal.
🔶Sensitivity Adjustment
Control pivot bar width (pivotLeft and pivotRight) and the proximity threshold to focus on major or minor price zones.
🔶Visualization Options
Adjust line colors, styles, and thickness to align with your charting preferences.
🔶Maximum Levels
Limit the number of displayed levels to keep your chart clean and free of unnecessary clutter.
DEMO QV | QuantEdgeBIntroducing DEMO QV by QuantEdgeB
Overview
The DEMO QV indicator is a dynamic momentum and volatility-based model, designed to identify high-probability trend shifts and breakout opportunities. By leveraging a double exponential moving average smoothing with percentile-based trend analysis, and ATR volatility filters, this tool adapts to market conditions efficiently and ensuring robust signal generation.
_____
Key Features
🔹 DEMA (Double Exponential Moving Average)
A faster and more responsive alternative to traditional EMAs, DEMA reduces lag, enhancing the ability to detect rapid market shifts.
🔹 Percentile-Based Trend Identification:
The system calculates 25th, 50th, and 75th percentile levels effectively segmenting price action into different regimes for trend confirmation and signal clarity.
🔹 ATR-Adjusted Volatility Filters:
By incorporating ATR multipliers the system adapts to different market conditions, ensuring that breakout signals are based on meaningful price movements rather than noise.
🔹 Momentum Confirmation (ROC-Based):
A rate-of-change (ROC) momentum filter is applied to validate trend strength, reducing false signals and aligning trades with prevailing market momentum.
_____
How It Works
✅ Long Signals:
- Price closes above the 75th DEMA Percentile level, adjusted with ATR for volatility filtering.
- Momentum is positive, confirming the trend shift.
- Shown by "Long" label
✅ Short Signals:
- Price closes above the 25th DEMA Percentile level, adjusted with ATR for volatility filtering.
- Momentum is negative, ensuring alignment with bearish trends.
- Shown by "Cash" label
This dual-layered signal mechanism makes the strategy smooth yet aggressive on shorts, quickly reacting to potential downturns.
______
Use Cases
📌 Breakout & Trend-Following Strategy: Ideal for spotting breakout conditions based on percentile rank and ATR expansion.
📌 Momentum-Driven Trading: The ROC filter ensures signals align with price momentum, reducing premature entries.
📌 Adaptable Across Markets: Works across assets with different volatility, thanks to its ATR filtering and dual layer for signal confirmation.
📌 Smooth but Aggressive on Shorts:The dual-layered short logic enables reactive entries while maintaining a clean trend-following approach for longs.
_____
Behaviour across Crypto Majors:
BTC
ETH
SOL
Note : Past behaviour is not indicative of future results. Always conduct thorough testing and risk management before making trading decisions.
_____
Customization Options
⚙️ Color Mode Selection: Multiple preset themes for enhanced visualization.
⚙️ Long/Cash Signal Label: Default is turned off.
⚙️ DEMA Length: Adjustable to fine-tune sensitivity. (Default: 14)
⚙️ Percentile Calculation Length: Defines trend zones. (Default: 35)
⚙️ ATR Length & Multipliers: Controls the threshold for breakout confirmation. (Default: 14, 1.3x for longs, 2.5x for shorts)
⚙️ Momentum Length: Fine-tunes responsiveness to trend shifts. (Default: 8)
_____
Conclusion
The DEMO QV indicator is a powerful trend and volatility-based tool, balancing smooth trend-following logic with aggressive short entries for optimized breakout detection. Whether used for momentum trading, breakouts, or adaptive trend filtering, its combination of percentile-based analysis, ATR filtering, and momentum validation ensures a robust and reliable trading experience.
_____
🔹 Disclaimer: Past performance is not indicative of future results. No trading strategy can guarantee success in financial markets.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
Smart Adaptive Signal SystemSmart Adaptive Signal System
Description: The Smart Adaptive Signal System is a sophisticated indicator that generates intelligent buy/sell signals by dynamically adapting to market conditions. It predicts target prices based on momentum and volatility, providing more accurate and reliable trading opportunities.
How It Works:
Dynamic Signal Generation: The system predicts target prices by considering factors such as volatility and momentum. This allows it to react instantly to trend changes and market fluctuations.
Adaptive Thresholds: Buy and sell signals are triggered with adaptive thresholds, adjusting according to market volatility. This ensures flexibility in the face of sudden market changes.
Trend-Based Reset: Users can choose to reset threshold values based on a time interval or trend change. This feature helps the system re-adapt to current market conditions for greater accuracy.
Target Price Prediction: Target prices are calculated using momentum and volatility, helping the system predict future price movements.
How to Use:
Buy/Sell Signals: The indicator generates buy and sell signals based on market conditions. Look for a "down arrow" for a buy signal and an "up arrow" for a sell signal on the chart.
Target Price Lines: Along with buy and sell signals, the system draws target price lines. This helps you visualize potential future price levels.
Flexible Settings: Users can customize analysis periods, minimum change percentages, and other parameters to fit their needs.
Features:
Dynamic buy and sell signals
Target price predictions
Volatility and momentum-based analysis
User-friendly and flexible settings
Trend-based adaptive resetting
Alerts: The Smart Adaptive Signal System responds quickly to sudden market changes, but always use it in conjunction with other indicators like support and resistance levels. Signal accuracy may vary depending on market conditions.
RSI of Accumulation/DistributionHow to Use the RSI of Accumulation/Distribution Indicator:
1. Identify Overbought/Oversold Conditions:
Overbought: When the RSI of the ADL is above 70, it indicates that the asset may be overbought and could be due for a pullback or correction.
Oversold: When the RSI of the ADL is below 30, it suggests that the asset may be oversold and could be poised for a rebound.
2. Look for Divergences:
Bullish Divergence: If the price is making lower lows while the RSI of the ADL is making higher lows, it can signal a potential reversal to the upside.
Bearish Divergence: If the price is making higher highs while the RSI of the ADL is making lower highs, it can indicate a potential reversal to the downside.
3. Confirm Trend Strength:
Use the RSI of the ADL to confirm the strength of a trend. For example, if the RSI is consistently above 50 during an uptrend, it suggests strong buying pressure and the trend is likely to continue.
Conversely, if the RSI is consistently below 50 during a downtrend, it indicates strong selling pressure and the trend is likely to persist.
4. Monitor for Reversals:
When the RSI of the ADL crosses above 50, it can signal a potential bullish reversal.
When the RSI of the ADL crosses below 50, it can signal a potential bearish reversal.
Is It Worth It?
The RSI of the Accumulation/Distribution Line can be a valuable tool for traders looking to gain insights into market momentum and trend strength. Here are a few reasons why it might be worth considering:
1. Volume and Price Combination: By combining price action (RSI) with volume-based analysis (ADL), this indicator provides a more comprehensive view of market dynamics.
2. Divergence Detection: It helps identify divergences between price and volume, which can be early signals of potential reversals.
3. Trend Confirmation: It offers additional confirmation of trend strength and potential reversal points, helping traders make more informed decisions.
However, like any indicator, it's important to use it in conjunction with other analysis methods and not rely on it solely for trading decisions. Backtesting the indicator on historical data and combining it with other technical analysis tools can improve its effectiveness.
Feel free to test the script in TradingView and see how it performs in different market conditions. If you have any specific questions or need further assistance, let me know! 😊
Price-Aligned Trend Indicator - Saerthak AnandThis is a Pine Script (version 6) for TradingView that creates a "Price-Aligned Trend Indicator" with three different T3 moving averages (Fast, Medium, and Slow). The indicator colors the lines based on the trend (bullish, bearish, or neutral) and adds "BREAKOUT" or "BREAKDOWN" labels when the fast moving average crosses the medium moving average.
Explanation:
T3 Moving Average Calculation: The function calculates the T3 moving average by recursively applying the exponential moving average (EMA) multiple times.
Trend Conditions:
Bullish: Fast > Medium > Slow.
Bearish: Fast < Medium < Slow.
Neutral: Any other condition.
Plotting:
The three T3 moving averages are plotted with different levels of opacity based on the trend.
A colored cloud is filled between the fast and medium lines, indicating the current trend.
Breakout and Breakdown Labels:
A "BREAKOUT" label is displayed when the fast T3 crosses above the medium T3 and the overall trend is bullish.
A "BREAKDOWN" label is displayed when the fast T3 crosses below the medium T3 and the overall trend is bearish.
Suggestions for Improvement:
Performance Optimization: You may want to experiment with higher T3 lengths for smoother trend visualization.
Customization: Consider adding options for users to customize colors and label display.
Alert Conditions: You can add alertcondition for breakouts and breakdowns for real-time alerts in TradingView.
Signal Confirmation: Add further trend confirmation (e.g., volume analysis or RSI) to reduce false signals.
Alligator Oscillator | TramaAlligator Oscillator | Trama
The Alligator Oscillator | Trama (ATO | Trama) is a momentum-based trading indicator that utilizes Smoothed Moving Averages (SMMA) to measure market trends. Inspired by Bill Williams’ Alligator Indicator, it focuses on the relationship between the Jaw and Lips moving averages, calculating their percentage difference to identify bullish and bearish conditions.
Key Features:
✔ Jaw & Lips SMMA Calculation: Measures the spread between two smoothed moving averages.
✔ Threshold-Based Trading Signals: Identifies trend shifts using customizable long/short thresholds.
✔ Optional Smoothing: Enhances signal reliability with SMA, EMA, HMA, or RMA.
✔ Dynamic Color Modes: Choose between "Cool," "Classic," and "Blue" for visual clarity.
How It Works:
SMMA Calculation:
The Jaw (Long SMMA) is a 15-period smoothed moving average.
The Lips (Short SMMA) is a 4-period smoothed moving average.
Percentage Difference Computation:
Calculates the percentage gap between Lips and Jaw for trend analysis.
Adjusts polarity to maintain consistency in signal direction.
Signal Interpretation:
-Bullish Signal (Cyan, Green, or Light Blue): When percentage difference crosses above the long threshold.
-Bearish Signal (Magenta, Red, or Dark Blue): When percentage difference falls below the short threshold.
-Optional Smoothing:Users can smooth the percentage difference using SMA, EMA, HMA, or RMA for enhanced clarity.
-Dynamic Color Coding:The indicator colors candles based on trend detection.
This indicator is ideal for traders who:
📈 Want a trend-following strategy with clear entry/exit signals.
🔍 Prefer filtered signals with optional smoothing to reduce noise.
⚡ Seek momentum confirmation in combination with other indicators (e.g., RSI, MACD).
Customization Options:
-Threshold Levels: Adjustable long and short levels for fine-tuning sensitivity.
-Smoothing Settings: Choose from SMA, EMA, HMA, RMA or disable smoothing.
-Color Modes: Adapt the visual style to match personal preferences.
Disclaimer:
This indicator is for educational and informational purposes only. It does not constitute financial advice. Always apply proper risk management when trading.
Volume Delta Imbalance Index [PhenLabs]📊 Volume Delta Imbalance Index (VDII)
Version: PineScript™ v6
Description
The Volume Delta Imbalance Index is an advanced technical analysis tool that combines volume profile analysis with price movement dynamics to identify significant market imbalances. It features a sophisticated analysis system that weighs recent versus historical volume delta imbalance patterns, providing traders with insights into potential market reversals and trend continuation scenarios.
Points of Innovation:
Custom volume delta calculation incorporating price and volume relationships
Adaptive smoothing system based on market volatility
Multi-component analysis combining flow, acceleration, and strength metrics
Real-time volume profile integration with historical context
🔧 Core Components
Volume Profile Analysis: Dynamic volume delta imbalance distribution assessment
Flow Imbalance Detection: Buy/sell pressure evaluation
Strength Analysis: Composite market strength measurement
Acceleration Framework: Volume movement dynamics
Statistical Bands: Adaptive threshold system
🚨 Key Features 🚨
The indicator provides comprehensive analysis through:
Volume Delta: Up to date volume imbalance measurement
Market Structure: Support/resistance level identification
Flow Analysis: Buy/sell pressure visualization
Acceleration Signals: Movement momentum detection
Adaptive Bands: Dynamic overbought/oversold levels
📈 Visualization
Color-coded Columns: Shows direction and strength of imbalance
Signal Lines: Strong buy/sell level indicators
Statistical Bands: Shows normal trading ranges
Gradient Fills: Indicates extreme market conditions
Dynamic Opacity: Reflects trend strength
📌 Usage Guidelines
The indicator offers several customization options:
Basic Settings:
Lookback Period: Analysis timeframe adjustment
Sensitivity Level: Signal response calibration
History Depth: Historical context range
Memory Setting: Recent vs. historical data weight
Visual Settings:
Color Scheme: Bullish/bearish signal colors
Signal Levels: Strong buy/sell thresholds
Band Display: Statistical range visualization
✅ Best Use Cases / Things To Look For:
Wait for establishment in the initial trend when the VDII comes back towards zero and the color of the volume becomes more faint
Once this is established and the VDII pushes through to the other side look for small retracements above the zero line on the VDII leading you to believe it is a likely area for price to retrace and continue in its prior direction
Make sure you see the volume bars become more faint in color to give yo further confluence price will continue in its priorly established direction
⚠️ Limitations
Requires sufficient volume data
Most effective in liquid markets
Historical depth affects calculation speed
Possible lag in highly volatile conditions
What Makes This Unique
Composite Volume Analysis: Combines multiple volume metrics
Adaptive Calculation: Adjusts to market volatility
Profile Integration: Incorporates volume profile analysis
Multi-component Scoring: Weighted analysis system
Memory-efficient Design: Optimized for real-time analysis
🔧 How It Works
The indicator processes market data through four main components:
1. Volume Profile Analysis:
Creates dynamic volume delta distribution profiles
Weights recent versus historical data
Identifies significant price levels
2. Flow Imbalance Detection:
Analyzes buying versus selling pressure
Calculates normalized flow ratios
Determines market bias
3. Strength Analysis:
Measures composite market strength
Incorporates volume-weighted movements
Provides trend strength indication
4. Final Score Calculation:
Combines all components with weighted importance
Applies volatility-based smoothing
Generates final signal output
5. VDII Potential Reversal Confluences
Bars between signal confluence is default set to 10 but you can change it to whatever you’d prefer
Signals are a compiled look at the indicator as a whole determining where it think reversals or retracements are likely
💡 Note:
The indicator performs best in markets with consistent volume and clear trending or ranging conditions. Its sophisticated volume analysis provides valuable insights into market dynamics beyond traditional price-based indicators.
Cross Market AdvancedEnglish Description:
Cross Market Advanced is a TradingView indicator designed for intermarket analysis between two tickers. It compares the price of the primary market (the chart’s ticker) with a secondary market (user-selectable) by calculating their ratio—optionally with a configurable time delay. This feature is especially useful for markets such as oil and gold. Statistical studies show that the gold price typically lags behind the oil price by about 140–150 days, meaning that an oil rally can potentially trigger a gold rally after approximately 145 days.
Key features include:
• Intermarket Comparison: Analyzes the relationship between two different markets.
• Customizable Ratio Calculation: Choose between EMA and SMA smoothing, set evaluation periods, and apply a time delay for the secondary ticker. This delay can be tailored to match market-specific relationships, like the oil-to-gold lag.
• Overbought & Oversold Levels: Visual cues are provided with horizontal reference lines at 70 (overbought) and 30 (oversold), with a shaded zone between, helping to identify extreme market conditions.
• Divergence Detection: Identifies potential divergences between the ticker price and the scaled index. Divergence signals are color-coded (red for bearish, green for bullish) as a rough guide—note that this does not replace detailed technical analysis.
• Additional Plots: Optionally display the raw ratio and z‑score.
• Visual Aids: The indicator displays the selected tickers on the chart along with clear reference levels.
This tool is ideal for traders looking to explore cross-market relationships, identify early signs of potential market reversals, and incorporate time delay effects—particularly in markets like oil and gold.
Deutsche Beschreibung:
Cross Market Advanced ist ein TradingView-Indikator, der eine Intermarket-Analyse zwischen zwei Tickern ermöglicht. Er vergleicht den Kurs des primären Marktes (dem im Chart dargestellten Ticker) mit einem sekundären Markt (frei wählbar), indem er deren Verhältnis berechnet – optional mit einem einstellbaren Zeitversatz. Dieser Zeitversatz ist besonders nützlich, wenn beispielsweise Öl und Gold verglichen werden. Statistischen Untersuchungen zufolge läuft der Goldpreis etwa 140–150 Tage hinter dem Ölpreis her, was bedeuten kann, dass eine Öl-Rallye zu einer Gold-Rallye mit einem Verzögerungsfaktor von etwa 145 Tagen führen kann.
Wichtige Funktionen im Überblick:
• Intermarket-Vergleich: Analyse der Beziehung zwischen zwei unterschiedlichen Märkten.
• Anpassbare Verhältnis-Berechnung: Auswahl zwischen EMA und SMA, Festlegung der Evaluationsperiode sowie Anwendung eines Zeitversatzes für den zweiten Ticker. Dieser Versatz kann an marktspezifische Zusammenhänge angepasst werden, wie z.B. das Öl-Gold-Verhältnis.
• Überkauft & Überverkauft: Mit horizontalen Referenzlinien bei 70 (Überkauft) und 30 (Überverkauft) wird die aktuelle Marktlage visualisiert – der dazwischen liegende, hervorgehobene Bereich hilft, extreme Marktbedingungen zu erkennen.
• Divergenzerkennung: Ermittelt mögliche Divergenzen zwischen dem Ticker-Kurs und dem skalierten Index. Divergenzsignale werden farblich hervorgehoben (rot für bärisch, grün für bullisch) und dienen als grobe Orientierung – sie ersetzen jedoch keine ausführliche charttechnische Analyse.
• Zusatzplots: Optionale Darstellung des Rohwerts des Verhältnisses sowie des z‑Scores.
• Visuelle Hilfen: Der Indikator zeigt die ausgewählten Ticker im Chart sowie die klaren Referenzniveaus an.
Dieser Indikator eignet sich ideal für Trader, die Cross-Market-Beziehungen untersuchen, frühzeitig Hinweise auf mögliche Trendumkehrungen erkennen und auch Verzögerungseffekte – wie etwa beim Öl-Gold-Verhältnis – in ihre Analyse einbeziehen möchten.
SyakDan FX (Clear Version)**SyakDan FX (Clear Version) - Indicator Description**
### Overview:
SyakDan FX (Clear Version) is a comprehensive TradingView indicator designed for account management, trend identification, and automated trading signals. This script utilizes multiple moving averages, ATR-based stop-loss calculations, and Fibonacci-based pivot points to assist traders in making informed trading decisions.
### Features:
1. **Account Management Calculation:**
- The indicator dynamically adapts to the current timeframe.
- Customizable moving average (MA) types, including EMA, SMA, WMA, and HMA.
- ATR-based trailing stop and volatility assessment.
2. **Moving Averages & Trend Identification:**
- Configurable EMA lengths for three different moving averages.
- Dynamic selection of MA types (SMA, EMA, WMA, HMA) for flexibility.
- Different EMA lengths for low and high timeframes.
- Automatic detection of EMA crossovers and trend changes.
3. **Entry, Stop-Loss, and Take-Profit Calculation:**
- Enables automatic calculation of entry, stop-loss, and take-profit levels.
- ATR-based stop-loss placement.
- Multi-level take-profit targets (TP1, TP2, TP3, and Max TP).
- Visual representation of SL/TP levels using dynamic lines and labels.
4. **Alerts & Notifications:**
- Alerts for EMA crossovers (Buy & Sell signals).
- Additional alerts when EMA 2 crosses EMA 3, indicating strong signals.
5. **Pivot Point Calculations:**
- Calculates daily and weekly pivot points using Fibonacci and traditional methods.
- Helps traders identify key support and resistance levels.
### How It Works:
- The indicator plots three customizable moving averages on the chart.
- It detects crossovers between these moving averages to identify potential buy and sell signals.
- ATR (Average True Range) is used to set dynamic stop-loss and take-profit levels.
- Traders can enable or disable automatic SL/TP plotting.
- Alerts notify users when key trade signals occur.
- Fibonacci and traditional pivot points provide additional confluence for trading decisions.
### Customization Options:
- **MA Type Selection:** Choose from SMA, EMA, WMA, or HMA for each moving average.
- **EMA Length Adjustments:** Modify the lengths for short-term and long-term trends.
- **SL/TP Settings:** Enable or disable SL/TP plotting and customize their multipliers.
- **Alert Preferences:** Enable or disable alerts for trend crossovers.
### Ideal Usage:
- Traders using trend-following strategies based on moving averages.
- Those who want automated SL/TP placement for risk management.
- Anyone looking to integrate pivot points into their trading decisions.
This indicator provides a clean, structured approach to trading with automated analysis, reducing the need for manual calculations while offering strong risk management tools.
ORB-5Min + Adaptive 12/48 EMA + PDH/PDL
Overview:
This indicator combines the 5-Minute Opening Range Breakout (ORB), Adaptive 12/48 Exponential Moving Averages (EMAs), and Previous Day High/Low (PDH/PDL) levels to help traders identify key intraday levels and market trends.
Key Components and Logic:
5-Minute Opening Range Breakout (ORB):
Displays the high and low from the first 5-minute candle of the trading session.
Includes customizable opacity for the range fill.
Helps traders spot breakout opportunities and key support/resistance zones.
Adaptive 12/48 EMA System:
Displays EMAs for 9, 12, 48, and 200 periods.
The 12 EMA changes color based on whether the price is entirely above or below it.
The 48 EMA changes color depending on its relationship with the 12 EMA.
Provides dynamic trend identification and potential entry/exit signals.
Previous Day High/Low (PDH/PDL):
Displays the previous day’s high and low levels.
Useful for tracking key intraday support/resistance levels and potential reversal points.
Summary:
This script stands out by blending three popular intraday tools into a single comprehensive indicator. The combined visualization provides a layered market context that assists traders in making informed decisions quickly. The color-adaptive EMAs add clarity to trend direction, while the ORB and PDH/PDL levels highlight significant price zones for breakout or reversal trades.
How to Use:
Breakout Trades: Watch for price breaks above the ORB high or below the ORB low, especially when supported by EMA trends.
Trend Confirmation: Use the color-adaptive 12/48 EMA system to gauge momentum and market direction.
Reversal or Continuation: Observe how price reacts around PDH/PDL levels, especially if confluence with EMAs occurs.
This indicator is suitable for day traders seeking a clear and efficient way to track market structure, identify trends, and spot potential trade opportunities during regular market hours.
GMA-F | TramaGMA-F | TRAMA Indicator
The GMA-F | TRAMA is an advanced Geometric Moving Average (GMA) indicator for TradingView, incorporating a for loop to refine trend signals. This tool enhances market analysis by detecting price momentum shifts with a mathematically weighted approach.
Key Features:
-Geometric Moving Average (GMA): Unlike standard moving averages, the GMA calculates the geometric mean of past prices for a more balanced and adaptive trend measurement.
-For Loop-Based Signal Processing: Iteratively evaluates price movements over a user-defined range, enhancing signal precision.
-Customizable Thresholds: Users can set long and short triggers to align with their preferred trading strategies.
-Color-Coded Signals: Choose between three distinct visualization modes (Cool, Classic, Blue) for easier interpretation.
For Loop Logic:
-Accumulates trend signals based on past price movements.
-Dynamically adapts to different market conditions.
-Filters out noise by applying a structured evaluation process.
Trading Signals:
-Bullish Signal (Cyan, Green, or Light Blue): The loop calculation exceeds the long threshold, indicating an upward trend.
-Bearish Signal (Magenta, Red, or Dark Blue): The loop calculation drops below the short threshold, signaling a downward trend.
Graphical Visualization:
-Loop Signal Plot: Displays the computed GMA loop signal with dynamic coloring.
-Threshold Markers: Clearly indicate bullish and bearish levels for quick reference.
-Colored Candlesticks: Change color based on detected market conditions, offering instant visual confirmation.
Operational Use:
The GMA-F | TRAMA is ideal for traders aiming to:
✔ Identify trend strength through an alternative moving average calculation.
✔ Reduce market noise by leveraging iterative signal refinement.
✔ Customize parameters to optimize entries and exits.
Disclaimer:
This indicator is for informational and educational purposes only and does not constitute financial advice. Traders should use this tool alongside other market analysis methods and risk management strategies before making trading decisions. Investing in financial markets involves significant risks.
Normalized RSI Oscillator with DivergencesNormalized RSI with Divergences {A Next-Level Trading Tool}
The Normalized RSI with Divergences indicator is a powerful and innovative tool designed to enhance your trading precision. By normalizing the Relative Strength Index (RSI) and detecting divergences between the standard and normalized RSI, this script helps traders identify potential trend reversals and continuations with remarkable clarity.
Key Features
🔹 Advanced RSI Normalization
• Transforms the traditional RSI into a normalized range of , making overbought and oversold conditions more intuitive.
• Utilizes a dynamic lookback period to adapt to market conditions.
🔹 Divergence Detection for Smarter Trading
• Identifies Bullish, Hidden Bullish, Bearish, and Hidden Bearish divergences by analyzing RSI pivot points.
• Provides early signals of trend reversals and continuations for better trade execution.
🔹 Clear & Visual Trade Signals
• Divergences are automatically labeled on the chart:
o Bullish Divergence: 🟢 “Bull” (Green) – Possible upward reversal.
o Hidden Bullish Divergence: 🟢 “Hid.” (Lime) – Continuation of an uptrend.
o Bearish Divergence: 🔴 “Bear” (Red) – Possible downward reversal.
o Hidden Bearish Divergence: 🟠 “Hid.” (Orange) – Continuation of a downtrend.
🔹 Fully Customizable Inputs
• Adjust RSI period, normalization lookback, and divergence parameters to fit your strategy.
• Tailor the indicator to your preferred trading style and market conditions.
________________________________________
How It Works
🔹 RSI Normalization Formula:
Norm=2×(RSI−MinMax−Min)−1\text{Norm} = 2 \times \left(\frac{\text{RSI} - \text{Min}}{\text{Max} - \text{Min}}\right) - 1Norm=2×(Max−MinRSI−Min)−1
• Min & Max represent the lowest and highest RSI values over the selected lookback period.
🔹 Divergence Detection Process:
• Identifies pivot points in both the normalized RSI and the standard RSI.
• Compares their directions to detect potential trading signals.
🔹 Real-Time Chart Labeling:
• Uses label.new to visually highlight divergence points for quick and efficient decision-making.
________________________________________
Input Parameters
• Source: Price source for RSI calculation (Default: hlc3).
• Signal Period: RSI calculation period (Default: 50).
• Lookback Range: Normalization period (Default: 200, Max: 5000).
• Trend Length: Smoothing period for normalized RSI (Default: 5).
• Band Width: Center line & bands calculation period (Default: 34).
• Divergence Range: Lookback period for divergence detection (Default: 5).
________________________________________
How to Use
1. Add the script to your trading chart.
2. Customize the settings to match your trading approach.
3. Watch for divergence labels to identify potential market moves:
o 🟢 Bullish Divergence: Possible upward reversal.
o 🟢 Hidden Bullish Divergence: Continuation of an uptrend.
o 🔴 Bearish Divergence: Possible downward reversal.
o 🟠 Hidden Bearish Divergence: Continuation of a downtrend.
________________________________________
Why Use This Indicator?
✅ Enhanced RSI Analysis: Normalization simplifies overbought/oversold conditions.
✅ Crystal-Clear Divergence Signals: Instantly spot key trend shifts.
✅ Fully Customizable: Adjust settings for your specific strategy.
✅ Improve Trade Accuracy: Gain an edge with precise divergence detection.
________________________________________
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice. Always conduct thorough research and backtesting before using it in live trading.
📜 License
This script is released under the Mozilla Public License 2.0.
Enjoy the Normalized RSI with Divergences indicator, and happy trading! 🚀📈
— Kerem Ertem
Dual HTF Candle Boxes with PDH/PDL/PWH/PWLThis Pine Script code for TradingView creates an indicator that displays dual higher timeframe (HTF) candle boxes along with Previous Day High (PDH), Previous Day Low (PDL), Previous Week High (PWH), and Previous Week Low (PWL) lines. Let's break down what this code does:
Core Functionality:
Dual HTF Candle Boxes: The script overlays two sets of candle boxes on the main chart, each representing a different higher timeframe. This allows traders to visualize price action on larger timeframes without switching charts. For example, you can see 15-minute and 1-hour candles overlaid on your current chart.
Customizable Timeframes: You can define the specific higher timeframes you want to see for each set of candles. The script provides input options to select these timeframes.
Color Customization: The colors of the candle bodies, wicks, and boxes are customizable. You can set different colors for bullish and bearish candles for each of the two higher timeframes.
Box and Body Display Options: You can choose to display both the box outlines and the candle bodies, or just the bodies, or just the boxes (high/low range). This allows you to customize the visual representation to your liking.
Midline: An optional midline can be displayed within each HTF candle box, representing the midpoint between the high and low.
Range in Pips/Percentage: The script can display the range of each HTF candle in pips or as a percentage of the total range.
PDH/PDL/PWH/PWL Lines: The script also plots horizontal lines representing the Previous Day High, Previous Day Low, Previous Week High, and Previous Week Low. These are common support and resistance levels.
PDH/PDL/PWH/PWL Customization: You can customize the colors and line styles (solid or dashed) of the PDH/PDL/PWH/PWL lines.
Code Breakdown:
indicator(): Defines the script as an indicator with a title and other properties.
input.*: Defines user input options for customizing the indicator. This is how you configure the timeframes, colors, and other settings.
timeframe.period: Gets the current chart's timeframe.
request.security(): Used to request data from higher timeframes. This is how the script gets the high, low, open, and close prices for the HTF candles.
box.new(): Creates the candle box objects on the chart.
line.new(): Creates the PDH/PDL/PWH/PWL lines.
label.new(): Creates the labels for the pip/percentage range and PDH/PDL/PWH/PWL.
array.new_box(), array.new_label(), array.new_line(): These arrays are used to store the created boxes, labels, and lines so they can be managed and deleted if the color settings are changed. This is a crucial improvement for performance and prevents the chart from becoming cluttered with old objects.
f_draw_htf_boxes(): This function handles the drawing of the HTF candle boxes. It takes the timeframe, colors, and other parameters as input.
ta.change(time(Interval)): Detects when a new HTF candle has formed.
Key Improvements in this Version:
Object Management: The use of arrays to store and manage the boxes, labels, and lines is a significant improvement. This prevents the accumulation of objects on the chart, which can slow down TradingView and make the chart unreadable. The script now properly deletes old objects when colors are changed.
Color Change Detection: The script now detects when the user changes the color inputs and clears the existing objects before drawing new ones with the new colors.
Clearer Code Structure: The code is organized into functions, making it easier to read and understand.
How to Use:
Open TradingView.
Open a chart for any symbol.
Open the Pine Editor.
Copy and paste this code into the editor.
Add the indicator to the chart.
Use the input options to customize the indicator to your preferences.
This script provides a powerful way to visualize higher timeframe price action and key support/resistance levels directly on your chart, enhancing your trading analysis. Remember that proper use and interpretation of these indicators are crucial for successful trading. This script is a tool, and like any tool, its effectiveness depends on the user's skill and understanding.
Peak Reaction Zones [BigBeluga]Peak Reaction Zones is an advanced Smart Money Concept (SMC) indicator that identifies the most recent swing high and swing low zones, helping traders determine premium and discount areas for optimal trade positioning.
🔵 Key Features:
Swing High & Low Zones:
Automatically detects the latest swing high and swing low levels.
Helps traders identify key reaction points where price is likely to respond.
Premium & Discount Concept:
The high zone represents a premium area, where price is overextended and may reverse.
The low zone represents a discount area, where price is undervalued and may bounce.
The midline dynamically marks the equilibrium of the range.
Adjustable Zone Width:
Users can fine-tune the width of the zones to match their trading style.
Wider zones capture broader reaction ranges, while narrower zones focus on precise levels.
Zone Retest Signals:
Blue markers appear when price retests the lower reaction zone, signaling potential support.
Orange markers appear when price retests the upper reaction zone, indicating possible resistance.
Price Labels for Key Levels:
Displays the price value of the swing high, swing low, and midline for quick reference.
Helps traders recognize major reaction points at a glance.
🔵 Usage:
Smart Money Trading: Utilize the premium and discount concept to align trades with institutional order flow.
Zone Reactions: Watch for price tests of reaction zones and use the retest signals to confirm potential reversals.
Midline Confirmation: If price holds above or below the midline, it can indicate directional bias.
Scalping & Swing Trading: Short-term traders can look for zone rejections, while swing traders can use the levels for trend continuation setups.
Peak Reaction Zones is a must-have tool for traders looking to trade with Smart Money Concepts, allowing for precise entries and exits based on key liquidity areas and market structure.
Pivot Points DWMWhat Is a Pivot Point?
A pivot point is a price level calculated from previous prices. It's used to indicate potential areas of support or resistance that offer attractive reward-to-risk setups for trades. The pivot point itself is simply the average of the intraday high and low and the closing price from the previous trading day. Trading above the pivot point on the subsequent day is thought to indicate ongoing bullish sentiment. Trading below the pivot point indicates bearish sentiment.
Non-Repainting
Candlestick Pattern Detector - Vijay PrasadOverview:
This Pine Script v6 indicator is designed to detect and label key candlestick patterns on TradingView charts. It provides real-time visual markers for major bullish and bearish reversal signals, aiding traders in decision-making.
Usefulness:
✅ Saves time by automating candlestick pattern detection.
✅ Reduces manual chart analysis errors.
✅ Works across all markets & timeframes.
✅ Enhances trading strategies with accurate signals.
Candlestick Patterns Recognises:
Bullish Engulfing – A strong bullish reversal pattern.
Bearish Engulfing – Indicates a potential downtrend.
Hammer – Suggests a market bottom or reversal.
Shooting Star – A bearish reversal signal at the top of an uptrend.
Doji – Signals market indecision and possible trend change.
Key Functions:
Automated Pattern Visible
Identifies candlestick patterns dynamically and plots them on the chart.
Visual Labels for Patterns
Labels to indicate specific candlestick formations.
Labels appear only when a valid pattern is detected, avoiding unnecessary clutter.
Buy/Sell Signal
Plots buy signals at bullish patterns and sell signals at bearish patterns.
Helps traders recognize trend reversals and entry/exit points.
Bullish Engulfing Pattern (Green Label)
What it means: A bullish engulfing pattern typically signals a potential reversal from a downtrend to an uptrend. The current candle fully engulfs the previous candle, signaling strong buying interest.
Identifying Candlestick Patterns on the Chart
How to use it:
Entry: Look for a green label (bullish engulfing) at the bottom of the chart. When it appears, consider entering a long position (buy).
Confirmation: To increase reliability, wait for confirmation by observing if price moves above the high of the bullish engulfing candle.
Exit: Exit when the trend shows signs of reversing or take profit at predefined levels (e.g., resistance or a risk-to-reward ratio).
Bearish Engulfing Pattern (Red Label)
What it means: A bearish engulfing pattern is a signal of a potential reversal from an uptrend to a downtrend. The current candle fully engulfs the previous candle, signaling strong selling pressure.
How to use it:
Entry: Look for a red label (bearish engulfing) at the top of the chart. When it appears, consider entering a short position (sell).
Confirmation: Wait for the price to move below the low of the bearish engulfing candle to confirm the bearish trend.
Exit: Close the trade when the price reaches support levels or the trend shows signs of reversing.
Doji Pattern (Blue Circle)
What it means: A Doji candle signals market indecision. It represents a balance between buyers and sellers, often marking a potential reversal or consolidation point.
How to use it:
Entry: If the Doji appears after a strong trend (bullish or bearish), wait for the next candle to break above or below the Doji's high or low. This can signal a continuation or reversal.
Confirmation: You can look for additional indicators like moving averages, RSI, or MACD for confirmation before taking any action.
Exit: Exit when the price shows clear momentum in your entry direction.
Hammer Pattern (Orange Triangle)
What it means: The hammer pattern is a bullish reversal pattern that appears after a downtrend. It suggests that sellers pushed the price down during the session, but buyers managed to push the price back up.
How to use it:
Entry: When a hammer appears, consider entering a long position (buy). The price should move above the hammer's high for confirmation.
Confirmation: Look for strong volume and a follow-up bullish candle to confirm the reversal.
Exit: Set a target based on the next resistance level, or use a trailing stop to lock in profits.
Using Candlestick Patterns with Other Indicators
To increase your chances of success, combine candlestick patterns with other technical indicators.
Here are some ideas:
RSI (Relative Strength Index): Use RSI to check whether the market is overbought or oversold. A bullish engulfing in an oversold market could indicate a stronger buy signal, and a bearish engulfing in an overbought market could indicate a stronger sell signal.
Moving Averages (e.g., 50 EMA, 200 EMA): Confirm trend direction. If the candlestick pattern aligns with the direction of the moving averages, it can give a stronger signal.
MACD (Moving Average Convergence Divergence): Use MACD to confirm momentum and potential trend changes. If a candlestick pattern aligns with a MACD crossover, it strengthens the signal.
Volume: Look for higher-than-average volume when a pattern appears. This can give you additional confirmation that the market is reacting strongly.
Practice and Refine
It's important to practice using the candlestick patterns in a demo account or backtest them to see how they perform under different market conditions. Over time, you can adjust the settings and patterns to fit your trading style and preferences.
TradFi Fundamentals: Momentum Trading with Macroeconomic DataIntroduction
This indicator combines traditional price momentum with key macroeconomic data. By retrieving GDP, inflation, unemployment, and interest rates using security calls, the script automatically adapts to the latest economic data. The goal is to blend technical analysis with fundamental insights to generate a more robust momentum signal.
Original Research Paper by Mohit Apte, B. Tech Scholar, Department of Computer Science and Engineering, COEP Technological University, Pune, India
Link to paper
Explanation
Price Momentum Calculation:
The indicator computes price momentum as the percentage change in price over a configurable lookback period (default is 50 days). This raw momentum is then normalized using a rolling simple moving average and standard deviation over a defined period (default 200 days) to ensure comparability with the economic indicators.
Fetching and Normalizing Economic Data:
Instead of manually inputting economic values, the script uses TradingView’s security function to retrieve:
GDP from ticker "GDP"
Inflation (CPI) from ticker "USCCPI"
Unemployment rate from ticker "UNRATE"
Interest rates from ticker "USINTR"
Each series is normalized over a configurable normalization period (default 200 days) by subtracting its moving average and dividing by its standard deviation. This standardization converts each economic indicator into a z-score for direct integration into the momentum score.
Combined Momentum Score:
The normalized price momentum and economic indicators are each multiplied by user-defined weights (default: 50% price momentum, 20% GDP, and 10% each for inflation, unemployment, and interest rates). The weighted components are then summed to form a comprehensive momentum score. A horizontal zero line is plotted for reference.
Trading Signals:
Buy signals are generated when the combined momentum score crosses above zero, and sell signals occur when it crosses below zero. Visual markers are added to the chart to assist with trade timing, and alert conditions are provided for automated notifications.
Settings
Price Momentum Lookback: Defines the period (in days) used to compute the raw price momentum.
Normalization Period for Price Momentum: Sets the window over which the price momentum is normalized.
Normalization Period for Economic Data: Sets the window over which each macroeconomic series is normalized.
Weights: Adjust the influence of each component (price momentum, GDP, inflation, unemployment, and interest rate) on the overall momentum score.
Conclusion
This implementation leverages TradingView’s economic data feeds to integrate real-time macroeconomic data into a momentum trading strategy. By normalizing and weighting both technical and economic inputs, the indicator offers traders a more holistic view of market conditions. The enhanced momentum signal provides additional context to traditional momentum analysis, potentially leading to more informed trading decisions and improved risk management.
The next script I release will be an improved version of this that I have added my own flavor to, improving the signals.
Pivot Candles with MFI Opacity (No Plot)How to Use the Pivot Candles with MFI Opacity Indicator for Trade Entries and Position Management
Overview
This indicator is designed not only to display key pivot levels (support and resistance) and Money Flow Index (MFI) signals on your chart, but also to help you structure systematic order entries and position management. By combining pivot levels with dynamic MFI-based candle opacity, the indicator provides a visual framework that technical analysts and quants can use to time buy and sell stop orders as well as to pyramid positions or take profits.
Trade Entry with Pivot Levels
Buy Stop Orders Above R1:
Concept: In many technical setups, resistance levels such as R1 are viewed as potential breakout points. A buy stop order placed just above R1 allows you to enter a long position only when price decisively breaks the prior resistance, confirming bullish momentum.
How It Works:
The indicator calculates pivot levels based on the previous higher‑timeframe bar, so R1 is “locked in” for the current period.
When the current candle closes above R1, it may signal a breakout.
Technical analysts often place a buy stop order slightly above R1 (for example, a few ticks or pips above the level) to confirm the move.
Practical Application:
Quants and systematic traders can program their models to monitor when the current close exceeds R1.
Once this condition is met, a buy stop order is triggered to capture the breakout move, ensuring that you only participate if the price decisively moves upward.
Sell Stop Orders Below S1:
Concept: Conversely, S1 acts as a support level. A sell stop order placed just below S1 is designed to capture a breakdown. This order is activated when price closes below S1, indicating that selling pressure may be overwhelming.
How It Works:
With pivot levels fixed from the previous higher‑timeframe bar, S1 provides a reference for potential support.
A close below S1 can be interpreted as a sign of a bearish reversal or a continuation of a downtrend.
Practical Application:
Quants set up their systems to watch for a break below S1.
A sell stop order is positioned just below S1 to ensure that if the support level fails, the system can quickly initiate a short position to capture the downward move.
Using MFI for Position Management
Pyramiding and Profit Taking:
Dynamic Candle Opacity:
The Money Flow Index (MFI) in this indicator not only provides overbought/oversold alerts but also controls the opacity of your candlesticks. When MFI readings are high, the candles become more opaque, indicating strong buying pressure. Conversely, lower MFI values lead to more transparent candles, suggesting reduced momentum.
Pyramiding Long Positions:
Strategy:
In a strong trend, technical analysts might choose to add to a winning position gradually—a process known as pyramiding.
Implementation:
As long as the price remains above R1 and MFI readings are supportive (high and consistent), you may consider adding to your long position incrementally.
Each new buy stop order can be set above R1 with slightly adjusted trigger levels to capture further breakout strength.
Risk Management:
Quants use the MFI reading as a risk filter; if MFI begins to drop or the candles become significantly more transparent, it may be a cue to stop pyramiding or even begin taking profits.
Taking Profit Using MFI and Pivot Reversals:
Profit Targeting:
When price reaches higher resistance levels (e.g., R2 or R3) or shows signs of overextension in conjunction with extreme MFI levels (for instance, a sudden drop in MFI after a strong rally), you can begin taking partial profits.
Systematic Exit:
A systematic strategy might include scaling out of the position as the price approaches the next resistance level or when the MFI indicates that buying momentum is waning.
Similarly, for short positions entered below S1, profit targets might be set near subsequent support levels, with exits triggered if MFI suggests a reversal.
Summary
Entry Orders:
Place buy stop orders just above R1 to capture breakouts.
Place sell stop orders just below S1 to capture breakdowns.
Position Management with MFI:
Use MFI-based candle opacity as a visual indicator of momentum.
Pyramid positions in the direction of the trend when MFI confirms strength.
Consider partial exits if MFI readings start to reverse or if the price nears the next pivot level.
By following this systematic approach, technical analysts and quants can use the indicator not only as a visual tool but as an integral part of an automated or semi-automated trading system that emphasizes disciplined entries, pyramiding, and profit-taking.