DNSE VN301!, ADX Momentum StrategyDiscover the tailored Pine Script for trading VN30F1M Futures Contracts intraday.
This strategy applies the Statistical Method (IQR) to break down the components of the ADX, calculating the threshold of "normal" momentum fluctuations in price to identify potential breakouts for entry and exit signals. The script automatically closes all positions by 14:30 to avoid overnight holdings.
www.tradingview.com
Settings & Backtest Results:
- Chart: 30-minute timeframe
- Initial capital: VND 100 million
- Position size: 4 contracts per trade (includes trading fees, excludes tax)
- Backtest period: Sep-2021 to Sep-2025
- Return: over 270% (with 5 ticks slippage)
- Trades executed: 1,000+
- Win rate: ~40%
- Profit factor: 1.2
Default Script Settings:
Calculates the acceleration of changes in the +DI and -DI components of the ADX, using IQR to define "normal" momentum fluctuations (adjustable via Lookback period).
Calculates the difference between each bar’s Open and Close prices, using IQR to define "normal" gaps (adjustable via Lookback period).
Entry & Exit Conditions:
Entry Long: Change in +DI or -DI > Avg IQR Value AND Close Price > Previous Close
Exit Long: (all 4 conditions must be met)
- Change in +DI or -DI > Avg IQR Value
- RSI < Previous RSI
- Close–Open Gap > Avg IQR Gap
- Close Price < Previous Close
Entry Short: Change in +DI or -DI > Avg IQR Value AND Close Price < Previous Close
Exit Short: (all 4 conditions must be met)
- Change in +DI or -DI > Avg IQR Value
- RSI > Previous RSI
- Close–Open Gap > Avg IQR Gap
- Close Price > Previous Close
Disclaimers:
Trading futures contracts carries a high degree of risk, and price movements can be highly volatile. This script is intended as a reference tool only. It should be used by individuals who fully understand futures trading, have assessed their own risk tolerance, and are knowledgeable about the strategy’s logic.
All investment decisions are the sole responsibility of the user. DNSE bears no liability for any potential losses incurred from applying this strategy in real trading. Past performance does not guarantee future results. Please contact us directly if you have specific questions about this script.
Indicators and strategies
Dynamic Swing Anchored VWAP STRAT (Zeiierman/PineIndicators)Dynamic Swing Anchored VWAP STRATEGY — Zeiierman × PineIndicators (Pine Script v6)
A pivot-to-pivot Anchored VWAP strategy that adapts to volatility, enters long on bullish structure, and closes on bearish structure. Built for TradingView in Pine Script v6.
Full credits to zeiierman.
Repainting notice: The original indicator logic is repainting. Swing labels (HH/HL/LH/LL) are finalized after enough bars have printed, so labels do not occur in real time. It is not possible to execute at historical label points. Treat results as educational and validate with Bar Replay and paper trading before considering any discretionary use.
Concept
The script identifies swing highs/lows over a user-defined lookback ( Swing Period ). When structure flips (most recent swing low is newer than the most recent swing high, or vice versa), a new regime begins.
At each confirmed pivot, a fresh Anchored VWAP segment is started and updated bar-by-bar using an EWMA-style decay on price×volume and volume.
Responsiveness is controlled by Adaptive Price Tracking (APT) . Optionally, APT auto-adjusts with an ATR ratio so that high volatility accelerates responsiveness and low volatility smooths it.
Longs are opened/held in bullish regimes and closed when the regime turns bearish. No short positions are taken by design.
How it works (under the hood)
Swing detection: Uses ta.highestbars / ta.lowestbars over prd to update swing highs (ph) and lows (pl), plus their bar indices (phL, plL).
Regime logic: If phL > plL → bullish regime; else → bearish regime. A change in this condition triggers a re-anchor of the VWAP at the newest pivot.
Adaptive VWAP math: APT is converted to an exponential decay factor ( alphaFromAPT ), then applied to running sums of price×volume and volume, producing the current VWAP estimate.
Rendering: Each pivot-anchored VWAP segment is drawn as a polyline and color-coded by regime. Optional structure labels (HH/HL/LH/LL) annotate the swing character.
Orders: On bullish flips, strategy.entry("L") opens/maintains a long; on bearish flips, strategy.close("L") exits.
Inputs & controls
Swing Period (prd) — Higher values identify larger, slower swings; lower values catch more frequent pivots but add noise.
Adaptive Price Tracking (APT) — Governs the VWAP’s “half-life.” Smaller APT → faster/closer to price; larger APT → smoother/stabler.
Adapt APT by ATR ratio — When enabled, APT scales with volatility so the VWAP speeds up in turbulent markets and slows down in quiet markets.
Volatility Bias — Tunes the strength of APT’s response to volatility (above 1 = stronger effect; below 1 = milder).
Style settings — Colors for swing labels and VWAP segments, plus line width for visibility.
Trade logic summary
Entry: Long when the swing structure turns bullish (latest swing low is more recent than the last swing high).
Exit: Close the long when structure turns bearish.
Position size: qty = strategy.equity / close × 5 (dynamic sizing; scales with account equity and instrument price). Consider reducing the multiplier for a more conservative profile.
Recommended workflow
Apply to instruments with reliable volume (equities, futures, crypto; FX tick volume can work but varies by broker).
Start on your preferred timeframe. Intraday often benefits from smaller APT (more reactive); higher timeframes may prefer larger APT (smoother).
Begin with defaults ( prd=50, APT=20 ); then toggle “Adapt by ATR” and vary Volatility Bias to observe how segments tighten/loosen.
Use Bar Replay to watch how pivots confirm and how the strategy re-anchors VWAP at those confirmations.
Layer your own risk rules (stops/targets, max position cap, session filters) before any discretionary use.
Practical tips
Context filter: Consider combining with a higher-timeframe bias (e.g., daily trend) and using this strategy as an entry timing layer.
First pivot preference: Some traders prefer only the first bullish pivot after a bearish regime (and vice versa) to reduce whipsaw in choppy ranges.
Deviations: You can add VWAP deviation bands to pre-plan partial exits or re-entries on mean-reversion pulls.
Sessions: Session-based filters (RTH vs. ETH) can materially change behavior on futures and equities.
Extending the script (ideas)
Add stops/targets (e.g., ATR stop below last swing low; partial profits at k×VWAP deviation).
Introduce mirrored short logic for two-sided testing.
Include alert conditions for regime flips or for price-VWAP interactions.
Incorporate HTF confirmation (e.g., only long when daily VWAP slope ≥ 0).
Throttle entries (e.g., once per regime flip) to avoid over-trading in ranges.
Known limitations
Repainting: Swing labels and pivot confirmations depend on future bars; historical labels can look “perfect.” Treat them as annotations, not executable signals.
Execution realism: Strategy includes commission and slippage fields, yet actual fills differ by venue/liquidity.
No guarantees: Past behavior does not imply future results. This publication is for research/education only and not financial advice.
Defaults (backtest environment)
Initial capital: 10,000
Commission value: 0.01
Slippage: 1
Overlay: true
Max bars back: 5000; Max labels/polylines set for deep swing histories
Quick checklist
Add to chart and verify that the instrument has volume.
Use defaults, then tune APT and Volatility Bias with/without ATR adaptation.
Observe how each pivot re-anchors VWAP and how regime flips drive entries/exits.
Paper trade across several symbols/timeframes before any discretionary decisions.
Attribution & license
Original indicator concept and logic: Zeiierman — please credit the author.
Strategy wrapper and publication: PineIndicators .
License: CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike). Respect the license when forking or publishing derivatives.
Script_Algo - Pivot Trend Rider Strategy📌 This strategy aims to enter a trade in the direction of the trend, catching a reversal point at the end of a correction.
The script is unique due to the combination of three key elements:
🔹 Detection of reversal points through searching for local lows and highs
🔹 Trend filter based on SMA for trading only in the trend direction
🔹 Adaptive risk management using ATR for dynamic stop-losses and take-profits
This allows the strategy to work effectively in various market conditions, minimizing false signals and adapting to market volatility.
⚙️ Principle of Operation
The strategy is based on the following logical components:
📈 Entry Signals:
Long: when a local low (pivot low) is detected in an uptrend
Short: when a local high (pivot high) is detected in a downtrend
📉 Position Management:
Stop-loss and take-profit are calculated based on ATR
Automatic reverse switching when an opposite signal appears
📊 Trend Filter:
Uses SMA to determine trend direction (can be disabled if needed)
🔧 Default Settings
Pivot detection: 11 bars
SMA filter length: 16 periods
ATR period: 14
SL multiplier: 2.5
TP multiplier: 10
Trend filter: enabled
🕒 Usage Recommendations
Timeframe: from 1 hour and above
Assets: cryptocurrency pairs, stocks
🤖 Trading Automation
This script is fully ready for integration with cryptocurrency exchanges via Webhook.
📊 Backtest Results
As seen from testing results, over 4.5 years this strategy could have potentially generated about $5000 profit or 50% of initial capital on the NAERUSDT crypto pair on the 4H timeframe.
Position size: $1000
Max drawdown: $1400
Total trades: 376
Win rate: 38%
Profit factor: 1.34
⚠️ Disclaimer
Please note that the results of the strategy are not guaranteed to repeat in the future. The market constantly changes, and no algorithm can predict exactly how an asset will behave.
The author of this strategy is not responsible for any financial losses associated with using this script.
All trading decisions are made solely by the user.
Trading financial markets carries high risks and can lead to loss of your investments.
Before using the strategy, it is strongly recommended to:
✅ Backtest the strategy on historical data
✅ Start with small trading volumes
✅ Use only risk capital you are ready to lose
✅ Fully understand how the strategy works
🔮 Further Development
The strategy will continue to evolve and improve. Planned updates include:
Adding additional filters to reduce false signals
Optimizing position management algorithms
Expanding functionality for various market conditions
💡 Wishing everyone good luck and profitable trading!
📈 May your charts be green and your portfolios keep growing!
Developed by Script_Algo | MIT License | Version 1.0
VWAP Trend Strategy (Intraday) [KedarArc Quant]Description:
An intraday strategy that anchors to VWAP and only trades when a local EMA trend gate and a volume participation gate are both open. It offers two entry templates—Cross and Cross-and-Retest—with an optional Momentum Exception for impulsive moves. Exits combine a TrendBreak (structure flips) with an ATR emergency stop (risk cap).
Updates will be published under this script.
Why this merits a new script
This is not a simple “VWAP + EMA + ATR” overlay. The components are sequenced as gates and branches that *change the trade set* in ways a visual mashup cannot:
1. Trend Gate first (EMA fast vs. slow on the entry timeframe)
Counter-trend VWAP crosses are suppressed. Many VWAP scripts fire on every cross; here, no entry logic even evaluates unless the trend gate is open.
2. Participation Gate second (Volume SMA × multiplier)
This gate filters thin liquidity moves around VWAP. Without it, the same visuals would produce materially more false triggers.
3. Branching entries with structure awareness
* Cross: Immediate VWAP cross in the trend direction.
* Cross-and-Retest: Requires a revisit to VWAP vicinity within a lookback window (recent low near VWAP for longs; recent high for shorts). This explicitly removes first-touch fakeouts that a plain cross takes.
* Momentum Exception (optional): A quantified body% + volume condition can bypass the retest when flow is impulsive—intentional risk-timing, not “just another indicator.”
4. Dual exits that reference both anchor and structure
* TrendBreak: Close only when price loses VWAP and EMA alignment flips.
* ATR stop: Placed at entry to cap tail risk.
These exits complement the entry structure rather than being generic stop/target add-ons.
What it does
* Trades the session’s fair value anchor (VWAP), but only with local-trend agreement (EMA fast vs. slow) and sufficient participation (volume filter).
* Lets you pick Cross or Cross-and-Retest entries; optionally allow a fast Momentum Exception when candles expand with volume.
* Manages positions with a structure exit (TrendBreak) and an emergency ATR stop from entry.
How it works (concepts & calculations)
* VWAP (session anchor):
Standard VWAP of the active session; entries reference the cross and the retest proximity to VWAP.
* Trend gate:
Long context only if `EMA(fast) > EMA(slow)`; short only if `EMA(fast) < EMA(slow)`.
A *gate*, not a trigger—entries aren’t considered unless this is true.
* Participation (volume) gate:
Require `volume > SMA(volume, volLen) × volMult`.
Screens out low-participation wiggles around VWAP.
Entries:
* Cross: Price crosses VWAP in the trend direction while volume gate is open.
* Cross-and-Retest: After crossing, price revisits VWAP vicinity within `lookback` (recent *low near VWAP* for longs; recent *high near VWAP* for shorts).
* Momentum Exception (optional): If body% (|close−open| / range) and volume exceed thresholds, enter without waiting for the retest.
Exits:
* TrendBreak (structure):
* Longs close when `price < VWAP` and `EMA(fast) < EMA(slow)` (mirror for shorts).
* ATR stop (risk):
* From entry: `stop = entry ± ATR(atrLen) × atrMult`.
How to use it ?
1. Select market & timeframe: Intraday on liquid symbols (equities, futures, crypto).
2. Pick entry mode:
* Start with Cross-and-Retest for fewer, more selective signals.
* Enable Momentum Exception if strong moves leave without retesting.
3. Tune guards:
* Raise `volMult` to ignore thin periods; lower it for more activity.
* Adjust `lookback` if retests come late/early on your symbol.
4. Risk:
* `atrLen` and `atrMult` set the emergency stop distance.
5. Read results per session: Optional panel (if enabled) summarizes Net-R, Win%, and PF for today’s session to evaluate
behavior regime by regime.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Gann Fan Strategy [KedarArc Quant]Description
A single-concept, rule-based strategy that trades around a programmatic Gann Fan.
It anchors to a swing (or a manual point), builds 1×1 and related fan lines numerically, and triggers entries when price interacts with the 1×1 (breakout or bounce). Management is done entirely with the fan structure (next/previous line) plus optional ATR trailing.
What TV indicators are used
* Pivots: `ta.pivothigh/ta.pivotlow` to confirm swing highs/lows for anchor selection.
* ATR: `ta.atr` only to scale the 1×1 slope (optional) and for an optional trailing stop.
* EMA: `ta.ema` as a trend filter (e.g., only long above the EMA, short below).
No RSI/MACD/Stoch/Heikin/etc. The logic is one coherent framework: Gann price–time geometry, with ATR as a scale and EMA as a risk filter.
How it works
1. Anchor
* Auto: chooses the most recent *confirmed* pivot (you control Left/Right).
* Manual: set a price and bar index and the fan will hold that point (no re-anchoring).
* Optional Re-anchor when a newer pivot confirms.
2. 1×1 Slope (numeric, not cosmetic)
* ATR mode: `1×1 = ATR(Length) × Multiplier` (adapts to volatility).
* Fixed mode: `ticks per bar` (constant slope).
Because slope is numeric, it doesn’t change with chart zoom, unlike the drawing tool.
3. Fan Lines
Builds classic ratios around the 1×1: 1/8, 1/4, 1/3, 1/2, 1/1, 2/1, 3/1, 4/1, 8/1.
4. Signals
* Breakout: cross of price over/under the 1×1 in the EMA-aligned direction.
* Bounce (optional): touch + reversal across the 1×1 to reduce whipsaw.
5. Exits & Risk
* Take-profit at the next fan line; Stop at the previous fan line.
* If a level is missing (right after re-anchor), a fallback Risk-Reward (RR) is used.
* Optional ATR trailing stop.
Why this is unique
* True numeric fan: The 1×1 slope is calculated from ATR or fixed ticks—not from screen geometry—so it is scale-invariant and reproducible across users/timeframes.
* Deterministic anchor logic: Uses confirmed pivots (with your L/R settings). No look-ahead; anchors update only when the right bars complete.
* Fan-native trade management: Both entries and exits come from the fan structure itself (with a minimal ATR/EMA assist), keeping the method pure.
* Two entry archetypes: Breakout for momentum days; Bounce for range days—switchable without changing the core model.
* Manual mode: Lock a session’s bias by anchoring to a chosen swing (e.g., day’s first major low/high) and keep the fan constant all day.
Inputs (quick guide)
* Auto Anchor (Left/Right): pivot sensitivity. Higher values = fewer, stronger anchors.
* Re-anchor: refresh to newer pivots as they confirm.
* Manual Anchor Price / Bar Index: fixes the fan (turn Auto off).
* Scale 1×1 by ATR: on = adaptive; off = use ticks per bar.
* ATR Length / ATR Multiplier: controls adaptive slope; start around 14 / 0.25–0.35.
* Ticks per bar: exact fixed slope (match a hand-drawn fan by computing slope ÷ mintick).
* EMA Trend Filter: e.g., 50–100; trades only in EMA direction.
* Use Bounce: require touch + reverse across 1×1 (helps in chop).
* TP/SL at fan lines; Fallback RR for missing levels; ATR Trailing Stop optional.
* Transparency/Plot EMA: visual preferences.
Tips
* Range days: larger pivots (L/R 8–12), Bounce ON, ATR Multiplier \~0.30–0.40, EMA 100.
* Trend days: L/R 5–6, Breakout, Multiplier \~0.20–0.30, EMA 50, ATR trail 1.0–1.5.
* Match the TV Gann Fan drawing: turn ATR scale OFF, set ticks per bar = `(Δprice between anchor and 1×1 target) / (bars) / mintick`.
Repainting & testing notes
* Pivots require Right bars to confirm; anchors are set after confirmation (no look-ahead).
* Signals use the current bar close with TradingView strategy mechanics; real-time vs. bar-close can differ slightly, as with any strategy.
* Re-anchoring legitimately moves the structure when new pivots confirm—by design.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
W Bottom Reversal Strategy W Bottom Reversal Strategy (15m-close entries; intrabar TP; daily MACD exit; JSON alerts v49.3-expire2)
Overview
A precision reversal strategy designed for 15-minute charts on liquid symbols. It detects a capitulation-and-stabilization “W” base using 1-hour (1H) context, confirms momentum improvement, then enters only on bar close to avoid early/“ghost” signals. Exits combine a fast intrabar take-profit (~2.7%) with a daily MACD risk-off exit that closes positions when higher-timeframe momentum turns against the setup.
How it works (high-level, matching code)
1H volatility + oversold gate (arming)
Compute 1H Bollinger-style bands (basis = SMA(close, bbLength=20), stdev multiplier bbMult=2.0).
Arm the setup when a 1H bar closes with price < 1H lower band and 1H RSI( rsiLength=14 ) < rsiThreshold (default 20.0).
1H momentum flip → pending entry
When a new 1H bar closes and 1H MACD line (EMA12−EMA26) crosses above 0 while armed and flat, set an entryPending flag.
This does not enter yet—it prepares a confirmed, bar-close entry on the lower timeframe.
Bar-close execution on the chart timeframe (15m)
On the next 15m bar close (or within N bars, see below) and still flat, fire the entry using a limit order at close × (1 − 0.00001) (≈ 0.001% below close) to reduce slippage and maintain chart/alert alignment.
Anti-late filter (no stale triggers)
If the pending entry doesn’t trigger within N chart bars (input: “Pending entry valid for N chart bars”, default 1, range 1–8), it expires and the arm state resets. This prevents late fills long after the 1H confirmation.
Exit logic
Primary: Standing intrabar take-profit at +2.7% from the average entry price (managed via strategy.exit limit).
Risk-off: On daily bar close, if Daily MACD line (EMA12−EMA26) crosses under 0, close the position (flat on daily momentum flip).
Default Properties (used for this publication)
Timeframe: 15m (with 1H and Daily higher-timeframe confirmations via request.security)
Initial capital: $10,000
Position sizing: Percent of equity = 10% per trade (enters only when flat; no stacking while in a position)
Commission: 0.05% per side
Slippage: Recommend 1 tick in Strategy Properties for realistic fills
Inputs exposed:
BB Length: 20 • BB Multiplier: 2.0
RSI Length: 14 • RSI Threshold: 20.0
MACD: Short 12, Long 26, Signal 9 (signal kept for compatibility; logic uses MACD line vs 0)
Pending entry valid for N chart bars: default 1 (1–8)
Execution behavior (per code):
calc_on_every_tick = false (evaluates on bar close)
process_orders_on_close = true (orders placed at bar close)
Limit entry at close −0.001%
Intrabar TP (2.7%)
Daily risk-off exit on MACD<0 at daily bar close
Alerts (exact behavior in code)
Uses alert() function calls with standardized JSON.
Set your alert to “Only alert() function calls” and “Once per bar close.”
Two events are emitted:
LONG_CONFIRMED on entry fire (15m bar close)
EXIT_CONFIRMED_DAILY_MACD on daily MACD<0 (daily bar close)
JSON fields include: event, version ("v49.3-expire2"), symbol, interval, price, and time.
How to use
Apply on liquid tickers (tight spreads, healthy volume).
Keep defaults initially; run across a broad, liquid watchlist to gather a proper sample.
For automation, route bar-close alerts to your executor; confirm broker lot/route settings and that limit orders at close −0.001% are acceptable.
Expect fewer signals in powerful trends; the daily risk-off helps cut failed bases.
Methodology & expectations (results transparency)
Evaluate on a dataset yielding 100+ trades before drawing conclusions.
Keep commission & slippage enabled (see defaults).
Risk sizing: With 10% of equity per trade and flat-to-flat entries, exposure aligns with typical 5–10% guidance.
No performance guarantees—outcomes depend on symbol selection, volatility regime, news, and execution quality.
Originality & value (vendor justification)
While it uses familiar building blocks (BB/RSI/MACD), the edge comes from the 1H volatility + oversold arming, 1H momentum flip, strict 15m bar-close limit execution, and the N-bar pending expiry that prevents stale triggers—paired with a dual-exit design (intrabar TP + daily risk-off). The focus is on reducing premature fills, keeping alerts 1:1 with chart marks, and capturing the first impulse out of a W-base.
Disclaimers
For educational purposes only; not financial advice. Paper-test first. Verify alerts, fills, and symbol liquidity with your broker before live use.
Changelog: v49.3-expire2 — Bar-close limit entries; anti-late pending window; standardized JSON alerts; intrabar 2.7% TP; daily MACD risk-off exit.
Advanced Crypto Day Trading - Bybit Optimized mapercivEMA RSI ATR MACD trading script strategy with filters for weekdays
LP Sweep / Reclaim & Breakout Grading: Long-onlySignals
1) LP Sweep & Reclaim (mean-reversion entry)
Compute LP bounds from prior-bar window extremes:
lpLL_prev = lowest low of the last N bars (offset 1).
lpHH_prev = highest high of the last N bars (offset 1).
Sweep long trigger: current low dips below lpLL_prev and closes back above it.
Real-time quality grading (A/B/C) for sweep:
Trend filter & slope via EMA(88).
BOS bonus: close > last confirmed swing high.
Body size vs ATR, location above a long EMA, headroom to swing high (penalty if too close), and multi-sweep count bonus.
Sum → score → grade A/B/C; A or B required for sweep entry.
2) Trend Breakout (momentum entry)
Core trigger: close > previous Donchian high (length boLen) + ATR buffer.
Optional filter: close must be above the default EMA.
Breakout grading (A/B/C) in real time combining:
Trend up (price > EMA and EMA rising),
Body/ATR, Gap above breakout level (in ATR),
Volume vs MA,
Upper-wick penalty,
Position-in-Score: headroom to last swing high (penalty if too near) + EMA slope bonus.
Sum → score → A or B required if grading enabled.
RSI Momentum Trend MM with Risk Per Trade [MTF]This is a comprehensive and highly customizable trend-following strategy based on RSI momentum. The core logic identifies strong directional moves when the RSI crosses user-defined thresholds, combined with an EMA trend confirmation. It is designed for traders who want granular control over their strategy's parameters, from signal generation to risk management and exit logic.
This script evolves a simple concept into a powerful backtesting tool, allowing you to test various money management and trade management theories across different timeframes.
Key Features
- RSI Momentum Signals: Uses RSI crosses above a "Positive" level or below a "Negative" level to generate trend signals. An EMA filter ensures entries align with the immediate trend.
- Multi-Timeframe (MTF) Analysis: The core RSI and EMA signals can be calculated on a higher timeframe (e.g., using 4H signals to trade on a 1H chart) to align trades with the larger trend. This feature helps to reduce noise and improve signal quality.
Advanced Money Management
- Risk per Trade %: Calculate position size based on a fixed percentage of equity you want to risk per trade.
- Full Equity: A more aggressive option to open each position with 100% of the available strategy equity.
Flexible Exit Logic: Choose from three distinct exit strategies to match your trading style
- Percentage (%) Based: Set a fixed Stop Loss and Take Profit as a percentage of the entry price.
- ATR Multiplier: Base your Stop Loss and Take Profit on the Average True Range (ATR), making your exits adaptive to market volatility.
- Trend Reversal: A true trend-following mode. A long position is held until an opposite "Negative" signal appears, and a short position is held until a "Positive" signal appears. This allows you to "let your winners run."
Backtest Date Range Filter: Easily configure a start and end date to backtest the strategy's performance during specific market periods (e.g., bull markets, bear markets, or high-volatility periods).
How to Use
RSI Settings
- Higher Timeframe: Set the timeframe for signal calculation. This must be higher than your chart's timeframe.
- RSI Length, Positive above, Negative below: Configure the core parameters for the RSI signals.
Money Management
Position Sizing Mode
- Choose "Risk per Trade" to use the Risk per Trade (%) input for precise risk control.
- Choose "Full Equity" to use 100% of your capital for each trade.
- Risk per Trade (%): Define the percentage of your equity to risk on a single trade (only works with the corresponding sizing mode).
SL/TP Calculation Mode
Select your preferred exit method from the dropdown. The strategy will automatically use the relevant inputs (e.g., % values, ATR Multiplier values, or the trend reversal logic).
Backtest Period Settings
Use the Start Date and End Date inputs to isolate a specific period for your backtest analysis.
License & Disclaimer
© waranyu.trkm — MIT License.
This script is for educational purposes only and should not be considered financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always conduct your own research and risk assessment before making any trading decisions.
Higher Lows, Lower Highs & Failures with Signal Quality ScoringAn attempt at a higher low and lower high with scoring
dr.forexy strategy 1“Dear friends, please do not use this strategy on your own! This setup works best on the 5-minute timeframe. I hope it brings you great profits.”
Fury by Tetrad on TESLA v2Fury by Tetrad — TSLA v2 (Free Version)
📊 Fury v2 on TSLA — Financial Snapshot
First trade: August 11, 2010
Last trade: September 5, 2025
Net Profit: $10,549.10 (≈ +10,549%)
Gross Profit: $10,554.36
Gross Loss: $5.26
Commission Paid: $86.95
⚖️ Risk/Return Ratios
Sharpe Ratio: 0.42
Sortino Ratio: 17.63
Profit Factor: 2005.38
🔄 Trade Statistics
Total Trades: 37
Winning Trades: 37
Losing Trades: 0
Win Rate: 100%
Fury is a momentum-reversion hybrid designed for Tesla (TSLA) on higher-liquidity timeframes. It combines Bollinger Bands (signal extremes) with RSI (exhaustion filter) to time mean-reversion pops/drops, then exits via price multipliers or optional time-based stops. A Market Direction toggle (Market Neutral / Long Only / Short Only) lets you align with macro bias or risk constraints. Intrabar simulation is enabled for realistic stop/limit behavior, and labeled entries/exits improve visual auditability.
How it works
Entries:
• Long when price pierces lower band and RSI is below the long threshold.
• Short when price pierces upper band and RSI is above the short threshold.
Exits:
• Profit targets via entry×multiplier (independent for long/short).
• Optional price-based stop factors per side.
• Optional time stop (N days) to cap trade duration.
Controls:
• Market Direction switch (Neutral / Long Only / Short Only).
• Tunable BB length/multiplier, RSI length/thresholds, exit multipliers, stops.
Intended use
Swing or position trading TSLA; can be adapted to other high-beta equities with parameter retuning. Use on liquid timeframes and validate with robust out-of-sample testing.
Disclaimers
Backtests are approximations; past performance ≠ future results. Educational use only. Not financial advice.
Stay connected
Follow on TradingView for updates • Telegram: t.me • Website: tetradprotocol.com
Recovery StrategyDescription:
The Recovery Strategy is a long-only trading system designed to capitalize on significant price drops from recent highs. It enters a position when the price falls 10% or more from the highest high over a 6-month lookback period and adds positions on further 2% drops, up to a maximum of 5 positions. Each trade is held for 6 months before exiting, regardless of profit or loss. The strategy uses margin to amplify position sizes, with a default leverage of 5:1 (20% margin requirement). All key parameters are customizable via inputs, allowing flexibility for different assets and timeframes. Visual markers indicate recent highs for reference.
How It Works:
Entry: Buys when the closing price drops 10% or more from the recent high (highest high in the lookback period, default 126 bars ~6 months). If already in a position, additional buys occur on further 2% drops (e.g., 12%, 14%, 16%, 18%), up to 5 positions (pyramiding).
Exit: Each trade exits after its own holding period (default 126 bars ~6 months), regardless of profit or loss. No stop loss or take-profit is used.
Margin: Uses leverage to control larger positions (default 20% margin, 5:1 leverage). The order size is a percentage of equity (default 100%), adjustable via inputs.
Visualization: Displays blue markers (without text) at new recent highs to highlight reference levels.
Inputs:
Lookback Period for High Peak (bars): Number of bars to look back for the recent high (default: 126, ~6 months on daily charts).
Initial Drop Percentage to Buy (%): Percentage drop from recent high to trigger the first buy (default: 10.0%).
Additional Drop Percentage to Buy (%): Further drop percentage to add positions (default: 2.0%).
Holding Period (bars): Number of bars to hold each position before selling (default: 126, ~6 months).
Order Size (% of Equity): Percentage of equity used per trade (default: 100%).
Margin for Long Positions (%): Percentage of position value covered by equity (default: 20%, equivalent to 5:1 leverage).
Usage:
Timeframe: Designed for daily charts (126 bars ~6 months). Adjust Lookback Period and Holding Period for other timeframes (e.g., 1008 hours for hourly charts, assuming 8 trading hours/day).
Assets: Suitable for stocks, ETFs, or other assets with significant price volatility. Test thoroughly on your chosen asset.
Settings: Customize inputs in the strategy settings to match your risk tolerance and market conditions. For example, lower Margin for Long Positions (e.g., to 10% for 10:1 leverage) to increase position sizes, but beware of higher risk.
Backtesting: Use TradingView’s Strategy Tester to evaluate performance. Check the “List of Trades” for skipped trades due to insufficient equity or margin requirements.
Risks and Considerations:
No Stop Loss: The strategy holds trades for the full 6 months without a stop loss, exposing it to significant drawdowns in prolonged downtrends.
Margin Risk: Leverage (default 5:1) amplifies both profits and losses. Ensure sufficient equity to cover margin requirements to avoid skipped trades or simulated margin calls.
Pyramiding: Up to 5 positions can be open simultaneously, increasing exposure. Adjust pyramiding in the code if fewer positions are desired (e.g., change to pyramiding=3).
Market Conditions: Performance depends on price drops and recoveries. Test on historical data to assess effectiveness in your market.
Broker Emulator: TradingView’s paper trading simulates margin but does not execute real margin trading. Results may differ in live trading due to broker-specific margin rules.
How to Use:
Add the strategy to your chart in TradingView.
Adjust input parameters in the settings panel to suit your asset, timeframe, and risk preferences.
Run a backtest in the Strategy Tester to evaluate performance.
Monitor open positions and margin levels in the Trading Panel to manage risk.
For live trading, consult your broker’s margin requirements and leverage policies, as TradingView’s simulation may not match real-world conditions.
Disclaimer:
This strategy is for educational purposes only and does not constitute financial advice. Trading involves significant risk, especially with leverage and no stop loss. Always backtest thoroughly and consult a financial advisor before using any strategy in live trading.
5 EMA Close/Open Cross StrategyLong Entry - 5 EMA Close crossing above 5 EMA open
exit - 5 EMA Close crossing below 5 EMA open
Short entry - 5 EMA Close crossing below 5 EMA open
exit - 5 EMA Close crossing above 5 EMA open
Ismail version3The strategy is a long-only momentum system built on two classical technical indicators:
Relative Strength Index (RSI)
Momentum oscillator
It focuses on capturing upward moves while avoiding short trades, making it suitable for bullish markets, trend-following, or long-only portfolios.
BRN 03 BANDS AND ZONES Strategy Description: BRN 03 - Channel Reversal with DCA
Overview:
This is a versatile mean-reversion strategy designed to trade reversals from overbought or oversold conditions. It uses a user-selectable dynamic channel to define price extremes and enters a position only after receiving confirmation from a specific candlestick pattern. The strategy includes a Dollar Cost Averaging (DCA) system for position management and a unified take-profit mechanism.
Key Features:
Selectable Channels: The core of the strategy is built around one of five user-selectable channels to define support and resistance zones:
Bollinger Bands
VWAP (Volume-Weighted Average Price) Bands
ATR (Average True Range) Channel
Keltner Channels
Moving Average Envelope (%)
Dual-Condition Entry Signal: An entry is triggered only when two conditions are met:
The price enters a "trading zone" outside the primary channel bands.
A reversal candlestick pattern (either a simple "Reversal Candle" or a stricter "Engulfing Candle") forms within that zone.
DCA Position Management: The strategy can add to an existing position with a Dollar Cost Averaging (DCA) system. New orders are only placed at a more favorable price than the previous entry, effectively improving the overall average price.
Optional Trend Filter: A multi-timeframe Supertrend filter can be enabled to prevent the strategy from taking counter-trend trades in a strongly trending market.
Unified Take Profit System: The exit logic intelligently combines two types of targets, closing the trade at whichever is hit first:
Channel-Based Target: Either the channel's central line (e.g., the moving average) or the opposite band.
Percentage-Based Target: A fixed percentage gain from the average entry price.
Dynamic Stop Loss: Risk is managed with an ATR-based stop loss and an optional ATR-based trailing stop (Chandelier Exit) to protect profits
Penguin Volatility State StrategyThe Penguin Volatility State Strategy is a comprehensive technical analysis framework designed to identify the underlying "state" or "regime" of the market. Instead of just providing simple buy or sell signals, its primary goal is to classify the market into one of four distinct states by combining trend, momentum, and volatility analysis.
The core idea is to trade only when these three elements align, focusing on periods of volatility expansion (a "squeeze breakout") that occur in the direction of a confirmed trend and are supported by strong momentum.
Key Components
The strategy is built upon two main engines
The Volatility Engine (Bollinger Bands vs. Keltner Channels)
This engine detects periods of rapidly increasing volatility. It measures the percentage difference (diff) between the upper bands of Bollinger Bands (which are based on standard deviation) and Keltner Channels (based on Average True Range). During a volatility "squeeze," both bands are close. When price breaks out, the Bollinger Band expands much faster than the Keltner Channel, causing the diff value to become positive. A positive diff signals a volatility breakout, which is the moment the strategy becomes active.
The Trend & Momentum Engine (Multi-EMA System)
This engine determines the market's direction and strength. It uses:
A Fast EMA (e.g., 12-period) and a Slow EMA (e.g., 26-period): The crossover of these two moving averages defines the primary, underlying trend (similar to a MACD).
An Ultra-Fast EMA (e.g., 2-period of ohlc4): This is used to measure the immediate, short-term momentum of the price.
The Four Market States
By combining the Trend and Momentum engines, the strategy categorizes the market into four visually distinct states, represented by the chart's background color. This is the most crucial aspect of the system.
💚 Green State: Strong Bullish
The primary trend is UP (Fast EMA > Slow EMA) AND the immediate momentum is STRONG (Price > Fast EMA).
Interpretation: This represents a healthy, robust uptrend where both the underlying trend and short-term price action are aligned. It is considered the safest condition for taking long positions.
❤️ Red State: Strong Bearish
Condition: The primary trend is DOWN (Fast EMA < Slow EMA) AND the immediate momentum is WEAK (Price < Fast EMA).
Interpretation: This represents a strong, confirmed downtrend. It is considered the safest condition for taking short positions.
💛 Yellow State: Weakening Bullish / Pullback
Condition: The primary trend is UP (Fast EMA > Slow EMA) BUT the immediate momentum is WEAK (Price < Fast EMA).
Interpretation: This is a critical warning signal for bulls. While the larger trend is still up, the short-term price action is showing weakness. This could be a minor pullback, a period of consolidation, or the very beginning of a trend reversal. Caution is advised.
💙 Blue State: Weakening Bearish / Relief Rally
Condition: The primary trend is DOWN (Fast EMA < Slow EMA) BUT the immediate momentum is STRONG (Price > Fast EMA).
Interpretation: This signals that a downtrend is losing steam. It often represents a short-covering rally (a "bear market rally") or the first potential sign of a market bottom. Bears should be cautious and consider taking profits.
How the Strategy Functions
The strategy uses these four states as its foundation for making trading decisions. The entry and exit arrows (Long, Short, Close) are generated based on a set of rules that can be customized by the user. For instance, a trader can configure the strategy to
Only take long trades during the Green State.
Require a confirmed volatility breakout (diff > 0) before entering a trade.
Use the "RSI on Diff" indicator to ensure that the breakout is supported by accelerating momentum.
Summary
In essence, the Penguin Volatility State Strategy provides a powerful "dashboard" for viewing the market. It moves beyond simple indicators to offer a contextual understanding of price action. By waiting for the alignment of Trend (the State), Volatility (the Breakout), and Momentum (the Acceleration), it helps traders to identify higher-probability setups and, just as importantly, to know when it is better to stay out of the market.
License / disclaimer
© waranyu.trkm — MIT License. Educational use only; not financial advice.
Price vs Volume - Reversal StrategySelf-explanatory title <3
Price vs Volume - Reversal Strategy
You set how many past bars and average volume for the desired TF, then it'll show where the imbalances happens
Valdes Trading Bots Pro Strategy (TP + BE % + Trail)v10.1Pro Strategy (TP + BE % + Trail) v10.1
Overview
This strategy is built for systematic trade management, combining dynamic entries with layered exit controls. It’s designed to help evaluate staged profit-taking, breakeven protection, and trailing stop logic directly in backtests.
Core logic
Entry signals use a volatility-based filter combined with trend confirmation.
Exits are modular and can be enabled or disabled independently.
The system is adaptable to different markets and timeframes.
Features
Take Profits: Up to three scalable targets with user-defined % levels and allocation.
Breakeven: Optional breakeven trigger and offset for risk protection.
Trailing Stop: Trail activation and distance settings to capture extended moves.
Sizing: Portfolio-percent sizing by default, with an optional multiplier to simulate leverage.
Alert Mode: Choose between standard alerts or a structured JSON format for advanced integration.
Best use cases
Testing scaling-out methods vs. single-exit trades.
Comparing breakeven vs. trailing stop performance across timeframes.
Assessing risk management techniques under different volatility conditions.
Notes
Backtest results may differ from live results due to fees, slippage, or execution conditions.
This script is for research and educational purposes only.
CryptoThunder Storm v1.21CryptoThunder Storm v1.21 — Strategy (non-repainting, HTF-aware)
CryptoThunder Storm is a Pine v6 strategy that trades the cross of two moving-average variants computed on an alternate (higher) timeframe derived from your current chart. It’s built to be non-repainting by evaluating signals only at HTF bar boundaries and by avoiding lookahead. The script can trade LONG, SHORT, BOTH, or be disabled, and it includes a one-click invert Long/Short mode.
How it works
Two MA streams (Open/Close series).
You can choose from multiple MA types (SMA/EMA/DEMA/TEMA/WMA/VWMA/SMMA/Hull/LSMA/ALMA/SSMA/TMA). The script computes:
closeSeries – MA of the (possibly delayed) close
openSeries – MA of the (possibly delayed) open
Alternate Resolution (HTF).
The inputs allow you to multiply your current chart’s timeframe (e.g., on 5m with multiplier 3 → HTF = 15m). Both series are requested via request.security() with lookahead_off.
Non-repainting gating.
Signals are evaluated once per HTF bar (htfClosed gate). This ensures entries/alerts are aligned with HTF boundaries and prevents forward-shifting.
Entry logic.
Long when closeSeriesAlt crosses above openSeriesAlt.
Short when closeSeriesAlt crosses below openSeriesAlt.
Invert mode swaps these actions (a former long signal opens a short, and vice versa).
Orders are processed on bar close (process_orders_on_close=true).
Risk management (optional).
Optional initial TP/SL exits via strategy.exit() (ticks/points). Set 0 to disable.
Visuals.
The script colors bars (optional) and plots the two HTF series with a filled band, plus compact UP/DN/CL markers that match the executed side after inversion/filtering.
Inputs & configuration
Use Alternate Resolution?
Turns the HTF logic on/off. When off, the strategy uses the chart timeframe.
Multiplier for Alternate Resolution
Multiplies the current timeframe to form the HTF (e.g., 3×).
MA Type / Period / Offsets
MA Type — choose from 12 variants.
MA Period — core length.
Offset for LSMA / Sigma for ALMA — MA-specific tuning.
Offset for ALMA — center of mass for ALMA.
Delay Open/Close MA — shifts the source back by n bars for a more conservative (non-peek) calculation. Keep at 0 unless you know you want extra delay.
Show coloured Bars to indicate Trend?
Colors bars relative to HTF band.
What trades should be taken: LONG / SHORT / BOTH / NONE
Filters which sides are actually traded.
Invert Long/Short logic?
Swaps long ↔ short everywhere (orders, markers, JSON alerts).
Backtest window (Number of Bars for Back Testing)
Crude limiter to speed up testing. 0 = test full history.
TP/SL (Initial Stop Loss / Target Profit Points)
Values in ticks/points. 0 disables. They apply to both sides via strategy.exit().
Alert options
Turn on alerts (JSON)
Show alert marks (UP/DOWN/CLOSE)
Send CLOSE alerts (toggle)
The strategy fires alert() internally. Create an alert on “Any alert() function call”.
The payload is a simple JSON string:{ "text":"C98USDT.P UP"}
Messages:
UP — a long entry was executed (or, with Invert on: the inverted long signal that opens a long).
DOWN — a short entry executed.
CLOSE — position closed or flipped.
Tip: If you want to route long/short to different webhooks, parse the text field for UP, DOWN, or CLOSE
Plotting & markers
Band: Fills between the two HTF MA lines.
Bar color (optional): Quick visual trend cue.
Markers:
▲ “UP” below bar when a long executes.
▼ “DN” above bar when a short executes.
✖ “CL” on position close/flip.
These reflect the final executed side, after trade filters and after Invert mode
Best practices & notes
Non-repainting design.
request.security(..., lookahead_off) prevents future data leakage.
Signals are gated to HTF bar boundaries, so you won’t get intra-HTF recalculations.
Strategy orders are processed at bar close.
Choosing the multiplier.
A 2×–4× multiplier often balances responsiveness vs stability (e.g., 5m→15m or 20m). Larger multipliers reduce churn and false signals.
TP/SL units.
Values are in ticks/points of the chart symbol. On crypto, check your instrument’s tick size and adjust accordingly.
Trade filters apply after inversion.
With invertLS = true and tradeType = LONG, only final longs (post-inversion) are allowed.
Strategy vs chart counts.
The Tester reports closed trades; your chart shows entries/markers including the latest open trade. This can explain 8 vs 12 discrepancies over short windows.
Performance.
calc_on_every_tick=false and the backtest limiter keep the script responsive on long histories.
Tips: user on mid-volume crypto pair, 1M chart, best MA is: SMMA, Hull, SSMA, DEMA, TEMA.
This strategy is for research and education. Markets carry risk; past performance doesn’t guarantee future results. Always forward-test on paper and validate your exchange execution, tick size, and fees before deploying live.
AI-JX Strategy### 🤖 Core Features
AI-JX v3.3 is an AI-powered comprehensive trading strategy system developed with PineScript v6, integrating multiple advanced technical analysis tools and machine learning algorithms.
### 📊 Main Functional Modules 1. AI Learning System
- Adaptive Parameter Optimization : Automatically learns and adjusts trading parameters
- Three Strategy Modes : Conservative (ranging markets), Aggressive (trending markets), Balanced (universal)
- Dynamic Weight Adjustment : Intelligently allocates weights to different strategies based on market conditions
- Learning Memory Mechanism : Records historical trading data for continuous strategy optimization 2. Technical Indicator System
- SuperTrend Indicator : ATR-based trend following system
- Heikin Ashi Smoothing : Reduces market noise for clearer trend signals
- Standard Deviation Channels : Multi-level support and resistance analysis
- Trend Distribution Profile : Visualizes price distribution and trend strength
- Multi-Timeframe Analysis : Comprehensive analysis across 5m, 15m, and 1h timeframes 3. Intelligent Signal Generation
- Traditional Signals : Classic buy/sell signals based on SuperTrend
- AI Smart Signals : Comprehensive scoring system combining RSI, MACD, and ATR
- False Breakout Detection : Identifies and filters fake breakout signals
- Price Confirmation Mechanism : Ensures signal validity and reliability 4. Risk Management System
- Dynamic Stop Loss/Take Profit : Long 3% TP/1.5% SL, Short 2:1 risk-reward ratio
- Slippage Monitoring : Real-time market slippage risk assessment
- Volatility Filtering : Adjusts trading strategy based on ATR
- Position Management : Smart capital allocation and risk control 5. Visualization Panels
- Statistics Panel : Displays key data like trade count, win rate, current strategy
- AI Learning Panel : Shows strategy weights and learning progress
- Prediction Panel : Real-time AI analysis and trading recommendations
- Chart Markers : Clear buy/sell signals and trend line displays 6. Alert System
- Multiple Alert Types : Buy, sell, take profit, and stop loss notifications
- Personalized Messages : Fun "WangWang" themed alert messages
- Real-time Notifications : Precise alerts with maximum one per bar frequency
### 🎯 Key Advantages
- AI-Driven : Machine learning optimization for better performance
- Multi-Strategy : Adapts to different market conditions automatically
- Risk-Controlled : Comprehensive risk management with dynamic adjustments
- User-Friendly : Intuitive interface with detailed visualization panels
- Highly Customizable : Extensive parameter settings for different trading styles
Liquidation Strategy💣 Liquidation Strategy (High-Level Overview + Usage)
This strategy is built to trade extreme liquidation events on crypto exchanges like Bybit or OKX, using TradingView’s Liquidations indicator as input.
🔧 Core Logic
Long entries: Triggered when long liquidation values spike above a set threshold.
Short entries: Triggered when short liquidation values drop below a negative threshold.
Optional EMA filter ensures liquidation values are significantly above/below their moving average.
RSI crossover logic is used to exit trades.
🛠️ Usage Instructions
Add the Liquidations Indicator: Go to TradingView → Indicators → Search for “Liquidations” under the Financials section.
Select the Correct Chart: Use a chart from Bybit or OKX, as these exchanges provide liquidation data.
Link the Data Sources: In the strategy settings, set: Long Liquidation Data to the long liquidation series from the indicator. Short Liquidation Data to the short liquidation series.
Overlay the Strategy: You can overlay this strategy directly on the Liquidations indicator for better visual alignment.