Daily Breakout + Daily Shadow By RouroThis script is a Pine v5 strategy designed to detect daily candle body breakouts and execute them on any intraday timeframe, while also providing:
Daily Data Retrieval
Using request.security(..., "D", ...) it fetches the OHLC and timestamp of the daily candle, regardless of the chart’s current timeframe.
Calculation of Yesterday’s and Day-Before-Yesterday’s Bodies
b1High and b1Low → the high/low of yesterday’s daily candle body
b2High and b2Low → the high/low of the previous day’s body
Detection of the First Intraday Bar After a New Day
By using ta.change(time("D")), it marks the start of each new trading day.
Drawing the Previous Day’s “Shadow” on the Chart
It overlays a box (box.new) and two wick lines (line.new) with configurable colors and transparency, so you can clearly see the full range of yesterday’s candle on any intraday chart.
Automatic End-of-Day Position Closure
It will automatically close any open position at the start of the next day to avoid unintended rollovers.
Entry Signals
On the very first intraday bar after the daily close:
Long if yesterday’s close broke above the body of the day before yesterday
Short if yesterday’s close broke below the body of the day before yesterday
…which triggers a strategy.entry at the intraday open.
Fully Customizable Stop-Loss and Take-Profit
SL options:
Opposite end of yesterday’s body
Fixed pips from entry
A risk-reward ratio on yesterday’s wick
Optional “safety SL” in fixed pips that overrides the above
TP options:
Fixed pips
Yesterday’s wick extreme (high/low)
Partial exit on the wick (TP1), then second exit (TP2) either:
At a multiplied RR
Or at the daily close (“Close of Day”)
You can also choose to move SL to breakeven after TP1 is hit.
Live Metrics Table
In the upper-right corner it displays in real time:
Start of backtest (date of first trade)
Number of ✅ Winning trades and ❌ Losing trades
Total number of trades
Win rate (%)
Profit Factor
All within a fixed table layout so it never runs out of rows or columns.
Candlestick analysis
Breakout Buy Alertupdate 3 in progress where we are trying to get current market price instead of close and open
IU Inside out candlestick patternIU Inside Out Candlestick Pattern
This indicator identifies the Inside Out Candlestick Pattern — a unique 3-bar price action setup that captures strong market momentum and potential reversals with greater reliability than traditional patterns.
Pattern Logic:
The Inside Out pattern builds upon a classic engulfing setup by adding a breakout confirmation, making it a refined and filtered approach to candlestick analysis.
Bullish Inside Out Logic:
- Bar must be a bullish engulfing candle (engulfs previous bearish candle).
- Current bar must be bullish and must close above the high of the engulfing candle (a bullish breakout).
- When this setup is confirmed, a shaded green box is drawn around the range of the engulfing candle and its preceding bar.
Bearish Inside Out Logic:
- Bar must be a bearish engulfing candle (engulfs previous bullish candle).
- Current bar must be bearish and must close below the low of the engulfing candle (a bearish breakdown).
- When confirmed, a red box highlights the zone formed by the engulfing candle and its prior bar.
Why this is unique:
Unlike conventional candlestick indicators that trigger signals immediately after an engulfing pattern, this script adds a breakout condition to validate follow-through strength. This reduces false positives and gives traders a clearer edge. The pattern is also rare, which means it captures strong, decisive moves when it does appear.
How users can benefit:
- High-quality entries: Only shows patterns with proven follow-through, improving trade timing.
- Visual clarity: Boxes and labels highlight significant price zones for easy interpretation.
- Flexible use: Applicable across timeframes and instruments — ideal for both intraday and swing traders.
- Alerts included: Real-time alerts help traders stay updated without staring at charts all day.
This script is a powerful tool for price action traders looking to enhance pattern reliability and signal strength through structure-based breakout confirmation.
XAUUSD Strategy with Visual DivergenceThis strategy is designed to capture high-probability trend-continuation trades on XAUUSD (Gold/US Dollar) by combining trend-following logic with momentum-based divergence detection. It uses the 200-period Exponential Moving Average (EMA) to filter for the prevailing trend and the Relative Strength Index (RSI) to identify bullish and bearish divergences as early entry signals. The strategy incorporates a risk-reward profile of 2:1, making it suitable for both swing and intra-day traders.
Long-Term VWAP Mean Reversion SDCACore Idea:
This indicator is designed to support Strategic Dollar Cost Averaging (SDCA) for Bitcoin using a cumulative VWAP-based mean reversion model. It helps long-term investors identify high-conviction buy zones and overbought conditions using statistical deviation from the cumulative VWAP. This indicator evaluates how much price is stretched from the true market average price, weighted by cumulative volume over time.
Core Concepts and Formulas:
Cumulative VWAP (Volume Weighted Average Price):
VWAP cumulative = ∑(Price×Volume) / ∑Volume
A long-term anchor that reflects the average dollar cost of all market participants across all candles. This version does not reset daily, unlike intraday VWAP.
VWAP Deviation % :
Deviation% = Price - VWAP cumulative / VWAP cumulative x 100
Shows how far current price has diverged from the long-term fair value.
Z-Score of VWAP Deviation:
Z= (Price−VWAP)−μ / σ (lookback period: default 200)
SDCA Multiplier Mapping:
*Keep in mind in my Z-Score system, -2 represents the overbought level (white horizontal line) and +2 represents oversold (cyan horizontal line) conditions. So the scores on the Y axis and Z-score in the table are reversed.
| Z-Score Range | SDCA Multiplier |
---------------------------------------------
| ≤ -2 | 0.25×
| -1 to +1 | 1.0×
| > +2 | 2.0×
The pink line plots this multiplier. It’s meant to control buy weight at each time step.
How to Use This for SDCA:
-Buy normally when the multiplier is 1.0× (Z-score between -1 and +1)
-Accelerate buying when Z-score is deeply negative (price far below VWAP)
-Slow or pause buying when Z-score is high (price far above VWAP)
-Use the stats panel to track current Z-score, VWAP level, deviation %, and multiplier
-Watch the red/blue backgrounds as visual confirmation of oversold/overbought zones
Inputs:
Z-Score Lookback Length:
Default: 200 but can be adjusted.
Visuals:
Z-Score Line (cyan): shows current standardized deviation from VWAP
Multiplier Line (bright pink): your SDCA intensity signal
Background Zones: cyan = oversold, white = overbought
Horizontal Lines: +2 and -2 standard deviation thresholds
Stats Panel (bottom right): live values for Z-score, multiplier, price, VWAP, and the deviation formula
Suited For:
-Long-term Bitcoin investors
-SDCA Systems
-Mean reversion systems
-Macro-level buy/sell planning
Likidite Avı + Dönüş Stratejisi (TP/SL + Zaman Bazlı)Checks if the previous top/bottom is pinned.
Then it generates a signal as soon as a sharp and opposite candle comes.
It looks for a reactionary reversal, not a pullback.
It gives fewer but more meaningful signals.
✅ Previous top/bottom pin (liquidity hunt)
✅ Immediately followed by a strong reversal candle
✅ And there is a signal system that gives these conditions instantly, together with the candle closing.
Scalping Template - XAUUSD//@version=5
indicator("Scalping Template - XAUUSD", overlay=true)
// EMA
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
plot(ema50, color=color.blue, title="EMA 50")
plot(ema200, color=color.orange, title="EMA 200")
// QQE Mod Histogram (simplified)
src = close
rsi = ta.rsi(src, 14)
rsiEma = ta.ema(rsi, 5)
hist = rsi - rsiEma
plot(hist, title="QQE Histogram", color=hist >= 0 ? color.aqua : color.fuchsia, style=plot.style_columns, linewidth=2)
// Stochastic RSI
k = ta.stoch(close, high, low, 14)
d = ta.sma(k, 3)
plot(k, title="Stoch %K", color=color.green)
plot(d, title="Stoch %D", color=color.red)
hline(80, "Overbought", color=color.gray)
hline(20, "Oversold", color=color.gray)
[COW] Market DirectionA script that will plot a table on screen that shows your RSI and EMA directions for multiple timeframes. This will help determine your direction and bias for multiple timeframes. I have included some code that I have in a private library as well showing how I handle types with pine script and how they come in handy.
This indicator is useful to help determine chop, directional movement, and more!
OHLC Candles Overlay [Multi TF]- 3 CandlesMulti timeframe overlay candles for higher timeframe analysis on lower timeframes and vice versa.
Candlestick High/Low LabelsCandlestick High/Low Labels and OHLCV Dashboard with adjustable lookback period
Origin + Surge Zone (v2 fixed)test inventory surge
Searches for 2 or more consecutive doji candles → marks this as "origin" (grey box).
Waits for 2 strong candles (bullish or bearish) → surge → records its high as TP.
Strict Origin Zone Detectorinventory theory indicator test
Searches for 2 or more consecutive doji candles → marks this as "origin" (grey box).
Waits for 2 strong candles (bullish or bearish) → surge → records its high as TP.
Major Trading SessionsThis script displays the trading sessions of the 3 markets that are relevant in crypto. US, UK, and Tokyo.
Real Open/Close Ticks for Heiken Ashi CandlesJapanese candle open and close prices. Good if you're using a HeikenAshi chart and you want to see real opens and closes.
ICT Killzones & Pivots [TFO]shorten the date name
adjust to fit in JST time zone (fit for Japan based traders like me, who is early bird and can't trade at 10PM JST = NY open)
OHLC Candles Overlay [Multi TF]Two Multi timeframe OHLC candles (previous and current). Customized candles overlay of HTF on LTF and vice versa.
2 Red + 1 Green Buy / 2 Green + 1 Red Sell Signalits give buy and sell signal special in gold usd which work well in houlry and 2 houlry chart not less then hourly also we see suptertrde and 50 sma for entry and exit ..
signal also genrate when only less then 15 point stoploss candle form
24 Hour Key LevelsIndicator automatically plots horizontal rays from yesterday high/low of day and current day premarket high/low. Levels are customizable in color and thickness.
Asian & London Session Highs/LowsAsian & London Session Highs/Lows with Extendable Lines
This TradingView script automatically marks the highs and lows of the Asian and London trading sessions for the most recent day, allowing traders to identify key levels during these active periods. The lines representing the high and low of each session are drawn at the exact price point where the high/low occurred, and they extend to the right for a customizable number of bars, helping to visualize how the price reacts to these key levels after the session ends.
Key Features:
Session High/Low Tracking: Automatically tracks the highest and lowest points for the Asian and London sessions.
Extendable Lines: Lines start at the exact bar where the high/low occurred and can be extended to the right for a specified number of bars.
Timezone Adjustment: Allows you to input a timezone offset to adjust session times based on your local time or desired market time zone.
Customizable Colors & Line Thickness: Adjust the color and thickness of the session high and low lines to suit your visual preferences.
Clear & Precise Levels: Helps identify important support and resistance levels, making it easier to spot market reactions around session highs and lows.
This indicator is perfect for day traders and those looking to trade during specific market hours, offering clear visual markers of session boundaries and critical price levels.
SuperFib Enhanced (Array Only)Key Changes:
Removed MAX_LINES and defined const int MAX_STORAGE_CAPACITY = 200 (You can adjust 200 higher or lower, but be mindful of the total drawings limit).
Removed all individual inputs (show1-show10, price1-price10, text1-text10) and their corresponding groups. The array input is now the only way to define levels.
Removed the useArrayInput boolean input, as it's no longer needed.
Initialized var hLines and var lineLabels arrays with MAX_STORAGE_CAPACITY.
Modified the array parsing loop to respect MAX_STORAGE_CAPACITY when adding parsed levels.
Modified the main drawing loop (if barstate.islast) to iterate from 0 up to
MAX_STORAGE_CAPACITY - 1. Inside the loop, it checks if i < parsedLevelsCount to determine if a line should exist at that index.
Modified the real-time update loop (if barstate.isrealtime) to also iterate up to MAX_STORAGE_CAPACITY - 1 to handle any potential drawing index within the indicator's capacity.
Updated the tooltips for the array inputs to reflect that this is the primary method and mention the (increased) capacity limit.
This version is more flexible for users who rely heavily on array input, allowing them to define up to 200 levels. Remember that while the indicator itself can manage 200, the total drawings on your chart from all sources still cannot exceed Pine Script's platform-wide limit.
Entropy [ScorsoneEnterprises]This indicator calculates the entropy of price log returns over a user-defined lookback period, providing insights into market complexity and unpredictability. Entropy measures the randomness or disorder in price movements, helping traders identify periods of high or low market uncertainty.
How It Works
The indicator computes the entropy of log returns (log(close/close )) using a histogram-based approach with customizable bins. Log returns are stored in an array of size N (lookback period), and entropy is calculated by:
Binning the returns into bins intervals based on their range.
Computing the probability distribution across bins.
Calculating entropy as -Σ(p * log(p)), where p is the probability of each bin.
A reference Simple Moving Average (SMA) of the entropy, with a separate lookback period (SMA_N), is plotted to highlight trends in market complexity. The entropy plot uses a gradient color scheme (red for lower entropy, teal for higher), while the SMA color shifts based on whether entropy is above (teal) or below (red) the SMA.
Key Features
Inputs:
Lookback Period (default: 50): Number of bars for calculating log returns.
Reference SMA Lookback Period (default: 100): Period for the entropy SMA.
Number of Bins (default: 20): Number of histogram bins for entropy calculation.
Plots:
Entropy: Gradient-colored line reflecting market randomness.
Reference SMA: Trend line to compare entropy against its average.
Interpretation
High Entropy: Indicates chaotic, unpredictable price movements, often during volatile or trendless markets.
Low Entropy: Suggests more predictable, ordered price behavior, often in trending or stable markets.
Compare entropy to its SMA to gauge whether current market complexity is above or below its recent average.
Usage
Use this indicator to assess market regimes. High entropy may signal choppy, range-bound conditions, while low entropy could indicate trending opportunities. Combine with price action or other indicators for confirmation.
Examples
We see on this PEPPERSTONE:COCOA chart that when entropy is low it signals a strong trend, either up or down. High entropy signals indecision and choppiness in the market. We can determine this by noticing when the value is above or below its recent average.
Entropy is used in high frequency trading often. It is a nice tool for lower time frames to determine how predictable and strong a trend is.
Inputs
Users can enter the lookback value for entropy, bin count, and the look back for the entropy moving average.
No tool is perfect, the Entropy value is also not perfect and should not be followed blindly. It is good to use any tool along with discretion and price action.