Search in scripts for "GOLD"
GoldilocksTrader – Institutional Zones + Smart Money Market ModeThe GoldilocksTrader – Smart Money Trading System is a powerful institutional-grade tool designed for traders who want to follow real liquidity, identify institutional zones, and accurately read Smart Money market structure.
This indicator automatically detects Supply & Demand Zones, plots Institutional Pivot Levels, builds dynamic fade-strength heatmaps, and labels the current Market Mode (ACCUMULATE, DISTRIBUTE, WAIT)—all powered by a clean, real-time algorithm that updates with every candle.
This system helps you understand where banks, hedge funds, and institutions are likely to defend price, accumulate positions, or engineer liquidity sweeps. It makes complex Smart Money concepts simple, visual, and trader-friendly.
🧠 Core Features
✔ Institutional Supply & Demand Zones (auto-detected from swing pivots)
✔ Smart Money fade-strength heatmap using multi-layered boxes
✔ Market Mode Detection:
• ACCUMULATE – Smart Money loading long positions
• DISTRIBUTE – Smart Money unloading into premium levels
• WAIT – Neutral / imbalance zones
✔ EMA 9/21 Trend Filters
✔ VWAP Institutional Bias Filter
✔ Nearest Above/Below Liquidity Zones with clean readability
✔ Adjustable Transparency & Zone Thickness
✔ Compact On-Chart Legend (optional)
✔ Extremely lightweight, low-lag, optimized for all markets/timeframes
✔ Works for Forex, Crypto, Stocks, Indices, Futures, Commodities
📈 Trading Concepts Covered
This indicator is built around world-class concepts used by top proprietary desks and Smart Money traders, including:
ICT (Inner Circle Trader) Supply/Demand
Liquidity Zones & Institutional Order Blocks
Wyckoff Accumulation / Distribution
Imbalance & Fair Value Behavior (FVG-style fades)
Market Maker Models (MMXM + Premium/Discount Zones)
Pivot-based liquidity mapping
VWAP Institutional Bias
Trend Continuation vs. Reversal Zones
If you trade SMC, ICT, Wyckoff, Smart Money, Algo-based models, or institutional liquidity, this indicator is a perfect companion.
🚀 How It Helps You Trade
🔹 Identify hidden institutional levels where real accumulation or distribution occurs
🔹 Avoid bad trades by staying out of “WAIT” zones where most of the retail market enters.
🔹 Time entries during premium vs. discount pricing
🔹 Understand where price is expected to react, reverse, or continue
🔹 Visualize institutional pressure with fade-strength heatmaps
🔹 Combine with your own strategy to increase precision and confidence
🎨 Clean, Professional Visualization
Zones auto-extend to the left for historical context
Fade opacity increases or decreases depending on zone strength
Market Mode label plotted dynamically near relevant price zones
Optional compact legend for fast reading
All elements can be toggled and customized to your style.
⭐ Created by GoldilocksTrader™
For more institutional-level tools—including the new and soon to be popular "GoldilocksTrader Buy-Sell Signals with Built-In Optimizer"—search:
👉 “GoldilocksTrader” on TradingView
👉 Visit GoldilocksTrader.com for premium systems & education
Follow the institutions.
Trade Smart.
Trade Goldilocks™..."it's just right"
GOLD FUTURES TRADING STRATEGY AND SIGNALS WITH PERFORMANCE GOLD FUTURES GOLD1! , GOLDM , GC Trading Strategy And Signals, With Performance For Different Time Frames.
We present to your attention an indicator that, based on a strategy, generates buy / sell arrow signals and a gold futures trading strategy, which has shown its effectiveness in numerous tests on different time frames.
The strategy is based on a combination of ATR, Moving Average, MACD and RSI indicators.
If you consider gold as a tool for earning then active trading on the exchange, your choice is gold futures (gold futures). This derivative almost completely copies the movement of the price of physical gold, and is used by traders around the world to obtain from the fluctuations in the price of gold.
The strategy showed the best results for timeframes: H1, H2, H4, D1.
Recommended timeframe for this strategy: D1.
The strategy uses take-profit and stop-loss, which reduces risk and allows you to effectively use its trading, as well as the process of making trading decisions and predicting the movement of the gold price.
Gold and silver futures can be used to hedge against inflation, speculative play, an alternative investment grade, or as a commercial hedging method for investors looking for opportunities beyond traditional equities and fixed income securities.
The script can generate alters "Buy" and "Sell".
The presented indicator of signals for gold futures, as well as the strategy, can complement your existing strategy and increase its performance, and can also be considered as an independent trading strategy for gold futures contracts.
Full Screenshot chart with performance here.
Golden Pocket Syndicate [GPS]Golden Pocket Syndicate is a multi-layered market analysis toolkit built for precision entries and sniper-style reversals in both trending and ranging conditions. The script fuses volume dynamics, golden pocket structures, market maker behavior, and liquidation cluster tracking into one high-confluence system.
Core Features:
• 📐 Golden Pocket Zones: Dynamic GP levels from daily, weekly, monthly, and yearly timeframes. These levels update in real-time and serve as confluence zones for entries and exits.
• 📊 WaveTrend Divergence Diamonds: Momentum shifts are detected using a custom filtered WaveTrend cross system to mark high-probability reversal conditions.
• 🧠 Market Maker Premium Divergence: Tracks price dislocation between CME and Binance to detect large player manipulation using a configurable premium threshold.
• 💎 MM Reversal Diamonds: Identifies potential market maker traps and large player pivots using historical candle behavior, EMA alignment, and price structure breaks.
• 📉 Stealth Liquidation Cluster Arrows: Volume-based liquidation pressure visualized as lightweight directional arrows based on calculated wick expansion and volume bursts. Highlights key zones where price is likely to bounce or reject.
• 🧭 Trend Validation: Uses volume-based trend conditions and short-term EMA positioning to further qualify signals and eliminate noise.
How to Use:
This indicator is designed to help traders visualize confluence between key institutional price levels, momentum shifts, and volume-based pressure points. Long/short opportunities can be explored at marked reversal diamonds or liquidation zones that align with key GP levels. Intended for use on higher timeframes (15m to 4H), though flexible across any pair or market.
GOLDEN EDGE PRO 2H█ GOLDEN EDGE PRO — MACD 2H for XAUUSD ( FXOPEN:XAUUSD )
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ STOP scrolling through strategies with fake numbers.
You've seen them. "500% profit!" on a 3-month backtest. Looks amazing until you extend it to 2 years and watch it collapse.
This is different.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ THE REAL NUMBERS (Jan 2023 — Dec 2025)
┌─────────────────────────────────────┐
│ Net Profit: +109.18% │
│ Profit Factor: 19.97 │
│ Max Drawdown: 3.50% │
│ Win Rate: 59.38% │
│ Total Trades: 32 │
│ Avg Win/Loss: 34.9 : 1 │
└─────────────────────────────────────┘
Yes, you read that right. Profit Factor of nearly 20.
Not because of curve-fitting. Because of relentless optimization.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WHY THIS STRATEGY EXISTS
I spent mass of hours developing this.
Not copying indicators from the internet.
Not asking ChatGPT to write code.
Actually testing. Actually optimizing. Actually failing — until I didn't.
This is a MACD-based strategy, but not the MACD you know.
It's been engineered specifically for GOLD (XAUUSD) on the 2-hour timeframe.
Every parameter has been stress-tested across:
- Thousands of TP multiplier combinations
- Multiple market conditions (trending, ranging, volatile)
- 2.9 years of price data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ BACKTESTING DONE RIGHT
This strategy was tested with ALL premium settings enabled:
✅ Bar Magnifier — for accurate intrabar simulation
✅ Recalculate on every tick — no lookahead bias
✅ Recalculate after order filled — realistic execution
✅ Slippage: 2 ticks — because real markets slip
✅ Commission: 0.01% — because brokers take their cut
Most strategies fall apart when you turn these on.
This one was BUILT with them on.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WHAT YOU GET
📊 Optimized entry & exit logic for XAUUSD
📊 Clean, readable code (no obfuscation tricks)
📊 Configurable TP/SL multipliers
📊 Long & Short modes (Long recommended)
📊 Alert-ready for automation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ A WORD OF HONESTY
Will this strategy make you rich overnight? No.
No single strategy will. Anyone who tells you otherwise is lying.
But this CAN be a cornerstone of a diversified trading system.
I'm building more strategies across different assets and timeframes.
Follow my profile if you want access to the full ecosystem.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ RECOMMENDED SETTINGS
- Asset: XAUUSD (Gold)
- Timeframe: 2H
- TP Multiplier: 1.06 (optimized) or 1.52
- Mode: Long Only (highest performance)
- Broker: Any with tight gold spreads like ( FXOPEN:XAUUSD )
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ NEED HELP?
Want to automate this with MetaTrader, NinjaTrader, or Telegram alerts?
I offer integration services. DM me.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 FOLLOW for more battle-tested strategies
⭐ LIKE if this adds value
💬 COMMENT your questions — I actually respond
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#gold #xauusd #macd #tradingstrategy #algotrading #backtested
Golden Zone Structure [Kodexius]Golden Zone Structure is a ZigZag based market structure and Fibonacci tool designed to make swing context easier to read directly on the price chart. It detects meaningful pivot highs and lows, labels the evolving structure (HH, HL, LH, LL, including equal highs and lows), and automatically projects a Fibonacci map across the most recent completed swing.
Instead of forcing you to manually anchor Fib tools after every new leg, the script rebuilds levels each time a fresh pivot is confirmed. This makes it well suited for traders who focus on swing continuation, pullback depth, and reaction zones where liquidity and orderflow often concentrate.
A key emphasis is the Golden Zone highlight. The indicator shades the zone that is most relevant to the current swing context so you can quickly spot where a retracement is approaching a higher probability reaction area, without cluttering the chart with too many permanent objects.
The tool is intentionally visual and configurable. You can choose pivot source (High/Low or Close), adjust swing sensitivity via ZigZag period, switch color themes, and decide how much detail you want on screen (levels, zigzag lines, labels).
Optional trading markers can be enabled for users who want a lightweight “zone interaction” prompt. These markers are not intended as a standalone trading system. They are meant to complement your own confirmation rules (structure alignment, volume, higher timeframe bias, or price action triggers).
🔹Features
🔸 ZigZag Swing Engine
- Uses a configurable ZigZag period to filter noise and confirm swing points only when the lookback logic validates the move.
Supports different pivot sources (High/Low or Close) so you can choose between cleaner structure or more reactive behavior depending on the instrument.
Optional ZigZag leg drawing to visualize swing flow without clutter.
🔸 Market Structure Labels (HH, HL, LH, LL + Equals)
- Automatically labels each confirmed pivot based on how it compares to the prior pivot of the same type.
High side classification: H, HH, LH, EH.
Low side classification: L, HL, LL, EL.
Equal highs and lows help reveal potential liquidity pools and “magnet” areas where price often reacts or breaks with intent.
🔸 Auto Fibonacci Map on the Active Swing
- Rebuilds Fibonacci levels every time a new pivot is confirmed, keeping the projection aligned with the most recent completed leg.
Core retracement levels: 0.236, 0.382, 0.500, 0.618, 0.786.
Extension levels: 1.272 and 1.618 for expansion targeting and continuation mapping.
Optional price labels on each level, formatted to tick size so levels remain readable across markets.
🔸 Golden Zone Highlighting (Context Aware)
- Highlights the most relevant retracement band with a soft fill so you can spot “zone approach” moments at a glance.
The zone selection adapts to swing context, focusing on a different retracement region depending on whether the last confirmed pivot is a peak or a trough.
Adjustable transparency keeps the chart clean while preserving the key reaction area.
🔸 Visual Customization + Themes
- Multiple color themes (Neon, Ocean, Sunset, Monochrome) so the tool fits different chart styles and backgrounds.
Independent toggles for Fib levels, Golden Zone shading, ZigZag lines, and price labels.
Line width controls for better scaling across timeframes.
🔸 Optional Trading Markers + Alerts
- Optional BUY and SELL labels based on zone interaction logic with candle confirmation filters.
ATR based placement offset scaled by sensitivity so labels stay visually separated during volatility.
Built in alert conditions for new pivot highs and new pivot lows so you can monitor structure changes without watching every bar.
▶ Practical Usage Tip
• Use structure labels to define bias (HH + HL for bullish structure, LH + LL for bearish structure).
• Use the Golden Zone as a location filter, then wait for your own trigger (break of minor structure, rejection candle, volume shift, etc.).
• Treat extensions as “map points” not guaranteed targets. They work best when structure supports continuation.
Golden Cross Strategy & BacktesterGolden Cross Strategy & Backtester 📈🚀
Overview
This script provides a complete backtesting environment for the classic Golden Cross trend-following strategy. It is designed to be simple, visual, and easy to use. 💪
The strategy operates on the following logic:
🔼 Long Entry: A "Buy" signal is generated when the short-term moving average (Short MA) crosses above the long-term moving average (Long MA).
🔽 Exit: The position is closed when the short-term moving average crosses back below the long-term moving average (a "Death Cross").
The background of the chart will be shaded green 🎨 during periods when the strategy is holding an active position.
How to Use for Backtesting 🔬
This is a strategy script, which means its main purpose is to test the historical performance of this trading idea.
Add this script to your chart.
Open the "Strategy Tester" panel at the bottom of your chart.
In the "Overview" and "Performance" tabs, you can see detailed results 📊, such as the Net Profit and Max Drawdown, to evaluate the strategy's effectiveness.
Customization ⚙️
You can easily customize the strategy's parameters without editing the code.
Click the Settings/Gear icon (⚙️) next to the script's name on your chart.
In the "Inputs" tab, you can change:
📏 Short MA Length: The period for the fast-moving average (default is 50).
📏 Long MA Length: The period for the slow-moving average (default is 200).
In the "Properties" tab, you can change:
💰 Initial Capital: The starting balance for the backtest.
Feel free to test different settings to find what works best for your preferred asset and timeframe! Happy testing! 🎉
Golden/Death Cross Predictor (by Alex L.)Golden/Death Cross indicator to picture if we're in a Bull or Bear trend, but it's much more - it indicates a potential upcoming golden/death cross, draws a potential continuation of the moving averages to indicate when it might occur, shows a 4-hourly cross which can often alert of a potential trend reversal, and is multi timeframe!
Potential Golden/Death Cross Mark - shows a potential upcoming golden/death cross (with approximate % for its occurrence as a hint).
Potential Golden/Death Cross Projection - shows a potential continuation of the MAs to visually illustrate when the potential cross might occur.
Actual Golden/Death Cross Mark - all previous golden/death crosses are marked on chart with a green/red "X" (which is when indicator's "Short Term MA" crosses "Long Term MA" up or down).
Actual 4-hourly Golden/Death Cross Mark - shows latest golden/death cross on 4-hourly timeframe (regardless of chart's timeframe), which can alert of potential higher timeframe trend reversal.
Multi Timeframe - you can set indicator's timeframe having chart in different timeframe.
Enjoy!
GoldenCross Strategy by ClefsphereGolden cross when 50SMA crosses 200SMA. Can be used for any market. Day time frame is ideal.
Golden Cross, SMA 200 Moving Average Strategy (by ChartArt)This famous moving average strategy is very easy to follow to decide when to buy (go long) and when to take profit.
The strategy goes long when the faster SMA 50 (the simple moving average of the last 50 bars) crosses above the slower SMA 200. Orders are closed when the SMA 50 crosses below the SMA 200. This simple strategy does not have any other stop loss or take profit money management logic. The strategy does not short and goes long only!
Here is an article explaining the "golden cross" strategy in more detail:
www.stockopedia.com
On the S&P 500 index (symbol "SPX") this strategy worked on the daily chart 81% since price data is available since 1982. And on the DOW Jones Industrial Average (symbol "DOWI") this strategy worked on the daily chart 55% since price data is available since 1916. The low number of trades is in both cases not statistically significant though.
All trading involves high risk; past performance is not necessarily indicative of future results. Hypothetical or simulated performance results have certain inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not actually been executed, the results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
Gold Thai CompassGold Thai Compass Indicator
Calculates Thai Gold Price (96.5%) by converting XAU/USD with the USD/THB exchange rate in real time
Displays the calculated gold_price_thb directly on the chart with a clean right-aligned label for easy price reading
Includes customizable reference lines — add, remove, rename, recolor, and adjust each line independently
Supports multiple editable lines (e.g., 4 levels) with price labels displayed beside each line
Provides user-friendly input settings (e.g., custom price sources, spread/adjustment options)
Updates dynamically with live market data — suitable for trading, analysis, and Thai gold price tracking
Designed for TradingView (Pine Script) and optimized for clarity and usability
Optional visibility controls to show/hide labels and reference lines for a cleaner chart layout
GOLD SCALPERGOLD SCALPER is an advanced trading indicator specifically designed for scalping on GOLD markets. It combines an ultra-fast prediction line with optimized Support & Resistance levels, providing a unique approach to GOLD trading.
Key Features
Ultra-Fast Prediction Line
The indicator contains the only directional indicator in the chart - an ultra-fast prediction line that reacts instantly to price changes. The line is drawn on every bar for maximum speed and provides clear BUY, SELL, and WAIT signals.
GOLD-Optimized Support & Resistance
The S/R system is specifically optimized for GOLD characteristics. It uses pivot period 10 for faster detection, sensitivity 1 for maximum sensitivity, and strength filter to display only strong levels with 3+ touches.
Anomaly Warning System
A unique early warning system for anomalies. When unusual market behavior is detected, S/R levels turn orange, alerting to potential risky situations.
Session Filter
An intelligent session filter optimized for GOLD trading. Automatically detects London and New York sessions (8-21 UTC) and adjusts signals based on market activity.
Technical Specifications
Prediction Line
- BUY signal: Vertical green line up
- SELL signal: Vertical red line down
- WAIT signal: Horizontal orange line
- Dotted style for scalping
- Instant reaction to price changes
Support & Resistance
- Pivot Period: optimized for 5M timeframe
- Sensitivity: maximum sensitivity
- Max Lines: 5 (better coverage)
- Strength Threshold: only strong levels
- Retest Tolerance: 0.1% (precision for GOLD)
Anomaly Detection
- Lookback: 20 bars
- Threshold: 2.0 ATR
- Detects: Range expansion, volume spikes, rapid price changes, RSI extremes
- Visual warning: Orange S/R lines
GOLD Optimizations
GOLD-Specific Settings
The indicator is optimized for GOLD trading with the following specific settings:
- Shorter pivot periods for faster reaction
- Maximum sensitivity for GOLD characteristics
- Volume confirmation for more reliable signals
- Session awareness for best trading times
Performance Optimizations
- Cache optimization for all calculations
- Memory management for proper line deletion
- Pine Script v6 for modern functionality
- No linter errors for stable performance
Usage
Recommended Settings
- Timeframe: 5-15M GOLD
- Sessions: London/NY (8-21 UTC)
- Prediction Style: Dotted
- S/R Style: Dotted
- Anomaly Warning: Enabled
Trading Approach
The indicator is designed for a scalping approach with emphasis on speed and accuracy. It combines a fast prediction line for directional signals with slower S/R levels for context and confirmation.
GOLD SCALPER represents a professional tool for GOLD scalping with a unique approach combining speed with precision. It is ideal for traders who need instant signals and reliable S/R levels for their trading decisions.
Gold Price Trend Overlay This chart overlay provides the daily 9 SMA of Gold.
If the price of GOLD is ABOVE the 9 SMA then the line will be GOLD
If the price of GOLD is BELOW the 9 SMA then the line will be RED
A good way to use this overlay is by understanding how Gold effects currency pairs.
if GOLD is BULLISH - then AUD/USD is BULLISH
if GOLD is BULLISH - then NZD/USD is BULLISH
if GOLD is BULLISH - then EUR/USD is BULLISH
if GOLD is BULLISH - then USD is bearish
if GOLD is BULLISH - then USD/CHF is BEARISH
if GOLD is BULLISH - then USD/CAD is BEARISH
GOLD SUPER TREND ARROW SIGNALS STRATEGY WITH PERFORMANCEThe strategy is based on combination of ATR, Moving Averages, Volatility indicators that was filtered and final strategy based on accurate arrows that catch trend and
also predict pivot points for intraday Gold ( XAUUSD ) charts.
The strategy script can be used for time frames 30 MIN, 45 MIN, 1Hour, 4 HOURS.
The goal was to create trending strategy with maximum profit and lowest drawdown.
For initial deposit $12000 time frame 30 MIN profit was 42% with maximum drawdown 6%:
For time frame 45 MIN profit was 30% with maximum drawdown 5%:
Golden Pocket Channel [by vistahr]The indicator plots the golden pocket (Fibonacci retracement 61% to 65%) of recent highs and lows. The golden pocket is calculated from the last high to the last low. The high and low are determined by the number of last bars.
The golden pocket is used for trading as support and resistance.
The length of the past highs and lows can be determined by yourself. You can define three different lengths to find the highs and lows of the past.
Goldies Wave Revision- Exponential Movin Average
- Tilson's T3 Moving Average
- 0.618 Golden ratio
- Fibonacci Retrenchment
GOLDM Dow Theory – 1H Trend + 5m Pullback1. Strategy Overview
Instrument: MCX GOLDM
Chart timeframe: 5 minutes
Side: Long-only
Position size: Fixed 3 lots
Core idea:
Trade only in 1H uptrend, enter after a 5m pullback and breakout, with basic volume/volatility filters and ATR-based SL/TP.
2. High-Level Logic Flow (Per Bar)
On every 5-minute bar, the script does this:
Update session/time, volume, and ATR filters
Read 1H trend from higher timeframe
Update 5m pullback state (whether a valid dip happened)
Check if there is a valid breakout back in the direction of the 1H trend
If all filters + conditions align → enter Long (3 lots)
While in a trade:
Manage SL/TP using ATR
Close trade if 1H trend flips down or price closes below 5m EMA
Everything else (plots, alerts) is just for visibility and convenience.
3. Inputs & Configuration
Main inputs:
pullbackLookback – how many 5m bars to look back to detect a pullback
breakoutLookback – how many bars to consider for recent swing high
emaLenTrendFast / emaLenTrendSlow – 1H EMAs (50/200) for trend
emaLenPullback – 5m EMA used for pullback logic (default 20)
tradeSession – default "0900-2315" (you can change)
volLookback, volMult – volume filter
atrLen, atrSmaLen – ATR filter
slATRmult (1.4), tpATRmult (3.0) – ATR multiples → ~1.4 : 3 RR
4. Session / Time Filter
tradeSession = "0900-2315"
inSession = not useSessionFilter or not na(time(timeframe.period, tradeSession))
Only allows entries when the current bar’s time is inside 09:00–23:15.
If useSessionFilter is false, this filter is ignored.
No trade opens outside this window, but existing trades can still exit.
5. Volume & Volatility Filters
Volume Filter
avgVol = ta.sma(volume, volLookback)
highVolume = not useVolumeFilter or (volume > avgVol * volMult)
If enabled, current bar’s volume must be greater than average volume × multiplier.
Purpose: avoid thin, illiquid periods.
ATR Filter
atr5 = ta.atr(atrLen)
atrSma = ta.sma(atr5, atrSmaLen)
goodATR = not useATRFilter or (atr5 > atrSma)
If enabled, current ATR must be above its own moving average.
Purpose: avoid flat / extremely low-volatility periods.
Only if both highVolume and goodATR are true, the system considers entering.
6. Higher Timeframe Trend (1H)
emaFast1h = request.security(syminfo.tickerid, "60", ta.ema(close, emaLenTrendFast), ...)
emaSlow1h = request.security(syminfo.tickerid, "60", ta.ema(close, emaLenTrendSlow), ...)
trendUp = emaFast1h > emaSlow1h
trendDown = emaFast1h < emaSlow1h
On the 1-hour timeframe:
If EMA Fast (50) > EMA Slow (200) → trendUp = true
If EMA Fast (50) < EMA Slow (200) → trendDown = true
This is the core trend filter:
We only look for longs when trendUp is true.
7. 5-Minute Structure Logic (Dow-style)
7.1 Pullback Detection
emaPull = ta.ema(close, emaLenPullback)
pulledBackLong = ta.lowest(close, pullbackLookback) < emaPull
A pullback is defined as:
In the last pullbackLookback bars, price closed below the 5m EMA (emaPull) at least once.
This indicates a dip against the 1H uptrend.
A state flag tracks this:
var bool hadLongPullback = false
hadLongPullback := trendUp and pulledBackLong ? true : (not trendUp ? false : hadLongPullback)
When:
trendUp AND pulledBackLong → hadLongPullback = true.
If the trend stops being up (trendUp = false), flag resets to false.
So the system remembers:
“There has been a proper dip while the 1H uptrend is active.”
7.2 Breakout Confirmation
recentHigh = ta.highest(high, pullbackLookback)
breakoutUp = close > recentHigh
After a pullback, we wait for price to close above the highest high of recent bars (excluding the current one).
This mimics:
“Higher high after a higher low” → breakout in Dow Theory terms.
8. Final Long Entry Logic
The base entry condition:
baseLongEntry =
trendUp and
hadLongPullback and
breakoutUp and
close > emaPull
Translated:
1H trend is up (trendUp).
A valid pullback happened recently (hadLongPullback).
Current candle broke above the recent swing high (breakoutUp).
Price is now back above the 5m EMA (pullback is resolving, not deepening).
Then filters are applied:
longEntryCond =
baseLongEntry and
inSession and
highVolume and
goodATR and
not isLong
So a long entry only occurs if:
Core structure conditions (baseLongEntry) are true
Time is within session
Volume is high enough
ATR is healthy
You are not already in a long
When longEntryCond is true:
if longEntryCond
strategy.entry("Long", strategy.long, comment = "Dow Long: Trend+PB+BO")
hadLongPullback := false
Enters 3 lots long (as per default_qty_type + default_qty_value).
Resets hadLongPullback so we don’t re-use the same pullback.
9. Exit Logic
There are two exit layers:
9.1 Logical Exit (Trend or Structure Change)
exitLongTrendFlip = trendDown
exitLongEMA = ta.crossunder(close, emaPull)
longExitCond = isLong and (exitLongTrendFlip or exitLongEMA)
If in a long:
Exit when trend flips down (1H EMA50 < EMA200), OR
Price crosses below 5m EMA (pullback may be turning into reversal).
Then:
if longExitCond
strategy.close("Long", comment = "Exit Long: Trend flip / EMA break")
This closes the position at market (on bar close).
9.2 ATR-based Stop Loss & Take Profit
if useSLTP and isLong
longStop = strategy.position_avg_price - atr5 * slATRmult
longLimit = strategy.position_avg_price + atr5 * tpATRmult
strategy.exit("Long SLTP", "Long", stop = longStop, limit = longLimit)
SL = entry price – 1.4 × ATR(14, 5m)
TP = entry price + 3.0 × ATR(14, 5m)
This gives roughly 1.4 : 3 RR.
If SL or TP is hit, strategy.exit will close the trade.
So exits can come from:
Hitting Stop Loss
Hitting Take Profit
OR logic-based exit (trend flip / EMA break)
10. Alerts
Two alertconditions:
alertcondition(longEntryCond, title="Long Entry Signal",
message="GOLDM LONG: 1H Uptrend + 5m Pullback Breakout + Filters OK")
alertcondition(longExitCond, title="Long Exit Signal",
message="GOLDM LONG EXIT: Trend flip or EMA break")
You can set TradingView alerts based on:
“Long Entry Signal” → tells you when all entry conditions align.
“Long Exit Signal” → tells you when the logic-based exit triggers.
(ATR SL/TP exits won’t auto-alert unless you separately set price alerts or add extra conditions.)
11. Mental Model Summary (How YOU should think about it)
For every trade, the system is basically doing this:
Is GOLDM in an uptrend on 1H?
→ If no: do nothing
Did we get a clear dip below 5m EMA in that uptrend?
→ If no: wait
Did price then break above recent highs and reclaim EMA20?
→ If yes: this is our Dow-style continuation entry
Is market liquid and moving (volume + ATR)?
→ If yes: go Long with 3 lots
Manage with:
ATR SL & TP
Exit early if 1H trend flips or price falls back below EMA20
Goldencross & Deathcross Highlights (50/200 SMA) - Fixed dailyThis indicator visualizes major long-term trend shifts in the market
by tracking the daily 50-day and 200-day Simple Moving Averages (SMAs)
— regardless of your current chart timeframe.
🟩 A green flash (Golden Cross) appears when the 50-day SMA crosses
above the 200-day SMA — signaling potential long-term bullish momentum.
🟥 A red flash (Death Cross) appears when the 50-day SMA crosses
below the 200-day SMA — suggesting potential long-term bearish pressure.
Unlike typical SMA overlays, this script:
• Pulls daily data directly (fixed to daily timeframe)
• Works cleanly on any chart timeframe (5m, 1h, 4h, etc.)
• Avoids clutter by hiding moving average lines
• Shows only short, subtle flashes and one clean marker per event
GoldenPocket & CRT IndicatorWith this script, you will be able to see Golden Pocket Fibonacci Levels and Candle Range Theory Highs, Lows and EQs.
You can set lookback bar numbers to define Fibonacci highs and lows.
You can set CRT High Time-frame.
Simple and effective script. Please let me know if you have any comments and support me if you like it.
Golden Death Cross IndicatorThis indicator uses moving average to detect both a Golden Cross and Death Cross on any timeframe but is recommended for use on the daily and 24 hour timeframes only.
We have also provided instructions on how to create alerts for these indicators below.
Happy Trading!
Moving Averages: We’ll use Simple Moving Averages (SMA). The 50-day SMA looks at the average price over the last 50 periods, and the 200-day SMA does the same for 200 periods.
Crossovers: We’ll check when the 50-day SMA crosses above (Golden Cross) or below the 200-day SMA (Death Cross).
Set Up Alerts
Now, let’s make sure you get notified when a cross happens:
Open the Alerts Menu
On the chart, click the bell icon (top right of the screen) to create an alert.
Configure the Golden Cross Alert
In the “Condition” dropdown, select “Cross Alerts” (the name of your script).
Below that, select “Golden Cross.”
Set “Once Per Bar Close” in the next dropdown (this ensures it only triggers after the period ends, avoiding false signals mid-bar).
Choose how you want to be notified (e.g., popup, email, or phone app—set this under “Notifications”).
Name the alert (e.g., “Golden Cross Alert”) and click “Create.”
Configure the Death Cross Alert
Click the bell icon again to create a second alert.
Condition: “Cross Alerts” > “Death Cross.”
Set “Once Per Bar Close” again.
Choose your notification method.
Name it (e.g., “Death Cross Alert”) and click “Create.”






















