Machine Learning Adaptive SmartTrend [Bitwardex]ML Adaptive SmartTrend is a sophisticated trend tracking indicator that complements the classic supertrend formula using machine learning and advanced technical analysis. Based on SuperTrend, the SmartTrend formula adapts to market dynamics, providing traders with accurate buy and sell signals. Using K-Means clustering, it intelligently adjusts to high, medium or low volatility, ensuring optimal performance in various market conditions. The combination of ATR, RSI and ADX with Gaussian smoothing allows you to filter out noise for a clear and reliable trend detection.
Key functions:
Brand new calculations: Based on the idea of the supertrend and the Bollinger channel, SmartTrend has been developed, which adds adaptive intelligence for excellent trend tracking.
Volatility Adaptation: Uses K-means clustering to dynamically adapt to market volatility, increasing signal accuracy.
Clear Buy/Sell signals: Visual markers (🐮/🐻) indicate trading opportunities based on trend intersection and price movement.
Noise reduction: Gaussian smoothing minimizes false signals, providing smooth and reliable trend lines.
Fully customizable: You can fine-tune the ATR length, smoothing period, and other parameters to suit your trading strategy
Real-time Alerts: Keep abreast of trend changes and volatility, which is ideal for active trading.
Universal Application: Ideal for trend trading, scalping or swing trading in stock, currency, cryptocurrency and other markets.
Designed for both beginners and experienced traders, ML Adaptive SmartTrend provides you with an intelligent, data-driven tool to identify trends and make confident trading decisions. Customize it according to your needs and use the power of this modern trend-setting approach to stay ahead in any market!
Chỉ báo và chiến lược
MACD Liquidity Tracker SystemMACD Liquidity Tracker System
🔹 Enhanced MACD with candle coloring, entry markers, and customizable signal logic.
🧠 Features:
This tool combines a color-coded MACD histogram with signal-based candle colors and small shape markers (🔼🔽) for clear market momentum and entry visualization.
📊 Visuals:
MACD Histogram (Sub-panel):
4 dynamic colors to show momentum direction:
🔹 Bright Blue = MACD > 0 & rising (strong bullish)
🔹 Dark Blue = MACD > 0 & falling (weakening bullish)
🔹 Bright Magenta = MACD < 0 & falling (strong bearish)
🔹 Dark Magenta = MACD < 0 & rising (weakening bearish)
Price Candles (Main Chart):
🔹 Bright Blue = Active Long signal
🔹 Bright Magenta = Active Short signal
Entry Markers:
🔼 Blue triangle (below candle) = Start of Long
🔽 Magenta triangle (above candle) = Start of Short
⚙️ System Types (select in settings):
Normal:
🔹 Long = MACD > 0
🔹 Short = MACD < 0
Fast: (Based on histogram color)
🔹 Long = Bright Blue OR Dark Magenta
🔹 Short = Dark Blue OR Bright Magenta
Safe:
🔹 Long = Only Bright Blue
🔹 Short = All other colors
🔔 Alerts:
Alerts trigger only on the first bar of a new Long/Short signal.
Easy to set up using TradingView’s alert system.
📌 How to Use:
Add the indicator to your chart
Open settings and select a System Type
Adjust MACD parameters if needed
Use histogram color + candle color for momentum and signal confirmation
Set alerts for clean entries if desired
💡 Ideal for traders seeking visual clarity and flexible MACD-based strategies.
Bijnor Pivot ExtendedOverview: The Bijnor Pivot Extended (BP+) indicator is a powerful visual tool designed to help traders identify key price levels using Fibonacci-based pivots. It dynamically plots Support and Resistance levels based on your chosen timeframe (Daily, Weekly, or Monthly) and displays them only for the current session, reducing chart clutter and improving focus.
🔧 Features:
📆 Pivot Timeframe Selection: Choose between Daily, Weekly, or Monthly pivots.
🎯 Fibonacci Pivot Levels:
Central Pivot (P)
Resistance: R1, R2, R3, R4 (Extended)
Support: S1, S2, S3, S4 (Extended)
🎨 Full Customization:
Toggle labels and prices on/off
Position labels to the left or right
Change line width and individual colors for pivot, support, and resistance lines
🧠 Smart Line Plotting:
Lines are drawn only during the selected session, keeping your chart clean
🕹️ Max Performance: Optimized to stay lightweight with max_lines_count and max_labels_count set to 500
🧭 How to Use It:
Use this indicator to:
Plan entries and exits around key Fibonacci pivot zones
Identify overbought/oversold zones at R3/R4 and S3/S4
Enhance your intraday, swing, or positional trading setups
Combine with price action, candlestick patterns, or volume for maximum edge.
✅ Bonus:
This script is ideal for traders looking for a minimalist yet powerful pivot framework, with extended levels for breakout or reversal scenarios.
Dynamic Trailing [Dakon]
Overview:
This indicator is a dynamic trend-following tool designed to detect potential shift points in market trends using an adaptive trailing system based on ATR and smoothed filters.
Key Features:
Adaptive trailing stop that responds to price volatility
Detects potential trend reversals by tracking breakout zones
Includes dual RMA lines for broader trend filtering
Customizable sensitivity and ATR period
Visual coloring to distinguish bullish and bearish momentum
Parameters:
Sensitivity: Controls how reactive the trail is to price changes
ATR Period: Defines the length of the ATR calculation for volatility
MA Lines: Two RMA lines for trend context and filtering
Purpose:
This indicator helps identify potential trend phase shifts. It is not a buy/sell signal by itself, but rather a contextual tool to combine with other indicators for more accurate trade decisions.
RSIDivergence Smartzebra 1📈 RSIDivergence Smartzebra 1 – Powerful Momentum & Reversal Detection Tool
The RSIDivergence Smartzebra 1 indicator is an advanced divergence detection system built on the classic RSI oscillator — but enhanced with intelligent regression-based analysis and multi-layered visual cues.
✅ Why It's a Game-Changer
1. Advanced Divergence Detection
Instead of relying on simple peak/trough comparisons, this indicator uses linear regression analysis on both price and RSI to determine trend direction and slope. This allows it to detect true divergences with greater accuracy — even subtle ones.
2. Visual Strength Representation
Each divergence is analyzed for its strength based on the difference between the start and end of the RSI regression line.
🟢 Bullish signals are marked with green circles below the price
🔴 Bearish signals are marked with red circles above the price
The circle size reflects strength: small = weaker divergence, large = strong and high-conviction signals.
3. RSI-Based Trend Context
The script also includes a smoothed daily RSI (10-period EMA), helping you identify larger trend momentum — useful for filtering false signals and aligning with higher timeframes.
4. Clear Divergence Lines on RSI
Divergence events are plotted as colored lines on the RSI panel:
Green lines = bullish divergence
Red lines = bearish divergence
These offer quick visual confirmation and historical reference.
5. Strategic RSI Zones
The indicator shades key RSI zones to highlight overbought, oversold, and neutral areas — giving context to divergence signals based on momentum extremes.
6. Alerts for Buy & Sell Signals
With built-in alertconditions, you can be notified of new bullish or bearish divergences the moment they appear.
Levels 2.0 by SaltanovCrypto (Arrays - Up to 20 Levels)Script Description: Levels 2.0 by SaltanovCrypto – Dynamic Trading Levels for Multiple Exchanges
This Pine Script (version 6), titled "Levels 2.0 by SaltanovCrypto", is a highly versatile and customizable tool designed to display buy and sell levels with corresponding labels for cryptocurrency pairs across multiple exchanges, including Bybit, Binance, OKX, BingX, Coinbase, and others. The script is tailored to meet the specific needs of traders who rely on large limit orders or data from order book screeners, allowing them to visualize key trading zones with ease.
Core Features Based on Your Requirements
1. Universal Compatibility Across Exchanges:
- The script supports any exchange and any cryptocurrency pair in the format `exchange:pair` (e.g., `BYBIT:TIAUSDT`, `BINANCE:BTCUSDT.P`, `COINBASE:ADAUSD`).
- You can add as many pairs as needed in this simple format:
bybit:TONUSDT,
bybit:TRUMPUSDT,
coinbase:ADAUSD,
okx:ETHUSDT,
bingx:SOLUSDT,
binance:ZENUSDT.P,
binance:ZKUSDT.P,
bybit:AAVEUSDT.P,
bybit:AMIUSDT,
bybit:APTUSDT,
bybit:ATOMUSDT.P,
bybit:DYDXUSDT.P,
2. Dynamic Levels and Labels:
- All buy levels and sell levels for a single coin must be grouped together within one `else if` block. This ensures that all levels for a specific ticker are defined in a single, cohesive section.
- The first coin in the script starts with an `if ticker` statement, while all subsequent coins use `else if ticker`. This structure ensures proper conditional logic.
3. Correct Format for Adding Levels:
- The format for adding levels to the script should look like this:
if ticker == "BYBIT:WLDUSDT"
buyLevels.push(0.682)
buyLabels.push("31.04K")
else if ticker == "BYBIT:TIAUSDT"
buyLevels.push(2.285)
buyLabels.push("48.84K")
else if ticker == "BYBIT:MKRUSDT"
sellLevels.push(1400)
sellLabels.push("72.06K")
else if ticker == "BYBIT:GALAUSDT"
buyLevels.push(0.01355)
buyLabels.push("35.95K")
- Key Rule:
- The first coin always starts with `if ticker`.
- All subsequent coins use `else if ticker`.
4. Support for Futures (.P Pairs):
- The script works seamlessly with futures pairs that have `.P` appended to their names (e.g., `BINANCE:BTCUSDT.P`, `BINANCE:ETHUSDT.P`).
- Example:
else if ticker == "BINANCE:BTCUSDT.P"
buyLevels.push(90000)
buyLabels.push("Buy Level 1")
buyLevels.push(89000)
buyLabels.push("Buy Level 2")
sellLevels.push(92000)
sellLabels.push("Sell Level 1")
5. Unlimited Scalability:
- While the script currently supports up to 20 buy levels and 20 sell levels per ticker, it is designed to be easily extendable. You can add more variables (e.g., `buyLine21`, `sellLine22`) to accommodate additional levels if needed.
- Each level is drawn as a horizontal line on the chart, and labels are displayed next to the lines for better readability.
6. Customizable Appearance:
- The script provides full control over the visual appearance of the lines and labels:
- Line Color: Separate colors for buy and sell lines (e.g., green for buy, blue for sell).
- Line Width: Adjustable width for better visibility.
- Label Text Color: Customizable text color for labels.
- Label Background Color: Semi-transparent background for labels to improve contrast.
- Font Size: Adjustable font size for labels.
7. Offset for Lines:
- The script includes parameters to offset the lines left and right from the last bar, ensuring they don’t overlap with the price action or other indicators.
8. Neural Network Integration:
- Neural networks can be used to automate the process of extracting levels and labels from screeners and converting them into the required format for the script. For example:
- Train a neural network to parse screener data and output the levels and labels in the correct format.
- Automate the insertion of these levels into the script using scripts or tools that interact with the Pine Script editor.
---
Example Block with 5 Buy Levels and 5 Sell Levels
Here’s an example of how to define 5 buy levels and 5 sell levels for a single coin, such as `BINANCE:BCHUSDT.P`, in the simplified format:
else if ticker == "BINANCE:BCHUSDT.P"
sellLevels.push(337)
sellLabels.push("3.38M")
sellLevels.push(339)
sellLabels.push("3.41M")
sellLevels.push(340)
sellLabels.push("3.41M")
sellLevels.push(342)
sellLabels.push("3.45M")
sellLevels.push(345)
sellLabels.push("3.50M")
buyLevels.push(320)
buyLabels.push("417.92K")
buyLevels.push(318)
buyLabels.push("395.20K")
buyLevels.push(315)
buyLabels.push("372.48K")
buyLevels.push(312)
buyLabels.push("349.76K")
buyLevels.push(310)
buyLabels.push("327.04K")
---
Why This Script Meets Your Needs
- Flexibility Across Exchanges: The script supports any exchange and any pair, making it ideal for traders who monitor multiple platforms like Bybit, Binance, OKX, BingX, and Coinbase.
- Ease of Data Integration: The intuitive format for defining levels and labels makes it easy to integrate data from any screener or source.
- Scalability: With support for up to 20 levels per ticker (and the ability to extend this limit), the script can accommodate even the most complex trading strategies.
- Automation Potential: By leveraging neural networks, you can fully automate the process of extracting levels and labels from screeners, saving time and reducing manual effort.
---
Conclusion
The "Levels 2.0 by SaltanovCrypto" script is a powerful and flexible tool designed to meet the needs of modern traders. Its compatibility with any exchange, ease of integrating data from screeners, and potential for automation with neural networks make it an indispensable addition to any trader's toolkit. Whether you're monitoring large limit orders or analyzing key trading zones, this script provides the scalability, flexibility, and customization you need to succeed.
Vietnamese Stocks: Multi-Ticker Fibonacci AlertThis Pine Script™ indicator is designed specifically for traders monitoring the Vietnamese stock market (HOSE, HNX). Its primary goal is to automate the tracking of Fibonacci retracement levels across a large list of stocks, alerting you when prices breach key support zones.
Core Functionality:
The script calculates Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) for up to 40 tickers simultaneously. The calculation is based on the highest high and lowest low identified since a user-defined Start Time. This allows you to anchor the Fibonacci analysis to a specific market event, trend start, or time period relevant to your strategy.
What it Does For You:
Automated Watchlist Scanning: Instead of drawing Fib levels on dozens of charts, select one of the two pre-configured watchlists (up to 40 symbols each, customizable in settings) populated with popular Vietnamese stocks.
Time-Based Fibonacci: Define a Start Time in the settings. The script uses this date to find the subsequent highest high and lowest low for each symbol in your chosen watchlist, forming the basis for the Fib calculation.
Intelligent Alerts: Get notified via TradingView's alerts when the candle closing price of any stock in your active watchlist falls below the critical 38.2%, 50%, 61.8%, or 78.6% levels relative to its own high/low range since the start time. Alerts are consolidated for efficiency.
Visual Aids:
- Plots the same time-based Fibonacci levels directly on your current chart symbol for quick reference.
- Includes an optional on-chart table showing which monitored stocks are currently below key Fib levels (enable "Show Debug Info").
- Features experimental background coloring to highlight potential bullish signals on the current chart.
Configuration:
Start Time: Crucial input – sets the anchor point for Fib calculations.
WatchList Selection: Choose between WatchList #1 (Bluechip/Midcap focus) or WatchList #2 (Defensive/Other focus) using the boolean toggles.
Symbol Customization: Easily replace the default symbols with your preferred Vietnamese stocks directly in the indicator settings.
Notification Prefix: Add custom text to the beginning of your alert messages.
Alert Setup: Remember to create an alert in TradingView, selecting this indicator and the alert() condition, usually with "Once Per Bar Close" frequency.
This tool is open-source under the MPL 2.0 license. Feel free to use, modify, and learn from it.
Jack's ADX v3 with Multi-TF TableAdded a table showing the ADX value on 3 timeframes.
You can change the timeframes in the settings.
NOTE: When you change the timeframe/s in the settings it will change the value in the table but the timeframe label does not change. To be fixed.
But if you change timeframe 2 to 1 hour, the text in the table will say 26m but the value is from the 1 hour adx value.
Hope that makes sense.
MA + RSI + Auto S/R (v5)📘 Documentation: All-in-One Technical Indicator
This indicator merges multiple essential tools into a single chart overlay. It’s designed to help traders visualize market trends, volatility, price action patterns, and potential reversal zones with clarity and precision.
🧩 Included Components
Component Description
EMA (Fast/Slow) Tracks short- and mid-term trend momentum.
SMA (Short/Long) Acts as dynamic support/resistance and long-term trend bias.
RSI Displays overbought/oversold momentum.
Support/Resistance Detected automatically using pivot highs/lows.
ZigZag Simplifies price structure, showing key highs/lows based on % deviation.
Bollinger Bands Measures price volatility and deviation from mean.
Fibonacci Levels Auto-draws retracement levels between recent pivot high and low.
⚙️ User Inputs
Input Description
emaFastLen Length of fast EMA (default: 9).
emaSlowLen Length of slow EMA (default: 21).
smaShortLen Length of short SMA (default: 20).
smaLongLen Length of long SMA (default: 50).
rsiLen RSI period (default: 14).
rsiOB, rsiOS Overbought/Oversold thresholds (default: 70/30).
pivotLeft/Right Number of candles to look left/right for pivot high/low (default: 5).
zigzagDepth Not currently used, reserved for future depth-based logic.
zigzagDev (%) Minimum percentage move to trigger ZigZag point.
bbLength Length of the Bollinger Bands (default: 20).
bbMult Standard deviation multiplier (default: 2.0).
📊 Indicator Visuals
📈 Moving Averages
EMA Fast (Orange): Captures short-term momentum.
EMA Slow (Red): Captures longer-term trend.
SMA Short (Blue) and SMA Long (Teal): Indicate major trend and support/resistance zones.
💹 RSI
Hidden by default but available via style settings.
Shows momentum and potential reversals:
Overbought = Above 70
Oversold = Below 30
Neutral = 50 line
🔺 Support / 🔻 Resistance (Pivot Highs/Lows)
Based on swing points (pivot detection).
Green Cross = Support
Red Cross = Resistance
⚡ ZigZag
Lines plotted between points where price changes exceed a % threshold.
Useful for:
Recognizing structure
Trend swing points
Pattern formation
📉 Bollinger Bands
Upper Band, Lower Band, and Basis (SMA).
Shows deviation from average price and potential reversal when price hits outer bands.
📐 Fibonacci Retracement
Auto-draws key retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) between recent pivot low and high.
Helps identify:
Potential retracement zones
Entry/exit areas
🟥🟩 Trend Background (Optional)
Green background: EMA Fast > EMA Slow → Bullish momentum
Red background: EMA Fast < EMA Slow → Bearish momentum
🧪 Use Cases & Tips
Use Case Strategy Idea
Trend Confirmation Use EMA/SMA crossovers and RSI values.
Breakout & Reversal Zones Watch for price near Bollinger Bands and Fibonacci levels.
Entry & Exit Planning Confirm with ZigZag swing points and pivot S/R zones.
Volatility Awareness Use Bollinger Band width and ZigZag spacing.
🔧 Suggested Additions (Optional)
Let me know if you'd like me to add any of these:
Buy/Sell signals (based on multiple conditions)
Alerts for RSI cross, BB breakout, or Fibonacci retest
Strategy backtesting mode (strategy.*)
Multi-timeframe logic
Visual settings customization
King Crypto Crossover BotThe Simple SMA Crossover Bot is a streamlined yet robust algorithmic signal generator, architected to detect dynamic trend inflection points using dual-period simple moving average convergence and divergence.
Leveraging the intersection logic of short-term and long-term moving averages, this system highlights potential breakout and reversal zones by precisely identifying crossover and crossunder events — critical junctures where bullish or bearish momentum transitions often begin.
Designed for traders who value clarity and precision, the bot deploys high-visibility chart markers and configurable real-time alert conditions, enabling seamless integration with webhook-based automation systems. This makes it ideal for hybrid manual-automated trading strategies or full automation when paired with third-party trade execution layers.
Whether used standalone or as part of a broader multi-indicator framework, this crossover engine offers a solid foundation for systematic trading strategies in crypto, forex, or equities markets.
MA + RSI + Auto S/R (v5) MA + RSI + Auto Support/Resistance Indicator
This indicator combines Exponential Moving Averages (EMA), Simple Moving Averages (SMA), Relative Strength Index (RSI), and Auto-detected Support/Resistance levels (based on pivot highs/lows) to offer a comprehensive technical analysis toolkit for any trader.
🧩 Included Components
Component Description
EMA (Fast/Slow) Used for identifying short- and medium-term trend direction.
SMA (Short/Long) Indicates dynamic support/resistance and longer-term trend.
RSI Helps detect overbought or oversold conditions.
Support/Resistance Automatically plotted using pivot highs/lows (swing points).
Trend Highlight Optional background coloring to visually represent trend bias.
⚙️ User Inputs
Input Purpose
emaFastLen Length of the fast EMA (default: 9).
emaSlowLen Length of the slow EMA (default: 21).
smaShortLen Length of the short SMA (default: 20).
smaLongLen Length of the long SMA (default: 50).
rsiLen RSI calculation period (default: 14).
rsiOB, rsiOS RSI Overbought and Oversold thresholds (default: 70/30).
pivotLeft/Right Number of bars for detecting pivot highs/lows (default: 5 each).
📈 Indicator Components
📊 EMA / SMA
Fast EMA (orange) and slow EMA (red) show trend momentum.
Short SMA (blue) and long SMA (teal) show general price direction and act as dynamic support/resistance.
💹 RSI Panel
RSI is calculated and internally plotted.
Static lines:
70 → Overbought
30 → Oversold
50 → Neutral/Center Line
RSI value labels appear every ~20 bars for clarity.
📌 Support and Resistance Zones
Automatically drawn using:
pivotHigh() → plots resistance (red crosses)
pivotLow() → plots support (green crosses)
Useful for swing trading and breakout setups.
🟥🟩 Trend Background Highlight (Optional)
Green background → Fast EMA above Slow EMA → Bullish momentum.
Red background → Fast EMA below Slow EMA → Bearish momentum.
Helps visualize trend bias at a glance.
🧪 Usage Suggestions
Combine EMA/SMA crossovers with RSI values for stronger signals.
Watch for RSI divergence near support/resistance zones.
Use pivot highs/lows to plan stop-loss or breakout entries.
Use background color to confirm trend alignment across timeframes.
🛠️ Possible Extensions
Add buy/sell signal plots based on conditions (e.g., EMA crossover + RSI filter).
Add alerts when price touches pivot levels or RSI crosses critical values.
Integrate into a full trading strategy script (strategy.*) for backtesting.
RSI+Stoch Band Oscillator📈 RSI + Stochastic Band Oscillator
Overview:
The RSI + Stochastic Band Oscillator is a technical indicator that combines the strengths of both the Relative Strength Index (RSI) and the Stochastic Oscillator. Instead of using static thresholds, this indicator dynamically constructs upper and lower bands based on the RSI and Stochastic overbought/oversold zones. It then measures the relative position of the current price within this adaptive range, effectively producing a normalized oscillator.
Key Components:
RSI-Based Dynamic Bands:
Using RSI values and exponential moving averages of price changes, upper and lower dynamic bands are constructed.
These bands adjust based on overbought and oversold levels, offering a more responsive framework than fixed RSI thresholds.
Stochastic-Based Dynamic Bands:
Similarly, Stochastic %K and %D values are used to construct dynamic bands.
These adapt to overbought and oversold levels by recalculating potential high/low values within the lookback window.
Oscillator Calculation:
The oscillator (osc) is computed as the relative position of the current close within the combined upper and lower bands of both RSI and Stochastic.
This value is normalized between 0 and 100, allowing clear identification of extreme conditions.
Visual Features:
The oscillator is plotted as a line between 0 and 100.
Color-filled areas highlight when the oscillator enters extreme zones:
Above 100 with falling momentum: Red zone (potential reversal).
Below 0 with rising momentum: Green zone (potential reversal).
Additional trend conditions (falling/rising RSI, %K, and %D) are used to strengthen reversal signals by confirming momentum shifts.
Ultimate Moving Average Crossover Indicator by SAMQUANT📈 Ultimate Moving Average Crossover Indicator | All-in-One MA Strategy
Unlock the power of multiple moving averages in one versatile indicator designed to give you clear, actionable signals in any market condition.
📌 Key Features:
- Supports **all major moving averages**:
- **SMA, EMA, WMA, HMA, RMA, DEMA, TEMA**, and more.
- Each MA is **fully customizable** with different lengths and types for ultimate flexibility.
- **Binary Long/Short signals** based on crossover logic—perfect for alerts, strategies, or discretionary trading.
- **Dynamic background coloring**:
- **Green** for bullish trends
- **Red** for bearish trends
Quickly gauge market direction at a glance.
---
🚀 Why Use This Indicator?
✅ Combines the strength of all major MA types
✅ Customizable to fit any trading style—scalping, swing, or trend following
✅ Built-in alerts ready for your next trade
✅ Visually intuitive with built-in signal clarity
✅ Excellent tool for **confluence-based** strategies
---
Great trades start with great tools. Clarity, precision, and flexibility—this indicator brings it all to your charts. Trade smarter, not harder.
---
> ⚠️ **Disclaimer:**
This script is intended for **educational and informational purposes only**. It does not constitute financial advice. Past performance is not indicative of future results. Always practice sound risk management and test strategies thoroughly before using real capital.
DEMA Trend Oscillator Strategy📌 Overview
The DEMA Trend Oscillator Strategy is a dynamic trend-following approach based on the Normalized DEMA Oscillator SD.
It adapts in real-time to market volatility with the goal of improving entry accuracy and optimizing risk management.
⚠️ This strategy is provided for educational and research purposes only.
Past performance does not guarantee future results.
🎯 Strategy Objectives
The main goal of this strategy is to respond quickly to sudden price movements and trend reversals,
by combining momentum-based signals with volatility filters.
It is designed to be user-friendly for traders of all experience levels.
✨ Key Features
Normalized DEMA Oscillator: A momentum indicator that normalizes DEMA values on a 0–100 scale, allowing intuitive identification of trend strength
Two-Bar Confirmation Filter: Requires two consecutive bullish or bearish candles to reduce noise and enhance entry reliability
ATR x2 Trailing Stop: In addition to fixed stop-loss levels, a trailing stop based on 2× ATR is used to maximize profits during strong trends
📊 Trading Rules
Long Entry:
Normalized DEMA > 55 (strong upward momentum)
Candle low is above the upper SD band
Two consecutive bullish candles appear
Short Entry:
Normalized DEMA < 45 (downward momentum)
Candle high is below the lower SD band
Two consecutive bearish candles appear
Exit Conditions:
Take-profit at a risk-reward ratio of 1.5
Stop-loss triggered if price breaks below (long) or above (short) the SD band
Trailing stop activated based on 2× ATR to secure and extend profits
💰 Risk Management Parameters
Symbol & Timeframe: Any (AUDUSD 5M example)
Account size (virtual): $3000
Commission: 0.4PIPS(0.0004)
Slippage: 2 pips
Risk per trade: 5%
Number of trades (backtest):534
All parameters can be adjusted based on broker specifications and individual trading profiles.
⚙️ Trading Parameters & Considerations
Indicator: Normalized DEMA Oscillator SD
Parameter settings:
DEMA Period (len_dema): 40
Base Length: 20
Long Threshold: 55
Short Threshold: 45
Risk-Reward Ratio: 1.5
ATR Multiplier for Trailing Stop: 2.0
🖼 Visual Support
The chart displays the following visual elements:
Upper and lower SD bands (±2 standard deviations)
Entry signals shown as directional arrows
🔧 Strategy Improvements & Uniqueness
This strategy is inspired by “Normalized DEMA Oscillator SD” by QuantEdgeB,
but introduces enhancements such as a two-bar confirmation filter and an ATR-based trailing stop.
Compared to conventional trend-following strategies, it offers superior noise filtering and profit optimization.
✅ Summary
The DEMA Trend Oscillator Strategy is a responsive and practical trend-following method
that combines momentum detection with adaptive risk management.
Its visual clarity and logical structure make it a powerful and repeatable tool
for traders seeking consistent performance in trending markets.
⚠️ Always apply appropriate risk management. This strategy is based on historical data and does not guarantee future results.
FunctionSurvivalEstimationLibrary "FunctionSurvivalEstimation"
The Survival Estimation function, also known as Kaplan-Meier estimation or product-limit method, is a statistical technique used to estimate the survival probability of an individual over time. It's commonly used in medical research and epidemiology to analyze the survival rates of patients with different treatments, diseases, or risk factors.
What does it do?
The Survival Estimation function takes into account censored observations (i.e., individuals who are still alive at a certain point) and calculates the probability that an individual will survive beyond a specific time period. It's particularly useful when dealing with right-censoring, where some subjects are lost to follow-up or have not experienced the event of interest by the end of the study.
Interpretation
The Survival Estimation function provides a plot of the estimated survival probability over time, which can be used to:
1. Compare survival rates between different groups (e.g., treatment arms)
2. Identify patterns in the data that may indicate differences in mortality or disease progression
3. Make predictions about future outcomes based on historical data
4. In a trading context it may be used to ascertain the survival ratios of trading under specific conditions.
Reference:
www.global-developments.org
"Beyond GDP" ~ www.aeaweb.org
en.wikipedia.org
www.kdnuggets.com
survival_probability(alive_at_age, initial_alive)
Kaplan-Meier Survival Estimator.
Parameters:
alive_at_age (int) : The number of subjects still alive at a age.
initial_alive (int) : The Total number of initial subjects.
Returns: The probability that a subject lives longer than a certain age.
utility(c, l)
Captures the utility value from consumption and leisure.
Parameters:
c (float) : Consumption.
l (float) : Leisure.
Returns: Utility value from consumption and leisure.
welfare_utility(age, b, u, s)
Calculate the welfare utility value based age, basic needs and social interaction.
Parameters:
age (int) : Age of the subject.
b (float) : Value representing basic needs (food, shelter..).
u (float) : Value representing overall well-being and happiness.
s (float) : Value representing social interaction and connection with others.
Returns: Welfare utility value.
expected_lifetime_welfare(beta, consumption, leisure, alive_data, expectation)
Calculates the expected lifetime welfare of an individual based on their consumption, leisure, and survival probability over time.
Parameters:
beta (float) : Discount factor.
consumption (array) : List of consumption values at each step of the subjects life.
leisure (array) : List of leisure values at each step of the subjects life.
alive_data (array) : List of subjects alive at each age, the first element is the total or initial number of subjects.
expectation (float) : Optional, `defaut=1.0`. Expectation or weight given to this calculation.
Returns: Expected lifetime welfare value.
No Trading ZoneNo trading zone
This indicator highlights the time range between 03:00 and 11:00 UTC as a "danger zone" for trading.
Based on data-driven backtesting, this period consistently showed:
- High frequency of moving average (MA) crossovers without meaningful trend
- A high concentration of sideways market conditions
- Increased likelihood of false breakouts and stop-loss hunting
On average, strong directional trends tend to emerge after 12:00 UTC, especially between 12:00–15:00 UTC.
Avoiding trades during this time zone can help reduce exposure to low-probability setups and enhance strategy reliability.
Phoenix Pro Strategy📘 Phoenix Pro Indicator & Strategy – Technical Documentation
🔧 Overview
The Phoenix Pro Indicator is a comprehensive multi-tool indicator designed for trend detection, momentum analysis, volatility visualization, and automated strategy execution on TradingView. It integrates:
EMA, SMA (Trend Filters)
RSI (Momentum)
Bollinger Bands (Volatility)
Pivot Support/Resistance (Price Structure)
ZigZag Highs/Lows (Market Structure)
Auto Buy/Sell Strategy Logic
📊 Technical Components
🔹 1. Trend Filters (EMA/SMA)
Fast EMA (default 9): Short-term trend direction
Slow EMA (default 21): Long-term trend filter
SMA Short (default 20): Confirms price momentum
SMA Long (default 50): General market trend direction
pine
Kopyala
Düzenle
emaFast = ta.ema(close, 9)
emaSlow = ta.ema(close, 21)
🔹 2. RSI
Detects overbought/oversold conditions.
Used to time entries with trend confirmation.
pine
Kopyala
Düzenle
rsi = ta.rsi(close, 14)
🔹 3. Bollinger Bands
Measures volatility and helps detect breakouts.
pine
Kopyala
Düzenle
basis = ta.sma(close, 20)
upperBB = basis + 2 * ta.stdev(close, 20)
lowerBB = basis - 2 * ta.stdev(close, 20)
🔹 4. Pivot Support/Resistance
Highlights recent local highs and lows as potential reversal zones.
pine
Kopyala
Düzenle
pivotHigh = ta.pivothigh(high, 5, 5)
pivotLow = ta.pivotlow(low, 5, 5)
🔹 5. ZigZag
Simplifies price structure visualization to identify swing highs/lows.
pine
Kopyala
Düzenle
zigzagTop := (high >= high * (1 + dev / 100)) ? high : zigzagTop
📈 Strategy Logic
✅ Long Entry:
text
Kopyala
Düzenle
- EMA Fast > EMA Slow
- Close > SMA Short
- RSI < 60
- Close > Bollinger Basis
🔻 Short Entry:
text
Kopyala
Düzenle
- EMA Fast < EMA Slow
- Close < SMA Short
- RSI > 40
- Close < Bollinger Basis
📉 Exit Logic:
Close long if short condition triggers.
Close short if long condition triggers.
✅ Pine Script Strategy Code Snippet:
pine
Kopyala
Düzenle
strategy.entry("Long", strategy.long, when=longCond)
strategy.close("Long", when=shortCond)
strategy.entry("Short", strategy.short, when=shortCond)
strategy.close("Short", when=longCond)
🖥️ Usage in TradingView
Open TradingView
Click on Pine Editor (bottom tab)
Paste the full script
Click Add to Chart
Select the Strategy Tester tab to view performance
Adjust input parameters via settings ⚙️
⚙️ Recommended Settings (Adjust as needed)
Input Default Notes
EMA Fast 9 Short-term sensitivity
EMA Slow 21 Trend confirmation
SMA Short 20 Entry condition check
RSI Period 14 Momentum filter
RSI OB/OS 70/30 Entry condition tuning
Bollinger Length 20 For mean reversion / trend volatility
ZigZag Deviation (%) 5.0 Increase for higher-timeframe clarity
📌 Notes & Tips
Use on higher timeframes (1H, 4H, 1D) for better signals.
Combine with macro/fundamental filters for advanced setups.
Adjust parameters based on market type (ranging vs trending).
Use strategy tester to optimize performance.
Best Fit Linear Regression with StdDev BandsBest Fit Linear Regression with Standard Deviation Bands
The Best Fit Linear Regression with StdDev Bands is a custom TradingView indicator designed to analyze price trends and volatility over a specified number of bars. It plots a linear regression line representing the best fit for the selected price data, accompanied by optional standard deviation bands to visualize price dispersion.
📈 Key Features
Linear Regression Line: Calculates the best-fit line over a user-defined number of bars, providing a clear visualization of the prevailing price trend.
TradingView
Standard Deviation Bands: Optional upper and lower bands set at a multiple of the standard deviation from the regression line, indicating potential support and resistance levels.
Price Source Selection: Choose between using the closing price or the midpoint (average of high and low) for calculations.
Weighting Options: Apply True Range weighting to emphasize periods of higher volatility in the regression calculation.
Trend Strength Indicator: Displays a normalized strength value between -1 and 1, indicating the direction and magnitude of the trend.
Customizable Appearance: Adjust line color, width, label position, and background color to suit your preferences.
Extendable Lines: Option to extend the regression and standard deviation lines beyond the visible bars for projection purposes.
⚙️ Input Parameters
Bars to Analyze: Number of bars to include in the regression calculation (default: 100).
Price Value: Select "Close" or "Midpoint" as the data source for calculations.
Weighting Method: Choose between "None" or "True Range" weighting.
Line Color & Width: Customize the color and thickness of the regression line.
Label Position: Place the informational label at the start, center, or end of the regression line.
Label Background Color: Set the background color for the informational label.
Extend Line Beyond Visible Bars: Option to project the regression line into future bars.
Show Standard Deviation Bands: Toggle the visibility of the standard deviation bands.
Standard Deviation Multiplier: Set the multiplier for the standard deviation bands (default: 1.0).
StdDev Bands Color: Customize the color and transparency of the standard deviation bands.
🧮 How It Works
Data Collection: Gathers price data based on the selected source (Close or Midpoint) over the specified number of bars.
Weighting (Optional): Applies True Range weighting if selected, giving more importance to bars with higher volatility.
Regression Calculation: Computes the slope and intercept of the best-fit line using the least squares method.
Standard Deviation: Calculates the standard deviation of the price data from the regression line to determine the dispersion.
Plotting: Draws the regression line and, if enabled, the upper and lower standard deviation bands.
Labeling: Displays a label indicating the trend direction (Bullish, Bearish, or Neutral), strength percentage, and standard deviation value.
📊 Interpretation
Trend Direction: The slope of the regression line indicates the trend direction.
Trend Strength: The normalized strength value provides insight into the magnitude of the trend.
Price Position: Prices near or beyond the standard deviation bands may indicate overbought or oversold conditions.
TradingView
🛠️ Use Cases
Trend Analysis: Identify and confirm the direction and strength of market trends.
Volatility Assessment: Gauge market volatility through the width of the standard deviation bands.
Support and Resistance: Use the standard deviation bands to identify potential support and resistance levels.
Trade Timing: Assist in determining optimal entry and exit points based on price interaction with the regression line and bands.
This indicator is particularly useful for traders seeking a statistical approach to trend analysis, offering customizable options to tailor the tool to various trading strategies and preferences.
Volume & Price Counter**User Guide for Volume & Price Counter (Candle Structure)**
### 1. Introduction to Volume & Price Counter
The **Volume & Price Counter** (Candle Structure) is a momentum analysis indicator that helps identify which side—buyers or sellers—is dominating the market by counting candles based on the combination of volume and price movement.
The indicator classifies candles into 4 groups:
- **Volume Up, Price Up (Vol ↑ & Price ↑)** – Indicates strong buying pressure.
- **Volume Down, Price Up (Vol ↓ & Price ↑)** – Price is rising but buying momentum is weakening.
- **Volume Up, Price Down (Vol ↑ & Price ↓)** – Indicates strong selling pressure.
- **Volume Down, Price Down (Vol ↓ & Price ↓)** – Price is falling but selling momentum is weakening.
---
### 2. How the Indicator Works
The Volume & Price Counter calculates the number of each candle type over a specific time period to determine which side is currently in control:
- **Green Background**: When the total of (Vol ↑ & Price ↑) + (Vol ↓ & Price ↑) is greater than the total of (Vol ↑ & Price ↓) + (Vol ↓ & Price ↓) → Buyers are in control.
- **Red Background**: When the total of (Vol ↑ & Price ↓) + (Vol ↓ & Price ↓) is greater than the total of (Vol ↑ & Price ↑) + (Vol ↓ & Price ↑) → Sellers are in control.
---
### 3. How to Use the Indicator in Trading
**a) When the background is green**:
- The market is in an uptrend; consider buying during pullbacks to support zones.
- If the green background continues and the number of (Vol ↑ & Price ↑) candles dominates, the price may continue to rise.
- If the green background is present but there are many (Vol ↓ & Price ↑) candles, be cautious as buying strength may be fading.
**b) When the background is red**:
- The downtrend is prevailing; it's better to stay out or look for selling opportunities during pullbacks.
- If the red background continues with a high number of (Vol ↑ & Price ↓) candles, the price may continue to fall.
- If there are many (Vol ↓ & Price ↓) candles during a red background, selling pressure may be weakening—watch for reversal signals.
**c) When the background shifts from red to green**:
- This is a positive signal, indicating buyers are returning to the market.
- Additional volume confirmation is needed to validate a true uptrend.
**d) When the background shifts from green to red**:
- This warns of a potential trend reversal to the downside.
- If volume spikes during the red shift, consider closing long positions.
---
### 4. Combining Volume & Price Counter with Other Indicators
**Combine with support/resistance levels**:
If a green background appears at a strong support zone, it may signal a potential buying opportunity.
HTF FibonacciThis indicator displays Fibonacci lines for the selected previous HTF candle.
You can set its Fibs levels and colors.
HTF options: 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours and 1 day
Cumulative Delta Volume DivergenceCDV Divergence Indicator. Trading is about probabilities and no one indicator is going to give you a definite Buy/Sell signal. There are false positives. It can't tell you how high or low the price will go before it turns around. This is not financial advice. This is just a helpful addition to your toolbox :)
Previous 5 Days High/Low (RTH)Absolutely! Here's a detailed explanation of each part of the Pine Script we just built. This script is designed for intraday charts (e.g., 5-min, 15-min, 1-hour) and shows the high and low of the 5th most recent trading day, based on NASDAQ regular trading hours (RTH), which are 9:30 AM to 4:00 PM (New York time).
MOEX Sectors: % Above MA 50/100/200 (EMA/SMA)📊 Indicator Name:
MOEX Sector Breadth: % Above MA 50/100/200 (EMA/SMA)
📝 Description:
This indicator tracks market breadth across sector indices of the Moscow Exchange (MOEX). It calculates the percentage of sectors trading above selected moving averages (SMA or EMA) with user-defined periods (50, 100, or 200).
It provides a high-level view of market participation and internal strength, helping to identify broad trends, divergences, and potential reversals.
📦 Tracked MOEX Sector Indices:
mathematica
Copy
Edit
MOEXOG — Oil & Gas
MOEXCH — Chemicals
MOEXMM — Metals & Mining
MOEXTN — Transport
MOEXCN — Consumer
MOEXFN — Financials
MOEXTL — Telecom
MOEXEU — Utilities
MOEXIT — Information Technology
MOEXRE — Real Estate
📈 How to Use:
>50% above MA 200 → Bullish market regime
<50% above MA 200 → Weak breadth, caution advised
>90% above MA 50 → Market may be overbought
<10% above MA 200 → Market oversold, possible bottom
Combine with the IMOEX index to assess participation behind major moves
Use as a trend filter or divergence detector
Global M2 sandboxThis indicator aggregates global sources of liquidity to use as a proxy for the global money supply and allows an offsetting number of days to be implemented to use as a leading indicator.
// EUROZONE Data
EUM2D = request.security("ECONOMICS:EUM2*FX:EURUSD", "D", close, lookahead=barmerge.lookahead_on)
// North America Data
USM2D = request.security("ECONOMICS:USM2", "D", close, lookahead=barmerge.lookahead_on)
CAM2D = request.security("ECONOMICS:CAM2*FX_IDC:CADUSD", "D", close, lookahead=barmerge.lookahead_on)
// Non-EU Europe Data
CHM2D = request.security("ECONOMICS:CHM2*FX_IDC:CHFUSD", "D", close, lookahead=barmerge.lookahead_on)
GBM2D = request.security("ECONOMICS:GBM2*FX:GBPUSD", "D", close, lookahead=barmerge.lookahead_on)
FIPOP = request.security("ECONOMICS:FIM2/FX_IDC:USDFIM", "D", close, lookahead=barmerge.lookahead_on)
RUM2D = request.security("ECONOMICS:RUM2*FX_IDC:RUBUSD", "D", close, lookahead=barmerge.lookahead_on)
// Pacific Data
NZM2D = request.security("ECONOMICS:NZM2*FX_IDC:NZDUSD", "D", close, lookahead=barmerge.lookahead_on)
// Asia Data
CNM2D = request.security("ECONOMICS:CNM2*FX_IDC:CNYUSD", "D", close, lookahead=barmerge.lookahead_on)
TWM2D = request.security("ECONOMICS:TWM2*FX_IDC:TWDUSD", "D", close, lookahead=barmerge.lookahead_on)
HKM2D = request.security("ECONOMICS:HKM2*FX_IDC:HKDUSD", "D", close, lookahead=barmerge.lookahead_on)
INM2D = request.security("ECONOMICS:INM2*FX_IDC:INRUSD", "D", close, lookahead=barmerge.lookahead_on)
JPM2D = request.security("ECONOMICS:JPM2*FX_IDC:JPYUSD", "D", close, lookahead=barmerge.lookahead_on)
PHM2D = request.security("ECONOMICS:PHM2*FX_IDC:PHPUSD", "D", close, lookahead=barmerge.lookahead_on)
SGM2D = request.security("ECONOMICS:SGM2*FX_IDC:SGDUSD", "D", close, lookahead=barmerge.lookahead_on)
// Latin America Data
BRM2D = request.security("ECONOMICS:BRM2*FX_IDC:BRLUSD", "D", close, lookahead=barmerge.lookahead_on)
COM2D = request.security("ECONOMICS:COM2*FX_IDC:COPUSD", "D", close, lookahead=barmerge.lookahead_on)
MXM2D = request.security("ECONOMICS:MXM2*FX_IDC:MXNUSD", "D", close, lookahead=barmerge.lookahead_on)
// Middle East Data
AEM2D = request.security("ECONOMICS:AEM2*FX_IDC:AEDUSD", "D", close, lookahead=barmerge.lookahead_on)
TRM2D = request.security("ECONOMICS:TRM2*FX_IDC:TRYUSD", "D", close, lookahead=barmerge.lookahead_on)
// Africa Data
ZAM2D = request.security("ECONOMICS:ZAM2*FX_IDC:ZARUSD", "D", close, lookahead=barmerge.lookahead_on)
// Calculate Global Money Supply M2
total = (EUM2D + USM2D + CAM2D + CHM2D + GBM2D + FIPOP + RUM2D + NZM2D + CNM2D + TWM2D + HKM2D + INM2D + JPM2D + PHM2D + SGM2D + BRM2D + COM2D + MXM2D + AEM2D + TRM2D + ZAM2D) / 1000000000000