Best SMA FinderThis script, Best SMA Finder, is a tool designed to identify the most robust simple moving average (SMA) length for a given chart, based on historical backtest performance. It evaluates hundreds of SMA values (from 10 to 1000) and selects the one that provides the best balance between profitability, consistency, and trade frequency.
What it does:
The script performs individual backtests for each SMA length using either "Long Only" or "Buy & Sell" logic, as selected by the user. For each tested SMA, it computes:
- Total number of trades
- Profit Factor (total profits / total losses)
- Win Rate
- A composite Robustness Score, which integrates Profit Factor, number of trades (log-scaled), and win rate.
Only SMA configurations that meet the user-defined minimum trade count are considered valid. Among all valid candidates, the script selects the SMA length with the highest robustness score and plots it on the chart.
How to use it:
- Choose the strategy type: "Long Only" or "Buy & Sell"
- Set the minimum trade count to filter out statistically irrelevant results
- Enable or disable the summary stats table (default: enabled)
The selected optimal SMA is plotted on the chart in blue. The optional table in the top-right corner shows the corresponding SMA length, trade count, Profit Factor, Win Rate, and Robustness Score for transparency.
Key Features:
- Exhaustive SMA optimization across 991 values
- Customizable trade direction and minimum trade filters
- In-chart visualization of results via table and plotted optimal SMA
- Uses a custom robustness formula to rank SMA lengths
Use cases:
Ideal for traders who want to backtest and auto-select a historically effective SMA without manual trial-and-error. Useful for swing and trend-following strategies across different timeframes.
📌 Limitations:
- Not a full trading strategy with position sizing or stop-loss logic
- Only one entry per direction at a time is allowed
- Designed for exploration and optimization, not as a ready-to-trade system
This script is open-source and built entirely from original code and logic. It does not replicate any closed-source script or reuse significant external open-source components.
Moving Averages
UM Dual MA with Price Bar Color change & Fill
Description
This is a dual moving average indicator with colored bars and moving averages. I wrote this indicator to keep myself on the right side of the market and trends. It plots two moving averages, (length and type of MA are user-defined) and colors the MAs green when trending higher or red when trending lower. The price bars are green when both MAs are green, red when both MAs are red, and orange when one MA is green and the other is red. The idea behind the indicator is to be extremely visual. If I am buying a red bar, I ask myself "why?" If I am selling a green bar, again, "why?"
Recommended Usage
Configure your tow favorite Moving averages. Consider long positions when one or both turn green. Scale into a position with a portion upon the first MA turning green, and then more when the second turns green. Consider scaling out when the bars are orange after an up move.
Orange bars are either areas of consolidation or prior to major turns.
You can also look for MA crossovers.
The indicator works on any timeframe and any security. I use it on daily, hourly, 2 day charts.
Default settings
The defaults are the author's preferred settings:
- 8 period WMA and 16 period WMA.
- Bars are green when both MAs are trending higher, red when both MAs are trending lower, and orange when one MA is trending higher and the other is trending lower.
Moving average types, lengths, and colors are user-configurable. Bar colors are also user-configurable.
Alerts
Alerts can be set by right-clicking the indicator and selecting the dropdown:
- Bullish Trend Both MAs turning green
- Bearish Trend Both MAs turning red
- Mixed Trend, 1 green 1 red MA
Helpful Hints:
Look for bullish areas when both MAs turn green after a sustained downtrend
Look for bearish areas when both MAs turn red
Careful in areas of orange bars, this could be a consolidation or a warning to a potential trend direction change.
Switch up your timeframes, I toggle back and forth between 1 and 2 days.
Stretch your timeframe over a lower time frame; for example, I like the 8 and 16 daily WMA. With most securities I get 16 bars with pre and post market. This translates into 128 and 256 MAs on the hourly chart. This slows down moves and color transitions for better manageability.
Author's Subjective Observations
I like the 128/256 WMA on the hourly charts for leveraged and inverse ETFs such as SPXL/SPXS, TQQQ/SQQQ, TNA/TZA. Or even the volatility ETFs/ETNS: UVXY, VXX.
Here is a one-hour chart example:
I have noticed that as volatility increases, I should begin looking at higher timeframes. This seems counterintuitive, but higher volatility increases the level of noise or swings.
I question myself when I short a green bar or buy a red bar; "Why am I doing this?" The colors help me visually stay on the right side of trend. If I am going to speculate on a market turn, at least do it when the bars are orange (MA trends differ)
My last observation is a 2-day chart of leveraged ETFs with the 8 and 16 WMAs. I frequently trade SPXL, FNGA, and TNA. If you are really dissecting this indicator,
look at a few 2-day charts. 2-day charts seem to catch the major swings nicely up and down. They also weed out the daily sudden big swings such as a panic move from economic data
or tweets. When both the MAs turn red on a 2-day chart the same day or same bar, beware; this could be a rough ride or short opportunity. I found weekly charts too long for my style but good
to review for direction. Less decisions on longer charts equate to less brain damage for myself.
These are just my thoughts, of course you do you and what suits your style best! Happy Trading.
Golden & Death CrossThis indicator highlights Golden Cross and Death Cross signals based on customizable moving averages. It is ideal for swing traders and trend-following strategies across various timeframes.
🔍 Features:
Customizable moving average types: Choose between Simple Moving Average (SMA) and Exponential Moving Average (EMA)
Flexible MA lengths: Default 50/200, but can be adjusted to any short/long period (e.g., 9/21 for crypto)
Clear visual markers: Plots labels directly on the chart where crossovers occur
Alert support: Built-in alerts for Golden and Death Cross events
Overlay-enabled: MAs and signals display directly over price action
📈 Signal Logic:
Golden Cross = Short MA crosses above Long MA → bullish signal
Death Cross = Short MA crosses below Long MA → bearish signal
Common configurations:
50/200 EMA → Long-term trend shifts
9/21 EMA → Short-term momentum
🔔 Alerts:
You can create alerts using:
Golden Cross Alert: Triggers on bullish crossover
Death Cross Alert: Triggers on bearish crossover
✅ Use Cases:
Spot major trend shifts
Confirm entry/exit points with moving average dynamics
Combine with volume, RSI, or other filters for advanced strategies
Notes:
This is a basic yet powerful crossover tool. For more advanced filtering, trend confirmation, or backtesting logic, feel free to clone and expand it.
Questions or suggestions? Leave a comment or fork the script for your own use.
weighted support or resistance linesQ: Why should users choose this script?
A: I found that in all the publicly available scripts about support and resistance lines, there is basically no weight identification for these lines. In other words, users do not know which support or resistance lines are the most important. So I specifically wrote this script.
1. By adjusting the weights, only the most effective support or resistance lines are displayed. (Length threshold of trend price (Bar))
2. By selecting the number of K-lines, only the latest number of support or resistance lines generated will be displayed. (Maximum number of reserved S/R lines)
3. By selecting whether to automatically remove lines, only support or resistance lines that have not been penetrated by the k-line will be displayed. If this function is checked, the weight can be adjusted lower, as high-weight SR may have already been penetrated, and the newly generated SR may have a lower weight. (Automatically remove lines penetrated by closing price confirmation)
4. Notes: The default parameters work well in 15-minute candlestick charts. For candlestick charts with other time periods, the parameters can be adjusted appropriately. It is suitable for sideways trading but not for strong trends.
5. I'm quite satisfied with the performance of the script, as I specifically optimized it, lol
Institutional Support/Resistance Locator🏛️ Institutional Support/Resistance Locator
Overview
The Institutional Support/Resistance Locator identifies high-probability demand and supply zones based on strong price rejection, large candle bodies, and elevated volume . These zones are commonly targeted or defended by institutional participants, helping traders anticipate potential reversal or continuation areas.
⸻
How It Works
The indicator uses a confluence of conditions to detect zones:
• Large Body Candles: Body size must exceed the moving average body size multiplied by a user-defined factor.
• High Volume: Volume must exceed the moving average volume by a configurable multiplier.
• Wick Rejection: Candles must show strong upper or lower wicks indicating aggressive rejection.
• If all criteria are met:
• Bullish candles form a Demand Zone.
• Bearish candles form a Supply Zone.
Each zone is plotted for a customizable number of future bars, representing areas where institutions may re-engage with the market.
⸻
Key Features
• ✅ Highlights institutional demand and supply areas dynamically
• ✅ Customizable sensitivity: body, volume, wick, padding, and zone extension
• ✅ Zones plotted as translucent regions with auto-expiry
• ✅ Works across all timeframes and markets
⸻
How to Use
• Trend Traders: Use demand zones for potential bounce entries in uptrends, and supply zones for pullback short entries in downtrends.
• Range Traders: Use zones as potential reversal points inside sideways market structures.
• Scalpers & Intraday Traders: Combine with volume or price action near zones for refined entries.
Always validate zone reactions with supporting indicators or price behavior.
⸻
Why This Combination?
The combination of wick rejection, volume confirmation, and large candle structure is designed to reflect footprints of smart money. Rather than relying on fixed pivots or subjective zones, this logic adapts to the current market context with statistically grounded conditions.
⸻
Why It’s Worth Using
This tool offers traders a structured way to interpret institutional activity on charts without relying on guesswork. By plotting potential high-impact areas, it helps improve reaction time.
⸻
Note :
• This script is open-source and non-commercial.
• No performance guarantees or unrealistic claims are made.
• It is intended for educational and analytical purposes only.
Triangle Breakout Strategy with TP/SL, EMA Filter📌 Triangle Breakout Strategy with TP/SL, EMA Filters, and Backtest – Explained.
✅ 1. Pattern Detection – Triangle Breakout
The script scans for triangle patterns by detecting local pivot highs and pivot lows.
It uses two recent highs and two recent lows to draw converging trendlines (upper and lower boundaries of the triangle).
If the price breaks above the upper trendline, a bullish breakout signal is generated.
🎯 2. TP (Take Profit) & SL (Stop Loss)
When a bullish breakout is detected:
A buy order is placed using strategy.entry.
TP and SL levels are calculated relative to the current close price:
TP = 3% above the entry price
SL = 1.5% below the entry price
These are defined using strategy.exit.
📊 3. EMA Filter
An optional filter checks if:
Price is above both EMA 20 and EMA 50
Only if this condition is met, the strategy allows a long entry.
You can toggle the filter on or off with useEMAFilter.
📈 4. Backtesting with Strategy Tester
This script uses strategy() instead of indicator() to enable TradingView’s built-in backtest engine.
Every buy entry and exit (based on TP or SL) is recorded.
📌 5. Visuals
EMA 20 and EMA 50 lines are plotted on the chart.
A label is shown when a breakout is detected: "Breakout Up"
Results (profit, win rate, drawdown, etc.) can be viewed in the Strategy Tester panel.
Volume towers by GSK-VIZAG-AP-INDIAVolume Towers by GSK-VIZAG-AP-INDIA
Overview :
This Pine Script visualizes volume activity and provides insights into market sentiment through the display of buying and selling volume, alongside moving averages. It highlights high and low volume candles, enabling traders to make informed decisions based on volume anomalies. The script is designed to identify key volume conditions, such as below-average volume, high-volume candles, and their relationship to price movement.
Script Details:
The script calculates a Simple Moving Average (SMA) of the volume over a user-defined period and categorizes volume into several states:
Below Average Volume: Volume is below the moving average.
High Volume: Volume exceeds the moving average by a multiplier (configurable by the user).
Low Volume: Volume that doesn’t qualify as either high or below average.
Additionally, the script distinguishes between buying volume (when the close is higher than the open) and selling volume (when the close is lower than the open). This categorization is color-coded for better visualization:
Green: Below average buying volume.
Red: Below average selling volume.
Blue: High-volume buying.
Purple: High-volume selling.
Black: Low volume.
The Volume Moving Average (SMA) is plotted as a reference line, helping users identify trends in volume over time.
Features & Customization:
Customizable Inputs:
Volume MA Length: The period for calculating the volume moving average (default is 20).
High Volume Multiplier: A multiplier for defining high volume conditions (default is 2.0).
Color-Coded Volume Histograms:
Different colors are used for buying and selling volume, as well as high and low-volume candles, for quick visual analysis.
Alerts:
Alerts can be set for the following conditions:
Below-average buying volume.
Below-average selling volume.
High-volume conditions.
How It Works:
Volume Moving Average (SMA) is calculated using the user-defined period (length), and it acts as the baseline for categorizing volume.
Volume Conditions:
Below Average Volume: Identifies candles with volume below the SMA.
High Volume: Identifies candles where volume exceeds the SMA by the set multiplier (highVolumeMultiplier).
Low Volume: When volume is neither high nor below average.
Buying and Selling Volume:
The script identifies buying and selling volume based on the closing price relative to the opening price:
Buying Volume: When the close is greater than the open.
Selling Volume: When the close is less than the open.
Volume histograms are then plotted using the respective colors for quick visualization of volume trends.
User Interface & Settings:
Inputs:
Volume MA Length: Adjust the period for the volume moving average.
High Volume Multiplier: Define the multiplier for high volume conditions.
Plots:
Buying Volume: Green bars indicate buying volume.
Selling Volume: Red bars indicate selling volume.
High Volume: Blue or purple bars for high-volume candles.
Low Volume: Black bars for low-volume candles.
Volume Moving Average Line: Displays the moving average line for reference.
Source Code / Authorship:
Author: prowelltraders
Disclaimer:
This script is intended for educational purposes only. While it visualizes important volume data, users are encouraged to perform their own research and testing before applying this script for trading decisions. No guarantees are made regarding the effectiveness of this script for real-world trading.
Contact & Support:
For questions, support, or feedback, please reach out to the author directly through TradingView (prowelltraders).
Signature:
GSK-VIZAG-AP-INDIA
FLAT Multi-TF EMAs 3 EMA's where you can Choose the Timeframes you like and need on any other Timeframe!
Price-Confirmed Hull Moving AverageThis is a modified HULL moving average that adds some enhancements providing visual clues as to a change in trend direction. The user can add slight modifications to the abruptness of trend change indications, which are clearly seen by the color change of the hull line itself. The user can also choose to have the background color change for easier visual indication that the hull line has changed slope direction. In addition, the user can either have both the line and the background visuals on, or turn one or the other (or both) off.
The purpose of this HULL moving average is to provide easy identification of trend direction within the scope of the moving average values provided in settings.
SMA 50/200 Crossover with Candle Coloring
Indicator Features:
Customizable Moving Averages: You can change the lengths of the 50- and 200-SMA in the settings.
Candle Color: The candle at which the crossover occurs is colored (green for a bullish crossover, red for a bearish crossover).
Crossover Markers: Small arrows appear at the crossover points.
Colored Background: The background changes color when a crossover occurs.
Alerts: You can set alerts when crossovers occur.
Alerta Caída Brusca + Confirmación de VolumenTechnical Components of the Indicator
EMA 9 vs EMA 21
Detects momentum shifts via exponential moving average crossovers.
When EMA 9 crosses below EMA 21, it is interpreted as a bearish signal.
Bollinger Band Compression
Identifies periods of low volatility (tight bands).
A breakout following this compression typically precedes sharp and fast price moves.
Ichimoku Cloud (Kumo Breakout)
If the price closes below the Kumo (Ichimoku cloud), it indicates structural bearish pressure.
This confirms the loss of key technical support.
RSI (Relative Strength Index)
A reading below 45 signals price weakness and low buying pressure.
🛑 Conditions to Trigger a Sell Signal
A sell signal is generated when all of the following conditions occur simultaneously:
Bollinger Bands show compression (low volatility).
EMA 9 crosses below EMA 21 (bearish crossover).
Price breaks below the Ichimoku cloud (Kumo).
RSI is below 45, confirming weak buying momentum.
When these conditions are met, a "SELL" label is visually projected on the corresponding candle.
📈 Usage Recommendations
Recommended timeframes: 5 minutes, 15 minutes, or 1 hour.
Useful for anticipating drops, avoiding late entries, and detecting technical breakdowns.
Can be combined with volume, candlestick patterns, or liquidity zones for higher accuracy.
Fibonacci + TP/SL Strategy [Backtest]✅ Key Features Added and Adjusted:
Fibonacci Retracement Levels:
Automatically calculated based on the last 100 bars' high/low
Plotted levels: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%
Extension targets: 161.8%, 261.8%, 423.6%
Buy/Sell Signal Logic:
Buy: Price is between 78.6% and 38.2% levels
Sell: Price is between 61.8% and 23.6% levels
Both depend on a can_trade time filter to avoid overtrading
ATR-based Stop-Loss:
Stop-loss dynamically adapts to market volatility:
SL = Entry - ATR * 1.5 (long)
SL = Entry + ATR * 1.5 (short)
Fixed Take-Profit:
Configurable via input: default is 4%
Can be changed in TradingView UI
Golden/Death Cross Indicator (Visual Only):
EMA 50 crossing EMA 200 plotted on chart:
Golden Cross = Buy signal (green triangle)
Death Cross = Sell signal (red triangle)
Weekly Profit Cap:
Prevents new trades if weekly profit exceeds 15%
Resets at the start of every week
Visual Elements:
All Fibonacci levels are plotted
Buy/Sell signals are labeled on the chart (BUY, SELL)
Weekly Moving Averages (MAs) to Intraday ChartThis indicator overlays key weekly timeframe moving averages onto your intraday chart, allowing you to visualize important long-term support and resistance levels while trading shorter timeframes. The indicator includes:
330-period Simple Moving Average (white): Ultra long-term trend indicator
200-period Simple Moving Average (fuchsia): Major long-term trend indicator often watched by institutional traders
100-period Simple Moving Average (purple): Medium-to-long term trend indicator
50-period Exponential Moving Average (blue): Medium-term trend indicator, more responsive to recent price action
21-period Exponential Moving Average (teal): Short-to-medium term trend indicator
9-period Exponential Moving Average (aqua): Short-term trend indicator, highly responsive to recent price movements
This multi-timeframe approach helps identify significant support/resistance zones that might not be visible on your current timeframe. When price interacts with these weekly moving averages during intraday trading, it often signals important areas where institutional orders may be placed.
The indicator uses color-coding with increasing line thickness to help you quickly distinguish between different moving averages. Consider areas where multiple MAs cluster together as particularly strong support/resistance zones.
Perfect for day traders and swing traders who want to maintain awareness of the bigger picture while focusing on shorter-term price action.
Hull Moving Average with Cloud📈 Hull Moving Average with Cloud – Adaptive Trend Visualization
This indicator combines the power of the Hull Moving Average (HMA) with a visual signal line and trend cloud, giving traders a clearer view of market direction, momentum shifts, and potential reversals.
🔍 Key Features:
Dynamic HMA Length (optional): Adjusts the HMA period based on ATR volatility, allowing the moving average to adapt to changing market conditions.
Custom Smoothing Options: Smooth the main HMA with your choice of SMA, EMA, or WMA for a tailored trend line.
Signal Line (Orange HMA): A shorter-period Hull MA that acts as a trigger line for crossovers and trend changes.
Color-Coded Trend Cloud:
🟩 Green Cloud: Bullish – main HMA is above the signal HMA.
🟥 Red Cloud: Bearish – main HMA is below the signal HMA.
Real-Time Trend Coloring: Both lines dynamically change color based on slope (green for rising, red/purple for falling).
Offset Capability: Shift the HMA forward to visualize trend development and potential future direction.
✅ Use Cases:
Identify trend direction with cloud coloration.
Spot early reversals through HMA crossover signals.
Filter trades with volatility-aware moving average responsiveness.
MA Trendline with Angle LockThis indicator is just white line in screenshot (and will show the MA it is using).... This grabs the slope of the MA and makes a trendline out of it until the angle changes by x percentage then it recalculates. Mimics what a 2x sma envelope does to a smaller sma envelope... carves out the impulses just with straight rather than curved edges if that makes sense. Envelopes are shown as an example.
RSI-EMA-Crossing with Donchian-Stop-LossThe Donchian RSI Indicator is a visual tool that combines momentum and trend analysis to identify high-quality long opportunities based on RSI crossovers, price action, and Donchian channel dynamics.
How It Works
Momentum Signal: A bullish RSI crossover is detected when the RSI crosses above its moving average.
Trend Filter: A signal is only valid if the crossover occurs while the price is above its moving average – filtering out entries against the prevailing trend.
Signal Candle: The high of the crossover candle is stored.
Entry Trigger: A valid signal occurs when a later candle closes above that signal high.
Stop-Loss (Visual Only)
The lower band of the Donchian Channel acts as a visual reference for a dynamic stop-loss level.
Features
Customizable RSI, Donchian Channel, and moving average lengths
Selectable MA types: SMA, EMA, WMA, VWMA, HMA
Signal candle highlighted (yellow background)
Entry points labeled on the chart
Price MA and Donchian Channel plotted
Trend filter improves signal quality by confirming upward bias
Use Case
Designed for swing and position traders
Optimized for use on daily or 4H charts
MA cross X MAdiff<>atrfilter)📈 MA cross X MAdiff<>ATR filter
Smarter Trend Confirmation Using Adaptive Volatility Thresholds
🔍 What It Does
This indicator upgrades classic moving average crossovers by adding volatility awareness via ATR filtering. Instead of reacting to every small crossover, it waits for the distance between two moving averages to exceed a volatility-adjusted threshold, making signals more meaningful and less noisy.
⚙️ Core Logic
Calculates the difference between a Fast MA and a Slow MA.
Uses Average True Range (ATR) as a dynamic volatility filter.
Confirms trend only when MA difference exceeds:
diff > ATR × multiplier → Bullish
diff < -ATR × multiplier → Bearish
Otherwise: Neutral (gray zone)
The gray zone avoids false signals by detecting indecision or choppy markets.
🧠 Customizable Inputs
Choose any MA type independently for Fast and Slow:
SMA, EMA, WMA, VWMA, RMA, DEMA, TEMA, LSMA, Kijun
Control sensitivity via:
ATR Length
ATR Multiplier
✅ Why It Works
Reduces fake outs in ranging markets.
Adapts to volatility automatically.
Fully customizable for any asset or style.
Ideal for trend traders, momentum entries, or as a confluence layer.
EMA/SMA Combo + ADR (v6)This script combines popular moving averages with a clean, info-rich ADR table – perfect for traders who trade breakouts.
✳️ Features:
• 🟦 EMA 10 / 20 / 50 / 100 / 200 → shown as dotted points
• 🔷 SMA 10 / 20 / 50 / 100 / 200 → shown as solid lines
• 🎛️ All lines can be individually toggled on/off
• 📊 ADR info table shows average range, today’s range & % of ADR
🎯 Ideal for:
• Intraday traders looking for clean MAs & volatility reference
• Swing traders seeking strong confluence zones
• Anyone who prefers a minimalistic, customizable overlay
🧠 Pro Tip: The ADR table is styled for light charts – black text, no background. You can customize the MA display exactly as you like.
Trade smart, stay sharp! 🚀
30-70 RSI Strategy with Colored BarThis script colors price bars based on Relative Strength Index (RSI) levels, giving traders a quick and visual way to assess overbought or oversold market conditions directly on the chart.
📈 Key Features:
✅ RSI-Based Bar Coloring:
Green bars when RSI is above the upper threshold (default 70) – suggests bullish momentum.
Red bars when RSI is below the lower threshold (default 30) – indicates bearish pressure.
Bars remain uncolored when RSI is between thresholds – a neutral zone.
🔧 Customizable RSI Settings:
Adjustable RSI length (default: 14 periods)
Adjustable overbought/oversold levels (default: 70/30)
🧠 Helps traders:
Quickly spot potential reversals or trend continuations
Visually align price action with momentum
🛠️ Usage:
Ideal for trend-following, reversal, and momentum strategies.
Works across any timeframe (1m, 5m, 1h, daily, etc.).
Z-Score Trend Monitor [EdgeTerminal]The Z-Score Trend Monitor measures how far the short-term moving average deviates from the long-term moving average using the spread difference of the two — in standardized units. It’s designed to detect overextension, momentum exhaustion, and potential mean-reversion points by converting the spread between two moving averages into a normalized Z-score and tracking its change and direction over time.
The idea behind this is to catch the changes in the direction of a trend earlier than the usual and lagging moving average lines, allowing you to react faster.
The math behind the indicator itself is very simple. We take the simple moving average of the spread between a long term and short term moving average, and divide it by the difference between the spread and spread mean.
This results in a relatively accurate and early acting trend detector that can easily identify overbought and oversold levels in any timeframe. From our own testing, we recommend using this indicator as a trend confirmation tool.
How to Use It:
Keep an eye on the Z-Score or the blue line. When it goes over 2, it indicates an overbought or near top level, and when it goes below -2, it indicates an oversold or near bottom.
When Z-Score returns to zero or grey line, it suggests mean reversion is in progress.
You can also change the Z-Score criteria from 2 and -2 in the settings to any number you’d like for tighter or wider levels.
For scalping and fast trading setups, we recommend shorter SMAs, such as 5 and 20, and for longer trading setups such as swing trades, we recommend 20 and 100.
Settings:
Short SMA: Lookback period of short term simple moving average for the lower side of the SMA spread.
Short Term Weight: Additional weight or multiplier to suppress the short term SMA calculation. This is used to refine the SMA calculation for more granular and edge cases when needed, usually left at 1, meaning it will take the entire given value in the short SMA field.
Long SMA: Lookback period of long term simple moving average for the upper side of the SMA spread.
Long Term Weight: Additional weight or multiplier to suppress the long term SMA calculation. This is used to refine the long SMA calculation for more granular and edge cases when needed, usually left at 1, meaning it will take the entire given value in the long SMA field.
Z-Score Threshold: The threshold for upper (oversold) and lower (overbought) levels. This can also be set individually from the style page.
Z-Score Lookback Window: The lookback period to calculate spread mean and spread standard deviation
C&B Auto MK5C&B Auto MK5.2ema BullBear
Overview
The C&B Auto MK5.2ema BullBear is a versatile Pine Script indicator designed to help traders identify bullish and bearish market conditions across various timeframes. It combines Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Average True Range (ATR), and customizable time filters to generate actionable signals. The indicator overlays on the price chart, displaying EMAs, a dynamic cloud, scaled RSI levels, bull/bear signals, and market condition labels, making it suitable for swing trading, day trading, or scalping in trending or volatile markets.
What It Does
This indicator generates bull and bear signals based on the interaction of two EMAs, filtered by RSI thresholds, ATR-based volatility, a 50/200 EMA trend filter, and user-defined time windows. It adapts to market volatility by adjusting EMA lengths and RSI thresholds. A dynamic cloud highlights trend direction or neutral zones, with candlestick coloring in neutral conditions. Market condition labels (current and historical) provide real-time trend and volatility context, displayed above the chart.
How It Works
The indicator uses the following components:
EMAs: Two EMAs (short and long) are calculated on a user-selected timeframe (1, 5, 15, 30, or 60 minutes). Their crossover or crossunder triggers potential bull/bear signals. EMA lengths adjust based on volatility (e.g., 10/20 for volatile markets, 5/10 for non-volatile).
Dynamic Cloud: The area between the EMAs forms a cloud, colored green for bullish trends, red for bearish trends, or a user-defined color (default yellow) for neutral zones (when EMAs are close, determined by an ATR-based threshold). Users can widen the cloud for visibility.
RSI Filter: RSI is scaled to price levels and plotted on the chart (optional). Signals are filtered to ensure RSI is within volatility-adjusted bull/bear thresholds and not in overbought/oversold zones.
ATR Volatility Filter: An optional filter ensures signals occur during sufficient volatility (ATR(14) > SMA(ATR, 20)).
50/200 EMA Trend Filter: An optional filter restricts bull signals to bullish trends (50 EMA > 200 EMA) and bear signals to bearish trends (50 EMA < 200 EMA).
Time Filter: Signals are restricted to a user-defined UTC time window (default 9:00–15:00), aligning with active trading sessions.
Market Condition Labels: Labels above the chart display the current trend (Bullish, Bearish, Neutral) and optionally volatility (e.g., “Bullish Volatile”). Up to two historical labels persist for a user-defined number of bars (default 5) to show recent trend changes.
Visual Aids: Bull signals appear as green triangles/labels below the bar, bear signals as red triangles/labels above. Candlesticks in neutral zones are colored (default yellow).
The indicator ensures compatibility with standard chart types (e.g., candlestick or bar charts) to produce realistic signals, avoiding non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Timeframe: Choose a timeframe (1, 5, 15, 30, or 60 minutes) to match your trading style.
Filters:
Enable/disable the ATR volatility filter to focus on high-volatility periods.
Enable/disable the 50/200 EMA trend filter to align signals with the broader trend.
Enable the time filter and set custom UTC hours/minutes (default 9:00–15:00).
Cloud Settings: Adjust the cloud width, neutral zone threshold, color, and transparency.
EMA Colors: Use default trend-based colors or set custom colors for short/long EMAs.
RSI Display: Toggle the scaled RSI and its thresholds, with customizable colors.
Signal Settings: Toggle bull/bear labels and set signal colors.
Market Condition Labels: Toggle current/historical labels, include/exclude volatility, and adjust decay period.
Interpret Signals:
Bull Signal: A green triangle or “Bull” label below the bar indicates potential bullish momentum (EMA crossover, RSI above bull threshold, within time window, passing filters).
Bear Signal: A red triangle or “Bear” label above the bar indicates potential bearish momentum (EMA crossunder, RSI below bear threshold, within time window, passing filters).
Neutral Zone: Yellow candlesticks and cloud (if enabled) suggest a lack of clear trend; consider range-bound strategies or avoid trading.
Market Condition Labels: Check labels above the chart for real-time trend (Bullish, Bearish, Neutral) and volatility status to confirm market context.
Monitor Context: Use the cloud, RSI, and labels to assess trend strength and volatility before acting on signals.
Unique Features
Volatility-Adaptive EMAs: Automatically adjusts EMA lengths based on ATR to suit volatile or non-volatile markets, reducing manual configuration.
Neutral Zone Detection: Uses an ATR-based threshold to identify low-trend periods, helping traders avoid choppy markets.
Scaled RSI Visualization: Plots RSI and thresholds directly on the price chart, simplifying momentum analysis relative to price.
Flexible Time Filtering: Supports precise UTC-based trading windows, ideal for day traders targeting specific sessions.
Historical Market Labels: Displays recent trend changes (up to two) with a decay period, providing context for market shifts.
50/200 EMA Trend Filter: Aligns signals with the broader market trend, enhancing signal reliability.
Notes
Use on standard candlestick or bar charts to ensure accurate signals.
Test the indicator on a demo account to optimize settings for your market and timeframe.
Combine with other analysis (e.g., support/resistance, volume) for better decision-making.
The indicator is not a standalone system; use it as part of a broader trading strategy.
Limitations
Signals may lag in fast-moving markets due to EMA-based calculations.
Neutral zone detection may vary in extremely volatile or illiquid markets.
Time filters are UTC-based; ensure your platform’s timezone settings align.
This indicator is designed for traders seeking a customizable, trend-following tool that adapts to volatility and provides clear visual cues with robust filtering for bullish and bearish market conditions.
MTF VEGASThe MTF Tunnel Vegas indicator is a multi-timeframe (MTF) technical analysis tool designed to help traders identify trends and key price zones. It is based on the Vegas Tunnel system, which uses three key exponential moving averages (EMAs) — the 144, 169, and 233-period EMAs — to create a dynamic tunnel or channel on the price chart.
The purpose of this tunnel is to highlight zones where price may react, either as support/resistance or as breakout levels. When price approaches, bounces off, or crosses the tunnel, it can signal potential trading opportunities, whether for continuation or reversal setups.
The MTF component means that the indicator overlays the tunnel from a higher timeframe directly onto the current chart, giving traders a clear view of the larger trend context without needing to switch between multiple charts. This allows for better alignment of short-term decisions with long-term trend dynamics.
Key features:
✅ Plots 144, 169, and 233-period EMA tunnels from higher timeframes
✅ Highlights dynamic zones of support and resistance
✅ Helps traders stay aligned with the dominant trend
✅ Reduces chart noise and improves trade filtering
6 Dynamic EMAs by Koenigsegg🚀 6 Dynamic EMAs by Koenigsegg
Take control of your chart with ultimate flexibility. This tool gives you 6 customizable EMAs across any timeframe, helping you read the market like a pro — whether you're scalping seconds or swinging days. Built for precision, designed for dominance.
The combinations? Endless. Mix and match any EMA lengths and timeframes for tailored confluence — exactly how elite traders operate.
🔑 Key Features
✅ 6 Fully Customizable EMAs
⏳ Multi-Timeframe Support (from seconds to months)
🎨 Custom Colors & Thickness for each EMA
🚨 Built-in Cross Alerts for instant trade signals
🧠 Clean, efficient logic using request.security()
🔁 Dynamically toggle EMAs on/off
⚙️ Lightweight for smooth chart performance
🧩 Endless combo potential — confluence on your terms
📈 What Is an EMA?
The EMA is a type of moving average that adjusts more quickly to recent price changes than a Simple Moving Average (SMA). It does this by giving exponentially more weight to the most recent candles.
⚙️ How Does It Function?
Smoothing Price Data:
It takes the average of closing prices over a chosen period (like 20 or 50 candles), but gives more influence to the latest prices.
Reacts Quickly to Price Shifts:
Since recent data is weighted more heavily, the EMA adjusts faster to sudden price changes — helping you spot trend reversals or momentum shifts earlier.
Dynamic Support & Resistance:
Traders often use EMAs as moving support/resistance levels. Price often "respects" EMAs in trending markets — bouncing off them during pullbacks.
Trend Confirmation:
- If price is above the EMA, the market is likely in an uptrend.
- If price is below the EMA, the market is likely in a downtrend.
- Multiple EMAs (like 12/21 or 50/200) crossing each other are used for entry/exit signals.
💡 Example:
If you use a 21 EMA on a chart, it shows you the average price of the last 21 candles, but the most recent ones weigh heavier. This makes the EMA more responsive than an SMA, and better for short-term or active trading.
📊 Why EMAs Matter — and How Multi-Timeframe EMAs Give You the Edge
Exponential Moving Averages (EMAs) are essential tools for identifying trend direction, momentum shifts, and dynamic support/resistance. Because they weight recent price data more heavily, EMAs adapt quickly to changing market conditions, giving traders early insight into reversals or continuations.
Where this script shines is in its multi-timeframe (MTF) capability. For example, plotting a daily EMA on a 4H chart gives you high-level directional guidance while still allowing precision entries. This enables confluence between LTF (low timeframe) signals and HTF (high timeframe) momentum — a crucial edge used by institutional-level traders.
You can configure the tool to run classic combos like the 12/21 crossover on your current chart, while layering in a 50 or 200 EMA from a higher timeframe for macro confirmation. The 6th EMA, colored light blue by default, is perfect for adding one final level of structure insight — often used as a long-term anchor or trend bias marker.
Whether you're riding the wave or catching the reversal, these EMAs serve as your adaptable compass in every environment.
🎯 Purpose
This indicator was built to give traders a clear, responsive, and multi-timeframe edge using dynamic Exponential Moving Averages. Whether you're trend-following, identifying momentum shifts, or building a confluence system — these 6 EMAs are here to align with your strategy and style.
💡 Pro Tip
Instead of cluttering your chart with multiple EMA indicators, this script consolidates all into one sleek tool. You can toggle off bands you don't currently need, like running only the 12/21 EMAs on your active chart timeframe, while adding the 12/21 EMAs from a higher timeframe to guide trade decisions.
With this setup, you're not just reacting — you're orchestrating your trades with intention.
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice. Always do your own research and trade responsibly. Past performance does not guarantee future results.