15m ORB + FVG Strategy (ChadAnt)Core Logic
The indicator's logic revolves around three main phases:
1. Defining the 15-Minute Opening Range (ORB)
The script calculates the highest high (rangeHigh) and lowest low (rangeLow) that occurred during the first 15 minutes of the trading day.
This time window is defined by the sessionStr input, which defaults to 0930-0945 (exchange time).
The high and low of this range are plotted as small gray dots once the session ends (rangeSet = true).
2. Identifying a Fair Value Gap (FVG) Setup
After the 15-minute range is set, the indicator waits for a breakout of either the range high or range low.
A "Strict FVG breakout" requires two conditions on the first candle that closes beyond the range:
The candle before the breakout candle ( bars ago) must have been inside the range.
The breakout candle ( bar ago) must have closed outside the range.
A Fair Value Gap (FVG) must form on the most recent three candles (the current bar and the two previous bars).
Bullish FVG (Long Setup): The low of the current bar (low) is greater than the high of the bar two periods prior (high ). This FVG represents a price inefficiency that the trade expects to fill.
Bearish FVG (Short Setup): The high of the current bar (high) is less than the low of the bar two periods prior (low ).
If a valid FVG setup occurs, the indicator marks a pending setup and draws a colored box to highlight the FVG area (Green for Bullish FVG, Red for Bearish FVG).
3. Trade Entry and Management
If a pending setup is identified, the trade is structured as a re-entry trade into the FVG zone:
Entry Price: Set at the outer boundary of the FVG, which is the low of the current bar for a Long setup, or the high of the current bar for a Short setup.
Stop Loss (SL): Set at the opposite boundary of the FVG, which is the low for a Long setup, or the high for a Short setup.
The trade is triggered (tradeActive = true) once the price retraces to the pendingEntry level.
Risk/Reward (RR) Targets: Three Take Profit (TP) levels are calculated based on the distance between the Entry and Stop Loss:
$$\text{Risk} = | \text{Entry} - \text{SL} |$$
$$\text{TP}n = \text{Entry} \pm (\text{Risk} \times \text{RR}n)$$
where $n$ is 1, 2, or 3, corresponding to the input $\text{RR}1$, $\text{RR}2$, and $\text{RR}3$ values (defaults: 1.0, 1.5, and 2.0).
Trade Lines: Upon triggering, lines for the Entry, Stop Loss, and three Take Profit levels are drawn on the chart for a specified length (lineLength).
A crucial feature is the directional lock (highBroken / lowBroken):
If the price breaks a range level (e.g., simpleBrokeHigh) but without a valid FVG setup, the corresponding directional flag (e.g., highBroken) is set to true permanently for the day.
This prevents the indicator from looking for any subsequent trade setups in that direction for the rest of the day, suggesting that the initial move, without an FVG, exhausted the opportunity.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
ChadAnt
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied
Pesquisar nos scripts por "take profit"
Macketings 1min ScalpingThis is a hyper-reactive scalping strategy designed for the 1-minute chart. It utilizes a strict four-EMA hierarchy (80/90/340/500) to ensure trades are only taken in the strongest aligned market trend. The strategy is built to be extremely tight on risk and focuses on capturing the immediate, high-momentum swing that follows a confirmed EMA retest or breakout.
Key Mechanics (How it Works):
Strict Trend Alignment: Entry is only permitted when the faster EMA band (80/90) and the price action are correctly aligned with the slow trend (340/500).
Long: EMA 80/90 must be above EMA 340/500, AND EMA 340 must be above EMA 500. (And vice-versa for Short.)
Expanded Retest Entry: The strategy waits for the price to retest or briefly enter the 80/90 band, then immediately enters upon the confirmed momentum breakout from that band.
Dynamic Risk Management (Tight Ride): The strategy is engineered to ride the wave aggressively while protecting capital immediately:
Extremely Tight Initial Stop Loss (0.2% default): Limits initial risk instantly.
Break-Even Security: Once profit hits 0.3%, the Stop Loss is automatically trailed to secure 0.2% profit (a risk-free trade).
Aggressive Exit Logic: Positions are closed not only upon hitting the Take Profit target (2.5%) but also immediately if the 80/90 EMA band crosses the 340 EMA, signaling a critical loss of momentum.
Disclaimer:
This strategy requires high-liquidity instruments and is best used on low timeframes (1-minute) due to its dependency on fast momentum shifts and tight stops. Backtesting and forward testing are crucial before deployment.
TSI.LTA | Base BTC 1DTSI.LTA | Base BTC 1D is a closed‑source trend‑following strategy designed for BTC on the 1D timeframe .
It focuses on participating in the main directional moves of the market while avoiding as much short‑term noise as possible.
📊 The script:
Uses a combination of moving‑average–based filters and volatility bands to define the active trend.
Applies optional volume filters to avoid low‑participation or exhausted moves.
Includes risk‑management controls (Stop Loss, Take Profit, Trailing Stop) that work on a per‑trade basis.
All entries and exits are confirmed at bar close and the script does not repaint .
This makes it suitable for backtesting, alerts and external automation.
█ 💡 CONCEPTS
This strategy is built around a few simple ideas:
1 — Trend first.
Positions are only taken when a group of smoothed trend filters agree on direction.
The goal is to ride larger swings, not to scalp each fluctuation.
2 — Volatility awareness.
Standard‑deviation–based bands help avoid entries in abnormal spikes or during very compressed ranges.
3 — Participation filter.
Optional volume‑based conditions (VWMA, OBV slope, MFI, volume Z‑score) try to ensure that entries occur when the market shows enough activity, not during dead phases.
4 — Risk defined in advance.
Stop‑loss and trailing‑stop inputs are expressed as percentages relative to entry price, so users can align them with their own risk tolerance.
The logic is purposely conservative: it is expected to stay flat during parts of the market where the trend is unclear or participation is weak.
█ ⚙️ FEATURES & INPUTS
This section follows approximately the order of the script’s inputs, so users can read here and then match what they see in the “Inputs” tab.
1 — 📐 Trend filters
These inputs control how the strategy detects the underlying trend:
DEMA / Gaussian / SMMA lengths
Control how fast or slow the trend reacts to price changes.
Shorter lengths → more responsive, more trades, more noise.
Longer lengths → slower reaction, fewer trades, more filtering.
Volatility Bands (SD length & multipliers)
Standard‑deviation bands around the smoothed price series.
They are used to avoid entries during extreme moves or very narrow ranges where a breakout is not yet confirmed.
In practice, these settings let the user choose between a more “aggressive” trend follower (shorter lengths, smaller bands) or a more “patient” one.
2 — 📊 Volume filters (optional)
These filters are meant to restrict trades to periods where the market shows meaningful participation:
VWMA filter
Requires price to be aligned with a Volume‑Weighted Moving Average, which de‑emphasizes moves on very low volume.
OBV slope filter
Uses the slope of On‑Balance Volume to check that net volume flow supports the direction of the trade.
MFI band filter
Uses the Money Flow Index to avoid taking new entries in zones that often correspond to exhaustion (extreme values defined by the user).
Volume Z‑Score
Compares current volume to its recent history. Trades can be restricted when volume is unusually low or out of character for that period.
When any of these filters are turned off, the strategy relies only on price‑based trend and volatility logic.
When they are on, trades are more selective and may be fewer.
3 — 🛡️ Risk management
These inputs define how individual trades are managed once entered.
They do not change the trend logic itself:
Stop Loss (%)
A percentage move against the entry price that will close the position.
Typical values on BTC 1D remain in the single‑digit range so that no single trade risks an unrealistic portion of equity.
Take Profit (%)
An optional fixed target that closes the trade when price has moved a chosen percentage in favor.
This can be disabled if the user prefers to let the trend filters perform the exit.
Trailing Stop (%)
A stop that follows the most favorable price reached since entry.
When the “use lower timeframe peak” option is enabled, peaks can be detected on a lower timeframe for more granular trailing, while decisions still occur at the close of the 1D bar.
Fixed SL/TP Price and Activation Date
Allow defining absolute price levels and a date from which they start applying.
This is useful when the user wants structural protection around known price zones.
The combination of these controls determines how deep a pullback the user is willing to tolerate and how much profit they are prepared to give back in order to stay in trends.
4 — 🚫 Filter failure & cooldown
To avoid over‑trading in difficult environments, the script can:
Automatically exit when filters remain unfavorable for a configurable number of bars.
Enter a cooldown period, during which no new trades are taken, even if some conditions improve.
These mechanisms are intended to protect capital during choppy or low‑quality phases rather than force constant exposure.
█ 📚 HOW TO USE
A suggested process for using this strategy as a study tool:
1 — Start on BTC 1D.
Apply the script to BTCUSD or BTC/USDT on the 1D timeframe, with default inputs.
2 — Open the Strategy Tester.
Choose a time window (for example a full halving cycle, a crash + recovery period, or just the most recent bull leg).
3 — Compare with Buy & Hold.
For the same window, look at:
Net profit of the strategy vs Buy & Hold.
Max drawdown of the strategy vs Buy & Hold.
The goal is not to hit a particular number, but to see whether, in that window, the strategy manages to:
Provide a smoother equity curve (lower drawdown),
While still performing at least as well as, or better than, simply holding the asset.
4 — Experiment with risk inputs.
Vary Stop Loss, Trailing Stop and the volume filters.
After each change, re‑check the same two questions above. This should make clear how each input affects the trade‑off between participation and risk.
5 — Forward‑test.
Before using any configuration with real capital, let it run for a while in paper‑trading or demo conditions.
█ 🚧 LIMITATIONS
The strategy is built and tuned primarily for BTC on 1D.
It can be used on other symbols and timeframes, but behavior may differ and requires new testing.
In very tight ranges or during event‑driven gaps, trend logic may enter later than discretionary trading would. This is expected for a conservative trend‑following approach.
Results from historical backtests depend on data quality, broker settings, fees and slippage configured in the Strategy Tester.
█ 📝 NOTES
Signals are generated on bar close.
The script is closed‑source, but the description explains the main ideas so users and moderators can understand what it does and how to use it.
The HUD on the chart is meant as a compact summary of the same statistics available in the Strategy Tester; it simply makes comparisons quicker.
█ ⚠️ DISCLAIMER
This strategy is provided for educational and research purposes only .
It is not financial advice and does not recommend any specific trades, assets, position sizes, or risk levels.
Users are fully responsible for:
Choosing their own risk parameters (Stop Loss, Take Profit, Trailing Stop, position sizing, etc.).
Testing the script on the markets and timeframes they intend to trade.
Verifying that any configuration is appropriate for their capital, risk tolerance and jurisdiction.
Past performance in backtests or examples does not guarantee future results.
Always test carefully before considering any live deployment.
RubberBand Scalp NQ Strategy (V6 - High PF Focus)
================================================================================
RUBBERBAND SCALP NQ (V6 - HIGH PF FOCUS)
================================================================================
// STRATEGY OVERVIEW
// -----------------
// Instrument: NQ (Nasdaq 100 E-mini Futures)
// Style: Intraday mean-reversion scalping
// Core Idea: Price "stretches" away from VWAP, then "snaps back" → enter on strong reversal
// Session: 9:00 AM – 2:30 PM CST (America/Chicago)
// Timeframe: 1–5 min (ideal: 2–3 min)
// Position: 2 contracts, pyramiding = 0
// Commission: $2.00 per contract
// Goal: High Profit Factor via asymmetric exits (1R fixed + unlimited runner)
// KEY FILTERS
// -----------
// • Only trade when ATR(15) > 5.0 points (~$100 range) → avoids chop
// • Must be in session → forces flat at 2:30 PM
// • VWAP proximity: price must touch within 0.5 × ATR of VWAP
// ENTRY LOGIC (LONG)
// -----------------
// 1. In session & no position
// 2. Close > Open (bullish bar)
// 3. Close > highest high of last 4 bars → momentum confirmation
// 4. Close > VWAP
// 5. Low < VWAP + (0.5 × ATR) → pullback reached VWAP zone
// 6. ATR > 5.0
// 7. Bar confirmed
// → Plot green triangle below bar
// ENTRY LOGIC (SHORT) – Symmetric
// -----------------
// 1. Close < Open
// 2. Close < lowest low of last 4 bars
// 3. Close < VWAP
// 4. High > VWAP - (0.5 × ATR)
// 5. ATR > 5.0
// → Plot red triangle above bar
// STOP LOSS – DUAL SYSTEM (Widest Stop Wins)
// -----------------------------------------
// VWAP Stop (Long): VWAP - 0.20
// ATR Stop (Long): Close - min(ATR × 1.0, 15.0)
// Final Stop: MAX(VWAP Stop, ATR Stop) → then CAP at Close - 0.20
// Short: MIN of both → FLOOR at Close + 0.20
// → Max buffer: 0.20 pts = $20 (4 ticks)
// → Risk = |Entry – Final Stop|
// PROFIT TAKING – 2 CONTRACTS
// ---------------------------
// Contract #1: Fixed 1R → limit = entry + risk (long) / entry - risk (short)
// Contract #2: Trailing stop only → trail_points = risk, trail_offset = 0
// NO FIXED TAKE PROFIT ON RUNNER → lets 3R, 5R, 10R+ winners run
// BUG: Short runner uses trail_offset = 1.5 → CHANGE TO 0
// V6 IMPROVEMENTS
// ---------------
// 1. ATR_STOP_MULTIPLIER reduced from 1.5 → 1.0 → tighter average loss
// 2. Removed fixed 2R cap on runner → unlimited upside
// 3. Widest-stop logic → prevents premature stop-outs
// TRADE EXAMPLE (LONG)
// -------------------
// Entry: 18,125 (2 contracts)
// Stop: 18,110 → Risk = $300/contract
// 1R: 18,155 → Contract #1 exits (+$600)
// Runner trails by $300 → exits at 18,425 (+$6,000)
// Total P&L: +$6,600
// PERFORMANCE EXPECTATIONS
// ------------------------
// Win Rate: 40–50%
// Avg Winner: >3× avg loser
// Profit Factor: 2.0–3.5+
// Max Drawdown: <5% (with risk controls)
// DAILY CHECKLIST
// ---------------
// 2–3 min NQ chart
// Timezone: America/Chicago
// ATR > 5.0
// Price touched VWAP zone
// 4-bar breakout confirmed
// trail_offset = 0 (both sides)
// Alerts on
// Log R-multiple
// FINAL NOTES
// -----------
// This is a PROFIT FACTOR system — not a high win-rate system.
// Success = discipline + volatility + clean execution.
================================================================================
GOLDM Dow Theory – 1H Trend + 5m Pullback1. Strategy Overview
Instrument: MCX GOLDM
Chart timeframe: 5 minutes
Side: Long-only
Position size: Fixed 3 lots
Core idea:
Trade only in 1H uptrend, enter after a 5m pullback and breakout, with basic volume/volatility filters and ATR-based SL/TP.
2. High-Level Logic Flow (Per Bar)
On every 5-minute bar, the script does this:
Update session/time, volume, and ATR filters
Read 1H trend from higher timeframe
Update 5m pullback state (whether a valid dip happened)
Check if there is a valid breakout back in the direction of the 1H trend
If all filters + conditions align → enter Long (3 lots)
While in a trade:
Manage SL/TP using ATR
Close trade if 1H trend flips down or price closes below 5m EMA
Everything else (plots, alerts) is just for visibility and convenience.
3. Inputs & Configuration
Main inputs:
pullbackLookback – how many 5m bars to look back to detect a pullback
breakoutLookback – how many bars to consider for recent swing high
emaLenTrendFast / emaLenTrendSlow – 1H EMAs (50/200) for trend
emaLenPullback – 5m EMA used for pullback logic (default 20)
tradeSession – default "0900-2315" (you can change)
volLookback, volMult – volume filter
atrLen, atrSmaLen – ATR filter
slATRmult (1.4), tpATRmult (3.0) – ATR multiples → ~1.4 : 3 RR
4. Session / Time Filter
tradeSession = "0900-2315"
inSession = not useSessionFilter or not na(time(timeframe.period, tradeSession))
Only allows entries when the current bar’s time is inside 09:00–23:15.
If useSessionFilter is false, this filter is ignored.
No trade opens outside this window, but existing trades can still exit.
5. Volume & Volatility Filters
Volume Filter
avgVol = ta.sma(volume, volLookback)
highVolume = not useVolumeFilter or (volume > avgVol * volMult)
If enabled, current bar’s volume must be greater than average volume × multiplier.
Purpose: avoid thin, illiquid periods.
ATR Filter
atr5 = ta.atr(atrLen)
atrSma = ta.sma(atr5, atrSmaLen)
goodATR = not useATRFilter or (atr5 > atrSma)
If enabled, current ATR must be above its own moving average.
Purpose: avoid flat / extremely low-volatility periods.
Only if both highVolume and goodATR are true, the system considers entering.
6. Higher Timeframe Trend (1H)
emaFast1h = request.security(syminfo.tickerid, "60", ta.ema(close, emaLenTrendFast), ...)
emaSlow1h = request.security(syminfo.tickerid, "60", ta.ema(close, emaLenTrendSlow), ...)
trendUp = emaFast1h > emaSlow1h
trendDown = emaFast1h < emaSlow1h
On the 1-hour timeframe:
If EMA Fast (50) > EMA Slow (200) → trendUp = true
If EMA Fast (50) < EMA Slow (200) → trendDown = true
This is the core trend filter:
We only look for longs when trendUp is true.
7. 5-Minute Structure Logic (Dow-style)
7.1 Pullback Detection
emaPull = ta.ema(close, emaLenPullback)
pulledBackLong = ta.lowest(close, pullbackLookback) < emaPull
A pullback is defined as:
In the last pullbackLookback bars, price closed below the 5m EMA (emaPull) at least once.
This indicates a dip against the 1H uptrend.
A state flag tracks this:
var bool hadLongPullback = false
hadLongPullback := trendUp and pulledBackLong ? true : (not trendUp ? false : hadLongPullback)
When:
trendUp AND pulledBackLong → hadLongPullback = true.
If the trend stops being up (trendUp = false), flag resets to false.
So the system remembers:
“There has been a proper dip while the 1H uptrend is active.”
7.2 Breakout Confirmation
recentHigh = ta.highest(high, pullbackLookback)
breakoutUp = close > recentHigh
After a pullback, we wait for price to close above the highest high of recent bars (excluding the current one).
This mimics:
“Higher high after a higher low” → breakout in Dow Theory terms.
8. Final Long Entry Logic
The base entry condition:
baseLongEntry =
trendUp and
hadLongPullback and
breakoutUp and
close > emaPull
Translated:
1H trend is up (trendUp).
A valid pullback happened recently (hadLongPullback).
Current candle broke above the recent swing high (breakoutUp).
Price is now back above the 5m EMA (pullback is resolving, not deepening).
Then filters are applied:
longEntryCond =
baseLongEntry and
inSession and
highVolume and
goodATR and
not isLong
So a long entry only occurs if:
Core structure conditions (baseLongEntry) are true
Time is within session
Volume is high enough
ATR is healthy
You are not already in a long
When longEntryCond is true:
if longEntryCond
strategy.entry("Long", strategy.long, comment = "Dow Long: Trend+PB+BO")
hadLongPullback := false
Enters 3 lots long (as per default_qty_type + default_qty_value).
Resets hadLongPullback so we don’t re-use the same pullback.
9. Exit Logic
There are two exit layers:
9.1 Logical Exit (Trend or Structure Change)
exitLongTrendFlip = trendDown
exitLongEMA = ta.crossunder(close, emaPull)
longExitCond = isLong and (exitLongTrendFlip or exitLongEMA)
If in a long:
Exit when trend flips down (1H EMA50 < EMA200), OR
Price crosses below 5m EMA (pullback may be turning into reversal).
Then:
if longExitCond
strategy.close("Long", comment = "Exit Long: Trend flip / EMA break")
This closes the position at market (on bar close).
9.2 ATR-based Stop Loss & Take Profit
if useSLTP and isLong
longStop = strategy.position_avg_price - atr5 * slATRmult
longLimit = strategy.position_avg_price + atr5 * tpATRmult
strategy.exit("Long SLTP", "Long", stop = longStop, limit = longLimit)
SL = entry price – 1.4 × ATR(14, 5m)
TP = entry price + 3.0 × ATR(14, 5m)
This gives roughly 1.4 : 3 RR.
If SL or TP is hit, strategy.exit will close the trade.
So exits can come from:
Hitting Stop Loss
Hitting Take Profit
OR logic-based exit (trend flip / EMA break)
10. Alerts
Two alertconditions:
alertcondition(longEntryCond, title="Long Entry Signal",
message="GOLDM LONG: 1H Uptrend + 5m Pullback Breakout + Filters OK")
alertcondition(longExitCond, title="Long Exit Signal",
message="GOLDM LONG EXIT: Trend flip or EMA break")
You can set TradingView alerts based on:
“Long Entry Signal” → tells you when all entry conditions align.
“Long Exit Signal” → tells you when the logic-based exit triggers.
(ATR SL/TP exits won’t auto-alert unless you separately set price alerts or add extra conditions.)
11. Mental Model Summary (How YOU should think about it)
For every trade, the system is basically doing this:
Is GOLDM in an uptrend on 1H?
→ If no: do nothing
Did we get a clear dip below 5m EMA in that uptrend?
→ If no: wait
Did price then break above recent highs and reclaim EMA20?
→ If yes: this is our Dow-style continuation entry
Is market liquid and moving (volume + ATR)?
→ If yes: go Long with 3 lots
Manage with:
ATR SL & TP
Exit early if 1H trend flips or price falls back below EMA20
ETH SuperTrend Hull Strategy - 15min Futures(重制版)🟠 ETH SuperTrend Hull Strategy - 15min Futures
Strategy Overview
The "ETH SuperTrend Hull Strategy" is a sophisticated 15-minute trading system specifically designed for Bitcoin perpetual contracts. This advanced algorithm integrates SuperTrend indicators with Hull moving averages to deliver high-precision trend following through a triple-confirmation mechanism, featuring intelligent position management and multi-level take-profit systems.
Core Value Proposition
Triple Trend Confirmation: SuperTrend + Hull MA + ATR volatility filtering
Adaptive Take-Profit System: 6-level dynamic profit targets adjusted to market conditions
Smart Position Management: Three martingale modes with automatic sizing
Real-time Webhook Integration: Direct exchange connectivity for automated execution
🟠 Technical Framework
Multi-Layer Trend Detection
Layer 1 - SuperTrend Filter
pinescript
= ta.supertrend(supertrend_factor, supertrend_atr_period)
is_supertrend_long = direction < 0 // Bullish trend line
is_supertrend_short = direction >= 0 // Bearish trend line
Layer 2 - Hull MA Confirmation
pinescript
HMA = HMA(close, 73) // Hull Moving Average
hull_is_green = HULL > HULL // Uptrend confirmation
hull_is_red = HULL <= HULL // Downtrend confirmation
Layer 3 - ATR Breakout Signals
pinescript
xATR = ta.atr(5)
nLoss = key_value * xATR // Dynamic stop distance
Entry Conditions
Long Entry:
Price breaks above ATR trailing stop
Hull MA shows green uptrend
SuperTrend indicates bullish momentum
Price positioned above Hull MA
Short Entry:
Price breaks below ATR trailing stop
Hull MA shows red downtrend
SuperTrend indicates bearish momentum
Price positioned below Hull MA
🟠 Risk Management System
Position Sizing
text
Base Position = Initial Capital × Risk % / Entry Price × Leverage
Actual Position = Base Position × Martingale Multiplier (1.0-5.0x)
Martingale Modes
4x Mode: Conservative approach, maximum 4x position scaling
5x Mode: Balanced risk management, maximum 5x scaling
5x Big Mode: Aggressive growth with faster position increases
Dynamic Take-Profit System
6-Level Profit Targets:
TP1: 2.2×ATR (Close 30%)
TP2: 4.5×ATR (Close 25%)
TP3: 7.5×ATR (Close 20%)
TP4: 10.5×ATR (Close 10%)
TP5: 15.5×ATR (Close 7%)
TP6: 20.5×ATR (Close 3%)
ATR Adaptive Adjustment:
Short-term ATR > Long-term ATR: TP distance +0.5
Short-term ATR < Long-term ATR: TP distance -0.5
🟠 Configuration Parameters
Core Settings
pinescript
// Trend Sensitivity
key_value = 2.0 // ATR multiplier (lower = more sensitive)
supertrend_factor = 3.0 // SuperTrend factor
// Risk Management
risk_percent = 19.9 // Per trade risk %
leverage = 1.0 // Leverage multiplier
Hull MA Configuration
pinescript
length = 73 // Hull period (55-200)
modeSwitch = "Hma" // Hull variant (Hma/Thma/Ehma)
🟠 Quick Start Guide
Initial Setup
Apply to BTCUSDT perpetual 15-minute chart
Configure Webhook Signal ID and User ID
Adjust position parameters according to risk preference
Signal Monitoring
Long Signals: Green arrows with Hull MA turning green
Short Signals: Red arrows with Hull MA turning red
Trend Direction: SuperTrend line color changes
Execution Workflow
Wait for triple-signal confluence
Confirm all entry conditions met
System automatically calculates position size and TP levels
Webhook sends trade instructions to connected platform
Advanced Features
Heikin-Ashi Mode: Smooth price data using Heikin-Ashi candles
Fixed Position Mode: Disable martingale, use fixed sizing
Multi-Timeframe: Higher timeframe confirmation integration
🟠 ETH SuperTrend Hull Strategy - 15min Futures
策略概述
"ETH超级趋势Hull策略"是一款专为比特币永续合约设计的15分钟短线交易系统。该策略融合超级趋势指标与Hull均线,通过三重过滤机制实现高精度趋势跟踪,具备智能仓位管理和多级止盈体系。
核心价值
三重趋势确认:Supertrend + Hull均线 + ATR波动过滤
自适应止盈系统:6级动态止盈,根据市场波动调整目标
智能仓位管理:支持三种倍投模式,自动调整仓位规模
实时Webhook通知:直连交易平台,实现自动化执行
🟠 策略原理
趋势识别系统
第一层 - 超级趋势过滤
pinescript
= ta.supertrend(supertrend_factor, supertrend_atr_period)
is_supertrend_long = direction < 0 // 绿色趋势线
is_supertrend_short = direction >= 0 // 红色趋势线
第二层 - Hull均线确认
pinescript
HMA = HMA(close, 73) // Hull移动平均线
hull_is_green = HULL > HULL // 上升趋势
hull_is_red = HULL <= HULL // 下降趋势
第三层 - ATR突破信号
pinescript
xATR = ta.atr(5)
nLoss = key_value * xATR // 动态止损距离
入场条件
多头入场:
价格突破ATR追踪止损
Hull均线呈绿色上升趋势
超级趋势显示看涨信号
价格位于Hull均线上方
空头入场:
价格跌破ATR追踪止损
Hull均线呈红色下降趋势
超级趋势显示看跌信号
价格位于Hull均线下方
🟠 风险管理
仓位计算
text
基础仓位 = 初始资金 × 风险比例% / 入场价格 × 杠杆倍数
实际仓位 = 基础仓位 × 倍投系数 (1.0-5.0倍)
倍投模式
4倍模式:保守型,最大4倍加仓
5倍模式:均衡型,最大5倍加仓
5倍大模式:激进型,更快仓位增长
动态止盈系统
6级止盈目标:
TP1: 2.2×ATR (平仓30%)
TP2: 4.5×ATR (平仓25%)
TP3: 7.5×ATR (平仓20%)
TP4: 10.5×ATR (平仓10%)
TP5: 15.5×ATR (平仓7%)
TP6: 20.5×ATR (平仓3%)
ATR自适应调整:
短期ATR > 长期ATR:止盈距离+0.5
短期ATR < 长期ATR:止盈距离-0.5
🟠 参数配置
核心参数
pinescript
// 趋势敏感度
key_value = 2.0 // ATR乘数,值越小越敏感
supertrend_factor = 3.0 // 超级趋势因子
// 风险管理
risk_percent = 19.9 // 单次交易风险%
leverage = 1.0 // 杠杆倍数
Hull均线设置
pinescript
length = 73 // Hull周期 (55-200)
modeSwitch = "Hma" // Hull变体 (Hma/Thma/Ehma)
🟠 使用指南
初始设置
添加到BTCUSDT永续合约15分钟图表
配置Webhook信号ID和用户ID
根据风险偏好调整仓位参数
信号监控
多单信号:绿色箭头,Hull均线转绿
空单信号:红色箭头,Hull均线转红
趋势方向:超级趋势线颜色变化
执行流程
等待三重信号共振
确认入场条件满足
系统自动计算仓位和止盈
通过Webhook发送交易指令
高级功能
K线均线模式:使用Heikin-Ashi平滑价格
固定仓位模式:禁用倍投,固定仓位大小
多时间框架:集成更高时间框架确认
Moving Average Band StrategyOverview
The Moving Average Band Strategy is a fully customizable breakout and trend-continuation system designed for traders who need both simplicity and control.
The strategy creates adaptive bands around a user-selected moving average and executes trades when price breaks out of these bands, with advanced risk-management settings including optional Risk:Reward targets.
This script is suitable for intraday, swing, and positional traders across all markets — equities, futures, crypto, and forex.
Key Features
✔ Six Moving Average Types
Choose the MA that best matches your trading style:
SMA
EMA
WMA
HMA
VWMA
RMA
✔ Dynamic Bands
Upper Band built from MA of highs
Lower Band built from MA of lows
Adjustable band offset (%)
Color-coded band fill indicating price position
✔ Configurable Strategy Preferences
Toggle Long and/or Short trades
Toggle Risk:Reward Take-Profit
Adjustable Risk:Reward Ratio
Default position sizing: % of equity (configurable via strategy settings)
Entry Conditions
Long Entry
A long trade triggers when:
Price crosses above the Upper Band
Long trades are enabled
No existing long position is active
Short Entry
A short trade triggers when:
Price crosses below the Lower Band
Short trades are enabled
No existing short position is active
Clear entry markers and price labels appear on the chart.
Risk Management
This strategy includes a complete set of risk-controls:
Stop-Loss (Fixed at Entry)
Long SL: Lower Band
Short SL: Upper Band
These levels remain constant for the entire trade.
Optional Risk:Reward Take-Profit
Enabled/disabled using a toggle switch.
When enabled:
Long TP = Entry + (Risk × Risk:Reward Ratio)
Short TP = Entry – (Risk × Risk:Reward Ratio)
When disabled:
Exits are handled by reverse crossover signals.
Exit Conditions
Long Exit
Stop-Loss Hit (touch-based)
Take-Profit Hit (if enabled)
Reverse Band Crossover (if TP disabled)
Short Exit
Stop-Loss Hit (touch-based)
Take-Profit Hit (if enabled)
Reverse Band Crossover (if TP disabled)
Exit markers and price labels are plotted automatically.
Visual Tools
To improve clarity:
Upper & Lower Band (blue, adjustable width)
Middle Line
Dynamic band fill (green/red/yellow)
SL & TP line plotting when in position
Entry/Exit markers
Price labels for all executed trades
These are built to help users visually follow the strategy logic.
Alerts Included
Every trading event is covered:
Long Entry
Short Entry
Long SL / TP / Cross Exit
Short SL / TP / Cross Exit
Combined Alert for webhook/automation (JSON-formatted)
Perfect for algo trading, Discord bots, or automation platforms.
Best For
This strategy performs best in:
Trending markets
Breakout environments
High-momentum instruments
Clean intraday swings
Works seamlessly on:
Stocks
Index futures
Commodities
Crypto
Forex
⚠️ Important Disclaimer
This script is for educational purposes only.
Trading involves risk. Backtest results are not indicative of future performance.
Always validate settings and use proper position sizing.
Adaptive Volatility StrategyHere's a professional description for publishing your indicator:
Adaptive Volatility Strategy - Multi-Indicator Confirmation System
A comprehensive trading strategy that combines multiple technical indicators with adaptive volatility filtering to identify high-probability trade setups while managing risk effectively.
Key Features:
Multi-Indicator Confirmation: Combines RSI, MACD, and ADX signals with trend analysis (20/50/200 EMAs) to reduce false signals and improve entry quality
Adaptive Volatility Filter: Intelligent volatility detection using ATR that can filter trades based on either fixed percentage thresholds or multiples of average volatility, helping avoid unstable market conditions
Flexible Session Filtering: Optional time-based trading windows with customizable hours and trading days to align with your preferred market sessions
Smart Signal Generation: Requires minimum signal confirmations before entering trades, with separate tracking for directional and confirmation signals
Comprehensive Risk Management: Configurable take profit and stop loss percentages with automatic position exits on signal reversals
Real-Time Dashboard: Visual display showing current indicator values, signals, volatility levels, and trend direction for quick market assessment
Strategy Logic:
Enters long when bullish signals outnumber bearish signals (minimum 2 signals) with ADX confirmation
Enters short when bearish signals outnumber bullish signals with ADX confirmation
All trades must pass volatility and session filters when enabled
Exits on take profit, stop loss, or signal reversal
Best Used For:
Swing trading on 1H to daily timeframes
Markets with clear trending behavior
Traders who prefer multiple confirmations before entering positions
Note: This is a complete strategy with entry/exit logic. Backtest thoroughly and adjust parameters for your specific instrument and timeframe before live trading.
Qullamagi EMA Breakout Autotrade (Crypto Futures L+S)Title: Qullamagi EMA Breakout – Crypto Autotrade
Overview
A crypto-focused, Qullamagi-style EMA breakout strategy built for autotrading on futures and perpetual swaps.
It combines a 5-MA trend stack (EMA 10/20, SMA 50/100/200), volatility contraction boxes, volume spikes and an optional higher-timeframe 200-MA filter. The script supports both long and short trades, partial take profit, trailing MA exits and percent-of-equity position sizing for automated crypto futures trading.
Key Features (Crypto)
Qullamagi MA Breakout Engine – trades only when price is aligned with a strong EMA/SMA trend and breaks out of a tight consolidation range. Longs use: Close > EMA10 > EMA20 > SMA50 > SMA100 > SMA200. Shorts are the mirror condition with all MAs sloping in the trend direction.
Strict vs Loose Modes – Strict (Daily) is designed for cleaner swing trades on 1H–4H (full MA stack, box+ATR and volume filters, optional HTF filter). Loose (Intraday) focuses on 10/20/50 alignment with relaxed filters for more frequent 15m–30m signals.
Volatility & Volume Filters for Crypto – ATR-based box height limit to detect volatility contraction, wide-candle filter to avoid chasing exhausted breakouts, and a volume spike condition requiring current volume to exceed an SMA of volume.
Higher-Timeframe Trend Filter (Optional) – uses a 200-period SMA on a higher timeframe (default: 1D). Longs only when HTF close is above the HTF 200-SMA, shorts only when it is below, helping avoid trading against dominant crypto trends.
Autotrade-Oriented Trade Management – position size as % of equity, initial stop anchored to a chosen MA (EMA10 / EMA20 / SMA50) with optional buffer, partial take profit at a configurable R-multiple, trailing MA exit for the remainder, and an optional cooldown after a full exit.
Markets & Timeframes
Best suited for BTC, ETH and major altcoin futures/perpetuals (Binance, Bybit, OKX, etc.).
Strict preset: 1H–4H charts for classic Qullamagi-style trend structure and fewer fake breakouts.
Loose preset: 15m–30m charts for higher trade frequency and more active intraday trading.
Always retune ATR length, box length, volume multiplier and position size for each symbol and exchange.
Strategy Logic (Quick Summary)
Long (Strict): MA stack in bullish alignment with all MAs sloping up → tight volatility box (ATR-based) → volume spike above SMA(volume) × multiplier → breakout above box high (close or intrabar) → optional HTF close above 200-SMA.
Short: Mirror logic: bearish MA stack, tight box, volume spike and breakdown below box low with optional HTF downtrend.
Best Practices for Crypto
Backtest on each symbol and timeframe you plan to autotrade, including commissions and slippage.
Start on higher timeframes (1H/4H) to learn the behavior, then move to 15m–30m if you want more signals.
Use the higher-timeframe filter when markets are strongly trending to reduce counter-trend trades.
Keep position-size percentage conservative until you fully understand the drawdowns.
Forward-test / paper trade before connecting to live futures accounts.
Webhook / Autotrade Integration
Designed to work with TradingView webhooks and external crypto trading bots.
Alert messages include structured fields such as: EVENT=ENTRY / SCALE_OUT / EXIT, SIDE=LONG / SHORT, STRATEGY=Qullamagi_MA.
Map each EVENT + SIDE combination to your bot logic (open long/short, partial close, full close, etc.) on your preferred exchange.
Important Notes & Disclaimer
Crypto markets are highly volatile and can change regime quickly. Backtest and forward-test thoroughly before using real capital. Higher timeframes generally produce cleaner MA structures and fewer fake breakouts.
This strategy is for educational and informational purposes only and does not constitute financial advice. Trading leveraged crypto products involves substantial risk of loss. Always do your own research, manage risk carefully, and never trade with money you cannot afford to lose.
LiquiBreak — Semi-Automatic Breakout, Gap & Trend-Filter StrategLiquiBreak is a semi-automatic breakout + gap detection strategy that combines pivots, a volatility filter and an optional Supertrend direction check to generate entry signals. It can optionally place take-profit and stop-loss orders in points. Use it to highlight high-probability breakout/gap setups and to automate exits when you want — otherwise treat its signals as trade alerts that require your confirmation.
📌 LiquiBreak — Semi-Automatic Breakout, Gap & Trend Strategy
1. Overview
1. LiquiBreak is a semi-automatic breakout + gap strategy designed to catch high-quality moves with volatility confirmation.
2. Uses pivot-based support/resistance , gap detection , Supertrend filtering , and optional automatic TP/SL in points .
3. Works on all assets and timeframes, especially effective on XAUUSD, Indices, Crypto and FX pairs .
---
2. What This Script Detects
1. Breakouts above resistance and below support during strong volatility.
2. Bullish & bearish gap patterns confirmed with momentum sequences.
3. Dynamic volatility zones based on normalized ATR ranges.
4. Optional Supertrend trend direction for filtering bad signals.
5. Automatic TP/SL orders when enabled.
---
3. Recommended Indicators to Combine With
To increase accuracy and reduce false breakouts:
1. Supertrend (included) – best for trend direction.
2. EMA 9/21 or EMA 20/50 – confirms trend strength & pullbacks.
3. RSI or Stoch RSI – avoid overbought/oversold breakouts.
4. VWAP – institutional bias & fair value zones.
5. CPR / Pivot Points – confluence with breakout levels.
6. MACD – trend confirmation on higher timeframe.
7. Volume Profile (optional) – find breakout liquidity zones.
These indicators help filter low-quality signals without affecting the script’s core logic.
---
4. Key Features
1. Volatility-based pivot support & resistance .
2. Reliable breakout confirmation using real-time volatility strength.
3. Strong gap pattern detection with ATR threshold.
4. Optional Supertrend confirmation for safer entries.
5. Point-based Take Profit / Stop Loss .
6. Toggle on/off: Longs, Shorts, TP, SL .
7. Semi-automatic execution — not fully automated.
8. Clean, optimized structure for stability and speed.
---
5. Inputs / Settings
1. Pivot / Levels Period – defines structural S/R levels.
2. Volatility Filter (%) – prevents low-quality signals.
3. TP Points – automatic take-profit target.
4. SL Points – automatic stop-loss.
5. Enable TP / Enable SL – full exit control.
6. Allow Long / Allow Short – direction control.
7. Supertrend Filter – filter weak counter-trend trades.
---
6. How to Use the Strategy
1. Select timeframe & tune pivot/volatility settings.
2. Enable/disable automatic TP/SL based on your style.
3. Turn ON Supertrend for safer trend-based trades.
4. Confirm signals using EMA, RSI, VWAP, Volume or CPR.
5. Watch for high-volatility breakouts near key levels.
6. Use multiple timeframe analysis for stronger confirmation.
---
7. Important Warning (User Must Monitor Trades)
⚠ This script is NOT a fully automatic bot.
1. You MUST monitor the chart while using this strategy.
2. You MUST manually close trades if market conditions change.
3. Auto TP/SL helps, but during news events or fast markets, slippage may occur.
4. Treat this script as a signal + entry assistant , not a fire-and-forget system.
---
8. Best Practices
1. Works best on XAUUSD, NAS100, BTC, ETH, EURUSD .
2. Avoid major news unless experienced.
3. Increase volatility filter during choppy markets.
4. Use M15–H1 for clean breakouts; M5 for scalping.
5. For beginners: keep TP/SL enabled for safety.
6. Backtest first → then paper trade → then live trade.
---
9. Disclaimer
1. For educational and research purposes only .
2. Not financial advice.
3. User is fully responsible for their trades and risk.
4. Past performance does not guarantee future results.
ETH Short-Term VWAP+EMA/RSI (ATR Risk, <1h) (James Logan)ETH Short-Term VWAP + EMA / RSI Strategy (ATR-based Risk Control)
A short-term (< 1 hour) ETH trading system designed for intraday scalps and momentum swings on 5- to 15-minute charts.
It blends trend confirmation (EMA 50 / 200) with intrabar structure (EMA 21 pullback & VWAP filter) and RSI momentum triggers, managing exits dynamically through ATR-based stop, take-profit, and trailing stop targets.
Core logic
• Long when RSI crosses above the threshold within an up-trend (EMA 50 > EMA 200) and price is above VWAP.
• Short when RSI crosses below threshold within a down-trend (EMA 50 < EMA 200) and price is below VWAP.
• Optional pullback confirmation to the 21-EMA for cleaner entries.
• Risk defined by ATR-multiples for stop-loss, take-profit, and an adaptive trailing stop.
• Automatic flat-out exit after a set number of bars (time-based close).
Best use
• 5 min – 15 min ETH/USDT charts (Binance, Bybit, Coinbase, etc.)
• Works with both spot and perpetual data.
• Tune ATR and RSI thresholds per venue; defaults are balanced for 0.05 % per-side fees.
Key parameters
• ATR SL × 1.6 ATR TP × 2.2 ATR Trail × 2.0
• RSI 50 cross | EMA 50/200 trend filter | VWAP confirmation
• Default position sizing = USD-based (e.g. $1 000 per trade).
Notes
• All orders and exits are simulated at bar close; use 1-minute bar magnifier for finer fill modeling.
• No repainting—uses only confirmed bar data.
• Best validated with ≥ 200 trades and profit factor > 1.25 over multi-month backtests.
Final Scalping Strategy - RELAXED ENTRY, jangan gopoh braderEMA Scalping System (MTF) Guide (1HR direction, 15 min entry)
Objective
To capture small, consistent profits by entering trades when 15-minute momentum aligns with the 1-hour trend.
Trades are executed only during high-liquidity London and New York sessions to increase the probability of execution and success.
Strategy Setup
Chart Timeframe (Execution): 15-Minute (M15).
Trend Filter (HTF): 1-Hour (H1) chart data is used for the long-term EMA.
Long-Term Trend Filter: 50-Period EMA (based on H1 data).
Short-Term Momentum Signal: 20-Period EMA (based on M15 data).
Risk
Metric: 14-period ATR for dynamic Stop Loss calculation.
✅ Trading Rules🟢
Long (Buy) Entry Conditions
Session: Must be within the London (0800-1700 GMT) or New York (1300-2200 GMT) sessions.
HTF Trend: Current price must be above the 1-Hour EMA 50.
Momentum Signal: Price crosses above the 15-Minute EMA 20.
Confirmation: The bar immediately following the crossover must close above the 15-Minute EMA 20.
Ent
ry: A market order is executed on the close of the confirmation candle.
🔴 Short (Sell) Entry Conditions
Session: Must be within the London (0800-1700 GMT) or New York (1300-2200 GMT) sessions.
HTF Trend: Current price must be below the 1-Hour EMA 50.
Momentum Signal: Price crosses below the 15-Minute EMA 20.
Confirmation: The bar immediately following the crossover must close below the 15-Minute EMA 20.
Entry: A market order is executed on the close of the confirmation candle.
🛑 Trade Management & Exits
Stop Loss (SL): Placed dynamically at 2.0 times the 14-period ATR distance from the entry candle's low (for Buys) or high (for Sells).
Take Profit (TP): Placed dynamically to achieve a 1.5 Risk-Reward Ratio (RR) (TP distance = 1.5 x SL d
istance).
📊 On-Chart Visuals
Detailed Labels: A box appears on the entry bar showing the action, SL/TP prices, Risk/Reward in Pips, and the exact R:R ratio.
Horizontal Lines: Dashed lines display the calculated SL (Red) and TP (Green) levels while the trade is active.
Background: The chart background is shaded to highlight the active London and New York tradi
ng sessions.
Confirmed Momentum QQQ (RSI/MACD Filter)Gemini and Myself,
How This Targets a Higher Win Rate
The key to the win rate increase is the RSI 20/80 filter.
Long Signal: A long entry is now only taken if the trend is up (SMA cross), the MACD is bullish, and the RSI is not overbought (below 80). By only entering when momentum is not yet exhausted, you increase the chance that the price can travel far enough to hit your 4.0 point Take Profit.
Wider SL: The wider Stop Loss of 2.5 points reduces the chance of being stopped out prematurely by routine market movements (whipsaws), which is the number one killer of win rates in high-frequency trading.
After applying these changes, you will need to run the Strategy Tester again to see the new win rate and the new total number of trades.
Would you like me to help you interpret the new Strategy Tester results once you apply these settings?
ORB Breakout Strategy w/ Filters - Dynamic Sizing - MTFHere is a comprehensive description of the strategy, written in a clear and structured format. You can use this for your script's "how-to-use" guide or documentation.
---
## 📈 Opening Range Breakout (ORB) Strategy
This is a comprehensive, multi-timeframe strategy built for trading opening range breakouts. It is designed with a "filters-first" approach, allowing you to validate a breakout with trend, volume, and volatility.
The strategy's core power comes from its flexibility. You can trade on a low timeframe (like a 1-minute chart) while basing your breakout levels on a higher timeframe's opening bar (e.g., the first 15-minute bar). It includes dynamic position sizing based on risk and a wide array of advanced exit management options.
### Key Features
* **Multi-Timeframe Opening Range:** The core of the strategy. You can define the "Opening Range" timeframe (5, 10, 15, 30, or 60 min) *independently* of your chart timeframe.
* **Custom Trading Session:** Define the exact session (e.g., "0930-1600" in "America/New_York") you want to trade.
* **One Trade Per Session:** The strategy will only take the *first valid breakout* signal per day to avoid over-trading.
---
### 🚦 Entry Signals & Filters
A trade is only initiated when the price closes above the Session High or below the Session Low **AND** all active filters are passed.
* **Trend Filter:** (Optional) Requires price to be above a long-term MA (e.g., 100 EMA) for long trades and below it for short trades.
* **Volume Filter:** (Optional) Requires the breakout bar's volume to be a specified multiplier (e.g., 1.5x) of the recent average volume.
* **Volatility Filter:** (Optional) Requires the current ATR to be higher than its long-term average, ensuring you only trade during periods of expanding volatility.
* **Direction Filter:** Allows you to isolate the strategy to **Long Only**, **Short Only**, or **Both**.
---
### 💰 Dynamic Position Sizing
The strategy includes a robust "Risk %" sizing model.
* **Risk-Based Sizing:** Instead of fixed contracts, it calculates the position size based on your **Account Size**, **Risk % per Trade**, and the **Stop Loss distance**.
* **Auto-Detect Point Value:** It automatically detects the correct point value for popular futures contracts (ES, NQ, MES, MNQ) and provides a manual override for other assets.
---
### 📤 Exit & Risk Management
This strategy features a multi-layered exit system, giving you complete control over how trades are managed.
#### 1. Stop Loss (SL)
Your initial stop loss can be calculated using a fixed **Tick** offset or an **ATR** multiplier. It can be anchored from two different points:
* **Breakout Level:** The stop is placed relative to the `sessionHigh` or `sessionLow` level.
* **Entry Bar:** The stop is placed relative to the high/low of the bar that *triggered* the entry.
#### 2. Take Profit (TP)
A standard Take Profit can be set using a fixed **Tick** offset or an **ATR** multiplier.
#### 3. Advanced Exit Logic
These options override the standard Take Profit to allow for more dynamic trade management:
* **Trailing Take Profit (TTP):**
* **Fixed/ATR Trail:** A standard trailing stop that activates after price moves a certain amount in your favor.
* **MA Price Cross:** Exits the trade as soon as the price closes across a fast-moving average (e.g., 9-EMA).
* **MA Crossover:** Exits the trade as soon as a fast MA crosses below a slow MA (for longs) or above (for shorts).
* **Close on Reversal:** (Optional) Exits immediately if the **very next bar** after entry closes back *inside* the opening range (a "failed breakout" signal).
* **Close on Opposite Range Cross:** (Optional) Exits a long trade if the price ever closes below the `sessionLow` (and vice-versa for shorts).
* **End of Session Exit:** All open positions are automatically closed at the end of the defined trading session.
Dynamic Momentum Scalper | Gold & Volatility Strategy V1.0This is a high-frequency trading strategy optimized for volatile instruments, specifically XAUUSD (Gold). It utilizes a proprietary blend of momentum, volume, and volatility metrics to identify minor market reversal points and trend exhaustion.
The system employs a sophisticated, dynamic stop-loss mechanism based on Average True Range (ATR) to adjust risk automatically to current market conditions. It manages trades via a two-tiered Take-Profit system to secure partial profits quickly and let the remaining position run to a secondary target, effectively locking in gains and achieving an optimal risk-reward balance.
Best suited for the 1-Minute (M1) timeframe.
Visibility: Invite-Only Script.
BB SPY Mean Reversion Investment StrategySummary
Mean reversion first, continuation second. This strategy targets equities and ETFs on daily timeframes. It waits for price to revert from a Bollinger location with candle and EMA agreement, then manages risk with ATR based exits. Uniqueness comes from two elements working together. One, an adaptive band multiplier driven by volatility of volatility that expands or contracts the envelope as conditions change. Two, a bias memory that re arms the same direction after any stop, target, or time exit until a true opposite signal appears. Add it to a clean chart, use the markers and levels, and select on bar close for conservative alerts. Shapes can move while the bar is open and settle on close.
Scope and intent
• Markets. Currently adapted for SPY, needs to be optimized for other assets
• Timeframes. Daily primary. Other frames are possible but not the default
• Default demo. SPY on daily
• Purpose. Trade mean reversion entries that can chain into a longer swing by splitting holds into ATR or time segments
Originality and usefulness
• Novelty. Adaptive band width from volatility of volatility plus a persistent bias array that keeps the original direction alive across sequential entries until an opposite setup is confirmed
• Failure modes mitigated. False starts in chop are reduced by candle color and EMA location. Missed continuation after a take profit or stop is addressed by the re arm engine. Oversized envelopes during quiet regimes are avoided by the adaptive multiplier
• Testability. Every module has Inputs and visible levels so users can see why a suggestion appears
• Portable yardstick. All risk and targets are expressed in ATR units
Method overview in plain language
The engine measures where price sits relative to Bollinger bands, confirms with candle color and EMA location, requires ADX for shorts(in our case long close since we use it currently as long only), and optionally requires a trend or mean reversion regime using band width percent rank and basis slope. Risk uses ATR for stop, target, and optional breakeven. A small array stores the last confirmed direction. While flat, the engine keeps a pending order in that direction. The array flips only when a true opposite setup appears.
Base measures
• Range basis. True Range smoothed over a user defined ATR Length
• Return basis. Not required
Components
• Bollinger envelope. SMA length and standard deviation multiplier. Entry is based on cross of close through the band with location bias
• Candle and EMA filter. Close relative to open and close relative to EMA align direction
• ADX gate for shorts. Requires minimum trend strength for short trades
• Adaptive multiplier. Band width scales using volatility of volatility so envelopes breathe with conditions
• Regime gate optional. Band width percent rank and basis slope identify trend or mean reversion regimes
• Risk manager. ATR stop, ATR target, optional breakeven, optional time exit
• Bias memory. Array stores last confirmed direction and re arms entries while flat
Fusion rule
Minimum satisfied gates count style. All required gates must be true. Optional gates are controlled in Inputs. Bias memory never overrides an opposite confirmed setup.
Signal rule
• Long setup when close crosses up through the lower band, the bar closes green, and close is above the long EMA
• Short setup when close crosses down through the upper band, the bar closes red, close is below the short EMA, and ADX is above the minimum
• While flat the model keeps a pending order in the stored direction until a true opposite setup appears
• IN LONG or IN SHORT describes states between entry and exit
What you will see on the chart
• Markers for Long and Short setups
• Exit markers from ATR or time rules
• Reference levels for entry, stop, and target
• Bollinger bands and optional adaptive bands
Inputs with guidance
Setup
• Signal timeframe. Uses the chart timeframe
• Invert direction optional. Flips long and short
Logic
• BB Length. Typical 10 to 50. Higher smooths more
• BB Mult. Typical 1.0 to 2.5. Higher widens entries
• EMA Length long. Typical 10 to 50
• EMA Length short. Typical 5 to 30
• ADX Minimum for short. Typical 15 to 35
Filters
• Regime Type. none or trend or mean reversion
• Rank Lookback. Typical 100 to 300
• Basis Slope Length and Threshold. Larger values reduce false trends
Risk
• ATR Length. Typical 10 to 21
• ATR Stop Mult. Typical 1.0 to 3.0
• ATR Take Profit Mult. Typical 2.0 to 5.0
• Breakeven Trigger R. Move stop to entry after the chosen multiple
• Time Exit. Minimum bars and extension when profit exceeds a fraction of ATR
Bias and rearm
• Bias flips kept. Array depth
• Keep rearm when flat. Maintain a pending order while flat
UI
• Show markers and levels. Clean defaults
Usage recipes
Alerts update in real time and can change while the bar forms. Select on bar close for conservative workflows.
Properties visible in this publication
• Initial capital 25000
• Base currency USD
• If any higher timeframe calls are enabled, request.security uses lookahead off
• Commission 0.03 percent
• Slippage 3 ticks
• Default order size method Percent of equity with value 5
• Pyramiding 0
• Process orders on close On
• Bar magnifier Off
• Recalculate after order is filled Off
• Calc on every tick Off
Realism and responsible publication
No performance claims. Costs and fills vary by venue. Shapes can move intrabar and settle on close. Strategies use standard candles only.
Honest limitations and failure modes
High impact releases and thin liquidity can break assumptions. Gap heavy symbols may require larger ATR. Very quiet regimes can reduce contrast in the mean reversion signal. If stop and target can both be touched inside one bar, outcome follows the TradingView order model for that bar path.
Regimes with extreme one sided trend and very low volatility can reduce mean reversion edges. Results vary by symbol and venue. Past results never guarantee future outcomes.
Open source reuse and credits
None.
Backtest realism
Costs are realistic for liquid equities. Sizing does not exceed five percent per trade by default. Any departure should be justified by the user.
If you got any questions please le me know
Sniper StrategyThe Sniper Strategy is a clean and data-driven RSI-based system designed for precision entries and exits.
It combines multi-timeframe RSI analysis, automated labeling, and dynamic P/L tracking — perfect for traders who want clarity, visual feedback, and strict risk control in one tool.
🧩 Core Features
Dual RSI Framework:
Calculates both the current timeframe RSI and a higher timeframe RSI to confirm trend strength and avoid false signals.
Smart Entry Logic:
Long signals when RSI drops below oversold level.
Short signals when RSI exceeds overbought level.
Automatic Exit Management:
Configurable Stop Loss and Take Profit percentages.
Optional RSI-based exit for flexible trade closures.
All exits are visually labeled for transparency.
Real-Time Profit Tracking:
Displays a floating label above each bar showing current P/L (%), updated live while the position is open — giving you instant insight into trade performance.
Clean Visual Design:
Uses arrows and colored labels for entry/exit clarity.
Optional RSI line and higher timeframe RSI plot included.
Alerts Ready:
Built-in alert conditions for both Long and Short signals — ideal for automation or notifications.
⚙️ Inputs & Customization
Adjustable RSI lengths for both timeframes.
Selectable RSI source (Close, HL2, etc.).
Configurable stop loss and take profit levels.
Customizable leverage and precision for P/L display.
Optional wick-based calculation for sensitivity tuning.
💡 How to Use
Apply the strategy on your preferred symbol and timeframe.
Adjust RSI and risk settings to match your trading style.
Optionally enable higher timeframe RSI confirmation.
Set alerts for “Long Entry Signal” and “Short Entry Signal.”
Backtest and fine-tune before going live.
⚠️ Disclaimer
This script is for educational and research purposes only.
It is not financial advice. Always backtest thoroughly and manage your risk before using it in live trading.
PSAR with ATR Trailing Stop + SMA Filter📈 Strategy Overview: PSAR + 6×ATR Trailing Stop with SMA Filter
This strategy is built around the principle of “Cut the losers, let the winners run” — a disciplined, trend-following approach that combines the Parabolic SAR indicator with dynamic risk management and a Simple Moving Average (SMA) trend filter.
🔍 Strategy Logic
Trend Filter Trades are only taken in the direction of the prevailing trend, defined by a user-selected SMA (default: 100).
✅ Long trades only when price is above the SMA
✅ Short trades only when price is below the SMA
Entry Signal: A trade is triggered when the Parabolic SAR flips to the opposite side of the price bars, signaling a potential trend reversal.
Stop Loss: The stop loss is dynamically set at 6×ATR from the entry price. This adapts to market volatility and is recalculated every bar — effectively acting as a trailing stop.
Exit Logic: There is no fixed take profit. The trade remains open until the trailing stop is hit — allowing winners to run and losers to be cut quickly.
Risk Management: Each trade risks 0.5% of total equity, ensuring consistent position sizing and capital preservation.
📊 Visual Elements
PSAR dots mark trend direction changes
SMA line shows the broader trend filter
Trailing stop crosses (with 50% opacity) indicate the current stop level without cluttering the chart
⚙️ Customizable Inputs
PSAR parameters: Start, Increment, Maximum
ATR length and multiplier
SMA length
Risk percentage per trade
This strategy is ideal for traders who want to stay aligned with the trend, automate disciplined exits, and avoid emotional decision-making. Clean, simple, and powerful.
Wishing you calm and successful trades!
Futures Fighter MO: Multi-Confluence Day Trading System ADX/SMI👋 Strategy Overview: The Multi-Confluence Mashup
The Futures Fighter MO is a comprehensive, multi-layered day trading strategy designed for experienced traders focusing on high-liquidity futures contracts (e.g., NQ, ES, R2K).
This strategy is a sophisticated mashup that uses the 1-minute chart for surgical entries while enforcing strict environmental filtering through higher-timeframe data. We aim to capture high-conviction moves only when multiple, uncorrelated signals align.
🧠 How the Logic Works (Concepts & Confluence)
Our logic is built on four pillars, which must align for a trade to be executed:
Primary Trend Filter
Indicators :
ADX/DMI (15-Minute Lookback)
Role :
Price action is filtered to ensure the ADX (17/14) is above 25, confirming a strong, prevailing market trend (Bullish or Bearish). Trades are strictly rejected during "Flat" (sideways) market regimes.
Entry Signal Types
The system uses multiple entry types:
- 🟢 Trend Long/Short: A breakout/rejection near the 200-Period EMA is confirmed by the primary ADX trend.
- 🔴 Engulfing Rejection: A strong signal when a Bullish/Bearish Engulfing or Doji prints near the long-term 500-Period EMA (emaGOD) while the Stochastic Momentum Index (SMI on 30M) is in an extreme overbought/oversold state (below $-40$ or above $40$).
Volatility & Volume Confirmation
Indicators: Average True Range (ATR) and 20-Period SMA of Volume
Role: Every entry requires a volume spike (Current Volume $> 1.5 \times$ SMA Volume) to confirm that the move is supported by significant liquidity. Volatility is tracked via ATR to define bar range and stop boundaries.
Structural Guardrails
Indicators: Daily Pivot Points (PP, S1-S3, R1-R3)
Role: Trades are disabled if the current bar's price range intersects with a Daily Pivot Point. This is a critical filter to avoid high-chop consolidation zones near key structural levels.
📊 Strategy Results & Required Disclosures
I strive to publish backtesting results that are transparent and realistic for the retail futures trader.
- Initial Capital: $50,000 - A realistic base for Mini/Micro futures contracts.
- Order Size: 1 Contract (Pyramiding up to 3) - Conservative risk relative to the account size.
- Commission: $0.11 USD per order - Represents realistic costs for low-cost brokers.
- Slippage: 2 Ticks - Accounts for expected market friction.
⚠️ Risk Management & Deviations
Stop-Loss: The strategy uses a dynamic stop-loss system where positions are closed upon a reversal (e.g., breaking the 50-Period EMA or failure to hold a Pivot Point), rather than a fixed tick-based stop. This is suited for experienced traders using a low relative risk (single Micro-contract entry) on a larger account. Users must confirm that the first entry's maximum potential loss remains below $10\%$ of their capital for compliance.
Trade Sample Size: Due to data limitations of the TradingView Essential plan (showing $\approx 50$ trades over 2 weeks), the sample size is under the ideal $100+$ target. Justification: This system is designed to generate signals across a portfolio of correlated futures markets (NQ, ES, R2K, Gold, Crude), meaning the real sample size for a user tracking the portfolio is significantly higher.
Drawdown Control: This strategy is designed for manual management. It requires the user to turn the script/alerts OFF after a significant drawdown and only reactivate it once a recovery trend is established externally.
The strategy uses a combination of dynamic trailing stops, structural support/resistance zones, and a fixed profit target to manage open positions.
🛑 Strategy Exit Logic
1. General Stop-Loss (Dynamic Trailing Stop)
These conditions act as the primary dynamic stop, closing the position if the market reverses past a key Moving Average (MA):
- Long Positions Closed When: The current bar's close crosses under the 50-Period EMA (emaLong).
- Short Positions Closed When: The current bar's close crosses above the 50-Period EMA (emaLong).
2. Profit Target (Fixed Percentage)
The script includes a general exit based on a user-defined profit percentage:
Take Profit Trigger: The position is closed when the currentProfitPercent meets or exceeds the input Profit Target (%) (default is 1.0% of the entry price).
3. Structural Exits (Daily Pivot Points)
These exits are high-priority, "close all" orders that trigger when the price fails to hold or reclaims a recent Daily Pivot Point, suggesting a failure of the current move.
- VR Close All - Long ($\sym{size} > 0$) - Price crosses under a Daily Resistance Level (R1, R2, or R3) minus 1 ATR within the last 10 bars. This indicates the current momentum failed to hold Resistance as support.
- VS Close All - Short ($\sym{size} < 0$) - Price crosses above a Daily Support Level (S1, S2, or S3) plus 1 ATR within the last 10 bars. This indicates the current momentum failed to hold Support as resistance.
4. Trend Failure Exit (Trend-Following Signals Only)
This exit protects against holding a position when the primary high-timeframe trend used for the entry has failed:
- Long Positions Closed When: The primary trend is no longer "bullish" for more than 2 consecutive bars (i.e., it turned "bearish" or "flat").
- Short Positions Closed When: The primary trend is no longer "bearish" for more than 2 consecutive bars (i.e., it turned "bullish" or "flat").
5. End of Day (EOD) Session Control
The final hard exits based on time:
- End of Session (EoS): At 11:30 AM, new trades are disabled (TradingDay := false). Open positions are kept.
- End of Day (EoD): At 1:30 PM, all remaining open positions are closed (strategy.close_all).
🤝 Development & Disclaimer
This script and description were created with assistance from Gemini and GitHub Copilot. My focus is on helping fellow real estate investors and day traders develop mechanically sound systems.
Disclaimer: This is for educational purposes only and does not constitute financial advice. Always abide by the Realtor Code and manage your own risk.
NY VIX Channel Trend US Futures Day Trade StrategyNY VIX Channel Trend Strategy
Summary in one paragraph
Session anchored intraday strategy for index futures such as ES and NQ on one to fifteen minute charts. It acts only after the first configurable window of New York Regular Trading Hours and uses a VIX derived daily implied move to form a realistic channel from the session open. Originality comes from using a pure implied volatility yardstick as portable support and resistance, then committing in the direction of the first window close relative to the open. Add it to a clean chart and trade the simple visuals. For conservative alerts use on bar close.
Scope and intent
• Markets. Index futures ES and NQ
• Timeframes. One to thirty minutes
• Default demo. ES1 on five minutes
• Purpose. Provide a portable intraday yardstick for entries and exits without curve fitting
• Limits. This is a strategy. Orders are simulated on standard candles
Originality and usefulness
• Unique concept. A VIX only channel anchored at 09:30 New York plus a single window trend test
• Addresses. False urgency at session open and unrealistic bands from arbitrary multipliers
• Testability. Every input is visible and the channel is plotted so users can audit behavior
• Portable yardstick. Daily implied move equals VIX percent divided by square root of two hundred fifty two
• Protected status. None. Method and use are fully disclosed
Method overview in plain language
Take the daily VIX or VIX9D value, convert it to a daily fraction by dividing by square root of two hundred fifty two, then anchor a symmetric channel at the New York session open. Observe the first N minutes. If that window closes above the open the bias is long. If it closes below the open the bias is short. One trade per session. Exits occur at the channel boundary or at a bracket based on a user selected VIX factor. Positions are closed a set number of minutes before the session ends.
Base measures
Return basis. The daily implied move unit equals VIX percent divided by square root of two hundred fifty two and serves as the distance unit for targets and stops.
Components
• VIX Channel. Top, mid, bottom lines anchored at 09:30 New York. No extra multipliers
• Window Trend. Close of the first N minutes relative to the session open sets direction
• Risk Bracket. Take profit and stop loss equal to VIX unit times user factor
• Session Window. Uses the exchange time of the chart
Fusion rule
Minimum gates count equals one. The trade only arms after the window has elapsed and a direction exists. One entry per session.
Signal rule
• Long when the window close is above the session open and the window has completed
• Short when the window close is below the session open and the window has completed
• Exit on channel touch. Long exits at the top. Short exits at the bottom
• Flat thirty minutes before the session close or at the user setting
Inputs with guidance
Setup
• Use VIX9D. Width source. Typical true for fast tone or false for baseline
• Use daily OPEN. Toggle for sensitivity to overnight changes
Logic
• Window minutes. Five to one hundred twenty. Larger values delay entries and reduce whipsaw
• VIX factor for TP. Zero point five to two. Raising it widens the profit target
• VIX factor for SL. Zero point five to two. Raising it widens the stop
• Exit minutes before close. Fifteen to ninety. Raising it exits earlier
Properties visible in this publication
• Initial capital one hundred thousand USD
• Base currency USD
• request.security uses lookahead off
• Commission cash per contract two point five $ per each contract. Slippage one tick
• Default order size method FIXED with value one contract. Pyramiding zero. Process orders on close ON. Bar magnifier OFF. Recalculate after order is filled OFF. Calc on every tick ON
Realism and responsible publication
No performance claims. Past results never guarantee future outcomes. Fills and slippage vary by venue. Shapes can move while a bar forms and settle on close. Strategy uses standard candles.
Honest limitations and failure modes
Economic releases and thin liquidity can break the channel. Very quiet regimes can reduce signal contrast. Session windows follow the exchange time of the chart. If both stop and target can be hit within one bar, assume stop first for conservative reading without bar magnifier.
Works best in liquid hours of New York RTH. Very large gaps and surprise news may exceed the implied channel. Always validate on the symbols you trade.
Entries and exits
• Entry logic. After the first window, go long if the window close is above the session open, go short if below
• Exit logic. Long exits at the channel top or at the take profit or stop. Short exits at the channel bottom or at the take profit or stop. Flat before session close by the configured minutes
• Risk model. Initial stop and target based on the VIX unit times user factors. No trail and no break even. No cooldown
• Tie handling. Treat as stop first for conservative interpretation
Position sizing
Fixed size one contract per trade. Target risk per trade should generally remain near one percent of account equity. Risk is based on the daily volatility value, the max loss from the tests for one year duration with 5min chart was 4%, while the avg loss was below <1% of the total capital.
If you have any questions please let me know. Thank you for coming by !
Enhanced MA Crossover Pro📝 Strategy Summary: Enhanced MA Crossover Pro
This strategy is an advanced, highly configurable moving average (MA) crossover system designed for algorithmic trading. It uses the crossover of two customizable MAs (a "Fast" MA 1 and a "Slow" MA 2) as its core entry signal, but aggressively integrates multiple technical filters, time controls, and dynamic position management to create a robust and comprehensive trading system.
💡 Core Logic
Entry Signal: A bullish crossover (MA1 > MA2) generates a Long signal, and a bearish crossover (MA1 < MA2) generates a Short signal. Users can opt to use MA crossovers from a Higher Timeframe (HTF) for the entry signal.
Confirmation/Filters: The basic MA cross signal is filtered by several optional indicators (see Filters section below) to ensure trades align with a broader trend or momentum context.
Position Management: Trades are managed with a sophisticated system of Stop Loss, Take Profit, Trailing Stops, and Breakeven stops that can be fixed, ATR-based, or dynamically adjusted.
Risk Management: Daily limits are enforced for maximum profit/loss and maximum trades per day.
⚙️ Key Features and Customization
1. Moving Averages
Primary MAs (MA1 & MA2): Highly configurable lengths (default 8 & 20) and types: EMA, WMA, SMA, or SMMA/RMA.
Higher Timeframe (HTF) MAs: Optional MAs calculated on a user-defined resolution (e.g., "60" for 1-hour) for use as an entry signal or as a trend confirmation filter.
2. Multi-Filter System
The entry signal can be filtered by the following optional conditions:
SMA Filter: Price must be above a 200-period SMA for long trades, and below it for short trades.
VWAP Filter: Price must be above VWAP for long trades, and below it for short trades.
RSI Filter: Long trades are blocked if RSI is overbought (default 70); short trades are blocked if RSI is oversold (default 30).
MACD Filter: Requires the MACD Line to be above the Signal Line for long trades (and vice versa for short trades).
HTF Confirmation: Requires the HTF MA1 to be above HTF MA2 for long entries (and vice versa).
3. Dynamic Stop and Target Management (S/L & T/P)
The strategy provides extensive control over exits:
Stop Loss Methods:
Fixed: Fixed tick amount.
ATR: Based on a multiple of the Average True Range (ATR).
Capped ATR: ATR stop limited by a maximum fixed tick amount.
Exit on Close Cross MA: Position is closed if the price crosses back over the chosen MA (MA1 or MA2).
Breakeven Stop: A stop can be moved to the entry price once a trigger distance (fixed ticks or Adaptive Breakeven based on ATR%) is reached.
Trailing Stop: Can be fixed or ATR-based, with an optional feature to auto-tighten the trailing multiplier after the breakeven condition is met.
Profit Target: Can be a fixed tick amount or a dynamic target based on an ATR multiplier.
4. Time and Session Control
Trading Session: Trades are only taken between defined Start/End Hours and Minutes (e.g., 9:30 to 16:00).
Forced Close: All open positions are closed near the end of the session (e.g., 15:45).
Trading Days: Allows specific days of the week to be enabled or disabled for trading.
5. Risk and Position Limits
Daily Profit/Loss Limits: The strategy tracks daily realized and unrealized PnL in ticks and will close all positions and block new entries if the user-defined maximum profit or maximum loss is hit.
Max Trades Per Day: Limits the number of executed trades in a single day.
🎨 Outputs and Alerts
Plots: Plots the MA1, MA2, SMA, VWAP, and HTF MAs (if enabled) on the chart.
Shapes: Plots visual markers (BUY/SELL labels) on the bar where the MA crossover occurs.
Trailing Stop: Plots the dynamic trailing stop level when a position is open.
Alerts: Generates JSON-formatted alerts for entry ({"action":"buy", "price":...}) and exit ({"action":"exit", "position":"long", "price":...}).
Gold 15m: Trend + S/R + Liquidity Sweep (RR 1:2)This strategy is designed for short-term trading on XAUUSD (Gold) using the 15-minute timeframe. It combines trend direction, support/resistance pivots, liquidity sweep detection, and momentum confirmation to identify high-probability reversal setups in line with the dominant market trend.
⚙️ Core Logic:
Trend Filter (EMA 200):
The strategy only takes long positions when price is above the 200 EMA and short positions when price is below it.
Support/Resistance via Pivots:
Dynamic swing highs and lows are identified using pivot points. These act as local supply and demand levels where liquidity is likely to accumulate.
Liquidity Sweep Detection:
A bullish liquidity sweep occurs when price briefly breaks below the last pivot low (grabbing liquidity) and then closes back above it.
A bearish sweep occurs when price breaks above the last pivot high and then closes back below.
Momentum & Candle Strength:
The strategy filters signals based on candle range and body size to ensure entries occur during strong price reactions, not weak retracements.
Risk Management (1:2 RR):
Stop-loss is placed slightly beyond the last pivot level using ATR-based buffers, and take-profit is set at 2× the risk distance, maintaining a reward-to-risk ratio of 1:2.
💼 Trade Logic Summary:
Long Entry:
After a bullish liquidity sweep & reclaim, momentum confirmation, and trend alignment (above EMA 200).
Short Entry:
After a bearish sweep & reclaim, momentum confirmation, and trend alignment (below EMA 200).
Exit:
Automated via ATR-based Stop Loss and Take Profit targets.
📊 Customization Options:
Adjustable EMA length, pivot settings, ATR multipliers, and RR ratio.
Option to enable/disable trend filter.
Toggle display of S/R zones on chart.
🧠 Best Use:
Works best during London and New York sessions when Gold shows strong momentum.
Can be adapted for forex pairs and indices by tuning ATR and pivot parameters.
VWAP & Band Cross Strategy v6 - AdvancedThese are a few updates made to the original script. The daily take profit and stop loss functions correctly for 1 contract but because of the pyramiding input even if not used you'll need to multiply the values by the number of contracts to keep consistent results. I have been unable to correct that function. Let me know if you test the script and have any recommendations for improvement. If trading an actual account I do recommend setting hard daily limits with your provider because there is still slippage from the original exit alerts even with the daily stop loss in place.
1. Real-Time Execution & Hard PnL Limits (The Focus)
The most critical changes were implemented to ensure the daily profit and loss limits act as hard, real-time barriers instead of waiting for the candle to close.
• Intrabar Tick Execution: The parameter calc_on_every_tick=true was added to the strategy() declaration. This forces the entire script to re-evaluate its logic on every single price update (tick), enabling immediate action.
• Real-Time PnL Tracking: The PnL calculation was updated to track the total_daily_pnl by summing the realized profit/loss (from closed trades) and the unrealized profit/loss (strategy.openprofit) on every tick.
• Immediate Closure: The script now checks the total_daily_pnl against the user-defined limits (daily_take_profit_value, daily_stop_loss_value) and immediately executes strategy.close_all() the moment the threshold is breached, preventing further trading.
• Combined Risk Enforcement: The user-defined "Max Intraday Risk ($)" and the "Daily Stop Loss (Value)" are compared, and the script enforces the tighter of the two limits.
2. Visibility and External Alerting
To address the unavoidable issue of slippage (which causes price overshoot in fast markets even with tick execution), dedicated alert mechanisms were added.
• Dedicated Alert Condition: An alertcondition named DAILY PNL LIMIT REACHED was added. This allows you to set up a TradingView alert that triggers the instant the daily_limit_reached variable turns true, giving you the fastest possible notification.
• Visual Marker: A large red triangle (\u25b2) is plotted on the chart using plotchar at the exact moment the daily limit condition is met, providing a clear visual confirmation of the trigger bar.
3. Strategy Features and Input Flexibility
Several user-requested features were integrated to make the strategy more robust and customizable.
• Trailing Stop / Breakeven (TSL/BE): A new exit option, Fixed Ticks + TSL, was added, allowing you to set a fixed profit target while also deploying a trailing stop or breakeven level based on points/ticks gained.
• Multiple Exit Types: The exit strategy was expanded to include logic for several types: Fixed Ticks, ATR-based, Capped ATR-based, VWAP Cross, and Price/Band Crosses.
• Pyramiding Control: An input Max Pyramiding Entries was introduced to control how many positions the strategy can have open at the same time.
• Confirmation Logic Toggle: Added an input to choose how multiple confirmation indicators (RSI, SMMA, MACD) are combined: "AND" (all must be true) or "OR" (at least one must be true).
• Indicator Confirmations: Logic for three external indicators—RSI, SMMA (EMA), and MACD—was fully integrated to act as optional filters for entry.
• VWAP Reset Anchors: Logic was corrected to properly reset the VWAP calculation based on the selected period ("Daily", "Weekly", or "Session") by using Pine Script v6's required anchor series.
Trading Day Filters: Inputs were added to select which specific days of the week the strategy is allowed to trade.






















