EMA Indicator with Dynamic Color & Crossovers_v003EMA Indicator with Dynamic Color & Crossovers_v003
インジケーターとストラテジー
9 EMA//@version=5
indicator("9 and 15 EMA", overlay=true)
ema9Length = 9
ema15Length = 15
ema9 = ta.ema(close, ema9Length)
ema15 = ta.ema(close, ema15Length)
plot(ema9, color=color.blue, title="9 EMA", linewidth=2)
plot(ema15, color=color.red, title="15 EMA", linewidth=2)
Dual MTF MADescription:
Parameters:
MA Type: Choose between Simple (SMA) and Exponential (EMA) Moving Average
MA Length: Number of periods for calculation (default 20)
Source: Price source for calculations (Close/Open/High/Low)
Offset: Shift lines forward/backward in time
Features:
Works on any timeframe without code modifications
Displays overlay on price chart (overlay=true)
Customizable visual settings (color, thickness)
Usage:
Trend identification
Price crossover detection
Support/resistance analysis
All in One with CCICCI with Stock ATR that shows the risk of the stock and the present that the stock can move in one day of trade
No gaps candles with 50 EMAraaaaaaaaaaaand djvhdsifhakujrfidffwofxi fhqwj3riugewrioriqeouirh efkudhcrj r;ofbsu 3wli gq3ogihae 3krigaw ilurgfhe;o 34krjgkugr iuhgiurerioutrhiog uyg rsiugt q34iu w
Daily First Hour Midpoint by sunil sharmathis indicator will show you the hourly 1st candle mid point. when next candle closes from below above the line, the high of the candle will be the buying point. SL will be low of the 1st hourly candle.
Candlestick Pattern Detector - Vijay PrasadOverview:
This Pine Script v6 indicator is designed to detect and label key candlestick patterns on TradingView charts. It provides real-time visual markers for major bullish and bearish reversal signals, aiding traders in decision-making.
Usefulness:
✅ Saves time by automating candlestick pattern detection.
✅ Reduces manual chart analysis errors.
✅ Works across all markets & timeframes.
✅ Enhances trading strategies with accurate signals.
Candlestick Patterns Recognises:
Bullish Engulfing – A strong bullish reversal pattern.
Bearish Engulfing – Indicates a potential downtrend.
Hammer – Suggests a market bottom or reversal.
Shooting Star – A bearish reversal signal at the top of an uptrend.
Doji – Signals market indecision and possible trend change.
Key Functions:
Automated Pattern Visible
Identifies candlestick patterns dynamically and plots them on the chart.
Visual Labels for Patterns
Labels to indicate specific candlestick formations.
Labels appear only when a valid pattern is detected, avoiding unnecessary clutter.
Buy/Sell Signal
Plots buy signals at bullish patterns and sell signals at bearish patterns.
Helps traders recognize trend reversals and entry/exit points.
Bullish Engulfing Pattern (Green Label)
What it means: A bullish engulfing pattern typically signals a potential reversal from a downtrend to an uptrend. The current candle fully engulfs the previous candle, signaling strong buying interest.
Identifying Candlestick Patterns on the Chart
How to use it:
Entry: Look for a green label (bullish engulfing) at the bottom of the chart. When it appears, consider entering a long position (buy).
Confirmation: To increase reliability, wait for confirmation by observing if price moves above the high of the bullish engulfing candle.
Exit: Exit when the trend shows signs of reversing or take profit at predefined levels (e.g., resistance or a risk-to-reward ratio).
Bearish Engulfing Pattern (Red Label)
What it means: A bearish engulfing pattern is a signal of a potential reversal from an uptrend to a downtrend. The current candle fully engulfs the previous candle, signaling strong selling pressure.
How to use it:
Entry: Look for a red label (bearish engulfing) at the top of the chart. When it appears, consider entering a short position (sell).
Confirmation: Wait for the price to move below the low of the bearish engulfing candle to confirm the bearish trend.
Exit: Close the trade when the price reaches support levels or the trend shows signs of reversing.
Doji Pattern (Blue Circle)
What it means: A Doji candle signals market indecision. It represents a balance between buyers and sellers, often marking a potential reversal or consolidation point.
How to use it:
Entry: If the Doji appears after a strong trend (bullish or bearish), wait for the next candle to break above or below the Doji's high or low. This can signal a continuation or reversal.
Confirmation: You can look for additional indicators like moving averages, RSI, or MACD for confirmation before taking any action.
Exit: Exit when the price shows clear momentum in your entry direction.
Hammer Pattern (Orange Triangle)
What it means: The hammer pattern is a bullish reversal pattern that appears after a downtrend. It suggests that sellers pushed the price down during the session, but buyers managed to push the price back up.
How to use it:
Entry: When a hammer appears, consider entering a long position (buy). The price should move above the hammer's high for confirmation.
Confirmation: Look for strong volume and a follow-up bullish candle to confirm the reversal.
Exit: Set a target based on the next resistance level, or use a trailing stop to lock in profits.
Using Candlestick Patterns with Other Indicators
To increase your chances of success, combine candlestick patterns with other technical indicators.
Here are some ideas:
RSI (Relative Strength Index): Use RSI to check whether the market is overbought or oversold. A bullish engulfing in an oversold market could indicate a stronger buy signal, and a bearish engulfing in an overbought market could indicate a stronger sell signal.
Moving Averages (e.g., 50 EMA, 200 EMA): Confirm trend direction. If the candlestick pattern aligns with the direction of the moving averages, it can give a stronger signal.
MACD (Moving Average Convergence Divergence): Use MACD to confirm momentum and potential trend changes. If a candlestick pattern aligns with a MACD crossover, it strengthens the signal.
Volume: Look for higher-than-average volume when a pattern appears. This can give you additional confirmation that the market is reacting strongly.
Practice and Refine
It's important to practice using the candlestick patterns in a demo account or backtest them to see how they perform under different market conditions. Over time, you can adjust the settings and patterns to fit your trading style and preferences.
5SMA+B.B.+RSI//@version=5
indicator("5SMA+B.B.+RSI", overlay = true)
// SMAの各種設定
SMAEnable = input.bool(true, title = "SMA Enable", group = "SMA settings")
SMASource1 = input.source(close, title = "SMA1 Source")
SMALength1 = input.int(5, title = "SMA1 Length")
SMASource2 = input.source(close, title = "SMA2 Source")
SMALength2 = input.int(25, title = "SMA2 Length")
SMASource3 = input.source(close, title = "SMA3 Source")
SMALength3 = input.int(75, title = "SMA3 Length")
SMASource4 = input.source(close, title = "SMA4 Source")
SMALength4 = input.int(100, title = "SMA4 Length")
SMASource5 = input.source(close, title = "SMA5 Source")
SMALength5 = input.int(150, title = "SMA5 Length")
// Bollinger Bandの各種設定
BBEnable = input.bool(true, title = "Bollinger Band Enable", group = "B.B. settings")
BBSource = input.source(close, title = "BB Source")
BBLength = input.int(20, title = "BB Length")
BBDeviation = input.float(2.0, title = "BB 偏差")
// RSIの各種設定
RSIEnable = input.bool(true, title = "RSI Enable", group = "RSI settings")
RSISource = input.source(close, title = "RSI Source")
RSILength = input.int(14, title = "RSI Length")
RSIUpper = input.float(70.0, title = "RSI Upper level")
RSILower = input.float(30.0, title = "RSI Lower level")
// SMAの算出
SMA1 = ta.sma(SMASource1, SMALength1)
SMA2 = ta.sma(SMASource2, SMALength2)
SMA3 = ta.sma(SMASource3, SMALength3)
SMA4 = ta.sma(SMASource4, SMALength4)
SMA5 = ta.sma(SMASource5, SMALength5)
// Bollinger Bandの算出
BBSMA = ta.sma(BBSource, BBLength)
BBDev = ta.stdev(BBSource, BBLength)
BBUpper = BBSMA + BBDeviation * BBDev
BBLower = BBSMA - BBDeviation * BBDev
// RSIの算出
RSIValue = ta.rsi(RSISource, RSILength)
// プロット
plot(SMAEnable ? SMA1 : na, title = "SMA1", linewidth = 2, color = color.white)
plot(SMAEnable ? SMA2 : na, title = "SMA2", linewidth = 2, color = color.blue)
plot(SMAEnable ? SMA3 : na, title = "SMA3", linewidth = 2, color = color.yellow)
plot(SMAEnable ? SMA4 : na, title = "SMA4", linewidth = 2, color = color.green)
plot(SMAEnable ? SMA5 : na, title = "SMA5", linewidth = 2, color = color.gray)
plot(BBEnable ? BBSMA : na, title = "BB SMA", color = color.orange)
plot(BBEnable ? BBUpper : na, title = "BB Upper", color = color.orange)
plot(BBEnable ? BBLower : na, title = "BB Lower", color = color.orange)
plotshape(RSIEnable and RSIUpper < RSIValue, style = shape.triangleup, location = location.abovebar, color = color.white, display = display.pane)
plotshape(RSIEnable and RSIValue < RSILower, style = shape.triangledown, location = location.belowbar, color = color.white, display = display.pane)//@version=5
indicator("5SMA+B.B.+RSI", overlay = true)
// SMAの各種設定
SMAEnable = input.bool(true, title = "SMA Enable", group = "SMA settings")
SMASource1 = input.source(close, title = "SMA1 Source")
SMALength1 = input.int(5, title = "SMA1 Length")
SMASource2 = input.source(close, title = "SMA2 Source")
SMALength2 = input.int(25, title = "SMA2 Length")
SMASource3 = input.source(close, title = "SMA3 Source")
SMALength3 = input.int(75, title = "SMA3 Length")
SMASource4 = input.source(close, title = "SMA4 Source")
SMALength4 = input.int(100, title = "SMA4 Length")
SMASource5 = input.source(close, title = "SMA5 Source")
SMALength5 = input.int(150, title = "SMA5 Length")
// Bollinger Bandの各種設定
BBEnable = input.bool(true, title = "Bollinger Band Enable", group = "B.B. settings")
BBSource = input.source(close, title = "BB Source")
BBLength = input.int(20, title = "BB Length")
BBDeviation = input.float(2.0, title = "BB 偏差")
// RSIの各種設定
RSIEnable = input.bool(true, title = "RSI Enable", group = "RSI settings")
RSISource = input.source(close, title = "RSI Source")
RSILength = input.int(14, title = "RSI Length")
RSIUpper = input.float(70.0, title = "RSI Upper level")
RSILower = input.float(30.0, title = "RSI Lower level")
// SMAの算出
SMA1 = ta.sma(SMASource1, SMALength1)
SMA2 = ta.sma(SMASource2, SMALength2)
SMA3 = ta.sma(SMASource3, SMALength3)
SMA4 = ta.sma(SMASource4, SMALength4)
SMA5 = ta.sma(SMASource5, SMALength5)
// Bollinger Bandの算出
BBSMA = ta.sma(BBSource, BBLength)
BBDev = ta.stdev(BBSource, BBLength)
BBUpper = BBSMA + BBDeviation * BBDev
BBLower = BBSMA - BBDeviation * BBDev
// RSIの算出
RSIValue = ta.rsi(RSISource, RSILength)
// プロット
plot(SMAEnable ? SMA1 : na, title = "SMA1", linewidth = 2, color = color.white)
plot(SMAEnable ? SMA2 : na, title = "SMA2", linewidth = 2, color = color.blue)
plot(SMAEnable ? SMA3 : na, title = "SMA3", linewidth = 2, color = color.yellow)
plot(SMAEnable ? SMA4 : na, title = "SMA4", linewidth = 2, color = color.green)
plot(SMAEnable ? SMA5 : na, title = "SMA5", linewidth = 2, color = color.gray)
plot(BBEnable ? BBSMA : na, title = "BB SMA", color = color.orange)
plot(BBEnable ? BBUpper : na, title = "BB Upper", color = color.orange)
plot(BBEnable ? BBLower : na, title = "BB Lower", color = color.orange)
plotshape(RSIEnable and RSIUpper < RSIValue, style = shape.triangleup, location = location.abovebar, color = color.white, display = display.pane)
plotshape(RSIEnable and RSIValue < RSILower, style = shape.triangledown, location = location.belowbar, color = color.white, display = display.pane)
Ocean's PVSRAList of features:
PVSRA Candles
Vector Candle Zones
PVSRA POCs
5/13/20/50/100/200/800 EMAs
2 Custom EMAs
13/50/200 Daily EMAs
Pivot points (S/M/R 1,2,3; PP )
Daily Open
Psychological High/Low
All of these are configurable in the indicator settings.
Usage instructions:
PVSRA Candle colors meaning:
Green (bull) and red (bear): Candles with volume >= 200% of the average volume of the 10 previous chart candles, and candles where the product of candle spread x candle volume is >= the highest for the 10 previous chart time candles.
Blue (bull) and blue-violet (bear): Candles with volume >= 150% of the average volume of the 10 previous chart candles
Vector Candle Zones:
displays unrecovered liquidity left behind on unrecovered vectors.
PVSRA POCs:
Display the POC of High Volume Candles.
EMA/Pivot Points:
- EMA retrace: Breaking these in either direction without addressing an imbalance on the opposite side requires confirmation after the break.
- Pivot-level trading operates on the same principle.
- **Note:** Pivot levels in this indicator have additional M-levels, which represent 50% markers to provide better insights into potential retraces or upward moves.
- For example: Breaking M1, retracing, and confirming at M1 with a target at M2.
Daily Open:
The daily open helps identify possible SPOT/Futures gaps (depending on the asset, such as a missing futures market over the weekend: NAS/DAX). Can display historical values too.
Psychological High/Low:
Configurable for Crypto or Forex - draws the perceived Psychological High/Low ranges for the week. Can display historical values too.
Trend Strength Gauge sam//@version=6
indicator("Trend Strength Gauge", overlay=true)
// Input for indicators
lengthMA = input.int(50, title="Moving Average Length")
lengthATR = input.int(14, title="ATR Length")
lengthRSI = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// Calculating Moving Averages
maShort = ta.sma(close, lengthMA)
maLong = ta.sma(close, lengthMA * 2) // Using a longer period for trend confirmation
// Calculating ATR for volatility
atrValue = ta.atr(lengthATR)
// Calculating RSI for momentum
rsiValue = ta.rsi(close, lengthRSI)
// Trend Strength Calculation
trendDirection = maShort > maLong ? 1 : -1
volatilityFactor = atrValue / close
momentumFactor = rsiValue > rsiOverbought ? -1 : (rsiValue < rsiOversold ? 1 : 0)
// Trend Strength Formula (0 to 100)
strength = (trendDirection * 50 + volatilityFactor * 50 + momentumFactor * 50)
// Normalize strength to be between 0 and 100
strength := math.min(math.max(strength, 0), 100)
// Plot the Trend Strength Gauge as a histogram
plot(strength, title="Trend Strength", color=color.new(color.blue, 0), linewidth=2, style=plot.style_histogram)
// Color the background based on trend strength
bgcolor(strength > 70 ? color.new(color.green, 90) : (strength < 30 ? color.new(color.red, 90) : na))
// Plot the moving averages on the chart for reference
plot(maShort, title="Short MA", color=color.green, linewidth=2)
plot(maLong, title="Long MA", color=color.red, linewidth=2)
Ocean's RSIOverview
The Ocean's RSI+ is a custom implementation of the Relative Strength Index (RSI) designed to provide traders with additional insight into market conditions. It builds upon the traditional RSI by introducing custom thresholds, visual bands, and annotations, making it easier to interpret overbought and oversold conditions, potential reversals, and periods of market neutrality.
This indicator is intended to help traders identify optimal entry and exit points by analyzing price momentum and strength across predefined levels.
How to Use the Indicator
1. Identifying Market Momentum
Observe the RSI line:
When it trends above 62, the market is likely in a strong uptrend or overbought condition.
When it trends below 24, the market is likely in a downtrend or oversold condition.
2. Trading Decisions Based on Zones
Strong Buy Zone (RSI < 16):
Indicates extreme oversold conditions.
Look for reversal patterns and consider entering a long position.
Possible Reversal Zone (RSI 24-38):
Market may reverse upward soon.
Watch for confirmation of bullish momentum.
Neutral Zone (RSI 38-50):
Market is consolidating; avoid entering large positions.
Prepare for potential trend continuation or reversal.
Possible Retrace Zone (RSI 50-62):
Indicates potential for a slight retracement.
Observe price action for continuation or reversal signals.
Strong Sell Zone (RSI > 62):
Indicates high momentum; market may be overbought.
Look for bearish patterns and consider exiting or shorting.
Upper Band Zone (RSI > 80):
Extreme overbought conditions.
Market is at high risk of reversal; consider taking profits.
3. Color Shading as Visual Cues
Use the colored bands to quickly assess the market’s state:
Red: Caution, overbought levels.
Green: Potential trade opportunities.
Blue: Caution, oversold levels.
4. Confirmation with Other Indicators
Combine Ocean's RSI+ with other indicators (e.g., moving averages, MACD, or volume) for confirmation of trends and reversals.
Use price action and candlestick patterns to validate entries and exits.
Bullish & Bearish Candles with Bollinger BandsI have created pine script for tradingview. in this script I have been focus candlestick with bollinger band.
Gate by Sanskaaarema 20,50,100,200
Identify trends: By observing the direction and spacing of the EMAs.
Find potential support and resistance levels: The EMAs themselves and the filled areas between them can act as dynamic support/resistance.
Get crossover signals (with alerts): The example alerts show how to be notified of price crossing specific EMAs.
Keep the chart clean: The user-selectable EMAs allow for decluttering.
Heikin Ashi EMA Kesişim StratejisiBu kod şunları yapıyor:
Heikin Ashi mumlarını hesaplıyor
Kullanıcının belirleyebileceği iki EMA periyodu tanımlıyor (varsayılan olarak 9 ve 21)
3. Heikin Ashi kapanış fiyatlarına göre EMA'ları hesaplıyor
EMA kesişimlerini tespit ediyor
Grafik üzerinde:
Mavi çizgi: Hızlı EMA
Kırmızı çizgi: Yavaş EMA
Yeşil "AL" etiketi: Hızlı EMA yukarı kestiğinde
Kırmızı "SAT" etiketi: Hızlı EMA aşağı kestiğinde
OSB + EMA Outside Bar Trading Strategy
Buy Setup:
1. Identify a bullish Outside Bar where the high and low exceed the previous candle’s range.
2. Enter a buy trade when price breaks above the high of the Outside Bar.
3. Set a stop-loss below the Outside Bar’s low.
4. Take profit at a key resistance level or use a trailing stop for extended gains.
Sell Setup:
1. Identify a bearish Outside Bar with a high and low exceeding the prior candle’s range.
2. Enter a sell trade when price breaks below the low of the Outside Bar.
3. Place a stop-loss above the Outside Bar’s high.
4. Take profit at a support level or use a trailing stop for further downside potential.
This strategy works best in trending markets and can be enhanced with confirmation from volume, moving averages, or support/resistance levels. 🚀
Advanced Averaged Momentum Indicator (AAMI)Key Features of AAMI:
Combination of Momentum Indicators: It averages normalized values from RSI, MACD histogram, raw Momentum, and Stochastic oscillator to give a comprehensive view of momentum.
Normalization: Each component is normalized to a scale from -1 to 1 to ensure they contribute equally to the AMI calculation.
Visual Cues: The indicator includes visual levels for neutral, overbought, and oversold conditions to aid in quick decision-making.
Alerts: Basic alert conditions are included for when AMI moves into overbought or oversold territory, which traders can customize further.
Customizable: All parameters can be adjusted within TradingView to tailor the indicator to different market conditions or trading strategies.
Smoothing: Included an SMA for AMI to reduce noise and give smoother signals.
Divergence Detection: Implemented a basic divergence detection mechanism to spot potential reversals.
Usage Tips:
Overbought/Oversold: When AMI goes above 0.7, it might suggest an overbought condition, potentially signaling a sell or take profit. Below -0.7 might indicate oversold conditions, suggesting a buy opportunity.
Divergence: Watch for divergences between the AMI and price action for signals of potential trend reversals.
Crossing Zero: The AMI crossing from negative to positive might be used as a buy signal, and vice versa for a sell signal.
This script provides a new way to view momentum by consolidating multiple traditional indicators into one, potentially offering clearer signals in complex market environments.
BB & SMA Alerts (Universal)This script will:
Plot Bollinger Bands (BB 20, 2 StdDev)
Plot SMA 50 & SMA 200 for trend analysis
Send alerts when price crosses BB, SMA 50, or SMA 200
Detect Golden Cross (Bullish) & Death Cross (Bearish) signals
Do note that this is not a guarantee as markets are often irrational, hence these indicators are supposed to supplement your decision making process and not to be used as 100% truth.
The assumptions are made as a universal format that can be used for most asset classes in Equities, Futures, Crypto.
Have not tested it on Funds, Bonds.
Appendix:
Best Practice: Use 20-SMA for Bollinger Bands and keep 50/200-SMA for trend confirmation.
SMA
• Short-Term (Fast) → 9 SMA (Great for intraday trades)
• Medium-Term → 50 SMA (Good for swing trading)
• Long-Term (Slow) → 200 SMA (For overall trend direction)
BB
Why Bollinger Bands Use SMA 20?
• Shorter time frame captures price fluctuations.
• More reactive to price changes → good for reversion trades.
• If you increase it to 50 or 200, Bollinger Bands will be too wide → making it hard to trade reversion.
• Bollinger Bands (50-SMA) → Becomes less sensitive to short-term price swings.
• Bollinger Bands (200-SMA) → Almost useless for mean reversion, since price barely touches bands.
Suggested Use Case:
🔹 Use BB (20-SMA) for entry signals.
🔹 Use 50-SMA & 200-SMA to confirm trend direction.
🔹 Example Trading Strategy:
• If price touches lower BB AND is above 200-SMA → Look for a BUY.
• If price touches upper BB AND is below 200-SMA → Look for a SELL.
Dual MA CrossoverThis script does the following:
1. We define the indicator with the name “Dual MA Crossover” and set it to overlay on the chart.
2. Two user inputs are created for the fast and slow moving average lengths, with default values of 10 and 100 respectively.
3. We calculate the simple moving averages (SMA) using the `ta.sma()` function.
4. The moving averages are plotted on the chart using different colors.
5. Crossover and crossunder conditions are detected using `ta.crossover()` and `ta.crossunder()` functions.
6. Labels are created at the crossover points:
• A “BUY” label is placed below the candle when the fast MA crosses above the slow MA.
• A “SELL” label is placed above the candle when the fast MA crosses below the slow MA.
7. The labels are set to have white text as requested, with green background for buy signals and red for sell signals.
Nef33 - SMA, EMA, VWMA + RSI Overbought/Oversold + Imbalance/FVGImbalance: Se considera un imbalance alcista cuando el cierre de una vela está por encima del máximo de la vela anterior y el mínimo está por debajo del mínimo de la vela anterior. Esto crea un desajuste de precio que se marca con un color de fondo verde en el gráfico.
Un imbalance bajista se define cuando el cierre está por debajo del mínimo de la vela anterior y el máximo está por encima del máximo de la vela anterior. Esto se marca con un color de fondo rojo.
FVG (Fair Value Gap): Los gaps en el precio son similares a los imbalances. El código señala estas zonas donde hubo un desajuste de precio con las condiciones anteriores y las muestra sutilmente.
Fuerte Volumen: Si el volumen actual es mayor que el doble del promedio de volumen de los últimos 20 períodos, se considera que hay un "fuerte volumen". Esto se marca con un triángulo morado debajo de la vela.
Colores y Fondo:
El fondo verde marca un imbalance alcista.
El fondo rojo marca un imbalance bajista.
El triángulo morado marca un fuerte volumen.
Este código debería proporcionarte una forma visual de detectar imbalances y fuertes volúmenes de manera sutil, en línea con la estrategia ICT.
Doji Detector - by YustinusIndikator ini membantu dalam menemukan candlestick dengan range range minimal 0.01 (DOJI).
Nef 33 SMA, EMA, VWMA + RSI Overbought/OversoldSimple Moving Average (SMA), Exponential Moving Average (EMA), and Volume Weighted Moving Average (VWMA), each plotted with different colors (blue, orange, and green, respectively).
Relative Strength Index (RSI), with overbought and oversold levels set to 70 and 30, respectively, and with red and green signals showing when these conditions are met.