Market Structure🏗️ Market Structure Indicator for TradingView (Pine Script v6)
Overview:
The Market Structure indicator is a robust tool for identifying swing highs and swing lows across multiple structural levels:
🟤 Short-Term Swings
🟠 Intermediate-Term Swings
🟢 Long-Term Swings
It helps traders visually interpret market structure by detecting confirmed pivot points and promoting them through a hierarchical system. This provides a clear picture of trend direction, breakouts, and reversals.
⚙️ Features and Functionality:
✅ Multi-level Swing Detection:
The indicator promotes confirmed swing points from short-term to intermediate and long-term levels using a structured algorithm.
✅ Full Customization:
Toggle visibility of each swing level independently.
Choose custom colors for short, intermediate, and long-term swings.
✅ Transparent and Commented Logic:
The code contains well-structured functions for identifying and confirming swing highs and lows.
Label arrays are used for precise control over swing detection and display.
✅ Detailed and Open Source Code:
Every function is thoroughly explained with inline comments.
Designed to be easy to understand, modify, and extend — perfect for learning or integrating into more advanced systems.
📜 Open and Documented Source Code
The script is entirely open-source, written in Pine Script v6, and includes full documentation inside the code itself. Key sections include:
🔧 Input settings and visual configuration
🧠 Swing detection and confirmation methods
🔁 Promotion logic between structure levels
📈 Real-time label drawing on each bar
Everything is fully accessible and explained — no obfuscation, no hidden logic.
Indicatori e strategie
Double Banded Momentum CloudDouble Banded Momentum Cloud (DBMC) extends the logic of BMC by layering two volatility bands around a moving average to create stacked momentum thresholds. It compares a fast Exponential Moving Average (EMA) to a slow Simple Moving Average (SMA), while introducing inner and outer bands based on standard deviation multipliers.
SMA defines the central trend anchor.
EMA captures short-term price momentum.
Band A (inner) represents normal volatility range.
Band B (outer) flags extended or extreme conditions.
Momentum Cloud between EMA and SMA visualizes bias.
By observing how the EMA interacts with these bands, traders can distinguish between ordinary momentum and more aggressive or potentially exhausted moves.
AO Divergence StrategyQuick strategy tester to set up and find the best indicator values
Recommended values:
AO Fast EMA/SMA Length: 5
AO Slow EMA/SMA Length: 25
Use EMA instead of SMA for AO: ❌ (unchecked)
Right Lookback Pivot: 24
Left Lookback Pivot: 18
Maximum Lookback Range: 60
Minimum Lookback Range: 5
Bullish Trace: ✅
Hidden Bullish Trace: ❌
Bearish Trace: ✅
Hidden Bearish Trace: ❌
Status Line Input: ✅
Do your own testing and research, don't just rely on the posting chart that differs from the recommended settings.
Trinity Multi Time Frame Trend DashboardNote: This is based on trading view indicator but I am unsure the original name or author to give recognition. If you know the name of the indicator or author then please let me know and I can update this script to give recognition.
Below is a list of the changes this code has gone through and all settings are editable.
Changes:
Changed: timeline from 5 to 3 mins for faster scalping, changed the RSI, CCI and MACD values for faster signals as well as the below to update the code to latest pine script and for optimizations.
Structure and Optimization: The original script used individual variables for each timeframe (e.g., emaFast_3min, emaFast_15min), leading to repetitive code. The latest version uses arrays (e.g., emaFast as array.new_float(7, na)) to store values for all timeframes, making the code more compact and maintainable. However, due to Pine Script limitations with loops and request.security, the calculations are unrolled (explicitly computed for each timeframe i=0 to 6) instead of using a loop for security calls.
Timeframe Handling: Removed the timeframes array in the final version (as loops couldn't be used with variable timeframes in request.security due to requiring 'simple string' arguments). Instead, hardcoded the timeframe strings ("3", "15", etc.) directly in each block. Kept timeframe_labels array for display purposes.
Volume Calculation: Precomputed volume3 for the 3M timeframe outside the blocks. For 15M and 30M, used ta.sma(volume3, 3) and ta.sma(volume3, 6) respectively, as in the original, but integrated into unrolled blocks. Renamed volume arrays to tfVolume and tfVma to avoid conflicts with built-in volume.
MACD Calculation: In the original, used to ignore the histogram. The latest version does the same but assigns to temporary variables like macd0, signal0 for each timeframe to avoid tuple assignment issues.
Trend Determination: Used arrays for all boolean conditions (e.g., isBullish as array.new_bool(7, false)). Set values in a loop, which works since no security calls are involved here.
Added Signal Row: Introduced a new row in the table labeled "Signal". For each timeframe, it shows:
"Buy" (green) if EMA, MACD, RSI, and CCI are all bullish.
"Sell" (red) if all are bearish.
"⚠" (yellow) if not fully aligned
Table Dimensions: Updated the table to 9, 8 (columns, rows) to accommodate the new "Signal" row.
Color for Signal: In the table cell for signal, added coloring: green for "Buy", red for "Sell", yellow for "⚠".
Array Declarations: Used array.new_float, array.new_bool, etc., without qualifiers to fix template errors. Initialized with na for floats/colors, false for bools, "" for strings.
Error Fixes: Resolved various syntax/type issues, such as avoiding series in array templates, ensuring 'simple string' for timeframes in request.security, and proper tuple unpacking for MACD.
Overall Code Length: The latest version is longer due to unrolled calculations but more robust and error-free.
PRO Investing - Apex EnginePRO Investing - Apex Engine
1. Core Concept: Why Does This Indicator Exist?
Traditional momentum oscillators like RSI or Stochastic use a fixed "lookback period" (e.g., 14). This creates a fundamental problem: a 14-period setting that works well in a fast, trending market will generate constant false signals in a slow, choppy market, and vice-versa. The market's character is dynamic, but most tools are static.
The Apex Engine was built to solve this problem. Its primary innovation is a self-optimizing core that continuously adapts to changing market conditions. Instead of relying on one fixed setting, it actively tests three different momentum profiles (Fast, Mid, and Slow) in real-time and selects the one that is most synchronized with the current price action.
This is not just a random combination of indicators; it's a deliberate synthesis designed to create a more robust momentum tool. It combines:
Volatility analysis (ATR) to generate adaptive lookback periods.
Momentum measurement (ROC) to gauge the speed of price changes.
Statistical analysis (Correlation) to validate which momentum measurement is most effective right now.
Classic trend filters (Moving Average, ADX) to ensure signals are only taken in favorable market conditions.
The result is an oscillator that aims to be more responsive in volatile trends and more stable in quiet periods, providing a more intelligent and adaptive signal.
2. How It Works: The Engine's Three-Stage Process
To be transparent, it's important to understand the step-by-step logic the indicator follows on every bar. It's a process of Adapt -> Validate -> Signal.
Stage 1: Adapt (Dynamic Length Calculation)
The engine first measures market volatility using the Average True Range (ATR) relative to its own long-term average. This creates a volatility_factor. In high-volatility environments, this factor causes the base calculation lengths to shorten. In low-volatility, they lengthen. This produces three potential Rate of Change (ROC) lengths: dynamic_fast_len, dynamic_mid_len, and dynamic_slow_len.
Stage 2: Validate (Self-Optimizing Mode Selection)
This is the core of the engine. It calculates the ROC for all three dynamic lengths. To determine which is best, it uses the ta.correlation() function to measure how well each ROC's movement has correlated with the actual bar-to-bar price changes over the "Optimization Lookback" period. The ROC length with the highest correlation score is chosen as the most effective profile for the current moment. This "active" mode is reflected in the oscillator's color and the dashboard.
Stage 3: Signal (Normalized Velocity Oscillator)
The winning ROC series is then normalized into a consistent oscillator (the Velocity line) that ranges from -100 (extreme oversold) to +100 (extreme overbought). This ensures signals are comparable across any asset or timeframe. Signals are only generated when this Velocity line crosses its signal line and the trend filters (explained below) give a green light.
3. How to Use the Indicator: A Practical Guide
Reading the Visuals:
Velocity Line (Blue/Yellow/Pink): The main oscillator line. Its color indicates which mode is active (Fast, Mid, or Slow).
Signal Line (White): A moving average of the Velocity line. Crossovers generate potential signals.
Buy/Sell Triangles (▲ / ▼): These are your primary entry signals. They are intentionally strict and only appear when momentum, trend, and price action align.
Background Color (Green/Red/Gray): This is your trend context.
Green: Bullish trend confirmed (e.g., price above a rising 200 EMA and ADX > 20). Only Buy signals (▲) can appear.
Red: Bearish trend confirmed. Only Sell signals (▼) can appear.
Gray: No clear trend. The market is likely choppy or consolidating. No signals will appear; it is best to stay out.
Trading Strategy Example:
Wait for a colored background. A green or red background indicates the market is in a tradable trend.
Look for a signal. For a green background, wait for a lime Buy triangle (▲) to appear.
Confirm the trade. Before entering, confirm the signal aligns with your own analysis (e.g., support/resistance levels, chart patterns).
Manage the trade. Set a stop-loss according to your risk management rules. An exit can be considered on a fixed target, a trailing stop, or when an opposing signal appears.
4. Settings and Customization
This script is open-source, and its settings are transparent. You are encouraged to understand them.
Synaptic Engine Group:
Volatility Period: The master control for the adaptive engine. Higher values are slower and more stable.
Optimization Lookback: How many bars to use for the correlation check.
Switch Sensitivity: A buffer to prevent frantic switching between modes.
Advanced Configuration & Filters Group:
Price Source: The data source for momentum calculation (default close).
Trend Filter MA Type & Length: Define your long-term trend.
Filter by MA Slope: A key feature. If ON, allows for "buy the dip" entries below a rising MA. If OFF, it's stricter, requiring price to be above the MA.
ADX Length & Threshold: Filters out non-trending, choppy markets. Signals will not fire if the ADX is below this threshold.
5. Important Disclaimer
This indicator is a decision-support tool for discretionary traders, not an automated trading system or financial advice. Past performance is not indicative of future results. All trading involves substantial risk. You should always use proper risk management, including setting stop-losses, and never risk more than you are prepared to lose. The signals generated by this script should be used as one component of a broader trading plan.
Price discovery indicatorGives an ability to show places where price drops more than n percent in x candles. Use cases: see dips of btc, get a notification when a stablecoin goes crazy, validate that webhook integration works as expected using keep alive messages.
Features included:
- Price dip alerts. Create an alert that sends a notification every time price dips more than expected (yellow zone at the chart).
- Percentage drop threshold. Define how many percents price should drop to trigger an alert and to show a yellow zone.
- Candles length threshold. Define within how many candles this drop should happen. If price drops in 2% within 10 candles, but this option is 5 - the alert will not be triggered because price dropped not as fast as expected.
- Templates of messages on price dip and price recovery. Set your message that should be triggered with alert.
- Keep alive feature. Set to trigger keep alive alerts every period. Can be helpful if you don't check charts often - this feature will trigger alert every period with "hey, the integration is alive" message. I use it to validate on weekly basis that tradingview triggers my alerts (example: you created an alert with expiration date and forgot to recreate it), that webhook integration receives these alerts, that the integration sends these alerts to telegram. Example: I expect to see this message every monday's morning, otherwise something is broken and I have to check what is wrong with my alerting system.
Confirmed Entry Grid Pro//@version=5
indicator("Confirmed Entry Grid Pro", overlay=true)
// === المتوسطات ===
ma9 = ta.sma(close, 9)
ma21 = ta.sma(close, 21)
ma200 = ta.sma(close, 200)
// === الاتجاه ===
trendBull = close > ma200
trendBear = close < ma200
// === الزخم ===
rsi = ta.rsi(close, 14)
rsiBull = rsi > 50
rsiBear = rsi < 50
// === الحجم ===
volMA = ta.sma(volume, 20)
volHigh = volume > volMA
// === شموع ابتلاعية ===
bullEngulf = close > open and open < close and close > open
bearEngulf = close < open and open > close and close < open
// === بولنجر باند ===
basis = ta.sma(close, 20)
dev = ta.stdev(close, 20)
upper = basis + 2 * dev
lower = basis - 2 * dev
bbBreakUp = close > upper
bbBreakDown = close < lower
// === دعم / مقاومة ديناميكية ===
support = ta.lowest(low, 20)
resistance = ta.highest(high, 20)
nearSupport = math.abs(close - support) / close < 0.015
nearResistance = math.abs(close - resistance) / close < 0.015
// === تقاطع المتوسطات ===
crossUp = ta.crossover(ma9, ma21)
crossDown = ta.crossunder(ma9, ma21)
// === ATR ===
atr = ta.atr(14)
atrActive = atr > ta.sma(atr, 14)
// === SMC: BOS + CHOCH ===
bosUp = high > high and low > low
bosDown = low < low and high < high
chochUp = close > high and close < high
chochDown = close < low and close > low
smcBuy = bosUp and chochUp
smcSell = bosDown and chochDown
// === مناطق السيولة ===
liqHigh = ta.highest(high, 30)
liqLow = ta.lowest(low, 30)
liquidityBuyZone = close < liqLow
liquiditySellZone = close > liqHigh
// === حساب النقاط لكل صفقة ===
buyScore = (trendBull ? 1 : 0) + (rsiBull ? 1 : 0) + (volHigh ? 1 : 0) + (bullEngulf ? 1 : 0) + (smcBuy ? 1 : 0) + (bbBreakUp ? 1 : 0) + (nearSupport ? 1 : 0) + (crossUp ? 1 : 0) + (atrActive ? 1 : 0) + (liquidityBuyZone ? 1 : 0)
sellScore = (trendBear ? 1 : 0) + (rsiBear ? 1 : 0) + (volHigh ? 1 : 0) + (bearEngulf ? 1 : 0) + (smcSell ? 1 : 0) + (bbBreakDown ? 1 : 0) + (nearResistance ? 1 : 0) + (crossDown ? 1 : 0) + (atrActive ? 1 : 0) + (liquiditySellZone ? 1 : 0)
// === شروط الإشارات مع منع التكرار خلال آخر 5 شموع ===
var int lastBuyBar = na
var int lastSellBar = na
canBuy = buyScore >= 5 and (na(lastBuyBar) or bar_index - lastBuyBar > 5)
canSell = sellScore >= 5 and (na(lastSellBar) or bar_index - lastSellBar > 5)
if canBuy
lastBuyBar := bar_index
if canSell
lastSellBar := bar_index
showBuy = canBuy
showSell = canSell
// === طول الخطوط ===
var int lineLen = 5
// === رسم الإشارات ===
plotshape(showBuy, title="BUY", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.green)
plotshape(showSell, title="SELL", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.red)
// === خطوط الصفقة ===
var line buyLines = array.new_line(0)
var line sellLines = array.new_line(0)
if (showBuy)
entry = low
label.new(bar_index, entry, "Entry " + str.tostring(entry, format.mintick), style=label.style_label_left, textcolor=color.white, size=size.normal)
tpLevels = array.new_float(5)
array.set(tpLevels, 0, 0.618)
array.set(tpLevels, 1, 1.0)
array.set(tpLevels, 2, 1.272)
array.set(tpLevels, 3, 1.618)
array.set(tpLevels, 4, 2.0)
slLevel = -0.618
for i = 0 to 4
fibLabel = "TP" + str.tostring(i + 1) + " - Fib " + str.tostring(array.get(tpLevels, i))
tp = entry + array.get(tpLevels, i) * atr
line = line.new(bar_index, tp, bar_index + lineLen, tp, color=color.green)
label.new(bar_index + lineLen, tp, fibLabel + " (TP" + str.tostring(i + 1) + ") " + str.tostring(tp, format.mintick), style=label.style_label_right, textcolor=color.lime, size=size.normal)
array.push(buyLines, line)
sl = entry + slLevel * atr
slLine = line.new(bar_index, sl, bar_index + lineLen, sl, color=color.red)
label.new(bar_index + lineLen, sl, "SL " + str.tostring(sl, format.mintick), style=label.style_label_right, textcolor=color.red, size=size.normal)
array.push(buyLines, slLine)
if (showSell)
entry = high
label.new(bar_index, entry, "Entry " + str.tostring(entry, format.mintick), style=label.style_label_left, textcolor=color.white, size=size.normal)
tpLevels = array.new_float(5)
array.set(tpLevels, 0, -0.618)
array.set(tpLevels, 1, -1.0)
array.set(tpLevels, 2, -1.272)
array.set(tpLevels, 3, -1.618)
array.set(tpLevels, 4, -2.0)
slLevel = 0.618
for i = 0 to 4
fibLabel = "TP" + str.tostring(i + 1) + " - Fib " + str.tostring(math.abs(array.get(tpLevels, i)))
tp = entry + array.get(tpLevels, i) * atr
line = line.new(bar_index, tp, bar_index + lineLen, tp, color=color.green)
label.new(bar_index + lineLen, tp, fibLabel + " (TP" + str.tostring(i + 1) + ") " + str.tostring(tp, format.mintick), style=label.style_label_right, textcolor=color.green, size=size.normal)
array.push(sellLines, line)
sl = entry + slLevel * atr
slLine = line.new(bar_index, sl, bar_index + lineLen, sl, color=color.red)
label.new(bar_index + lineLen, sl, "SL " + str.tostring(sl, format.mintick), style=label.style_label_right, textcolor=color.red, size=size.normal)
array.push(sellLines, slLine)
// === متابعة نتائج الصفقة ===
// تحقق نجاح الصفقة (وصل أول TP)
buyHitTP = showBuy and high >= low + 0.618 * atr
sellHitTP = showSell and low <= high - 0.618 * atr
// تحقق فشل الصفقة (ضرب SL)
buyHitSL = showBuy and low <= low - 0.618 * atr
sellHitSL = showSell and high >= high + 0.618 * atr
// رسم الإشارة
plotshape(buyHitTP, title="Buy Success", style=shape.labelup, location=location.abovebar, color=color.green, size=size.small)
plotshape(sellHitTP, title="Sell Success", style=shape.labelup, location=location.abovebar, color=color.green, size=size.small)
plotshape(buyHitSL, title="Buy Failed", style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small)
plotshape(sellHitSL, title="Sell Failed", style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small)
God's Plan 7.1This is a buy/sell indicator containing the code for the Top Bottom indicator, VWAP and 9 EMA.
Buy conditions are Top Bottom buy and 9 EMA crossing above the VWAP.
Sell conditions are Top Bottom sell and 9 EMA crossing below the VWAP.
C signals indicate continuations.
Zero TOD constraints.
This is a simple strategy to help train the eye to recognize trend shifts and potential entries.
It is important for the users of this strategy to use their own logic when determining stop loss and targets.
Thank you to all of the coders and creators that have provided us with inspiration for this strategy. Happy trading!
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
todaywewin73
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
0 comments
Alert Bot v3Open Range Automation. Set a time for the opening range levels of a symbol. Indicator automatically plots the opening range support and resistance lines.
EMAs + VWAP + SMADaytrade Dream:
5 EMAs
1SMA
VWAP
This script is used to plot on the chart:
5 EMAS:
10,20,50,100 and 200
VWAP:
White Vwap line
1 SMA:
200 SMA
High-Mid-Low 200 Day and Buy Levels and labels
Volume-Scaled PVR with Dynamic Buy Levels (ETF investing Visual Aid)
Description
This indicator is designed primarily for exchange-traded fund (ETF) traders and investors who seek a broad, visual tool to assist in identifying favorable buy and sell regions based on key price levels in relation to High and Lows of the ETF.
Key Features
Lookback Reference Levels:
Automatically identifies and plots key price levels within a user-defined lookback period:
Period High: Highest price in the lookback window.
Period Low: Lowest price in the lookback window.
Mid-Line: Midpoint between the period high and low.
Detailed Percentage Labels:
Displays percentage distances from the current price to the period high, period low, and their respective most recent occurrences, along with bar-counts for context, allowing quick assessment of price positioning relative to significant recent highs and lows.
Dynamic Buy-Level Lines for Multiple ETFs:
Supports a configurable list of ETF tickers with predefined buy price levels. When charting one of these ETFs, a horizontal line and label mark the specified buy price level, serving as a visual reminder or guide for entries.
Lightweight and Visual:
Designed to overlay directly on price charts with minimal clutter, providing clean and insightful visual references to inform buy-low and sell-high decisions.
How It Helps You
Offers broad, contextual cues to guide "buy low, sell high" strategies on ETFs by visualizing:
Where price currently stands within recent high/low ranges.
Specific buy price levels personalized for tracked ETFs as a check before committing.
Flexible lookback parameters allow tuning sensitivity to your preferred timeframes and trading style.
Usage Notes
Customize the list of ETFs and associated buy prices within the script via arrays to suit your watchlist. (Make a working copy to update Arrays, ensure pair matching).
Best applied on daily or higher timeframes for clearer trend dynamics.
This is a visual aid and should be combined with your own analysis and risk management techniques and other standard/established indicators.
Prev Day High/Low + 15min Range Boxes//@version=5
indicator("Prev Day High/Low + 15min Range Boxes (Next Day Display)", overlay=true, dynamic_requests=true)
rth_tz = "America/New_York"
rth_start = timestamp(rth_tz, year, month, dayofmonth, 9, 30)
rth_end = timestamp(rth_tz, year, month, dayofmonth, 16, 0)
// Get 15-minute data
= request.security(syminfo.tickerid, "15", )
// Define yesterday's RTH
curr = time("15")
prev = curr - 24 * 60 * 60 * 1000
yesterday_start = timestamp(rth_tz, year(prev), month(prev), dayofmonth(prev), 9, 30)
yesterday_end = timestamp(rth_tz, year(prev), month(prev), dayofmonth(prev), 16, 0)
// Collect yesterday's RTH extremes
var float prevHigh = na
var float prevLow = na
var int prevHighTime = na
var int prevLowTime = na
var float prevHighBody = na
var float prevLowBody = na
inRTH_yesterday = time15 >= yesterday_start and time15 <= yesterday_end
if inRTH_yesterday
if na(prevHigh) or hi15 > prevHigh
prevHigh := hi15
prevHighTime := time15
prevHighBody := na
if na(prevLow) or lo15 < prevLow
prevLow := lo15
prevLowTime := time15
prevLowBody := na
// Capture the body of the next 15m candle after the extremes
highNextCond = not na(prevHighTime) and time15 == prevHighTime + 15 * 60 * 1000
lowNextCond = not na(prevLowTime) and time15 == prevLowTime + 15 * 60 * 1000
if highNextCond
prevHighBody := math.max(op15, cl15)
if lowNextCond
prevLowBody := math.min(op15, cl15)
// ⏱ Today’s RTH
today_start = timestamp(rth_tz, year, month, dayofmonth, 9, 30)
today_end = timestamp(rth_tz, year, month, dayofmonth, 16, 0)
inRTH_today = time >= today_start and time <= today_end
// Draw the yellow boxes on current RTH using previous day’s high/low
var box highBox = na
var box lowBox = na
if inRTH_today and not na(prevHigh) and not na(prevHighBody)
if na(highBox)
highBox := box.new(left=today_start, right=today_end, top=prevHigh, bottom=prevHighBody,
xloc=xloc.bar_time, border_color=color.yellow, bgcolor=color.new(color.yellow, 70), border_width=1)
if inRTH_today and not na(prevLow) and not na(prevLowBody)
if na(lowBox)
lowBox := box.new(left=today_start, right=today_end, top=prevLowBody, bottom=prevLow,
xloc=xloc.bar_time, border_color=color.yellow, bgcolor=color.new(color.yellow, 70), border_width=1)
Confirmed Entry Grid Pro//@version=5
indicator("Confirmed Entry Grid Pro", overlay=true,
max_lines_count=500, max_labels_count=500,
title="Confirmed Entry Grid Pro")
// === إعدادات المستخدم ===
showImpulse = input.bool(true, "Show Impulse Wave")
showShrinkWarning = input.bool(true, "Shrink Warning")
minConfirmations = input.int(5, "Minimum Confirmations", minval=3, maxval=10)
// === المتوسطات ===
ma9 = ta.sma(close, 9)
ma21 = ta.sma(close, 21)
ma200 = ta.sma(close, 200)
// === الاتجاه ===
trendBull = close > ma200
trendBear = close < ma200
// === الزخم ===
rsi = ta.rsi(close, 14)
rsiBull = rsi > 50
rsiBear = rsi < 50
// === الحجم ===
volMA = ta.sma(volume, 20)
volHigh = volume > volMA
// === شموع ابتلاعية ===
bullEngulf = close > open and open < close and close > open
bearEngulf = close < open and open > close and close < open
// === بولنجر باند ===
basis = ta.sma(close, 20)
dev = ta.stdev(close, 20)
upper = basis + 2 * dev
lower = basis - 2 * dev
bbBreakUp = close > upper
bbBreakDown = close < lower
// === دعم / مقاومة ديناميكية ===
support = ta.lowest(low, 20)
resistance = ta.highest(high, 20)
nearSupport = math.abs(close - support) / close < 0.015
nearResistance = math.abs(close - resistance) / close < 0.015
// === تقاطع المتوسطات ===
crossUp = ta.crossover(ma9, ma21)
crossDown = ta.crossunder(ma9, ma21)
// === ATR ===
atr = ta.atr(14)
atrActive = atr > ta.sma(atr, 14)
// === SMC: BOS + CHOCH + Impulsive Wave ===
bosUp = high > high and low > low
bosDown = low < low and high < high
chochUp = close > high and close < high
chochDown = close < low and close > low
smcBuy = bosUp and chochUp
smcSell = bosDown and chochDown
// === الموجة الدافعة (مؤشر اختياري لإشارة دخول قوية)
impulseWaveSell = close <= close and close <= close and close <= close and close < open
impulseWave = close >= close and close >= close and close >= close and close > open
// === مناطق السيولة ===
liqHigh = ta.highest(high, 30)
liqLow = ta.lowest(low, 30)
liquidityBuyZone = close < liqLow
liquiditySellZone = close > liqHigh
// === حساب النقاط لكل صفقة ===
buyScore = (trendBull ? 1 : 0) + (rsiBull ? 1 : 0) + (volHigh ? 1 : 0) + (bullEngulf ? 1 : 0) + (smcBuy ? 1 : 0) + (bbBreakUp ? 1 : 0) + (nearSupport ? 1 : 0) + (crossUp ? 1 : 0) + (atrActive ? 1 : 0) + (liquidityBuyZone ? 1 : 0)
sellScore = (trendBear ? 1 : 0) + (rsiBear ? 1 : 0) + (volHigh ? 1 : 0) + (bearEngulf ? 1 : 0) + (smcSell ? 1 : 0) + (bbBreakDown ? 1 : 0) + (nearResistance ? 1 : 0) + (crossDown ? 1 : 0) + (atrActive ? 1 : 0) + (liquiditySellZone ? 1 : 0)
// === شروط الإشارات مع منع التكرار خلال آخر 5 شموع ===
var int lastBuyBar = na
var int lastSellBar = na
canBuy = buyScore >= 5 and impulseWave and (na(lastBuyBar) or bar_index - lastBuyBar > 3)
canSell = sellScore >= 5 and impulseWaveSell and (na(lastSellBar) or bar_index - lastSellBar > 3)
if canBuy
lastBuyBar := bar_index
if canSell
lastSellBar := bar_index
showBuy = canBuy and buyScore >= minConfirmations
showSell = canSell and sellScore >= minConfirmations
// === طول الخطوط ===
var int lineLen = 5
// === رسم الإشارات ===
plotshape(showBuy, title="BUY", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.green)
plotshape(showImpulse and impulseWave, title="Impulsive Buy", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.lime, text="IB")
plotshape(showSell, title="SELL", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.red)
plotshape(showImpulse and impulseWaveSell, title="Impulsive Sell", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.maroon, text="IS")
// === خطوط الصفقة ===
var line buyLines = array.new_line(0)
var line sellLines = array.new_line(0)
if (showBuy)
entry = close
label.new(bar_index, entry, "Entry " + str.tostring(entry, format.mintick), style=label.style_label_left, textcolor=color.white, size=size.normal)
tpLevels = array.from(0.618, 1.0, 1.272, 1.618, 2.0)
for i = 0 to array.size(tpLevels) - 1
fib = array.get(tpLevels, i)
tp = entry + fib * atr
fibLabel = "TP" + str.tostring(i + 1) + " - Fib " + str.tostring(fib)
line = line.new(bar_index, tp, bar_index + lineLen, tp, color=color.green)
label.new(bar_index + lineLen, tp, fibLabel + " " + str.tostring(tp, format.mintick), style=label.style_label_right, textcolor=color.lime, size=size.normal)
array.push(buyLines, line)
sl = entry - 0.618 * atr
slLine = line.new(bar_index, sl, bar_index + lineLen, sl, color=color.red)
label.new(bar_index + lineLen, sl, "SL " + str.tostring(sl, format.mintick), style=label.style_label_right, textcolor=color.red, size=size.normal)
array.push(buyLines, slLine)
if (showSell)
entry = close
label.new(bar_index, entry, "Entry " + str.tostring(entry, format.mintick), style=label.style_label_left, textcolor=color.white, size=size.normal)
tpLevels = array.from(-0.618, -1.0, -1.272, -1.618, -2.0)
for i = 0 to array.size(tpLevels) - 1
fib = array.get(tpLevels, i)
tp = entry + fib * atr
fibLabel = "TP" + str.tostring(i + 1) + " - Fib " + str.tostring(math.abs(fib))
line = line.new(bar_index, tp, bar_index + lineLen, tp, color=color.green)
label.new(bar_index + lineLen, tp, fibLabel + " " + str.tostring(tp, format.mintick), style=label.style_label_right, textcolor=color.green, size=size.normal)
array.push(sellLines, line)
sl = entry + 0.618 * atr
slLine = line.new(bar_index, sl, bar_index + lineLen, sl, color=color.red)
label.new(bar_index + lineLen, sl, "SL " + str.tostring(sl, format.mintick), style=label.style_label_right, textcolor=color.red, size=size.normal)
array.push(sellLines, slLine)
Volatility Squeeze – Blue Zone (classic) Volatility Squeeze – Blue Zone
Highlights periods when volatility contracts by showing a blue band between the Bollinger Bands (BB) whenever they fall inside the Keltner Channel (KC).
Blue zone = squeeze: BB upper & lower are inside KC – market coiling.
Automatic breakout alert: optional alert fires on the first bar after the squeeze releases.
Fully adjustable: BB/KC length, BB σ, KC ATR multiplier, zone colour & opacity, border on/off.
Clean overlay: zone hugs price bar-by-bar and disappears only when the squeeze ends, so past squeezes remain visible for context.
Use it to spot low-volatility setups, then watch for momentum or volume confirmations when the squeeze breaks.
QTR Sector Fund Performance vs SPY - by LMAnalyzes various market sectors and compares the last several quarters to the performance of the SPY. The goal is to seek out the sectors that have underperformed for several quarters in the hopes that they would overperform in the next quarter.
Buy and Sell Signals by Raja Saien📈 Buy and Sell Signals by Raja Saien 💹
"Simple. Clean. Powerful."
🔥 This indicator is built for those who believe in price action and clarity. No confusion, no clutter — just pure EMA crossover logic to catch early trends and filter false moves.
✅ Buy Signal when the 9 EMA crosses above the 21 EMA — indicating momentum shift to the upside.
❌ Sell Signal when the 9 EMA crosses below the 21 EMA — signaling potential downside momentum.
🧠 Designed for traders who trust the trend, respect momentum, and want to stay ahead of the crowd.
🔍 Perfect for scalping, intraday, and swing trading. Combine it with support/resistance or price action zones for even more 🔥 accuracy.
✨ Created by Raja Saien — for serious traders only.
💪 "Indicators don’t make you money, but discipline with clarity does."
CBC Flip SonBThis script uses several different indicators like vwap, ema's and cbc candle flips.
This script scalping script is best used on the smaller timeframes (10m, 5m)
EMA10/14/20 Trend Alignment (1st Signal Only)// ╔══════════════════════════════════════════════╗
// ║ M1 Starter Entry 10/14/20 (TH/EN) ║
// ╚══════════════════════════════════════════════╝
//
// 📌 ภาษาไทย:
// ระบบนี้ใช้ EMA 10/14/20 สำหรับจับจุดเข้าไม้ต้นเทรนด์ใน Timeframe M1
// - ออกสัญญาณ Buy เมื่อ EMA เรียงตัว 10 > 14 > 20 และแท่งเทียนยืนเหนือเส้น (โดยไม่แนบเส้นเกินไป)
// - ออกสัญญาณ Sell เมื่อ EMA เรียง 10 < 14 < 20 และแท่งอยู่ใต้เส้นทั้งหมด
// - มีการตรวจสอบระยะห่างระหว่างเส้น เพื่อหลีกเลี่ยงจุดหลอกตอน EMA ชิดกัน
// - สัญญาณออกเฉพาะ “แท่งแรก” หลังเข้าเงื่อนไขเท่านั้น
//
// 📌 English:
// This script detects early trend entries using EMA 10/14/20 on M1 timeframe.
// - Buy signal: When EMA10 > EMA14 > EMA20, and the candle closes above all EMAs
// - Sell signal: When EMA10 < EMA14 < EMA20, and the candle closes below all EMAs
// - Minimum distance between EMAs required to avoid fake signals in flat zones
// - Signals are shown only on the **first candle** that meets all conditions
//
// 🛠 เหมาะกับการใช้คู่กับระบบ MTF หรือแนวรับต้านด้วย
// Created by: คุณซี 💚
Triple Banded Momentum CloudTriple Banded Momentum Cloud (TBMC) is an advanced, customizable momentum indicator that blends multiple moving averages with layered volatility zones. It builds on the DBMC framework by allowing full control over the type and length of three distinct moving averages: signal, trend, and base.
Signal MA tracks short-term price momentum.
Trend MA anchors the core standard deviation bands.
Base MA provides long-term market context.
Three volatility bands (A/B/C) adapt dynamically to market conditions using user-defined standard deviation multipliers.
Momentum Cloud shades between signal and base for a directional read.
This tool is highly adaptable — suitable for trend-following, mean reversion, or volatility breakout strategies. Customization is key: choose MA types (SMA, EMA, RMA, etc.) to match your trading context.
52/26/13/4 High WeekThis is a tool to identify the 52-week high of a candlestick for use in breakout strategies. It can be used in conjunction with Pocket Pivot and EMA or Volume.
It is ideal for studying price behavior and trend following.
庄家入场基础指标//@version=5
indicator("庄家入场基础指标", overlay=true)
length = input.int(20, "低点周期")
volMultiplier = input.float(1.5, "成交量放大倍数")
lowestLow = ta.lowest(low, length)
avgVol = ta.sma(volume, length)
volumeSignal = volume > avgVol * volMultiplier
priceSignal = low <= lowestLow
entrySignal = priceSignal and volumeSignal
plotshape(entrySignal, title="庄家入场", location=location.belowbar, color=color.green, style=shape.labelup, text="庄", size=size.small)
MA20/EMA200 Crossover Alert# MA20/EMA200 Crossover Alert with Telegram Integration
**Description:**
This indicator identifies key trend reversals by detecting when the 20-period Simple Moving Average (MA20) crosses the 200-period Exponential Moving Average (EMA200). These crossovers are widely recognized as significant signals for medium to long-term trend changes.
**Key Features:**
- Real-time detection of MA20/EMA200 crossovers on any timeframe (optimized for 1H)
- Visual signals with up/down triangles at crossover points
- Background color highlights for easy identification
- Built-in alert system with JSON-formatted messages for Telegram webhook integration
- Clean, customizable interface with adjustable MA/EMA periods
**Signals:**
- 🟢 **Bullish Signal**: MA20 crosses above EMA200 (potential uptrend beginning)
- 🔴 **Bearish Signal**: MA20 crosses below EMA200 (potential downtrend beginning)
**Alert Integration:**
The indicator includes pre-formatted alert messages designed for direct integration with Telegram bots via webhooks. Each alert contains:
- Symbol and exchange information
- Current price at crossover
- Signal type (BULLISH/BEARISH)
- Descriptive message
**Best Use Cases:**
- Trend following strategies
- Position entry/exit timing
- Multi-timeframe analysis
- Automated trading system triggers
**Note:** This indicator works best on liquid markets and higher timeframes (1H, 4H, 1D) to reduce false signals. Always combine with other analysis methods for confirmation.
**Tags:** ma, ema, moving average, crossover, trend, telegram, alert, webhook, trading, signal