Sideways Scalper Peak and BottomUnderstanding the Indicator
This indicator is designed to identify potential peaks (tops) and bottoms (bottoms) within a market, which can be particularly useful in a sideways or range-bound market where price oscillates between support and resistance levels without a clear trend. Here's how it works:
RSI (Relative Strength Index): Measures the speed and change of price movements to identify overbought (above 70) and oversold (below 30) conditions. In a sideways market, RSI can help signal when the price might be due for a reversal within its range.
Moving Averages (MAs): The Fast MA and Slow MA provide a sense of the short-term and longer-term average price movements. In a sideways market, these can help confirm if the price is at the upper or lower extremes of its range.
Volume Spike: Looks for significant increases in trading volume, which might indicate a stronger move or a potential reversal point when combined with other conditions.
Divergence: RSI divergence occurs when the price makes a new high or low, but the RSI does not, suggesting momentum is weakening, which can be a precursor to a reversal.
How to Use in a Sideways Market
Identify the Range: First, visually identify the upper resistance and lower support levels of the sideways market on your chart. This indicator can help you spot these levels more precisely by signaling potential peaks and bottoms.
Peak Signal :
When to Look: When the price approaches the upper part of the range.
Conditions: The indicator will give a 'Peak' signal when:
RSI is over 70, indicating overbought conditions.
There's bearish divergence (price makes a higher high, but RSI doesn't).
Volume spikes, suggesting strong selling interest.
Price is above both Fast MA and Slow MA, indicating it's at a potentially high point in the range.
Action: This signal suggests that the price might be at or near the top of its range and could reverse downwards. A trader might consider selling or shorting here, expecting the price to move towards the lower part of the range.
Bottom Signal:
When to Look: When the price approaches the lower part of the range.
Conditions: The indicator will give a 'Bottom' signal when:
RSI is below 30, indicating oversold conditions.
There's bullish divergence (price makes a lower low, but RSI doesn't).
Volume spikes, suggesting strong buying interest.
Price is below both Fast MA and Slow MA, indicating it's at a potentially low point in the range.
Action: This signal suggests that the price might be at or near the bottom of its range and could reverse upwards. A trader might consider buying here, expecting the price to move towards the upper part of the range.
Confirmation: In a sideways market, false signals can occur due to the lack of a strong trend. Always look for confirmation:
Volume Confirmation: A significant volume spike can add confidence to the signal.
Price Action: Look for price action like candlestick patterns (e.g., doji, engulfing patterns) that confirm the reversal.
Time Frame: Consider using this indicator on multiple time frames. A signal on a shorter time frame (like 15m or 1h) might be confirmed by similar conditions on a longer time frame (4h or daily).
Risk Management: Since this is designed for scalping in a sideways market:
Set Tight Stop-Losses: Due to the quick nature of reversals in range-bound markets, place stop-losses close to your entry to minimize loss.
Take Profit Levels: Set profit targets near the opposite end of the range or use a trailing stop to capture as much of the move as possible before it reverses again.
Practice: Before trading with real money, practice with this indicator on historical data or in a paper trading environment to understand how it behaves in different sideways market scenarios.
Key Points for New Traders
Patience: Wait for all conditions to align before taking a trade. Sideways markets require patience as the price might hover around these levels for a while.
Not All Signals Are Equal: Sometimes, even with all conditions met, the market might not reverse immediately. Look for additional context or confirmation.
Continuous Learning: Understand that this indicator, like any tool, isn't foolproof. Learn from each trade, whether it's a win or a loss, and adjust your strategy accordingly.
By following these guidelines
Candlestick analysis
EMA with Dynamic Support and Resistance Signals//@version=5
indicator("EMA with Dynamic Support and Resistance Signals", overlay=true)
// Parameters
emaLength = 10
lookbackPeriod = 20
// Calculations
ema = ta.ema(close, emaLength)
highestHigh = ta.highest(high, lookbackPeriod)
lowestLow = ta.lowest(low, lookbackPeriod)
// Conditions
buyCondition = close > ema and close > highestHigh
sellCondition = close < ema and close < lowestLow
// Plot EMA
plot(ema, title="10-Period EMA", color=color.blue)
// Plot Support and Resistance Levels
plot(highestHigh , title="Resistance Level", color=color.red, style=plot.style_linebr)
plot(lowestLow , title="Support Level", color=color.green, style=plot.style_linebr)
// Plot Buy and Sell Signals
plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
Bollinger Bounce Reversal Strategy – Visual EditionOverview:
The Bollinger Bounce Reversal Strategy – Visual Edition is designed to capture potential reversal moves at price extremes—often termed “bounce points”—by using a combination of technical indicators. The strategy integrates Bollinger Bands, MACD, and volume analysis, and it provides rich on‑chart visual cues to help traders understand its signals and conditions. Additionally, the strategy enforces a maximum of 5 trades per day and uses fixed risk management parameters. This publication is intended for educational purposes and offers a systematic, transparent approach that you can further adjust to fit your market or risk profile.
How It Works:
Bollinger Bands:
A 20‑period simple moving average (SMA) and a user‑defined standard deviation multiplier (default 2.0) are used to calculate the Bollinger Bands.
When the price reaches or crosses these bands (i.e. falls below the lower band or rises above the upper band), it suggests that the price is in an extreme, potentially oversold or overbought, state.
MACD Filter:
The MACD (calculated with standard lengths, e.g. 12, 26, 9) provides momentum information.
For a bullish (long) signal, the MACD line should be above its signal line; for a bearish (short) signal, the MACD line should be below.
Volume Confirmation:
The strategy uses a 20‑period volume moving average to determine if current volume is strong enough to validate a signal.
A signal is confirmed only if the current volume is at or above a specified multiple (by default, 1.0×) of this moving average, ensuring that the move is supported by increased market participation.
Visual Cues:
Bollinger Bands and Fill: The basis (SMA), upper, and lower Bollinger Bands are plotted, and the area between the upper and lower bands is filled with a semi‑transparent color.
Signal Markers: When a long or short signal is generated, corresponding markers (labels) appear on the chart.
Background Coloring: The chart’s background changes color (green for long signals and red for short signals) on the bars where signals occur.
Information Table: An on‑chart table displays key indicator values (MACD, signal line, volume, average volume) and the number of trades executed that day.
Entry Conditions:
Long Entry:
A long trade is triggered when the previous bar’s close is below the lower Bollinger Band and the current bar’s close crosses above it, combined with a bullish MACD condition and strong volume.
Short Entry:
A short trade is triggered when the previous bar’s close is above the upper Bollinger Band and the current bar’s close crosses below it, with a bearish MACD condition and high volume.
Risk Management:
Daily Trade Limit: The strategy restricts trading to no more than 5 trades per day.
Stop-Loss and Take-Profit:
For each position, a stop loss is set at a fixed percentage away from the entry price (typically 2%), and a take profit is set to target a 1:2 risk-reward ratio (typically 4% from the entry price).
Backtesting Setup:
Initial Capital: $10,000
Commission: 0.1% per trade
Slippage: 1 tick per bar
These realistic parameters help ensure that backtesting results reflect the conditions of an average trader.
Disclaimer:
Past performance is not indicative of future results. This strategy is experimental and provided solely for educational purposes. It is essential to backtest extensively and paper trade before any live deployment. All risk management practices are advisory, and you should adjust parameters to suit your own trading style and risk tolerance.
Conclusion:
By combining Bollinger Bands, MACD, and volume analysis, the Bollinger Bounce Reversal Strategy – Visual Edition provides a clear, systematic method to identify potential reversal opportunities at price extremes. The added visual cues help traders quickly interpret signals and assess market conditions, while strict risk management and a daily trade cap help keep trading disciplined. Adjust and refine the settings as needed to better suit your specific market and risk profile.
5D-SMA+4hMACDSession VWAP:
Uses the change in time("D") to detect a new day and resets the cumulative price‐volume and volume totals. The VWAP is then the cumulative price × volume divided by the cumulative volume.
2‑Day VWAP:
Maintains separate accumulators for the current day and the previous day. On a new day, the previous day’s totals are saved and then added to the current day’s running totals to compute a VWAP spanning the two most recent days.
Weekly VWAP:
Uses ta.change(time("W")) to reset the weekly accumulators at the start of a new week.
Anchored VWAP:
Begins accumulation when the current bar’s time exceeds the user‐defined anchor time. Once started, it continues to accumulate indefinitely.
Feel free to modify the inputs and styling to suit your preferences.
Candlestick Pattern Identifier by dnsfor begginers who ant to learn about candel stick it ill help you identify the candels
Waldo's RSI Color Trend Candles
TradingView Description for Waldo's RSI Color Trend Candles
Title: Waldo's RSI Color Trend Candles
Short Title: Waldo RSI CTC
Overview:
Waldo's RSI Color Trend Candles is a visually intuitive indicator designed to enhance your trading experience by color-coding candlesticks based on the integration of Relative Strength Index (RSI) momentum and moving average trend analysis. This innovative tool overlays directly on your price chart, providing a clear, color-based representation of market sentiment and trend direction.
What is it?
This indicator combines the power of RSI with the simplicity of moving averages to offer traders a unique way to visualize market conditions:
RSI Integration: The RSI is computed with customizable parameters, allowing traders to adjust how momentum is interpreted. The RSI values influence the primary color of the candles, indicating overbought or oversold market states.
Moving Averages: Utilizing two Simple Moving Averages (SMAs) with user-defined lengths, the indicator helps in identifying trend directions through their crossovers. The fast MA and slow MA can be toggled on/off for visual clarity.
Color Trend Candles: The 'Color Trend Candles' feature uses a dynamic color scheme to reflect different market conditions:
Purple for overbought conditions when RSI exceeds the set threshold (default 70).
Blue for oversold conditions when RSI falls below the set threshold (default 44).
Green indicates a bullish trend, confirmed by both price action and RSI being bullish (fast MA crossing above slow MA, with price above the slow MA).
Red signals a bearish trend, when both price and RSI are bearish (fast MA crossing below slow MA, with price below the slow MA).
Gray for neutral or mixed market sentiment, where signals are less clear or contradictory.
How to Use It:
Waldo's RSI Color Trend Candles is tailored for traders who appreciate visual cues in their trading strategy:
Trend and Momentum Insight: The color of each candle gives an immediate visual representation of both the trend (via MA crossovers) and momentum (via RSI). Green and red candles align with bullish or bearish trends, respectively, providing a quick reference for market direction.
Identifying Extreme Conditions: Purple and blue candles highlight potential reversal zones or areas where the market might be overstretched, offering opportunities for contrarian trades or to anticipate market corrections.
Customization: Users can adjust the RSI length, overbought/oversold levels, and the lengths of the moving averages to align with their trading style or the specific characteristics of the asset they're trading.
This customization ensures the indicator can be tailored to various market conditions.
Simplified Decision Making: Designed for traders who prefer a visual approach, this indicator simplifies the decision-making process by encoding complex market data into an easy-to-understand color system.
However, for a robust trading strategy, it's recommended to use it alongside other analytical tools.
Control Over Display: The option to show or hide moving averages and to enable or disable the color-coding of candles provides users with control over how information is presented, allowing for a cleaner chart or more detailed analysis as preferred.
Conclusion:
Waldo's RSI Color Trend Candles offers a fresh, visually appealing method to interpret market trends and momentum through the color of candlesticks. It's ideal for traders looking for a straightforward way to gauge market sentiment at a glance. While this indicator can significantly enhance your trading setup, remember to incorporate it within a broader strategy, using additional confirmation from other indicators or analysis methods to manage risk and validate trading decisions. Dive into the colorful world of trading with Waldo's RSI Color Trend Candles and let the market's mood guide your trades with clarity and ease.
Daily Bias IndicatorBasic ICT Daily Bias Indicator
When yesterday's price breaks above and closes above the high of the day before yesterday, it indicates a bullish bias.
When yesterday's price tests the low of the day before yesterday but does not break below it, it indicates a bullish bias.
When yesterday's price breaks below and closes below the low of the day before yesterday, it indicates a bearish bias.
When yesterday's price tests the high of the day before yesterday but does not break above it, it indicates a bearish bias.
Week division This TradingView Pine Script indicator works exclusively on the hourly timeframe. Its primary functions are:
1. Marking the Opening of Each Weekday:
• It places a vertical line at the opening hour of each day (Sunday to Friday).
2. Dividing the Week by Days:
• It visually separates each day within the weekly structure to help traders analyze price movements per day.
3. Displaying the Day Name:
• The script labels each day’s opening with its respective name (e.g., “Sunday”, “Tuesday”, etc.) at the bottom of the chart.
Key Features:
✔️ Works only on the hourly timeframe
✔️ Highlights the start of each weekday
✔️ Divides the week into separate days
✔️ Displays the day’s name on the chart
Let me know if you need any modifications! 🚀
950 StandardNQ 9:50 AM Candle Strategy v3 (Trade at 9:55AM) - 1 Contract
Also called 950 Standard, 950 Bar, or The 950 Strategy.
This strategy places its trade at 9:55am each day based on the close of the 9:50am candle. Uses 5min timeframe candles. If candle closes red, or bearish, the strategy goes short. If candle closes green, or bullish, the strategy goes long. Brackets are 150tick TP and 200tick SL.
KDJ J Value Strategy (Weekly)This strategy is based on the KDJ indicator at the weekly level, using the changes in the J value to generate buy and sell signals. When the J value drops below -5, it is considered a buy signal; when the J value rises above 90, it is considered a sell signal.
The 950 Bar StrategyNQ 9:50 AM Candle Strategy v3 (Trade at 9:55AM) - 1 Contract
Also called the 950 Standard. The 950 Strategy.
This strategy places its trade at 9:55am each day based on the close of the 9:50am candle. Uses 5min timeframe candles. If candle closes red, or bearish, the strategy goes short. If candle closes green, or bullish, the strategy goes long. Brackets are 150tick TP and 200tick SL.
RSI Deviation & Correlation by DINVESTORQOverview:
This indicator analyzes the Relative Strength Index (RSI) over 252 days, calculating its mean (average) and standard deviation. Based on this, it sets an upper and lower threshold to determine overbought and oversold conditions.
Additionally, it calculates the correlation between RSI and price using a moving average, helping traders understand if RSI is moving in sync with price trends.
Key Features:
✅ RSI Deviation Bands
Upper Limit = RSI Avg + (2 × SD × 2.5)
Lower Limit = RSI Avg - (2 × SD × 2.5)
✅ Trading Signals:
Sell Signal: RSI crosses above the upper limit
Buy Signal: RSI drops below the lower limit
✅ RSI-Price Correlation Moving Average
Uses 50-day correlation between RSI and price
Helps confirm trend strength
✅ Customizable Parameters
RSI Length (Default: 252 Days)
Correlation Period (Default: 50 Days)
✅ Chart Visuals:
Plots RSI (blue), Upper Band (red), Lower Band (green)
Plots RSI-Price Correlation (orange)
Buy/Sell signals appear on chart
TradingView Indicator: RSI Deviation & Correlation Indicator
Overview:
This indicator analyzes the Relative Strength Index (RSI) over 252 days, calculating its mean (average) and standard deviation. Based on this, it sets an upper and lower threshold to determine overbought and oversold conditions.
Additionally, it calculates the correlation between RSI and price using a moving average, helping traders understand if RSI is moving in sync with price trends.
Key Features:
✅ RSI Deviation Bands
Upper Limit = RSI Avg + (2 × SD × 2.5)
Lower Limit = RSI Avg - (2 × SD × 2.5)
✅ Trading Signals:
Sell Signal: RSI crosses above the upper limit
Buy Signal: RSI drops below the lower limit
✅ RSI-Price Correlation Moving Average
Uses 50-day correlation between RSI and price
Helps confirm trend strength
✅ Customizable Parameters
RSI Length (Default: 252 Days)
Correlation Period (Default: 50 Days)
✅ Chart Visuals:
Plots RSI (blue), Upper Band (red), Lower Band (green)
Plots RSI-Price Correlation (orange)
Buy/Sell signals appear on chart
Pine Script for TradingView:
pinescript
Copy
Edit
//version=5
indicator("RSI Deviation & Correlation Indicator", overlay=false)
// User Inputs
length = input.int(252, title="RSI Period")
corr_length = input.int(50, title="Correlation Period")
// RSI Calculation
rsi_value = ta.rsi(close, length)
// Calculate Mean and Standard Deviation of RSI
rsi_avg = ta.sma(rsi_value, length)
rsi_sd = ta.stdev(rsi_value, length) * 2.5
// Define Upper and Lower Limits
upper_limit = rsi_avg + (rsi_sd * 2)
lower_limit = rsi_avg - (rsi_sd * 2)
// Buy and Sell Signals
buy_signal = rsi_value < lower_limit
sell_signal = rsi_value > upper_limit
// Correlation Moving Average between RSI and Price
rsi_price_correlation = ta.correlation(rsi_value, close, corr_length)
// Plot RSI with Bands
plot(rsi_value, title="RSI", color=color.blue)
plot(upper_limit, title="Upper Limit", color=color.red, linewidth=2)
plot(lower_limit, title="Lower Limit", color=color.green, linewidth=2)
plot(rsi_avg, title="Average RSI", color=color.gray, linewidth=2)
// Display Buy/Sell Signals on Chart
plotshape(buy_signal, location=location.bottom, color=color.green, style=shape.labelup, title="BUY Signal", size=size.small)
plotshape(sell_signal, location=location.top, color=color.red, style=shape.labeldown, title="SELL Signal", size=size.small)
// Plot Correlation Moving Average
plot(rsi_price_correlation, title="RSI-Price Correlation", color=color.orange, linewidth=2)
// Alerts for Buy/Sell
alertcondition(buy_signal, title="BUY Alert", message="RSI is below the Lower Limit - BUY Signal")
alertcondition(sell_signal, title="SELL Alert", message="RSI is above the Upper Limit - SELL Signal")
How to Use in TradingView:
1️⃣ Open TradingView and go to the Pine Editor
2️⃣ Paste the above Pine Script
3️⃣ Click Add to Chart
4️⃣ Adjust RSI Length and Correlation Period if needed
5️⃣ Buy/Sell alerts will trigger when conditions match
Trading Strategy:
📉 Sell (Short Entry) when RSI crosses above the upper limit
📈 Buy (Long Entry) when RSI drops below the lower limit
📊 Confirm trends with RSI-Price Correlation:
+1 means RSI and price are moving together
-1 means RSI and price are diverging
Final Notes:
Works best on higher timeframes (Daily, Weekly)
Helps filter overbought/oversold false signals
Can be combined with other indicators (MACD, Bollinger Bands, etc.)
AMD Session Structure Levels# Market Structure & Manipulation Probability Indicator
## Overview
This advanced indicator is designed for traders who want a systematic approach to analyzing market structure, identifying manipulation, and assessing probability-based trade setups. It incorporates four core components:
### 1. Session Price Action Analysis
- Tracks **OHLC (Open, High, Low, Close)** within defined sessions.
- Implements a **dual tracking system**:
- **Official session levels** (fixed from the session open to close).
- **Real-time max/min tracking** to differentiate between temporary spikes and real price acceptance.
### 2. Market Manipulation Detection
- Identifies **manipulative price action** using the relationship between the open and close:
- If **price closes below open** → assumes **upward manipulation**, followed by **downward distribution**.
- If **price closes above open** → assumes **downward manipulation**, followed by **upward distribution**.
- Normalized using **ATR**, ensuring adaptability across different volatility conditions.
### 3. Probability Engine
- Tracks **historical wick ratios** to assess trend vs. reversal conditions.
- Calculates **conditional probabilities** for price moves.
- Uses a **special threshold system (0.45 and 0.03)** for reversal signals.
- Provides **real-time probability updates** to enhance trade decision-making.
### 4. Market Condition Classification
- Classifies market conditions using a **wick-to-body ratio**:
```pine
wick_to_body_ratio = open > close ? upper_wick / (high - low) : lower_wick / (high - low)
```
- **Low ratio (<0.25)** → Likely a **trend day**.
- **High ratio (>0.25)** → Likely a **range day**.
---
## Why This Indicator Stands Out
### ✅ Smarter Level Detection
- Uses **ATR-based dynamic levels** instead of static support/resistance.
- Differentiates **manipulation from distribution** for better decision-making.
- Updates probabilities **in real-time**.
### ✅ Memory-Efficient Design
- Implements **circular buffers** to maintain efficiency:
```pine
var float manipUp = array.new_float(lookbackPeriod, 0.0)
var float manipDown = array.new_float(lookbackPeriod, 0.0)
```
- Ensures **constant memory usage**, even over extended trading sessions.
### ✅ Advanced Probability Calculation
- Utilizes **conditional probabilities** instead of simple averages.
- Incorporates **market context** through wick analysis.
- Provides **actionable signals** via a probability table.
---
## Trading Strategy Guide
### **Best Entry Setups**
✅ Wait for **price to approach manipulation levels**.
✅ Confirm using the **probability table**.
✅ Check the **wick ratio for context**.
✅ Enter when **conditional probability aligns**.
### **Smart Exit Management**
✅ Use **distribution levels** as **profit targets**.
✅ Scale out **when probabilities shift**.
✅ Monitor **wick percentiles** for confirmation.
### **Risk Management**
✅ Size positions based on **probability readings**.
✅ Place stops at **manipulation levels**.
✅ Adjust position size based on **trend vs. range classification**.
---
## Configuration Tips
### **Session Settings**
```pine
sessionTime = input.session("0830-1500", "Session Hours")
weekDays = input.string("23456", "Active Days")
```
- Match these to your **primary trading session**.
- Adjust for different **market opens** if needed.
### **Analysis Parameters**
```pine
lookbackPeriod = input.int(50, "Lookback Period")
low_threshold = input.float(0.25, "Trend/Range Threshold")
```
- **50 periods** is a good starting point but can be optimized per instrument.
- The **0.25 threshold** is ideal for most markets but may need adjustments.
---
## Market Structure Breakdown
### **Trend/Continuation Days**
- **Characteristics:**
✅ Small **opposing wicks** (minimal counter-pressure).
✅ Clean, **directional price movement**.
- **Bullish Trend Day Example:**
✅ Small **lower wicks** (minimal downward pressure).
✅ Strong **closes near the highs** → **Buyers in control**.
- **Bearish Trend Day Example:**
✅ Small **upper wicks** (minimal upward pressure).
✅ Strong **closes near the lows** → **Sellers in control**.
### **Reversal Days**
- **Characteristics:**
✅ **Large opposing wicks** → Failed momentum in the initial direction.
- **Bullish Reversal Example:**
✅ **Large upper wick early**.
✅ **Strong close from the lows** → **Sellers failed to maintain control**.
- **Bearish Reversal Example:**
✅ **Large lower wick early**.
✅ **Weak close from the highs** → **Buyers failed to maintain control**.
---
## Summary
This indicator systematically quantifies market structure by measuring **manipulation, distribution, and probability-driven trade setups**. Unlike traditional indicators, it adapts dynamically using **ATR, historical probabilities, and real-time tracking** to offer a structured, data-driven approach to trading.
🚀 **Use this tool to enhance your decision-making and gain an objective edge in the market!**
5-Min Trendline Breakout Based on H1 S/R [ABU SETTS]Trail, just wrote and still doing tuning.
What Changed?
Fixed plotshape Size Argument:- Added a switch statement to convert the input string (breakout_label_size) into a const string (label_size).
This ensures the size argument in plotshape receives a valid const string.
Improved Flexibility: - The breakout_label_size input now works correctly with plotshape and label.new.
How to Use
Adjust the Pivot Length, Slope Multiplier, and other inputs to customize the script.
Use the Breakout Label Size dropdown to select the size of the breakout labels (tiny, small, or normal).
Toggle Show Only Confirmed Breakouts to filter out unconfirmed signals.
USDT.D + USDT.C ALL TIMEFRAMESThis indicator combines the dominance of USDT (USDT.D) and USDC (USDC.D) to track total stablecoin market share across all timeframes. It displays the combined dominance as candlesticks, providing a clearer view of market liquidity shifts and investor sentiment.
📌 How to Use:
Green candles indicate rising stablecoin dominance (potential risk-off sentiment).
Red candles indicate declining stablecoin dominance (potential risk-on sentiment).
Works on all timeframes, from intraday scalping to macro trend analysis.
This tool is essential for traders looking to analyze stablecoin liquidity flow, identify market turning points, and refine trading strategies based on stablecoin dominance behavior. 🚀
XAU/USD Strategy: Candlestick Patterns Buy/SellThis indicator combines several technical analysis tools to generate buy and sell signals for XAU/USD (gold) based on candlestick patterns, RSI, Supertrend, and market structure (Swing High/Low). Here's a breakdown of how it works:
1. Input Parameters:
RSI Length & Levels:
rsi_length: The period for calculating the Relative Strength Index (RSI), defaulted to 14.
rsi_overbought: The overbought level for RSI, defaulted to 70.
rsi_oversold: The oversold level for RSI, defaulted to 30.
Supertrend Settings:
supertrend_atr: The period for the Average True Range (ATR), defaulted to 10.
supertrend_mult: The multiplier for the ATR in the Supertrend calculation, defaulted to 3.
Label Size: Controls the text size for the labels (Small, Normal, or Large).
Swing Length: Determines the lookback period to identify the highest high and lowest low for market structure analysis.
2. Exponential Moving Averages (EMAs):
Four EMAs (20, 50, 100, and 200 periods) are calculated, though they aren't directly used in the signal generation in this script.
3. RSI Calculation:
The RSI is calculated with the user-defined length (rsi_length) and is used to identify overbought and oversold conditions. If RSI is below the oversold level (30), it suggests a potential buy, and if RSI is above the overbought level (70), it suggests a potential sell.
4. Supertrend Calculation:
The Supertrend is calculated based on the ATR (with supertrend_atr length) and the user-defined multiplier (supertrend_mult).
The Supertrend Direction is determined by whether the price is above or below the Supertrend:
Direction = 1 (bullish) when the close is above the Supertrend upper band.
Direction = -1 (bearish) when the close is below the Supertrend lower band.
Direction = 0 (neutral) when the close is in between the bands.
5. Market Structure (SMC):
Swing Highs and Lows: The script identifies the highest high and lowest low over the last swing_length periods.
Last High and Last Low: These values are stored to be used in the signal generation logic.
6. Candlestick Patterns:
Bullish Engulfing: This pattern occurs when the current candle is bullish and fully engulfs the previous bearish candle.
Bearish Engulfing: This pattern occurs when the current candle is bearish and fully engulfs the previous bullish candle.
7. Signal Generation:
Buy Signal:
The RSI is below the oversold level (RSI < 30).
The Supertrend is bullish (direction = 1).
The price is above the last low.
OR: A bullish engulfing candlestick pattern occurs.
Sell Signal:
The RSI is above the overbought level (RSI > 70).
The Supertrend is bearish (direction = -1).
The price is below the last high.
OR: A bearish engulfing candlestick pattern occurs.
8. Label Plotting:
When a buy signal is generated:
A label is plotted below the candlestick indicating a "Buy" action, showing whether it was triggered by the RSI + Supertrend or by a Bullish Engulfing pattern.
A green line is drawn from the candlestick low to the buy label.
When a sell signal is generated:
A label is plotted above the candlestick indicating a "Sell" action, showing whether it was triggered by the RSI + Supertrend or by a Bearish Engulfing pattern.
A red line is drawn from the candlestick high to the sell label.
9. Alert Conditions:
Alerts are set for both buy and sell signals so that traders can receive notifications when a signal occurs for XAU/USD.
Summary:
This indicator generates buy and sell signals based on a combination of the RSI (for overbought/oversold conditions), Supertrend (for trend direction), market structure (Swing High/Low), and candlestick patterns (Bullish/Bearish Engulfing). Labels are plotted on the chart indicating the trade type, and lines connect the labels to the respective candlesticks. Alerts can be triggered when buy or sell conditions are met, making it a comprehensive strategy for trading XAU/USD (gold).
Optimized Smart Money Concept for BTCUSDThis indicator is designed to detect breakouts based on a simplified version of the Smart Money Concept (SMC) for BTCUSD and uses risk/reward calculations for trade management. Here's how it works:
1. Input Parameters:
Risk/Reward Ratio: This determines the target profit relative to the stop loss. For BTCUSD, the default is set to a 2:1 ratio (i.e., for every dollar risked, the target profit is two dollars).
Lookback Period for Swing High/Low: This is the number of bars used to look back to identify the highest high and lowest low, which help in determining the stop-loss levels. A larger lookback is used to account for BTCUSD's volatility.
2. Breakout Pattern:
Bullish Breakout Condition:
The first candle (index 2) is bearish (close < open).
The second candle (index 1) is bullish (close > open).
The third candle is also bullish (close > open), and it closes higher than the second candle.
Bearish Breakout Condition:
The first candle (index 2) is bullish (close > open).
The second candle (index 1) is bearish (close < open).
The third candle is also bearish (close < open), and it closes lower than the second candle.
3. Swing Points for Stop Loss:
Lowest Low (Long Stop Loss): The lowest low over the defined lookback period.
Highest High (Short Stop Loss): The highest high over the defined lookback period.
4. Stop Loss and Take Profit Calculation:
For Long (Buy) Trades:
Stop Loss is placed at the lowest low over the lookback period.
Take Profit is calculated by adding the difference between the entry price (current close) and the stop loss, multiplied by the risk/reward ratio (e.g., 2:1).
For Short (Sell) Trades:
Stop Loss is placed at the highest high over the lookback period.
Take Profit is calculated by subtracting the difference between the entry price and the stop loss, multiplied by the risk/reward ratio.
5. Conditions for Buy and Sell:
A buy condition is triggered when the bullish breakout pattern occurs.
A sell condition is triggered when the bearish breakout pattern occurs.
6. Plotting Buy/Sell Signals:
When a long (buy) condition is met, a label is placed below the candlestick with the entry price, take-profit (TP), and stop-loss (SL) levels. A line is drawn connecting the label to the low of the candlestick.
When a short (sell) condition is met, a label is placed above the candlestick with the entry price, TP, and SL levels. A line is drawn connecting the label to the high of the candlestick.
7. Breakout Debugging:
The indicator uses plotshape() to visually mark where bullish and bearish breakout patterns are detected on the chart with green (bullish) and red (bearish) shapes, respectively.
In Summary:
The indicator looks for specific bullish and bearish breakout patterns, calculates the stop-loss and take-profit levels based on swing points and a risk/reward ratio, and then plots buy/sell labels on the chart with the corresponding entry, TP, and SL values. It also provides a visual marker for each breakout pattern detected for debugging or confirmation purposes.
Three Bar Reversal & Pattern Signals with TP, SL This indicator identifies a "Three Bar Reversal" pattern and provides buy/sell signals along with stop-loss (SL), take-profit (TP), and entry prices based on mean reversion. Here’s a breakdown of how it works:
Inputs:
Text Size: The user can choose the size of the label text displayed on the chart, with options like tiny, small, normal, large, and huge.
Buy/Sell Label Colors: Users can set the colors for the buy and sell labels.
Buy/Sell Text Colors: The user can set the text color for the buy and sell labels.
Identifying Reversal Patterns:
Bullish Reversal: The indicator looks for a bullish reversal pattern where:
The first bar (index 2) is bullish (close > open).
The second bar (index 1) has a low price lower than the first bar.
The close of the current bar is higher than the high of the second bar.
Bearish Reversal: A bearish reversal is identified when:
The first bar (index 2) is bearish (close < open).
The second bar (index 1) has a high price higher than the first bar.
The close of the current bar is lower than the low of the second bar.
Mean Reversion (SMA) Calculation:
The script calculates a 20-period simple moving average (SMA) of the close prices (mean_price), which is used as a reference for setting stop-loss and take-profit levels.
Risk to Reward Ratio (1:1.5):
The risk-to-reward ratio is set at 1.5:1. This means the take-profit target is 1.5 times the distance from the entry price to the stop-loss.
Stop-Loss and Take-Profit Calculation:
Buy Signal:
Stop-Loss is placed 1% below the mean price.
Take-Profit is calculated based on the risk-to-reward ratio from the entry price.
Sell Signal:
Stop-Loss is placed 1% above the mean price.
Take-Profit is calculated similarly based on the risk-to-reward ratio.
Creating Labels:
When a bullish or bearish reversal pattern is detected:
A label is drawn on the chart showing the entry price, TP, and SL for the trade.
Alerts are triggered when a buy or sell signal is detected, displaying the relevant entry, TP, and SL levels.
Line Drawing:
A blue line is drawn at the low price of the reversal pattern to visually represent the reversal point.
In summary, the indicator combines a reversal pattern detection (Three Bar Reversal) with mean reversion, setting stop-loss and take-profit levels based on the 20-period moving average and a defined risk-to-reward ratio. Labels with the trade details (entry, TP, SL) are plotted, and alerts are triggered whenever a reversal pattern is identified.