Custom Pattern: HLH//@version=6
indicator("Custom Pattern: HLH", overlay=true)
var float low1 = na
var float high1 = na
var float low2 = na
var float high2 = na
var float patternLevel = na
var line myLine = na
// توابع تشخیص قله و دره
isTop() =>
high < high and high > high
isBottom() =>
low > low and low < low
// ۱. تشخیص دره اول
if isBottom()
low1 := low
// ۲. تشخیص قله اول بعد از دره
if not na(low1) and isTop() and high < high
high1 := high
// ۳. تشخیص دره دوم بالاتر از دره اول
if not na(high1) and isBottom() and low > low1
low2 := low
// ۴. تشخیص قله سوم بین high1 و high و ثبت خط
if not na(low2) and isTop() and high > high1 and high < high
high2 := high
patternLevel := high2
// رسم خط افقی روی قله وسط
myLine := line.new(x1=bar_index, y1=patternLevel, x2=bar_index + 20, y2=patternLevel, color=color.red, width=2)
Candlestick analysis
CANX Enhanced Bill Williams FractalsBased on the well known Bill Williams Fractals but with some changes.
Smaller fractals with a more consistent intervals.
- Helps identify more recent and relevant swing points on the chart.
Ideal for identifying where to place a stop lose when you are trading subjectively.
- Great to implement into any mechanical strategy
Paired with a momentum indicator and trend lines it can indicate very accurate times to enter a trade and where to place your stop loss. Paired with the correct indicators and a basic understanding of market structure these are a very powerful tool on all markets.
Keep it simple, keep it profitable!
Real-Time Open Levels with Labels + Info TableReal-Time Multi-Timeframe Open Levels with Labels & Info Panel
Overview
This indicator displays real-time opening price levels across multiple timeframes (Monthly, Weekly, Daily, 4H) directly on your chart. It features:
• Dynamic horizontal lines extending through each timeframe period
• Customizable labels with text/colors
• Special 4H line treatment for the last hour (5-min charts only)
• Integrated information panel showing symbol, timeframe, and price changes
! (www.tradingview.com)
*Example showing multiple timeframe levels with labels and info panel*
---
Features & Configuration
1. Monthly Settings
! (www.tradingview.com)
Show Monthly: Toggle visibility of monthly opening price
Color: Semi-transparent blue (#2196F3 at 70% opacity)
Width: 2px line thickness
Style: Solid/Dotted/Dashed
Label: Display "M-Open" text with white text on blue background
2. Weekly Settings
! (www.tradingview.com)
Show Weekly: Toggle weekly opening price visibility
Color: Semi-transparent red (#FF5252 at 70% opacity)
Width: 1px thickness
Style: Dotted by default
Label: "W-Open" text in white on red background
3. Daily Settings
! (www.tradingview.com)
Show Daily: Toggle daily opening price
Color: Amber (#FFA000 at 70% opacity)
Width: 2px thickness
Style: Solid
Label: "D-Open" in white on orange background
---
4. 4-Hour Settings (5-Minute Charts Only)
Special Features for 5-Min Timeframe:
1. Standard 4H Line
• First 3 hours: Green (#4CAF50) dashed line
• Last hour: Bright red solid line (configurable)
• Vertical divider between 3rd/4th hours
2. Configuration Options
• Main 4H Line:
◦ Color/Width/Style for initial 3 hours
◦ Toggle label ("H4-Open") visibility and styling
• Final Hour Enhancement:
*Last Hour Line*
◦ Unique red color and line style
◦ Separate width (1px) and style (Solid)
*Divider Line*
◦ Vertical red dotted line marking last hour
◦ Adjustable position/width/transparency
! (www.tradingview.com)
*4H levels showing 3-hour segment and final hour treatment*
---
5. Info Panel Settings
Positioning:
• Anchor to any chart corner (Top/Bottom + Left/Right combinations)
• Three text sizes: Title (Huge), Change % (Large), Signature (Small)
Display Elements:
• Symbol: Show exchange prefix (e.g., "NASDAQ:")
• Timeframe: Current chart period (e.g., "5m")
• Change %: 24-hour price movement ▲/▼ percentage
• Custom Signature: Add text/username in footer
Styling:
• Semi-transparent white text (#ffffff77)
• Currency pair formatting (e.g., BTC/USD vs BTC-USD)
! (www.tradingview.com)
*Sample info panel with all elements enabled*
---
Usage Tips
1. Multi-Timeframe Context: Use levels to identify key daily/weekly support/resistance
2. 4H Trading: On 5-min charts, watch for price reactions near final hour transition
3. Customization:
• Match line colors to your chart theme
• Use different labels for clarity (e.g., "Weekly Open")
• Disable unused elements to reduce clutter
4. Divider Lines: Helps identify institutional trading periods (hour closes)
---
*Created using Pine Script v6. For optimal performance, use on charts <1H timeframe. ()*
Trend Revisit Pullback Strategy (Final Working Box)📈 Trend Revisit Pullback Strategy
This TradingView Pine Script strategy identifies strong trend breakouts and accounts for natural pullbacks by:
Entering long or short on strong 1-bar breakouts
Allowing for pullback averaging if price retraces after entry
Expecting a revisit to the original entry price within 15 bars
Automatically exiting at break-even or using a custom TP/SL
Drawing a visual trade zone (entry → SL → revisit window) for easy reference
Optional labels and color-coded boxes to track each trade’s lifecycle
Ideal for trend traders who anticipate a pullback and prefer to manage risk with break-even exits or reward-to-risk parameters.
Sunday OpenSunday Open – Weekly Open Levels
Description
The "Sunday Open" indicator automatically displays the market open levels for Sunday. These levels are often used by traders as potential support and resistance zones. The script requires no manual data input and works on any timeframe.
Functionality
- Displays the N most recent Sunday Open levels, including the current and previous ones.
- The color of the current level differs from the older ones, making it easier to identify on the chart.
- Lines can be customized by style, thickness, and label visibility.
- Alerts are triggered when the price crosses any Sunday Open level (either up or down).
User Settings
- Number of levels to display (1–100)
- Color for the current and past levels
- Line style: solid, dashed, dotted
Line thickness
- Display text labels on the chart
- Enable/disable alerts for price crossing
Useful For
- Quickly identifying key reference points at the beginning of the week
- Setting up trading scenarios around the open zone
- Receiving signals for breakouts or touches of the levels
Important !
All elements are created automatically—no manual drawing required.
If you want to create alerts for when the price crosses a Sunday Open level, you need to go to "Alerts" at the top of the screen and select "SO" in the "Condition" field.
Multi-Timeframe RSI Divergenceweekly RSI divergence indicator. marking are made on chart for bullish and bearish indication on charts. suggestion for improvement are welcomed for refinement.
Multi-VP POC Divergence AlertThis is a very effective POC divergence alert system I've used—hope it helps you too.
CMA Technologies RSI Mean Reversion Bot
🔷 Strategy Name: CMA Technologies – RSI Mean Reversion Bot
📈 Type: Range-Based / Mean Reversion
🕐 Recommended Timeframe: 1D (Daily) – adaptable to other assets
🌐 Developed by CMA Technologies | cmatech.co
📘 Strategy Overview:
The RSI Mean Reversion Bot by CMA Technologies is a rule-based system designed to exploit extreme momentum conditions in range-bound markets using the classic Relative Strength Index (RSI).
It detects price exhaustion by monitoring when RSI exceeds overbought (default: 70) or drops below oversold (default: 30) levels — then triggers entries upon confirmed reversal back into neutral RSI territory.
🔍 Core Logic:
Long Entry: RSI moves below 30 → then crosses back above
Short Entry: RSI rises above 70 → then crosses back below
No predictions. Just math.
This approach captures short-term reversals in sideways or slow-trending environments and avoids chasing extended trends. The system focuses on mean-reverting price behavior — a proven technique in quantitative trading.
⚙️ Parameters:
RSI Length: Default = 14
Overbought: 70
Oversold: 30
Position Sizing: Fixed unit size (no leverage assumed)
⏱️ Recommended Timeframes:
Default: 1D (Daily), ideal for spot traders or swing traders
Alternative: 4H or 1H for high-volatility coins
Each asset class may require RSI tuning based on volatility profile
🧠 Best Suited For:
Sideways or range-bound markets
Crypto, Forex, and Commodities
Traders seeking reliable, non-repainting logic
Strategy developers who want to extend it with TP/SL logic or filters
📌 Important Notes:
This is a core strategy model — you can build on top of it.
Currently, it does not include take profit or stop loss, but can be extended with ATR, fixed target levels, or trailing logic.
Works well on pairs that frequently revert from extremes.
🔬 Quant-based. Emotion-free. CMA Technologies.
📬 For more systems: cmatech.co
📈 TradingView Profile: @CMATechnologies
MFI EMA Divergence Strategypositive mfi divergence when price falls and makes a lower low but mfi makes a higher low
negative mfi divergence when price falls and makes a higher high but mfi makes a lower high
CMA Technologies Heikin-Ashi Trend Follower🔷 Strategy Name: CMA Technologies – Heikin-Ashi Trend Follower Bot
📈 Type: Trend-Following / Smoother Trend Detection
🕐 Recommended Timeframe: 1D (Daily)
📊 Test ONLY on Candlestick chart mode – NOT Heikin-Ashi chart!
📘 Strategy Overview:
This strategy captures clean directional trends using Heikin-Ashi candle logic.
Heikin-Ashi candles are great for visual clarity — they smooth out noise and highlight directional moves. This bot leverages that by waiting for two consecutive same-direction candles before entering a trade:
📗 2 Bullish HA candles → Long Entry
📕 2 Bearish HA candles → Short Entry
❌ Exit is triggered when a candle of opposite direction appears
This helps reduce fakeouts and allows the bot to ride trends longer with cleaner logic.
⚠️ IMPORTANT NOTICE – Backtest Correctly:
DO NOT use the “Heikin-Ashi” chart type when testing this bot.
Pine Script always runs on raw candlestick data — but if your chart is Heikin-Ashi, you’ll see fake or delayed results.
✅ Always backtest on normal candles, even though the logic uses Heikin-Ashi internally.
✅ We recommend using the 1D timeframe for optimal trend clarity.
⚙️ Parameters & Logic:
Trend Confirmation: 2 consecutive HA candles in same direction
Exit on HA candle flip
Position Size: 50% of equity
Commission: 0.05%
Max Pyramiding: 5
🧠 Best For:
Swing traders who want to ride trends longer
Traders who hate noise and need visual confirmation
Assets with clean trending phases (crypto majors, indices, gold)
📌 CMA Technologies – We build structure inside volatility.
📈 More bots on our TradingView profile: @CMATechnologies
Trend Dönüş Algoritması - Linear Regression + HacimIt gives a signal when the linear regression slope of the price turns from positive to negative or from negative to positive (i.e. when the trend changes) and at the same time there is an increase in volume.
Thus, there is both a trend reversal and volume confirmation.
These signals can be more reliable for the beginning and end of the trend.
Valtoro Trading BotThis PineScript code defines a trading strategy based on moving average crossovers with additional conditions and risk management. Here's a breakdown:
Strategy Overview
1%-2% Daily Profit!
The strategy uses two Simple Moving Averages (SMA) with periods of 100 and 200. It generates buy and sell signals based on the crossover of these MAs, combined with RSI (Relative Strength Index) conditions.
Buy and Sell Conditions
Buy: Short MA crosses over Long MA, RSI < 70, and close price > open price.
Sell: Short MA crosses under Long MA, RSI > 30, and close price < open price.
Close Conditions
Close Long: Short MA crosses under Long MA or RSI > 80.
Close Short: Short MA crosses over Long MA or RSI < 20.
Risk Management
Stop Loss: 2% of the entry price.
Take Profit: 5% of the entry price.
Position Sizing
The strategy calculates the position size based on a risk percentage (1% of equity) and the stop loss percentage.
Some potential improvements to consider:
1. Optimize parameters: Experiment with different MA periods, RSI thresholds, and risk management settings to improve strategy performance.
2. Add more conditions: Consider incorporating other technical indicators or market conditions to refine the strategy.
3. Test on different assets: Evaluate the strategy's performance on various assets and timeframes.
Market Signal Suite (No Funding)A universal indicator for short-term and medium-term trading without taking into account funding.
2-Candle Reversal with Hammer + MA + RSI (Buy Alert)First Candle (Setup Candle):
Hammer:
Lower wick ≥ 2 × real body
Close is:
Below MA20 and MA200
MA20 is below MA200 (bearish environment)
RSI < 40
Second Candle (Confirmation Candle):
Higher Low
Higher High and Close above previous high
1R Breakout Highlighter1R Breakout. This indicator measures every bar and highlights any bar that is greater than the previous bar by more than 1R.
Candle % High/Low Bar + HL Order + MA by Barty&PitPapcioWhat does the indicator show?
The "Candle % High/Low Bar + HL Order + MA by Barty&PitPapcio" indicator displays the percentage deviation of each candle’s high and low relative to its open price. The zero line represents the candle’s open — bars above zero show upward movement from the open (to high), bars below zero show downward movement (to low).
Additionally, the indicator plots a dot above or below each bar indicating which came first during the candle — the high or the low — based on data from a lower timeframe two steps below the current chart (for example, on a 1-hour chart it uses 15-minute data).
Finally, the indicator calculates and plots a user-selectable moving average (EMA, SMA, or WMA) of these "first high or low" signals, helping identify trends whether the first move is more often upwards or downwards.
Where do the data come from?
Percentage values are calculated directly from the current chart’s candles:
highPerc=(High−Open)/Open×100%,
lowPerc=(Low−Open)/Open×100%
The timing of the first high or low for each candle is retrieved from a lower timeframe, stepping down two levels from the current timeframe (e.g. from 1H to 15 min), providing better precision in detecting the order of highs and lows that may be blurred on higher timeframes.
Additional features:
Full customization of colors for bars, dots, zero line, grid, and thicknesses.
Background grid with adjustable scale and style.
Safety checks for missing lower timeframe data.
A moving average smoothing the sequence of first high/low signals to reveal directional tendencies.
Suggested strategy for technical analysis support
Identify dominant candle direction: If the dot often appears above the bar (first high), it indicates buying pressure; if below (first low), selling pressure dominates.
Use percentage deviations: Large percent bars indicate heightened volatility and potential reversal points.
Moving average on order signals: The EMA of high/low first signals smooths the noise, showing the dominant trend in the sequence of price moves, useful for filtering other signals.
Combine with other tools: This indicator can act as a directional filter on multiple timeframes, synergizing well with momentum indicators, RSI, or support/resistance levels to confirm move strength.
Lots of love, Bartosz
Gustavo LiquidityThis script draws a user-colored horizontal ray on each green candle and places a blue flag at the ray’s end if the price touches the ray again within a specified number of future bars.
Gamma Blast Detector (Nifty)The Gamma Blast Detector (Nifty) is a custom TradingView indicator designed to help intraday traders identify sudden and explosive price movements—commonly referred to as "gamma blasts"—in the Nifty index during the final minutes of the trading session, particularly on expiry days. These movements are typically caused by rapid delta changes in ATM options, resulting in aggressive short-covering or option unwinding.
This indicator specifically monitors price action between 3:10 PM and 3:20 PM IST, which translates to 09:40 AM to 09:50 AM UTC on TradingView. It is optimized for use on 5-minute charts of the Nifty spot or futures index, where gamma-driven volatility is most likely to occur during this time window.
The core logic behind the indicator involves identifying unusually large candles within this time frame. It compares the size of the current candle to the average size of the previous five candles. If the current candle is at least twice as large and shows clear direction (bullish or bearish), the script flags it as a potential gamma blast. A bullish candle suggests a Call Option (CE) is likely to blast upward, while a bearish candle points to a Put Option (PE) gaining sharply.
When such a condition is detected, the indicator visually marks the candle on the chart: a "CE 🚀" label is shown below the candle for a bullish move, and a "PE 🔻" label appears above for a bearish move. It also includes alert conditions, allowing users to set real-time alerts for potential blasts and act quickly.
This tool is especially useful for expiry day scalpers, option traders, and anyone looking to ride momentum generated by gamma effects in the final minutes of the market. It provides a visual and alert-based edge to anticipate short-term, high-impact moves often missed in normal technical analysis.
Opening Range Breakout Detector📈 Opening Range Breakout Detector (TF-Independent)
Tracks breakouts with precision. No matter the chart, no matter the timeframe.
This indicator monitors whether price breaks above or below the Opening Range across multiple key durations — 1m, 5m, 10m, 15m, 30m, 45m, and 60m — using 1-minute data under the hood, while you can work on higher timeframe charts (daily, etc.).
Highlights:
✅ Status table shows which ORs broke UP or DOWN
⏱ Control which timeframes to track
🖼 Customizable table position, size and colors
Crafted by @FunkyQuokka
Bullish Engulfing Below MA20 with MA Conditions (Buy Alert)Timeframe: 1 hour
MA Conditions: MA20 < MA200
Pattern: Bullish Engulfing (current candle's body fully engulfs previous candle's body)
Location: Pattern must occur below MA20
Buy Signal: Triggered at close of the engulfing candle
Plot MA20 and MA200 on the chart
Grid Tendence Long V1The “Grid Tendence Long V1” strategy is based on the classic Grid strategy, only in this case the entries and exits are made in favor of the trend and only in Long. This allows to take advantage of large trend movements to maximize profits in bull markets. Like our Grid strategies in favor of the trend, you can enter and exit with the entire balance with a controlled risk, because the distance between each grid works as a natural and adaptable stop loss and take profit. What makes it different from bidirectional strategies, is that a minimum amount of follow-through is used in Short, so that the percentage distance between the grids is maintained.
In this version of the script the entries and exits can be chosen at market or limit, and are based on the profit or loss of the current position, not on the percentage change of the price.
Like all strategies, it is recommended to optimize the parameters so that the strategy is effective for each asset and for each time frame.
No Supply / No Demand Candle AlertsNo Supply Candle: A No Supply candle generally has a large body (close near high) with low volume. So, you would likely want the body percentage to be high, meaning the price action is concentrated near the high of the candle.
No Demand Candle: A No Demand candle generally has a large body (close near low) with low volume. You would want a high body percentage but with the close near low.
Super YZH Modelsma200 and sma20 especially works 30m 1h. candle filter, the wick must be more than %50 of total candle. sma200 and sma20 must ne in trend. the wick must be on sma20 than we need body closure from this canlde
Weekly RSI DivergenceMarks divergences on price and RSI on price chart. arrows arrears where DIVERGENCE occcure. green indicates bullish red is bearish. to be cross checked with price and used. any suggeston is welcome