🚀 Traderz h3lp3r - Combined Trend and ReversalThe "Traderz Helper" is a comprehensive trading indicator designed for the ETH/USDC pair, integrating several powerful analytical tools into one seamless overlay. This indicator combines H4 EMA trend analysis, Bollinger Bands for reversal detection, and precise candlestick pattern identification to provide traders with a robust tool for identifying potential market movements.
Features:
H4 EMA Trend Lines:
Displays the H4 EMA (Exponential Moving Average) to identify the overall market trend. It uses a 240-minute timeframe to reflect the H4 period across all charts.
The trend line is conditionally displayed based on the selected timeframe, ensuring relevance and clarity in trend analysis.
Bollinger Bands Reversal Signals:
Utilizes Bollinger Bands to spot potential bullish and bearish reversal points. The indicator highlights when the price wicks beyond the bands but closes within, signaling possible price rejections.
Includes both Bullish and Bearish reversal detections, marked with upward ("▲") and downward ("▼") arrows for quick visual cues.
Candlestick Pattern Detection:
Detects critical candlestick formations that indicate tops and bottoms in the market. This feature spots "Hammer" and "Shooting Star" patterns that can signify turning points.
Displays an orange "T" above bullish candles that form potential tops and a "B" below bearish candles indicating possible bottoms, providing traders with immediate visual insights into candlestick behavior.
Utility:
This indicator is tailored for traders who need a multi-faceted approach to technical analysis. Whether you are looking to confirm trend directions, anticipate market reversals, or identify key candlestick patterns, the "Traderz Helper" provides all necessary tools in a single, user-friendly format. Ideal for both novice and experienced traders, this indicator enhances decision-making by integrating essential trading metrics directly on your chart.
Usage Tips:
Monitor the H4 EMA for broader market trends. Use the trend lines to align your trades with the market direction.
Pay close attention to the reversal signals from Bollinger Bands. These can offer valuable entry and exit points.
Use the candlestick pattern detection to refine your trading strategy during key market movements. Look for "T" and "B" signals as confirmation of potential tops and bottoms.
Chart patterns
Donchian Breakout Indicator apthaTo trade using the Donchian Breakout Indicator, you can follow a trend-following approach, where the goal is to catch strong price movements as they break out of a consolidation range. Here's a step-by-step guide on how you can trade with this indicator:
1. Identifying Breakouts
The Donchian Channels display the highest high and the lowest low over a certain period (20 periods by default). When price breaks above the upper channel, it signals a potential bullish breakout, and when it breaks below the lower channel, it signals a potential bearish breakout.
2. Bullish Breakout (Buying)
Entry Signal: Look for a bullish breakout when the price closes above the upper channel. This indicates that the price is moving higher, breaking out of a recent range.
Confirmation: The middle channel acts as an additional confirmation. If the price is above the middle channel (or multiplied by the confirmation factor), it further strengthens the buy signal.
Exit: You can exit the position either when the price falls back inside the channel or based on other indicators like stop losses, take profits, or another price action signal.
3. Bearish Breakout (Selling/Shorting)
Entry Signal: Look for a bearish breakout when the price closes below the lower channel. This indicates a potential downward move, where the price is breaking below a recent support level.
Confirmation: Similarly, if the price is below the middle channel (or multiplied by the confirmation factor), it provides more confidence in the short position.
Exit: Exit the short position when the price breaks back above the lower channel or based on other indicators/price action.
4. Stop Loss and Take Profit Suggestions
Stop Loss:
For long positions, set the stop loss below the upper channel breakout point, or use a percentage-based stop from your entry price.
For short positions, set the stop loss above the lower channel breakout point.
Take Profit: Consider using a risk-reward ratio (like 2:1 or 3:1). Alternatively, you could exit when price closes back inside the channel or use trailing stops for dynamic exits.
5. Trade Example:
Bullish Example (Long Trade)
Signal: The price closes above the upper Donchian channel, indicating a potential breakout.
Confirmation: The price is above the middle channel (optional for stronger confirmation).
Action: Enter a long position.
Stop Loss: Place a stop loss just below the upper channel or a set percentage under the breakout point.
Take Profit: Set a profit target based on a risk-reward ratio or exit when the price shows signs of reversing.
Bearish Example (Short Trade)
Signal: The price closes below the lower Donchian channel, signaling a potential bearish breakout.
Confirmation: The price is below the middle channel (optional for added confidence).
Action: Enter a short position.
Stop Loss: Place a stop loss just above the lower channel or a set percentage above the breakout point.
Take Profit: Set a profit target based on a risk-reward ratio or exit when the price shows signs of reversing.
Things to Keep in Mind:
False Breakouts: Occasionally, price might break out temporarily and then reverse, which is a false breakout. To minimize this risk, use volume confirmation, momentum indicators (like RSI), or wait for a couple of candlesticks to confirm the breakout before entering.
Market Conditions: This strategy works best in trending markets. In ranging or consolidating markets, breakouts might not always follow through, leading to false signals.
Risk Management: Always apply good risk management techniques, such as defining your position size, setting stop losses, and using a proper risk-reward ratio.
Donchian Breakout IndicatorTo trade using the Donchian Breakout Indicator, you can follow a trend-following approach, where the goal is to catch strong price movements as they break out of a consolidation range. Here's a step-by-step guide on how you can trade with this indicator:
1. Identifying Breakouts
The Donchian Channels display the highest high and the lowest low over a certain period (20 periods by default). When price breaks above the upper channel, it signals a potential bullish breakout, and when it breaks below the lower channel, it signals a potential bearish breakout.
2. Bullish Breakout (Buying)
Entry Signal: Look for a bullish breakout when the price closes above the upper channel. This indicates that the price is moving higher, breaking out of a recent range.
Confirmation: The middle channel acts as an additional confirmation. If the price is above the middle channel (or multiplied by the confirmation factor), it further strengthens the buy signal.
Exit: You can exit the position either when the price falls back inside the channel or based on other indicators like stop losses, take profits, or another price action signal.
3. Bearish Breakout (Selling/Shorting)
Entry Signal: Look for a bearish breakout when the price closes below the lower channel. This indicates a potential downward move, where the price is breaking below a recent support level.
Confirmation: Similarly, if the price is below the middle channel (or multiplied by the confirmation factor), it provides more confidence in the short position.
Exit: Exit the short position when the price breaks back above the lower channel or based on other indicators/price action.
4. Stop Loss and Take Profit Suggestions
Stop Loss:
For long positions, set the stop loss below the upper channel breakout point, or use a percentage-based stop from your entry price.
For short positions, set the stop loss above the lower channel breakout point.
Take Profit: Consider using a risk-reward ratio (like 2:1 or 3:1). Alternatively, you could exit when price closes back inside the channel or use trailing stops for dynamic exits.
5. Trade Example:
Bullish Example (Long Trade)
Signal: The price closes above the upper Donchian channel, indicating a potential breakout.
Confirmation: The price is above the middle channel (optional for stronger confirmation).
Action: Enter a long position.
Stop Loss: Place a stop loss just below the upper channel or a set percentage under the breakout point.
Take Profit: Set a profit target based on a risk-reward ratio or exit when the price shows signs of reversing.
Bearish Example (Short Trade)
Signal: The price closes below the lower Donchian channel, signaling a potential bearish breakout.
Confirmation: The price is below the middle channel (optional for added confidence).
Action: Enter a short position.
Stop Loss: Place a stop loss just above the lower channel or a set percentage above the breakout point.
Take Profit: Set a profit target based on a risk-reward ratio or exit when the price shows signs of reversing.
Things to Keep in Mind:
False Breakouts: Occasionally, price might break out temporarily and then reverse, which is a false breakout. To minimize this risk, use volume confirmation, momentum indicators (like RSI), or wait for a couple of candlesticks to confirm the breakout before entering.
Market Conditions: This strategy works best in trending markets. In ranging or consolidating markets, breakouts might not always follow through, leading to false signals.
Risk Management: Always apply good risk management techniques, such as defining your position size, setting stop losses, and using a proper risk-reward ratio.
Yash Zones Pro [Clean]Overview of the Precision Yash Zones Pro Indicator
The Precision Yash Zones Pro indicator is designed to assist traders in identifying key supply and demand zones, which are critical for making informed trading decisions. Here’s how this indicator can help traders improve their trading strategies:
Custom Support LineIt is made with the following conditions in mind.
1. At the center of the candle at the moment,
Out of the last 10 candles, the low price (L) is within 3% of each other, drawing one line at the low prices of the candles.
2. Out of the last 10 candles, the market price (O) is within 3% of each other, drawing one line at the low end of each candle.
3.Out of the last 10 candles, the closing price (C) is within 3% of each other, and one line is drawn at the lower prices of the candles.
4. Draw one line when the three lines match the above three conditions.
We wanted to create a clear support line according to the above conditions.
WaveTrend Ignacio indicador de compra y venta simple, para mediano a largo plazo, con sobre compra y sobre venta como factor de explicacion
Long/Short - Juju & JojôFuncionalidades:
Sinais de Compra ("Long"): Gerados quando o RSI suavizado cruza acima da banda dinâmica de suporte.
Sinais de Venda ("Short"): Gerados quando o RSI suavizado cruza abaixo da banda dinâmica de resistência.
Alertas Integrados: Notificações automáticas ao identificar sinais de compra ou venda.
Personalização: Parâmetros ajustáveis para o RSI, suavização, sensibilidade do QQE e limiar de volatilidade.
Demand Zone FinderSwing Low Detection: The script identifies swing lows using the ta.lowest function over a user-defined period (length).
2. Demand Zone Range: A buffer is added to the swing low price to define the zone range.
3. Drawing Zones: Horizontal lines representing the demand zone are drawn on the chart and extended to the right.
4. Customization: You can adjust the swing length (length) and the buffer percentage (buffer) via inputs.
T&W Indikator### Beschreibung des Indikators
**Indikatorname:**
**EMA 20, 50, 200 & Hammer Pattern**
#### Funktionen des Indikators:
1. **EMA-Berechnung und Darstellung:**
- Der Indikator berechnet und zeigt die Exponentiellen Gleitenden Durchschnitte (EMAs) für die Perioden 20, 50 und 200.
- Jede EMA hat eine spezifische Farbe:
- **Blau:** EMA 20 (Kurzfristige Trends).
- **Orange:** EMA 50 (Mittelfristige Trends).
- **Rot:** EMA 200 (Langfristige Trends).
- Über jeder EMA wird bei der letzten Kerze die jeweilige Bezeichnung (z. B. "EMA 20") angezeigt, um die Werte zu identifizieren.
2. **Hammer-Kerzenmuster-Erkennung:**
- Der Indikator erkennt und markiert Hammer-Kerzenmuster, die potenzielle Umkehrsignale liefern.
- Bedingungen für das Muster:
- Der obere Schatten darf nicht größer als der Kerzenkörper sein.
- Der untere Schatten muss mindestens doppelt so groß sein wie der Kerzenkörper.
- Hämmer werden mit einem **grünen Dreieck** unterhalb der entsprechenden Kerze markiert.
3. **Signal für drei Kerzen unter einem lokalen Hoch:**
- Der Indikator erkennt, wenn nach einer lokalen Hochkerze drei aufeinanderfolgende Kerzen vollständig unter diesem Hoch bleiben.
- Ein **rotes Symbol** (Diamant) wird über der dritten Kerze angezeigt, die die Bedingung erfüllt.
4. **Dynamische Textkästen oben rechts im Chart:**
- Der Indikator zeigt zwei Textkästen in der oberen rechten Ecke des Charts:
- **Trendkasten:**
- Zeigt die aktuelle Marktphase an:
- **Grün:** "3Phasen" für Aufwärtstrend.
- **Rot:** "6Phasen" für Abwärtstrend.
- **Grau:** "Neutral" bei seitwärtsgerichteten Märkten.
- Die Schriftfarbe ist immer Weiß.
- **Signal-Kasten:**
- Ein **blauer Kasten**, wenn das Signal für drei Kerzen unter einem lokalen Hoch ausgelöst wird.
- Der Text lautet: "Signal Active".
---
#### Einsatzmöglichkeiten:
- **EMA-Trends:** Identifizieren von kurzfristigen, mittelfristigen und langfristigen Trends.
- **Hammer-Erkennung:** Unterstützt bei der Erkennung potenzieller Umkehrpunkte.
- **Signale bei drei Kerzen unter einem Hoch:** Erkennt Schwäche nach einem lokalen Hochpunkt.
- **Visuelle Darstellung:** Mit den Farbkasten und Symbolen ermöglicht der Indikator eine einfache und intuitive Analyse der Marktphasen.
---
**Hinweis:** Dieser Indikator eignet sich für Trader, die Trends erkennen und potenzielle Umkehrpunkte visualisieren möchten. Ergänze ihn mit anderen Tools für eine noch detailliertere Analyse.
Support, Resistance, and Price Action SetupHow to Use This:
Support and Resistance: The green and red lines represent Support and Resistance levels based on past price action.
Breakout Signals: When the price breaks above resistance or below support, the background color changes (green for breakout above resistance, red for breakout below support), and labels are created at the breakout points.
Rejection Signals: If the price rejects the support or resistance level (i.e., price moves away from it), a visual marker is added on the chart.
Conclusion:
This corrected script should now work without the NA type assignment issue. The breakout logic is properly handled and should now plot the Support, Resistance, and Price Action signals correctly. You can set alerts based on the breakout or rejection events to make this even more useful in live trading.
Trend Analysis with Volatility and MomentumVolatility and Momentum Trend Analyzer
The Volatility and Momentum Trend Analyzer is a multi-faceted TradingView indicator designed to provide a comprehensive analysis of market trends, volatility, and momentum. It incorporates key features to identify trend direction (uptrend, downtrend, or sideways), visualize weekly support and resistance levels, and offer a detailed assessment of market strength and activity. Below is a breakdown of its functionality:
1. Input Parameters
The indicator provides customizable settings for precision and adaptability:
Volatility Lookback Period: Configurable period (default: 14) for calculating Average True Range (ATR), which measures market volatility.
Momentum Lookback Period: Configurable period (default: 14) for calculating the Rate of Change (ROC), which measures the speed and strength of price movements.
Support/Resistance Lookback Period: Configurable period (default: 7 weeks) to determine critical support and resistance levels based on weekly high and low prices.
2. Volatility Analysis (ATR)
The Average True Range (ATR) is calculated to quantify the market's volatility:
What It Does: ATR measures the average range of price movement over the specified lookback period.
Visualization: Plotted as a purple line in a separate panel below the price chart, with values amplified (multiplied by 10) for better visibility.
3. Momentum Analysis (ROC)
The Rate of Change (ROC) evaluates the momentum of price movements:
What It Does: ROC calculates the percentage change in closing prices over the specified lookback period, indicating the strength and direction of market moves.
Visualization: Plotted as a yellow line in a separate panel below the price chart, with values amplified (multiplied by 10) for better visibility.
4. Trend Detection
The indicator identifies the current market trend based on momentum and the position of the price relative to its moving average:
Uptrend: Occurs when momentum is positive, and the closing price is above the simple moving average (SMA) of the specified lookback period.
Downtrend: Occurs when momentum is negative, and the closing price is below the SMA.
Sideways Trend: Occurs when neither of the above conditions is met.
Visualization: The background of the price chart changes color to reflect the detected trend:
Green: Uptrend.
Red: Downtrend.
Gray: Sideways trend.
5. Weekly Support and Resistance
Critical levels are calculated based on weekly high and low prices:
Support: The lowest price observed over the last specified number of weeks.
Resistance: The highest price observed over the last specified number of weeks.
Visualization:
Blue Line: Indicates the support level.
Orange Line: Indicates the resistance level.
Both lines are displayed on the main price chart, dynamically updating as new data becomes available.
6. Alerts
The indicator provides configurable alerts for trend changes, helping traders stay informed without constant monitoring:
Uptrend Alert: Notifies when the market enters an uptrend.
Downtrend Alert: Notifies when the market enters a downtrend.
Sideways Alert: Notifies when the market moves sideways.
7. Key Use Cases
Trend Following: Identify and follow the dominant trend to capitalize on sustained price movements.
Volatility Assessment: Measure market activity to determine potential breakouts or quiet consolidation phases.
Support and Resistance: Highlight key levels where price is likely to react, assisting in decision-making for entries, exits, or stop-loss placement.
Momentum Tracking: Gauge the strength and speed of price moves to validate trends or anticipate reversals.
8. Visualization Summary
Main Chart:
Background color-coded for trend direction (green, red, gray).
Blue and orange lines for weekly support and resistance.
Lower Panels:
Purple line for volatility (ATR).
Yellow line for momentum (ROC).
Trend Analysis with Volatility and MomentumVolatility and Momentum Trend Analyzer
The Volatility and Momentum Trend Analyzer is a multi-faceted TradingView indicator designed to provide a comprehensive analysis of market trends, volatility, and momentum. It incorporates key features to identify trend direction (uptrend, downtrend, or sideways), visualize weekly support and resistance levels, and offer a detailed assessment of market strength and activity. Below is a breakdown of its functionality:
1. Input Parameters
The indicator provides customizable settings for precision and adaptability:
Volatility Lookback Period: Configurable period (default: 14) for calculating Average True Range (ATR), which measures market volatility.
Momentum Lookback Period: Configurable period (default: 14) for calculating the Rate of Change (ROC), which measures the speed and strength of price movements.
Support/Resistance Lookback Period: Configurable period (default: 7 weeks) to determine critical support and resistance levels based on weekly high and low prices.
2. Volatility Analysis (ATR)
The Average True Range (ATR) is calculated to quantify the market's volatility:
What It Does: ATR measures the average range of price movement over the specified lookback period.
Visualization: Plotted as a purple line in a separate panel below the price chart, with values amplified (multiplied by 10) for better visibility.
3. Momentum Analysis (ROC)
The Rate of Change (ROC) evaluates the momentum of price movements:
What It Does: ROC calculates the percentage change in closing prices over the specified lookback period, indicating the strength and direction of market moves.
Visualization: Plotted as a yellow line in a separate panel below the price chart, with values amplified (multiplied by 10) for better visibility.
4. Trend Detection
The indicator identifies the current market trend based on momentum and the position of the price relative to its moving average:
Uptrend: Occurs when momentum is positive, and the closing price is above the simple moving average (SMA) of the specified lookback period.
Downtrend: Occurs when momentum is negative, and the closing price is below the SMA.
Sideways Trend: Occurs when neither of the above conditions is met.
Visualization: The background of the price chart changes color to reflect the detected trend:
Green: Uptrend.
Red: Downtrend.
Gray: Sideways trend.
5. Weekly Support and Resistance
Critical levels are calculated based on weekly high and low prices:
Support: The lowest price observed over the last specified number of weeks.
Resistance: The highest price observed over the last specified number of weeks.
Visualization:
Blue Line: Indicates the support level.
Orange Line: Indicates the resistance level.
Both lines are displayed on the main price chart, dynamically updating as new data becomes available.
6. Alerts
The indicator provides configurable alerts for trend changes, helping traders stay informed without constant monitoring:
Uptrend Alert: Notifies when the market enters an uptrend.
Downtrend Alert: Notifies when the market enters a downtrend.
Sideways Alert: Notifies when the market moves sideways.
7. Key Use Cases
Trend Following: Identify and follow the dominant trend to capitalize on sustained price movements.
Volatility Assessment: Measure market activity to determine potential breakouts or quiet consolidation phases.
Support and Resistance: Highlight key levels where price is likely to react, assisting in decision-making for entries, exits, or stop-loss placement.
Momentum Tracking: Gauge the strength and speed of price moves to validate trends or anticipate reversals.
8. Visualization Summary
Main Chart:
Background color-coded for trend direction (green, red, gray).
Blue and orange lines for weekly support and resistance.
Lower Panels:
Purple line for volatility (ATR).
Yellow line for momentum (ROC).
Crypto Strategy: Pattern Retest + EMA/RSI//@version=5
strategy("Crypto Strategy: Pattern Retest + EMA/RSI", overlay=true, margin_long=100, margin_short=100)
// ~~~~~~~~~~~~~~ INPUTS ~~~~~~~~~~~~~~
emaLength = input.int(50, "EMA Length")
rsiLength = input.int(14, "RSI Length")
overbought = input(70, "RSI Overbought Level")
oversold = input(30, "RSI Oversold Level")
patternLookback = input.int(20, "Pattern Lookback")
// ~~~~~~~~~~~~~~ INDICATORS ~~~~~~~~~~~~~~
ema = ta.ema(close, emaLength)
rsi = ta.rsi(close, rsiLength)
// ============== BULLISH PATTERN (Double Bottom Retest) ==============
var float necklineBullish = na
var bool breakoutBullish = false
// Detect Double Bottom
swingLow = ta.lowest(low, 5)
swingLowPrev = ta.lowest(low, 5)
swingHighBetween = ta.highest(high, 5)
isDoubleBottom = swingLow >= swingLowPrev * 0.99 and swingLow <= swingLowPrev * 1.01 and swingHighBetween > swingLow
// Update neckline on pattern detection
if isDoubleBottom
necklineBullish := swingHighBetween
breakoutBullish := false
// Breakout and Retest Logic
breakoutBullish := close > necklineBullish and not breakoutBullish
retestBullish = breakoutBullish and low <= necklineBullish and close > necklineBullish and rsi < oversold
// ============== BEARISH PATTERN (Double Top Retest) ==============
var float necklineBearish = na
var bool breakoutBearish = false
// Detect Double Top
swingHigh = ta.highest(high, 5)
swingHighPrev = ta.highest(high, 5)
swingLowBetween = ta.lowest(low, 5)
isDoubleTop = swingHigh <= swingHighPrev * 1.01 and swingHigh >= swingHighPrev * 0.99 and swingLowBetween < swingHigh
// Update neckline on pattern detection
if isDoubleTop
necklineBearish := swingLowBetween
breakoutBearish := false
// Breakdown and Retest Logic
breakoutBearish := close < necklineBearish and not breakoutBearish
retestBearish = breakoutBearish and high >= necklineBearish and close < necklineBearish and rsi > overbought
// ~~~~~~~~~~~~~~ BUY/SELL CONDITIONS ~~~~~~~~~~~~~~
// BUY Signal: Bullish retest OR EMA crossover + RSI oversold
buyCondition = retestBullish or (ta.crossover(close, ema) and rsi < oversold)
// SELL Signal: Bearish retest OR EMA crossunder + RSI overbought
sellCondition = retestBearish or (ta.crossunder(close, ema) and rsi > overbought)
// ~~~~~~~~~~~~~~ EXECUTE ORDERS ~~~~~~~~~~~~~~
if (buyCondition)
strategy.entry("BUY", strategy.long)
alert("BUY Signal: Price Retest + RSI/EMA Confirmation", alert.freq_once_per_bar)
if (sellCondition)
strategy.close("BUY")
alert("SELL Signal: Price Retest + RSI/EMA Confirmation", alert.freq_once_per_bar)
// ~~~~~~~~~~~~~~ PLOTTING ~~~~~~~~~~~~~~
plot(ema, "EMA", color=color.blue)
plot(necklineBullish, "Bullish Neckline", color=color.green, linewidth=2)
plot(necklineBearish, "Bearish Neckline", color=color.red, linewidth=2)
// Plot BUY/SELL labels on chart
plotshape(buyCondition, title="BUY", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellCondition, title="SELL", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
Nitin Strategy: Patterns + EMA/RSI Retest//@version=5
strategy("Crypto Strategy: Patterns + EMA/RSI Retest", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=90)
// Inputs
emaLength = input.int(50, "EMA Length")
rsiLength = input.int(14, "RSI Length")
overbought = input(70, "RSI Overbought")
oversold = input(30, "RSI Oversold")
patternLookback = input.int(20, "Pattern Lookback")
// Indicators
ema = ta.ema(close, emaLength)
rsi = ta.rsi(close, rsiLength)
// 1. BULLISH PATTERN (Double Bottom + Retest)
// -------------------------------------------
var float necklineBullish = na
var bool breakoutBullish = false
// Detect Double Bottom (two lows with a peak in between)
swingLow = ta.lowest(low, 5)
swingLowPrev = ta.lowest(low, 5)
swingHighBetween = ta.highest(high, 5)
isDoubleBottom = swingLow >= swingLowPrev * 0.99 and swingLow <= swingLowPrev * 1.01 and swingHighBetween > swingLow and swingHighBetween > swingLowPrev
// Update neckline on pattern detection
if isDoubleBottom
necklineBullish := swingHighBetween
breakoutBullish := false
// Check breakout above neckline
if not breakoutBullish and close > necklineBullish
breakoutBullish := true
// Retest after breakout (price returns to neckline and bounces)
retestBullish = breakoutBullish and low <= necklineBullish and close > necklineBullish and rsi < oversold
// 2. BEARISH PATTERN (Double Top + Retest)
// -------------------------------------------
var float necklineBearish = na
var bool breakoutBearish = false
// Detect Double Top (two highs with a trough in between)
swingHigh = ta.highest(high, 5)
swingHighPrev = ta.highest(high, 5)
swingLowBetween = ta.lowest(low, 5)
isDoubleTop = swingHigh <= swingHighPrev * 1.01 and swingHigh >= swingHighPrev * 0.99 and swingLowBetween < swingHigh and swingLowBetween < swingHighPrev
// Update neckline on pattern detection
if isDoubleTop
necklineBearish := swingLowBetween
breakoutBearish := false
// Check breakout below neckline
if not breakoutBearish and close < necklineBearish
breakoutBearish := true
// Retest after breakout (price returns to neckline and rejects)
retestBearish = breakoutBearish and high >= necklineBearish and close < necklineBearish and rsi > overbought
// 3. EMA + RSI Conditions
// -----------------------
emaBuy = ta.crossover(close, ema) and rsi < oversold
emaSell = ta.crossunder(close, ema) and rsi > overbought
// Final Buy/Sell Signals (Combine Retest & EMA/RSI)
buySignal = retestBullish or emaBuy
sellSignal = retestBearish or emaSell
// Execute Orders
strategy.entry("Buy", strategy.long, when=buySignal)
strategy.close("Buy", when=sellSignal)
// Plotting
plot(ema, "EMA", color=color.blue)
plot(necklineBullish, "Bullish Neckline", color=color.green, linewidth=2)
plot(necklineBearish, "Bearish Neckline", color=color.red, linewidth=2)
plotshape(buySignal, title="Buy", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
RSI Strategyris stratgy if buy or sell signal rsi is above 60 if rsi is above 6o momentum is high soo
Smoothed Heikin-Ashi Trend Strategy with SignalsbbSmoothed Heikin-Ashi Trend Strategy with Signalsbb
Smoothed Heikin-Ashi Trend Strategy with SignalsaaSmoothed Heikin-Ashi Trend Strategy with Signalsaa
Buy/Sell Indicator with BacktestThis script uses moving average crossovers for generating buy and sell signals, combined with stop loss and take profit levels based on user-defined percentages. It tracks positions and exits when stop loss or take profit levels are reached.