Multiple Ema 20/50/100Multiple Ema 20/50/100 and you can add more EMA Plot easily by changing the codes.
"美元指数跌破100大关"に関するスクリプトを検索
50, 100, 200 EMAsA simple script that displays the 50, 100, and 200-period exponential moving averages. Reduce clutter by combining them into one indicator!
50, 100, 200 SMAsA simple script that displays the 50, 100, and 200-period simple moving averages. Reduce clutter by combining them into one indicator!
50,100,200 MA by CryptoLife71(FIXED)Updated the code by CryptoLife71 so that the 200ma shows correctly.
EMA 20/50/100/200Plots exponential moving average on four timeframes at once for rapid indication of momentum shift as well as slower-moving confirmations.
Displays EMA 20, 50, 100, and 200... default colors are hotter for faster timeframes, cooler for slower ones
DECL: 3 X Moving Average (50, 100 and 200 day)Basic Moving Average with 3 different intervals. Default: 50 day (blue), 100 day (red) and 200 day (purple)
BB 100 with Barcolors6/19/15 I added confirmation highlight bars to the code. In other words, if a candle bounced off the lower Bollinger band, it needed one more close above the previous candle to confirm a higher probability that a change in investor sentiment has reversed. Same is true for upper Bollinger band bounces. I also added confirmation highlight bars to the 100 sma (the basis). The idea is that lower and upper bands are potential points of support and resistance. The same is true of the basis if a trend is to continue. 6/28/15 I added a plotshape to identify closes above/below TLine. One thing this system points out is it operates best in a trend reversal. Consolidations will whipsaw the indicator too much. I have found that when this happens, if using daily candles, switch to hourly, 30 min, etc., to catch a better signal. Nothing moves in a straight line. As with any indicator, it is a tool to be used in conjunction with the art AND science of trading. As always, try the indicator for a time so that you are comfortable enough to use real money. This is designed to be used with "BB 25 with Barcolors".
BB 100 with Barcolors6/19/15 I added confirmation highlight bars to the code. In other words, if a candle bounced off the lower Bollinger band, it needed one more close above the previous candle to confirm a higher probability that a change in investor sentiment has reversed. Same is true for upper Bollinger band bounces. I also added confirmation highlight bars to the 100 sma (the basis). The idea is that lower and upper bands are potential points of support and resistance. The same is true of the basis if a trend is to continue. Nothing moves in a straight line. As with any indicator, it is a tool to be used in conjunction with the art AND science of trading. As always, try the indicator for a time so that you are comfortable enough to use real money. This is designed to be used with "BB 25 with Barcolors".
BB 100 with BarcolorsI cleaned up the highlight barcolor to reflect red or lime depending if it closed > or < the open.
The description is in the code. you want to catch bounces off the 25 (upper or lower) and 100 (upper or lower).
Works well on the hourly and 30 min charts. Haven't tested it beyond that. Haven't tested Forex, just equities.
EMA Keltner Channel 1D100/200 EMAs, along with Keltner Bands based off them. Colors correspond to actions you should be ready to take in the area. Use to set macro mindset.
Uses the security function to display only the 1D values.
Red= Bad
Orange = Not as Bad, but still Bad.
Yellow = Warning, might also be Bad.
Purple = Dip a toe in.
Blue = Give it a shot but have a little caution.
Green = It's second mortgage time.
Extreme Pressure Zones Indicator (EPZ) [BullByte]Extreme Pressure Zones Indicator(EPZ)
The Extreme Pressure Zones (EPZ) Indicator is a proprietary market analysis tool designed to highlight potential overbought and oversold "pressure zones" in any financial chart. It does this by combining several unique measurements of price action and volume into a single, bounded oscillator (0–100). Unlike simple momentum or volatility indicators, EPZ captures multiple facets of market pressure: price rejection, trend momentum, supply/demand imbalance, and institutional (smart money) flow. This is not a random mashup of generic indicators; each component was chosen and weighted to reveal extreme market conditions that often precede reversals or strong continuations.
What it is?
EPZ estimates buying/selling pressure and highlights potential extreme zones with a single, bounded 0–100 oscillator built from four normalized components. Context-aware weighting adapts to volatility, trendiness, and relative volume. Visual tools include adaptive thresholds, confirmed-on-close extremes, divergence, an MTF dashboard, and optional gradient candles.
Purpose and originality (not a mashup)
Purpose: Identify when pressure is building or reaching potential extremes while filtering noise across regimes and symbols.
Originality: EPZ integrates price rejection, momentum cascade, pressure distribution, and smart money flow into one bounded scale with context-aware weighting. It is not a cosmetic mashup of public indicators.
Why a trader might use EPZ
EPZ provides a multi-dimensional gauge of market extremes that standalone indicators may miss. Traders might use it to:
Spot Reversals: When EPZ enters an "Extreme High" zone (high red), it implies selling pressure might soon dominate. This can hint at a topside reversal or at least a pause in rallies. Conversely, "Extreme Low" (green) can highlight bottom-fish opportunities. The indicator's divergence module (optional) also finds hidden bullish/bearish divergences between price and EPZ, a clue that price momentum is weakening.
Measure Momentum Shifts: Because EPZ blends momentum and volume, it reacts faster than many single metrics. A rising MPO indicates building bullish pressure, while a falling MPO shows increasing bearish pressure. Traders can use this like a refined RSI: above 50 means bullish bias, below 50 means bearish bias, but with context provided by the thresholds.
Filter Trades: In trend-following systems, one could require EPZ to be in the bullish (green) zone before taking longs, or avoid new trades when EPZ is extreme. In mean-reversion systems, one might specifically look to fade extremes flagged by EPZ.
Multi-Timeframe Confirmation: The dashboard can fetch a higher timeframe EPZ value. For example, you might trade a 15-minute chart only when the 60-minute EPZ agrees on pressure direction.
Components and how they're combined
Rejection (PRV) – Captures price rejection based on candle wicks and volume (see Price Rejection Volume).
Momentum Cascade (MCD) – Blends multiple momentum periods (3,5,8,13) into a normalized momentum score.
Pressure Distribution (PDI) – Measures net buy/sell pressure by comparing volume on up vs down candles.
Smart Money Flow (SMF) – An adaptation of money flow index that emphasizes unusual volume spikes.
Each of these components produces a 0–100 value (higher means more bullish pressure). They are then weighted and averaged into the final Market Pressure Oscillator (MPO), which is smoothed and scaled. By combining these four views, EPZ stands out as a comprehensive pressure gauge – the whole is greater than the sum of parts
Context-aware weighting:
Higher volatility → more PRV weight
Trendiness up (RSI of ATR > 25) → more MCD weight
Relative volume > 1.2x → more PDI weight
SMF holds a stable weight
The weighted average is smoothed and scaled into MPO ∈ with 50 as the neutral midline.
What makes EPZ stand out
Four orthogonal inputs (price action, momentum, pressure, flow) unified in a single bounded oscillator with consistent thresholds.
Adaptive thresholds (optional) plus robust extreme detection that also triggers on crossovers, so static thresholds work reliably too.
Confirm Extremes on Bar Close (default ON): dots/arrows/labels/alerts print on closed bars to avoid repaint confusion.
Clean dashboard, divergence tools, pre-alerts, and optional on-price gradients. Visual 3D layering uses offsets for depth only,no lookahead.
Recommended markets and timeframes
Best: liquid symbols (index futures, large-cap equities, major FX, BTC/ETH).
Timeframes: 5–15m (more signals; consider higher thresholds), 1H–4H (balanced), 1D (clear regimes).
Use caution on illiquid or very low TFs where wick/volume geometry is erratic.
Logic and thresholds
MPO ∈ ; 50 = neutral. Above 50 = bullish pressure; below 50 = bearish.
Static thresholds (defaults): thrHigh = 70, thrLow = 30; warning bands 5 pts inside extremes (65/35).
Adaptive thresholds (optional):
thrHigh = min(BaseHigh + 5, mean(MPO,100) + stdev(MPO,100) × ExtremeSensitivity)
thrLow = max(BaseLow − 5, mean(MPO,100) − stdev(MPO,100) × ExtremeSensitivity)
Extreme detection
High: MPO ≥ thrHigh with peak/slope or crossover filter.
Low: MPO ≤ thrLow with trough/slope or crossover filter.
Cooldown: 5 bars (default). A new extreme will not print until the cooldown elapses, even if MPO re-enters the zone.
Confirmation
"Confirm Extremes on Bar Close" (default ON) gates extreme markers, pre-alerts, and alerts to closed bars (non-repainting).
Divergences
Pivot-based bullish/bearish divergence; tags appear only after left/right bars elapse (lookbackPivot).
MTF
HTF MPO retrieved with lookahead_off; values can update intrabar and finalize at HTF close. This is disclosed and expected.
Inputs and defaults (key ones)
Core: Sensitivity=1.0; Analysis Period=14; Smoothing=3; Adaptive Thresholds=OFF.
Extremes: Base High=70, Base Low=30; Extreme Sensitivity=1.5; Confirm Extremes on Bar Close=ON; Cooldown=5; Dot size Small/Tiny.
Visuals: Heatmap ON; 3D depth optional; Strength bars ON; Pre-alerts OFF; Divergences ON with tags ON; Gradient candles OFF; Glow ON.
Dashboard: ON; Position=Top Right; Size=Normal; MTF ON; HTF=60m; compact overlay table on price chart.
Advanced caps: Max Oscillator Labels=80; Max Extreme Guide Lines=80; Divergence objects=60.
Dashboard: what each element means
Header: EPZ ANALYSIS.
Large readout: Current MPO; color reflects state (extreme, approaching, or neutral).
Status badge: "Extreme High/Low", "Approaching High/Low", "Bullish/Neutral/Bearish".
HTF cell (when MTF ON): Higher-timeframe MPO, color-coded vs extremes; updates intrabar, settles at HTF close.
Predicted (when MTF OFF): Simple MPO extrapolation using momentum/acceleration—illustrative only.
Thresholds: Current thrHigh/thrLow (static or adaptive).
Components: ASCII bars + values for PRV, MCD, PDI, SMF.
Market metrics: Volume Ratio (x) and ATR% of price.
Strength: Bar indicator of |MPO − 50| × 2.
Confidence: Heuristic gauge (100 in extremes, 70 in warnings, 50 with divergence, else |MPO − 50|). Convenience only, not probability.
How to read the oscillator
MPO Value (0–100): A reading of 50 is neutral. Values above ~55 are increasingly bullish (green), while below ~45 are increasingly bearish (red). Think of these as "market pressure".
Extreme Zones: When MPO climbs into the bright orange/red area (above the base-high line, default 70), the chart will display a dot and downward arrow marking that extreme. Traders often treat this as a sign to tighten stops or look for shorts. Similarly, a bright green dot/up-arrow appears when MPO falls below the base-low (30), hinting at a bullish setup.
Heatmap/Candles: If "Pressure Heatmap" is enabled, the background of the oscillator pane will fade green or red depending on MPO. Users can optionally color the price candles by MPO value (gradient candles) to see these extremes on the main chart.
Prediction Zone(optional): A dashed projection line extends the MPO forward by a small number of bars (prediction_bars) using current MPO momentum and acceleration. This is a heuristic extrapolation best used for short horizons (1–5 bars) to anticipate whether MPO may touch a warning or extreme zone. It is provisional and becomes less reliable with longer projection lengths — always confirm predicted moves with bar-close MPO and HTF context before acting.
Divergences: When price makes a higher high but EPZ makes a lower high (bearish divergence), the indicator can draw dotted lines and a "Bear Div" tag. The opposite (lower low price, higher EPZ) gives "Bull Div". These signals confirm waning momentum at extremes.
Zones: Warning bands near extremes; Extreme zones beyond thresholds.
Crossovers: MPO rising through 35 suggests easing downside pressure; falling through 65 suggests waning upside pressure.
Dots/arrows: Extreme markers appear on closed bars when confirmation is ON and respect the 5-bar cooldown.
Pre-alert dots (optional): Proximity cues in warning zones; also gated to bar close when confirmation is ON.
Histogram: Distance from neutral (50); highlights strengthening or weakening pressure.
Divergence tags: "Bear Div" = higher price high with lower MPO high; "Bull Div" = lower price low with higher MPO low.
Pressure Heatmap : Layered gradient background that visually highlights pressure strength across the MPO scale; adjustable intensity and optional zone overlays (warning / extreme) for quick visual scanning.
A typical reading: If the oscillator is rising from neutral towards the high zone (green→orange→red), the chart may see strong buying culminating in a stall. If it then turns down from the extreme, that peak EPZ dot signals sell pressure.
Alerts
EPZ: Extreme Context — fires on confirmed extremes (respects cooldown).
EPZ: Approaching Threshold — fires in warning zones if no extreme.
EPZ: Divergence — fires on confirmed pivot divergences.
Tip: Set alerts to "Once per bar close" to align with confirmation and avoid intrabar repaint.
Practical usage ideas
Trend continuation: In positive regimes (MPO > 50 and rising), pullbacks holding above 50 often precede continuation; mirror for bearish regimes.
Exhaustion caution: E High/E Low can mark exhaustion risk; many wait for MPO rollover or divergence to time fades or partial exits.
Adaptive thresholds: Useful on assets with shifting volatility regimes to maintain meaningful "extreme" levels.
MTF alignment: Prefer setups that agree with the HTF MPO to reduce countertrend noise.
Examples
Screenshots captured in TradingView Replay to freeze the bar at close so values don't fluctuate intrabar. These examples use default settings and are reproducible on the same bars; they are for illustration, not cherry-picking or performance claims.
Example 1 — BTCUSDT, 1h — E Low
MPO closed at 26.6 (below the 30 extreme), printing a confirmed E Low. HTF MPO is 26.6, so higher-timeframe pressure remains bearish. Components are subdued (Momentum/Pressure/Smart$ ≈ 29–37), with Vol Ratio ≈ 1.19x and ATR% ≈ 0.37%. A prior Bear Div flagged weakening impulse into the drop. With cooldown set to 5 bars, new extremes are rate-limited. Many traders wait for MPO to curl up and reclaim 35 or for a fresh Bull Div before considering countertrend ideas; if MPO cannot reclaim 35 and HTF stays weak, treat bounces cautiously. Educational illustration only.
Example 2 — ETHUSD, 30m — E High
A strong impulse pushed MPO into the extreme zone (≥ 70), printing a confirmed E High on close. Shortly after, MPO cooled to ~61.5 while a Bear Div appeared, showing momentum lag as price pushed a higher high. Volume and volatility were elevated (≈ 1.79x / 1.25%). With a 5-bar cooldown, additional extremes won't print immediately. Some treat E High as exhaustion risk—either waiting for MPO rollover under 65/50 to fade, or for a pullback that holds above 50 to re-join the trend if higher-timeframe pressure remains constructive. Educational illustration only.
Known limitations and caveats
The MPO line itself can change intrabar; extreme markers/alerts do not repaint when "Confirm Extremes on Bar Close" is ON.
HTF values settle at the close of the HTF bar.
Illiquid symbols or very low TFs can be noisy; consider higher thresholds or longer smoothing.
Prediction line (when enabled) is a visual extrapolation only.
For coders
Pine v6. MTF via request.security with lookahead_off.
Extremes include crossover triggers so static thresholds also yield E High/E Low.
Extreme markers and pre-alerts are gated by barstate.isconfirmed when confirmation is ON.
Arrays prune oldest objects to respect resource limits; defaults (80/80/60) are conservative for low TFs.
3D layering uses negative offsets purely for drawing depth (no lookahead).
Screenshot methodology:
To make labels legible and to demonstrate non-repainting behavior, the examples were captured in TradingView Replay with "Confirm Extremes on Bar Close" enabled. Replay is used only to freeze the bar at close so plots don't change intrabar. The examples use default settings, include both Extreme Low and Extreme High cases, and can be reproduced by scrolling to the same bars outside Replay. This is an educational illustration, not a performance claim.
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Markets involve risk; past behavior does not guarantee future results. You are responsible for your own testing, risk management, and decisions.
RSI Trendlines and Divergences█OVERVIEW
The "RSI Trendlines and Divergences" indicator is an advanced technical analysis tool that leverages the Relative Strength Index (RSI) to draw trendlines and detect divergences. Designed for traders seeking precise market signals, the indicator identifies key pivot points on the RSI chart, draws trendlines between pivots, and detects bullish and bearish divergences. It offers flexible settings, background coloring for breakout signals, and divergence labels, supported by alerts for key events. The indicator is universal and works across all markets (stocks, forex, cryptocurrencies) and timeframes.
█CONCEPTS
The indicator was developed to provide an alternative signal source for the RSI oscillator. Trendline breakouts and bounces off trendlines offer a broader perspective on potential price behavior. Combining these with traditional RSI signal interpretation can serve as a foundation for creating various trading strategies.
█FEATURES
- RSI and Pivot Calculation: Calculates RSI based on the selected source price (default: close) with a customizable period (default: 14). Identifies pivot points on RSI and price for trendlines and divergences.
- RSI Trendlines: Draws trendlines connecting RSI pivots (upper for downtrends, lower for uptrends) with optional extension (default: 30 bars). The trendline appears and generates a signal only after the first RSI crossover. Lines are colored (red for upper, green for lower).
- Trendline Fill: Widens the trendline with a tolerance margin expressed in RSI points, reducing signal noise and visually highlighting trend zones. Breaking this zone is a condition for generating signals, minimizing false signals. The tolerance margin can be increased or decreased.
- Divergence Detection: Identifies bullish and bearish divergences based on RSI and price pivots, displaying labels (“Bull” for bullish, “Bear” for bearish) with adjustable transparency. Divergence labels appear with a delay equal to the specified pivot length (default: 5). Higher values yield stronger signals but with greater delay.
- Breakout Signals: Generates signals when RSI crosses the trendline (bullish for upper lines, bearish for lower lines), with background coloring for signal confirmation.
- Alerts: Built-in alerts for:
Detection of bullish and bearish divergences.
Upper trendline crossover (bullish signal).
Lower trendline crossover (bearish signal).
- Customization: Allows adjustment of RSI length, pivot settings, line colors, fills, labels, and transparency of signals and background.
█HOW TO USE
Add the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configuring Settings.
RSI Settings
- RSI Length: Period for RSI calculation (default: 14).
- SMA Length: Period for RSI moving average (default: 9).
- Source: Source price for RSI (default: close).
Pivot Settings for Trend
- Left Bars for Pivot: Number of bars back for detecting pivots (default: 10).
- Right Bars for Pivot: Number of bars forward for confirming pivots (default: 10).
- Extension after Second Pivot: Number of bars to extend the trendline (default: 30, 0 = none). Extension increases the number of signals, while shortening reduces them.
- Tolerance: Deviation in RSI points to widen the breakout margin, reducing signal noise (default: 3.0).
Divergence Settings
- Enable Divergence Detection: Enables/disables divergence detection (default: enabled).
- Pivot Length for Divergence: Pivot period for divergences (default: 5).
Style Settings
- Upper Trendline Color: Color for downtrend lines (default: red).
- Upper Fill Color: Fill color for upper lines (default: red, transparency 70).
- Lower Trendline Color: Color for uptrend lines (default: green).
- Lower Fill Color: Fill color for lower lines (default: green, transparency 70).
- SMA Color: Color for RSI moving average (default: yellow).
- Bullish Divergence Color: Color for bullish labels (default: green).
- Bearish Divergence Color: Color for bearish labels (default: red).
- Text Color: Color for label text (default: white).
- Divergence Label Transparency: Transparency of labels (0-100, default: 40).
- Signal Background Transparency: Transparency of breakout signal background (0-100, default: 80).
Interpreting Signals
- Trendlines: Upper lines (red) indicate RSI downtrends, lower lines (green) indicate uptrends. The trendline appears and generates a signal only after the first RSI crossover. Trendline breakouts suggest potential trend reversals.
- Divergences: “Bull” labels indicate bullish divergence (potential rise), “Bear” labels indicate bearish divergence (potential decline), with a delay based on pivot length (default: 5). Divergences serve as confirmation or warning of trend reversal, not as standalone signals.
- Signal Background: Green background signals bullish breakouts, red background signals bearish breakouts.
- RSI Levels: Horizontal lines at 70 (overbought), 50 (midline), and 30 (oversold) help assess market zones.
- Alerts: Set up alerts in TradingView for divergences or trendline breakouts.
Combining with Other Tools: Use with support/resistance levels, Fibonacci levels, or other indicators for signal confirmation.
█APPLICATIONS
The "RSI Trendlines and Divergence" indicator is designed to identify trends and potential reversal points, supporting both trend-following and reversal strategies:
- Trend Confirmation: Trendlines indicate the RSI trend direction, with breakouts signaling potential reversals. The indicator is functional in traditional RSI usage, allowing classic RSI interpretation (e.g., returning from overbought/oversold zones). Combining trendline breakouts with RSI signal levels, such as a return from overbought or oversold zones paired with a trendline breakout, strengthens the signal.
- Divergence Detection: Divergences serve as confirmation or warning of trend reversal, not as standalone signals.
█NOTES
- Adjust settings (e.g., RSI length, pivots, tolerance) to suit your trading style and timeframe.
- Combine with other technical analysis tools to enhance signal accuracy.