Holy GrailThis is a long-only educational strategy that simulates what happens if you keep adding to a position during pullbacks and only exit when the asset hits a new All-Time High (ATH). It is intended for learning purposes only — not for live trading.
🧠 How it works:
The strategy identifies pullbacks using a simple moving average (MA).
When price dips below the MA, it begins monitoring for the first green candle (close > open).
That green candle signals a potential bottom, so it adds to the position.
If price goes lower, it waits for the next green candle and adds again.
The exit happens after ATH — it sells on each red candle (close < open) once a new ATH is reached.
You can adjust:
MA length (defines what’s considered a pullback)
Initial buy % (how much to pre-fill before signals start)
Buy % per signal (after pullback green candle)
Exit % per red candle after ATH
📊 Intended assets & timeframes:
This strategy is designed for broad market indices and long-term appreciating assets, such as:
SPY, NASDAQ, DAX, FTSE
Use it only on 1D or higher timeframes — it’s not meant for scalping or short-term trading.
⚠️ Important Limitations:
Long-only: The script does not short. It assumes the asset will eventually recover to a new ATH.
Not for all assets: It won't work on assets that may never recover (e.g., single stocks or speculative tokens).
Slow capital deployment: Entries happen gradually and may take a long time to close.
Not optimized for returns: Buy & hold can outperform this strategy.
No slippage, fees, or funding costs included.
This is not a performance strategy. It’s a teaching tool to show that:
High win rate ≠ high profitability
Patience can be deceiving
Many signals = long capital lock-in
🎓 Why it exists:
The purpose of this strategy is to demonstrate market psychology and risk overconfidence. Traders often chase strategies with high win rates without considering holding time, drawdowns, or opportunity cost.
This script helps visualize that phenomenon.
Educational
HEMA Trend by Rostek (Filters + ATR + RR) For testing by anyone. Enjoy! :)
HEMA Trend Levels with Gradient, ATR-based SL & TP, HTF Filter, and R/R Statistics
This advanced indicator is designed to help you detect high-quality trend crossovers using HEMA (Hull Exponential Moving Average) smoothing logic. It integrates dynamic visualization, strong multi-layer filters, and risk management levels — all in one package.
✅ Core Concept
The indicator plots two HEMAs (fast and slow), with a gradient fill between them that dynamically changes color based on the trend direction. Crossovers between these HEMAs generate potential trade signals (long or short).
🎨 Key Visual Features
Smooth gradient fill area between fast and slow HEMA.
Dynamic arrows marking crossover points (precisely above/below HEMA cross).
Optional ATR-based Stop Loss (SL) and Take Profit (TP) levels shown as dashed lines with labels.
Automatic display of calculated Risk/Reward (R/R) ratio next to TP level.
⚙️ Powerful Filters
You can enable/disable each of these filters individually:
✅ EMA Filter — Confirm signals only when the price is above/below a selected EMA (default: 100).
✅ ADX Filter — Confirms signals only if ADX value exceeds a set threshold (default: 20).
✅ RSI Filter — Filter signals based on RSI value (e.g., >50 for longs, <50 for shorts).
✅ Higher Time Frame (HTF) EMA Filter — Only take signals aligned with a higher timeframe EMA trend (e.g., daily EMA 100).
📏 Risk Management Features
ATR-based Stop Loss (SL): Dynamic stop level calculated using ATR, configurable multiplier (e.g., 1.5 × ATR).
ATR-based Take Profit (TP): Dynamic take profit level based on ATR, configurable multiplier (e.g., 3 × ATR).
Risk/Reward Statistics: Calculates and displays R/R ratio on the chart to help visually evaluate trade setups.
🔔 Alerts
A single unified alert condition for both long and short filtered signals, making it easy to set up TradingView alerts.
⚡ Usage Tips
Adjust HEMA lengths (default: 20 & 40) to tune responsiveness.
Enable/disable filters depending on your strategy and market conditions.
Fine-tune ATR multipliers for SL/TP based on your risk tolerance.
Use HTF filter to trade only in the direction of the main higher timeframe trend.
✅ Ideal for
Trend-following traders who want smoothed entries.
Traders looking for integrated visual risk management levels.
Users who want precise, customizable signals with strong filtering logic.
Dynamic VWAP: Fair Value & Divergence SuiteDynamic VWAP: Fair Value & Divergence Suite
Dynamic VWAP: Fair Value & Divergence Suite is a comprehensive tool for tracking contextual valuation, overextension, and potential reversal signals in trending markets. Unlike traditional VWAP that anchors to the start of a session or a fixed period, this indicator dynamically resets the VWAP anchor to the most recent swing low. This design allows you to monitor how far price has extended from the most recent significant low, helping identify zones of potential profit-taking or reversion.
Deviation bands (standard deviations above the anchored VWAP) provide a clear visual framework to assess whether price is in a fair value zone (±1σ), moderately extended (+2σ), or in zones of extreme extension (+3σ to +5σ). The indicator also highlights contextual divergence signals, including slope deceleration, weak-volume retests, and deviation failures—giving you actionable confluence around potential reversal points.
Because the anchor updates dynamically, this tool is particularly well suited for trend-following assets like BTC or stocks in sustained moves, where price rarely returns to deep negative deviation zones. For this reason, the indicator focuses on upside extension rather than symmetrical reversion to a long-term mean.
🎯 Key Features
✅ Dynamic Swing Low Anchoring
Continuously re-anchors VWAP to the most recent swing low based on your chosen lookback period.
Provides context for trend progression and overextension relative to structural lows.
✅ Standard Deviation Bands
Plots up to +5σ deviation bands to visualize levels of overextension.
Extended bands (+3σ to +5σ) can be toggled for simplicity.
✅ Conditional Zone Fills
Colored background fills show when price is inside each valuation zone.
Helps you immediately see if price is in fair value, moderately extended, or highly stretched territory.
✅ Divergence Detection
VWAP Slope Divergence: Flags when price makes a higher high but VWAP slope decelerates.
Low Volume Retest: Highlights weak re-tests of VWAP on low volume.
Deviation Failure: Identifies when price reverts back inside +1σ after closing beyond +3σ.
✅ Volume Fallback
If volume is unavailable, uses high-low range as a proxy.
✅ Highly Customizable
Adjust lookbacks, show/hide extended bands, toggle fills, and enable or disable divergences.
🛠️ How to Use
Identify Buy and Sell Zones
Price in the fair value band (±1σ) suggests equilibrium.
Reaching +2σ to +3σ signals increasing overextension and potential areas to take profits.
+4σ to +5σ zones can be used to watch for exhaustion or mean-reversion setups.
Monitor Divergence Signals
Use slope divergence and deviation failures to look for confluence with overextension.
Low volume retests can flag rallies lacking conviction.
Adapt Swing Lookback
30–50 bars: Faster re-anchoring for swing trading.
75–100 bars: More stable anchors for longer-term trends.
🧭 Best Practices
Combine the anchored VWAP with higher timeframe structure.
Confirm signals with other tools (momentum, volume profiles, or trend filters).
Use extended deviation zones as context, not as standalone signals.
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any security or asset. Always do your own research and consult a qualified financial professional before making any trading decisions. Past performance does not guarantee future results.
My Strategy: Uptrend Pullback ScreenerUptrend Pullback Screener. this will filter the stock who is in uptrend and ready to pullback from support.
Prakash and Vicky TrendPrakash and Vicky Trend
This indicator is designed to help traders identify potential trend changes and key price levels on the chart. It uses three weighted moving averages and the volume-weighted average price (VWAP) for a balanced view of short-term momentum, overall trend, and market value.
The fast and slow moving averages generate buy and sell signals when they cross over or under each other, signaling shifts in market momentum.
The longer-term moving average acts as a trend filter, helping traders see the bigger picture direction.
VWAP offers a benchmark level watched by institutions, highlighting areas of value and potential support or resistance.
This combination provides a simple yet effective framework for making trading decisions with a clear view of price action, trend strength, and key levels.
Omori Law Recovery PhasesWhat is the Omori Law?
Originally a seismological model, the Omori Law describes how earthquake aftershocks decay over time. It follows a power law relationship: the frequency of aftershocks decreases roughly proportionally to 1/(t+c)^p, where:
t = time since the main shock
c = time offset constant
p = power law exponent (typically around 1.0)
Application to the markets
Financial markets experience "aftershocks" similar to earthquakes:
Market Crashes as Main Shocks: Major market declines (crashes) represent the initial shock event.
Volatility Decay: After a crash, market volatility typically declines following a power law pattern rather than a linear or exponential one.
Behavioral Components: The decay pattern reflects collective market psychology - initial panic gives way to uncertainty, then stabilization, and finally normalization.
The Four Recovery Phases
The Omori decay pattern in markets can be divided into distinct phases:
Acute Phase: Immediately after the crash, characterized by extreme volatility, panic selling, and sharp reversals. Trading is hazardous.
Reaction Phase: Volatility begins decreasing, but markets test previous levels. False rallies and retests of lows are common.
Repair Phase: Structure returns to the market. Volatility approaches normal levels, and traditional technical analysis becomes more reliable.
Recovery Phase: The final stage where market behavior normalizes completely. The impact of the original shock has fully decayed.
Why It Matters for Traders
Understanding where the market stands in this recovery cycle provides valuable context:
Risk Management: Adjust position sizing based on the current phase
Strategy Selection: Different strategies work in different phases
Psychological Preparation: Know what to expect based on the phase
Time Horizon Guidance: Each phase suggests appropriate time frames for trading
BANKNIFTY Contribution Table [GSK-VIZAG-AP-INDIA]1. Overview
This indicator provides a real-time visual contribution table of the 12 constituent stocks in the BANKNIFTY index. It displays key metrics for each stock that help traders quickly understand how each component is impacting the index at any given moment.
2. Purpose / Trading Use Case
The tool is designed for intraday and short-term traders who rely on index movement and its internal strength or weakness. By seeing which stocks are contributing positively or negatively, traders can:
Confirm trend strength or divergence within the index.
Identify whether a BANKNIFTY move is broad-based or driven by a few heavyweights.
Detect reversals when individual components decouple from index direction.
3. Key Features and Logic
Live LTP: Current price of each BANKNIFTY stock.
Price Change: Difference between current LTP and previous day’s close.
% Change: Percentage move from previous close.
Weight %: Static weight of each stock within the BANKNIFTY index (user-defined).
This estimates how much each stock contributes to the BANKNIFTY’s point change.
Sorted View: The stocks are sorted by their weight (descending), so high-impact movers are always at the top.
4. User Inputs / Settings
Table Position (tableLocationOpt):
Choose where the table appears on the chart:
top_left, top_right, bottom_left, or bottom_right.
This helps position the table away from your price action or indicators.
5. Visual and Plotting Elements
Table Layout: 6 columns
Stock | Contribution | Weight % | LTP | Change | % Change
Color Coding:
Green/red for positive/negative price changes and contributions.
Alternating background rows for better visibility.
BANKNIFTY row is highlighted separately at the top.
Text & Background Colors are chosen for both readability and direction indication.
6. Tips for Effective Use
Use this table on 1-minute or 5-minute intraday charts to see near real-time market structure.
Watch for:
A few heavyweight stocks pulling the index alone (can signal weak internal breadth).
Broad green/red across all rows (signals strong directional momentum).
Combine this with price action or volume-based strategies for confirmation.
Best used during market hours for live updates.
7. What Makes It Unique
Unlike other contribution tables that show only static data or require paid feeds, this script:
Updates in real time.
Uses dynamic calculated contributions.
Places BANKNIFTY at the top and presents the entire internal structure clearly.
Doesn’t repaint or rely on lagging indicators.
8. Alerts / Additional Features
No alerts are added in this version.
(Optional: Alerts can be added to notify when a certain stock contributes above/below a threshold.)
9. Technical Concepts Used
request.security() to pull both 1-minute and daily close data.
Conditional color formatting based on price change direction.
Dynamic table rendering using table.new() and table.cell().
Static weights assigned manually for BANKNIFTY stocks (can be updated if index weights change).
10. Disclaimer
This script is intended for educational and informational purposes only. It does not constitute financial advice or a buy/sell recommendation.
Users should test and validate the tool on paper or demo accounts before applying it to live trading.
📌 Note: Due to internet connectivity, data delays, or broker feeds, real-time values (LTP, change, contribution, etc.) may slightly differ from other platforms or terminals. Use this indicator as a supportive visual tool, not a sole decision-maker.
Script Title: BANKNIFTY Contribution Table -
Author: GSK-VIZAG-AP-INDIA
Version: Final Public Release
Live Price Watermark (Flashing Overlay)Displays the current price as a large, centered watermark directly on your chart. The text color updates dynamically:
- Green when price rises
- Red when price falls
- Translucent black when unchanged
Dhokiya's 0.09% IndicatorThis is a custom indicator for predicting the levels on NSE:NIFTY chart for day trading. More strategy details will be updated soon.
(WIP)
- Rahul Dhangar
Turtle Trading Strategy (Simplified)This TradingView script is a powerful implementation of the classic Turtle Trading strategy, designed to help traders capitalize on significant market trends. Built using Pine Script, it can function as an indicator to highlight the specific entry and exit signals derived from the Turtle rules, or as a fully automated strategy to execute trades based on these signals. Users can fine-tune critical parameters like the lookback periods for breakouts and exits, enabling them to adapt the strategy to different market conditions and asset classes. The script leverages Pine Script's robust capabilities to accurately calculate and display the Turtle System's core logic, including position sizing based on volatility (ATR), providing a clear and systematic approach to trend-following directly on their TradingView charts.
Modüler Trailing Stop (Doğru Ölçekli)
📌 Modular Trailing Stop – Advanced Risk Management for Long & Short Strategies
Modular Trailing Stop is a dual-direction stop management tool that calculates independent stop levels for long and short positions. It is fully scale-adjusted, strategy-agnostic, and optimized for TradingView integration.
🚀 Key Features
🔹 Dual-Side Stop Logic
Separate Ref High and Stop levels for long and short trades, allowing precise and directional control.
🔹 Modular Architecture
Designed to be easily integrated into any indicator or strategy. Operates independently from entry signals.
🔹 Accurate Price Scaling
Automatically adjusts to symbol tick size using syminfo.mintick, ensuring precision across all markets (BTCUSD, ETHUSD, USDTRY...).
🔹 Static Trailing Logic
Once a position is opened, stop levels are anchored to a fixed reference price and adjusted by ATR volatility.
🔹 User-Configurable
- Customizable ATR period and multiplier
- Manual reference high percentages for long and short
- Real-time table display on the chart with key values
⚙️ Calculation Formulas
- Ref High (Long) = Base Price × (1 + %Offset) × scaleFix
- Ref High (Short) = Base Price × (1 - %Offset) × scaleFix
- Step = ATR × Multiplier
- Long Stop = Ref High (Long) – Step
- Short Stop = Ref High (Short) + Step
📈 Use Cases
- Volatility-based static stop-loss framework
- Compatible with RSI, EMA crossover, breakout, and custom signal systems
- Backtesting via TradingView Strategy Tester (WinRate, Sharpe, AvgPnL...)
🧪 Example Backtest (BTCUSDT, 4H Timeframe)
- Win Rate: 41.9%
- Sharpe Ratio: 0.27
- Profit Factor: 1.31
- Avg Trade Duration: 18 bars
- Test Strategy: RSI-based entries + modular trailing stops
🧩 Strategy Integration (Sample)
strategy.exit("Long Exit", from_entry="Long", stop=longStop)
strategy.exit("Short Exit", from_entry="Short", stop=shortStop)
🏁 Summary
Modular Trailing Stop is a robust and intuitive stop-loss management tool. It can be used as a standalone module or combined with any strategy for improved position handling, effective drawdown control, and systematic risk management.
Whether you're building strategies or optimizing entries and exits, this tool brings precision and modular flexibility to your trading workflow.
Position Size CalculatorIt calculates the risk per trade using two methods: Margin-Based (percentage of total Account Balance) or Equity-Based (percentage of Total Balance minus minimum balance). Displayed as a compact, customizable label on the main chart, it’s perfect for traders seeking quick, precise risk calculations.
Key Features
Two Calculation Options:
Margin-Based: Risk as a percentage (0-5%) of your total account balance.
Equity-Based: Risk as a percentage (0-50%) of (Total balance - Minimum balance).
Flexible Risk Input: Manually enter any risk percentage with 0.01% precision (e.g., 1.75%).
Customizable Display:
Repositionable table (9 positions, e.g., top-right, middle-center).
Four table sizes (XL, L, M, S) with text scaling (large, normal, small, tiny).
Adjustable cell color, text color, and transparency
Margin-Based Risk Calculation:
Set “Total Margin” (e.g., $10,000).
Enter “Risk Percentage (%)” (0 to 5%, e.g., 1.75%).
Equity-Based Risk Calculation:
Set “Total Equity” (e.g., $15,000).
Set “Minimum Balance” (e.g., $5,000).
Enter “Equity Risk Percentage (%)” (0 to 50%, e.g., 1.75%).
Display Settings:
Choose “Calculation Method” (Margin-Based or Equity-Based).
Select “Table Position” (e.g., top_right).
Select “Table Size” (XL, L, M, S; default M).
Customize “Table Cell Color”, “Table Text Color”, and “Table Cell Transparency”.
Custom Signal v1 - Ivan - Strict One Arrowtrend following indicator, do buy or sell with m15 chart on xau/usd
محدد الأوقات المطور جداً v6
Determine the candle times at any hour you want. If the strategy you are working on is CRT, specify the 4-hour frame and choose the time 1-5-9.
9AM–11AM NAS100 Session Box//@version=5
indicator("9AM–11AM NAS100 Session Box", overlay=true)
// Define session times in New York (EST)
session_start = timestamp("America/New_York", year, month, dayofmonth, 09, 0)
session_end = timestamp("America/New_York", year, month, dayofmonth, 11, 0)
// Detect if we're inside the session window
in_session = (time >= session_start) and (time < session_end)
// Track high/low of the session
var float session_high = na
var float session_low = na
if (in_session)
session_high := na(session_high) ? high : math.max(session_high, high)
session_low := na(session_low) ? low : math.min(session_low, low)
else
session_high := na
session_low := na
// Draw the session box
bgcolor(in_session ? color.new(color.blue, 85) : na)
// Optionally draw lines at session high/low
plot(in_session ? session_high : na, title="Session High", color=color.green, linewidth=1)
plot(in_session ? session_low : na, title="Session Low", color=color.red, linewidth=1)
IU Fibonacci Levels For IntradayDESCRIPTION
This indicator draws intraday Fibonacci levels from the opening price of the day using percentage-based retracements. It helps traders identify potential intraday support and resistance zones derived from the day’s opening bias. The levels are dynamically calculated and displayed with optional labels and customizable colors, making it an effective tool for both breakout and mean-reversion intraday strategies.
USER INPUTS
Direction Of The Level
Choose whether to show Upside, Downside, or Both level sets based on your directional bias.
Show Labels of Levels
Option to enable or disable text labels displaying Fibonacci values and prices.
Individual Level Toggles & Colors
You can choose to show or hide each of the following Fibonacci levels and set their respective colors:
* 0.236
* 0.328
* 0.500
* 0.618
* 0.786
* 1.000
INDICATOR LOGIC
On the first bar of the session, the opening price is captured.
Fibonacci levels are then calculated above and below this open using percentage multipliers (for example, day\_open + (day\_open \* 0.236%) for the 0.236 level).
Depending on the selected direction, upside and/or downside levels are plotted.
Filled zones are drawn between levels to visually highlight key price zones.
Optionally, each level can be labeled with its Fibonacci value and price.
WHY IT IS UNIQUE
Unlike traditional swing-based Fibonacci retracements, this tool uses the day’s opening price as an anchor, specifically designed for intraday traders.
Allows traders to quickly visualize micro-support and resistance levels that adapt every day.
Highly customizable and easy to read, with filled level bands for better zone recognition.
Works independently of indicators like RSI, MACD, or moving averages – purely based on price action logic.
HOW USER CAN BENEFIT FROM IT
Spot precise intraday reversal zones or breakout regions.
Combine with price action or volume analysis for smarter entries.
Filter trades by choosing directional bias (Up Site, Down Site, or Both).
Set profit targets or stop-losses based on Fibonacci bands.
Works great for scalpers, day traders, and even short-term swing traders looking to align with opening price momentum.
Disclaimer
This indicator is not financial advice, it's for educational purposes only highlighting the power of coding( pine script) in TradingView, I am not a SEBI-registered advisor. Trading and investing involve risk, and you should consult with a qualified financial advisor before making any trading decisions. I do not guarantee profits or take responsibility for any losses you may incur.
Normalized EMA Cycle (NEC)Normalized EMA Cycle (NEC)
The Normalized EMA Cycle (NEC) is a versatile momentum and trend reversal tool designed to detect high-probability turning points and gauge the strength of price cycles.
It combines fast and slow Exponential Moving Averages (EMAs), dynamic normalization, and adaptive transparency to create clear, intuitive reversal signals on the chart.
🔹 How It Works
EMA Differencing
The NEC calculates the difference between a fast EMA and a slower EMA:
Fast EMA Length (default 6) captures short-term momentum.
Slow EMA Length (default 16) tracks broader trends.
The slope of this difference identifies accelerating or decelerating momentum.
Normalization to 0–100 Scale
The raw EMA difference is scaled relative to the recent Alpha Period range (default 6 bars).
This transforms the value into a normalized oscillator ranging between 0 and 100.
A 3-period Hull Moving Average (HMA) smooths this series to reduce noise.
Overbought and Oversold Thresholds
By default:
Overbought Level: 75
Oversold Level: 25
Crossovers of these levels are used to detect potential reversals.
Adaptive Alpha Adjustment
The normalized value is transformed into an “Alpha Schaff” line, dynamically shifting between price and normalized cycles.
This helps the model adjust to different volatility regimes.
Trend Reversal Logic
Bullish Reversal:
Normalized oscillator crosses above the Oversold Level.
EMA difference slope is positive.
Bearish Reversal:
Normalized oscillator crosses below the Overbought Level.
EMA difference slope is negative.
Additional confirmation comes when price crosses the Alpha Schaff line in the direction of momentum.
Dynamic Confidence Visualization
The indicator calculates a trend confidence score based on the normalized separation of the EMAs.
The transparency of reversal markers dynamically adjusts:
Strong trends = more opaque signals
Weak trends = more transparent signals
🔹 How to Use
✅ Entries
Long Signal: Aqua upward label appears below a bar.
Conditions:
Bullish reversal or price crossing above Alpha Schaff
Normalized slope is rising
Short Signal: Fuchsia downward label appears above a bar.
Conditions:
Bearish reversal or price crossing below Alpha Schaff
Normalized slope is falling
✅ Trend Strength
The less transparent the signal marker, the more significant the trend.
✅ Customization
Use the inputs to fine-tune sensitivity:
Shorter EMAs: Faster signals
Longer EMAs: Smoother trends
Alpha Period: Adjusts the lookback range for normalization
🟢 Best Practices
NEC is best used in combination with other trend confirmation tools (e.g., price structure, volume, or higher timeframe EMAs).
Avoid relying on signals in extremely low-volume or choppy ranges.
⚠️ Disclaimer
This script is intended for educational purposes only and does not constitute financial advice. Trading involves substantial risk, and you should consult your financial advisor before making any investment decisions.
JAN - OCT [old] Engulfing Pattern Strategyold engulfing that is bad and shouldnt be used and if you do use it, then proceed at your own pearl. and i have to keep making this description longer other it wont publish which is annoying so this is just words to make the description longer so i can publish
JIYANS FVGJIYAN'S FVG is a powerful Fair Value Gap (FVG) indicator designed to help traders visually identify and track bullish and bearish imbalances across customizable timeframes. The script automatically detects FVGs based on market structure and plots them with shaded boxes and clear boundary lines on the chart.
Key Features:
Multi-Timeframe Detection: Select your preferred timeframe for FVG detection (e.g., H4, H1, M30).
Visual Clarity: Displays shaded gaps with customizable colors, upper and lower boundary lines, and optional midpoint lines for precise reference.
Dynamic Management: Automatically removes mitigated (filled) gaps to keep the chart clean and focused.
Labeling: Annotates each FVG with the selected timeframe for easy tracking.
Alerts: Built-in alerts notify you when a new FVG forms or when price touches the boundary of an existing unmitigated FVG.
This tool is perfect for traders who rely on price imbalances and fair value gaps to identify potential trading opportunities and key areas of interest.