Strategy with DI+/DI-, ADX, RSI, MACD, EMA + Time Stop [FAILED]I built this strategy combining trend strength (ADX, DI+/DI-), momentum (MACD, RSI), candle filters, and EMA direction with a time-based stop and fixed SL/TP.
Backtested on BTCUSDT (5-min) from Jan–Apr 2023 using TradingView Premium’s deep data.
🟥 Results:
• 5 trades, 0 wins
• -14.45% total P&L
• All trades hit stop-loss (1.5%)
• Profit factor: 0.00
Despite logical layering, the entry timing didn’t capture profitable moves. Possibly overfiltered or too delayed.
💡 Sharing this for transparency and learning. Not every test wins — but every test teaches. On to the next.
Indicadores e estratégias
Algoway V4.2📌 Algoway V4.2 — Multi-layered Strategy Powered by ADX, MACD & PSO
Overview
Algoway V4.2 is a layered algorithmic strategy designed for volatility-rich assets like cryptocurrencies. While some core components (such as PSO, MACD, and ADX oscillators) are adapted from known indicator models, the original logic, state tracking, and Candle Strength Oscillator (CSO) are fully custom-developed.
This strategy is not a simple combination of tools — it implements a conditional entry-exit logic system based on ADX zone transitions, momentum structure, and MACD/PSO signal synchronization, enhanced by custom-built CSO filtering.
🧠 Key Modules and How They Work Together
PSO (Premium Stochastic Oscillator)
Used to confirm local oversold/overbought pressure. Acts as a directional filter.
MACD (Normalized)
Volatility-normalized MACD values allow consistent signal detection even on volatile pairs. It triggers entries when momentum begins shifting.
ADX Zonal Logic
Divides the market into Range / MidRange / Trend Peak zones. Entries are allowed only under specific transitions — e.g., long entries only in yellow (low volatility) zones or in trend climax zones under certain pullbacks.
CSO (Candle Strength Oscillator) — Custom Module
Designed to measure real candle momentum and price structure consistency. It avoids false breakouts and filters trend fatigue.
🔁 How Logic Works
Strategy maintains state variables to track entry type and zone.
Exit conditions depend on the entry origin: entries from "Range" exit in "Peak", while "Peak" entries exit during pullbacks or mid-strength trend reversals.
Additional logic prevents entries when signals are not aligned across modules, minimizing noise.
Optional CSO module acts as a final microstructure confirmation before executing MACD-based midpoint entries.
📊 Example Parameters (for 5M crypto scalping)
Each module is tuned to respond to 5-minute crypto volatility:
Stochastic: fast response, tight thresholds
MACD: shortened EMAs, normalized
ADX: traditional smoothing, custom thresholds for zone switching
CSO: candle-based dynamic filter with visual zone mapping
🧪 Conclusion
Algoway V4.2 is not a script merger — it is a custom logic engine using familiar technical components but governed by a proprietary decision model, with additional filters and dynamic variable tracking.
It’s suitable for scalping or swing setups, and the internal logic is optimized for real trading conditions, not just visual backtests.
Quant Trading Zero Lag Trend Signals (MTF) Strategy🧠 Strategy Overview
The Quant Trading Zero Lag Trend Signals (MTF) Strategy is a high-precision, multi-timeframe trend-following system designed for traders seeking early trend entries and intelligent exits. Built around ZLEMA-based signal detection, it includes dynamic risk management features. Based on the original indicator Zero Lag Trend Signals (MTF) from AlgoAlpha, now built as a strategy with several improvements for Exit Criteria include RR, ATR Stop Loss, Trailing stop loss, etc. See below.
🔍 Key Components
1️⃣ ZLEMA Trend Engine
ZLEMA (Zero-Lag EMA) forms the foundation of the trend signal system.
Detects bullish and bearish momentum by analyzing price action crossing custom ZLEMA bands.
Optional confirmation using 5-bar ZLEMA slope filters (up/down trends) ensures high-conviction entries.
2️⃣ Volatility-Based Signal Bands
Dynamic bands are calculated using ATR (volatility) stretched over 3× period length.
These bands define entry zones (outside the bands) and trend strength.
Price crossing above/below the bands triggers trend change detection.
3️⃣ Entry Logic
Primary long entries occur when price crosses above the upper ZLEMA band.
Short entries (optional) trigger on downside cross under the lower band.
Re-entry logic allows continuation trades during strong trends.
Filters include date range, ZLEMA confirmation, and previous position state.
4️⃣ Exit Logic & Risk Management
Supports multiple customizable exit mechanisms:
🔺 Stop-Loss & Take-Profit
ATR-Based SL/TP: Uses ATR multipliers to dynamically set levels based on volatility.
Fixed Risk-Reward TP: Targets profit based on predefined RR ratios.
Break-Even Logic: Automatically moves SL to entry once a threshold RR is hit.
EMA Exit: Optional trailing exit based on price vs. short EMA.
🔀 Trailing Stop
Follows price action using a trailing ATR-based buffer that tightens with trend movement.
🔁 Trend-Based Exit
Automatically closes positions when the detected trend reverses.
5️⃣ Multi-Option Trade Filtering
Enable/disable short trades, ZLEMA confirmations, re-entries, etc.
Time-based backtesting filters for isolating performance within custom periods.
6️⃣ Visual Feedback & Annotations
Trend shading overlays: Green for bullish, red for bearish zones.
Up/Down triangle markers show when ZLEMA is rising/falling for 5 bars.
Stop-loss, TP, trailing lines drawn dynamically on the chart.
Floating stats table displays live performance (PnL, win %, GOA, drawdown, etc.).
Trade log labels annotate closed trades with entry/exit, duration, and reason.
7️⃣ CSV Export Integration
Seamless export of trade data including:
Entry/exit prices
Bars held
Encoded exit reasons
Enables post-processing or integration with external optimizers.
⚙️ Configurable Parameters
All key elements are customizable:
Entry band length and multiplier
ATR lengths, multipliers, TP/SL, trailing stop, break-even
Profit target RR ratio
Toggle switches for confirmations, trade types, and exit methods
Grid Long & Short Strategy [ trader_N08 ]This strategy combines grid trading with trend-following principles, utilizing a combination of EMA filters, RSI momentum indicators, and volume analysis to capture price reversals or continuations. The grid system is designed to layer trades based on volatility (via ATR), with adaptive grid spacing that allows for dynamic scaling while incorporating risk management strategies like fixed stop loss, take profit, and trailing stops to protect capital.
---
Key Features:
1. Trend Confirmation:
* The strategy uses a 200-period EMA to identify the dominant market trend (bullish or bearish).
* A 50-period EMA is used for medium-term trend confirmation.
* Trades are filtered to enter only when the price is moving in the same direction as the prevailing trend.
2. Momentum-Based Entry Signals:
* RSI Indicator is used to confirm momentum.
* Long entries are triggered when the RSI is above the user-defined threshold (e.g., 40), signaling upward momentum.
* Short entries occur when the RSI is below the user-defined threshold (e.g., 60), signaling downward momentum.
3. Volume Spike Confirmation:
* The strategy adds an additional layer of confirmation by ensuring that the trade signal is backed by a volume spike, which is defined as current volume exceeding the average volume over the last 20 periods multiplied by a factor (e.g., 1.2x).
4. Grid Trading Logic:
* After a position is opened, additional entries are made based on ATR (Average True Range) for defining price steps. The grid expands dynamically with the use of a Grid Expansion Factor (e.g., 1.2x) to manage volatility and reduce risk from over-exposure.
* Max Grid Levels: The number of grid entries is capped to avoid excessive risk buildup.
5. Risk and Capital Management:
* Fixed Stop Loss: A fixed percentage stop loss (e.g., 0.3%) is applied to limit the potential loss per trade, ensuring risk is managed.
* Fixed Take Profit: A fixed percentage take profit (e.g., 4%) is used to lock in profits at key levels, aligning with the overall market move.
* Trailing Stop: An ATR-based trailing stop is implemented to allow profits to run while protecting gains in case the market reverses.
6. Exit Strategy:
* The strategy exits positions using a combination of:
* Fixed Stop Loss and Take Profit levels.
* Trailing Stops that dynamically adjust based on ATR to lock in profits as the market moves in your favor.
* Exits are also programmed for both long and short positions, ensuring balanced risk management across both market directions.
---
Recommended Timeframes:
* This strategy performs best on 30-minute (30m) and 1-hour (1H) timeframes.
* Works well on XAU/USD and BTC/USD pairs.
---
Unique Strategy Features:
1. Dynamic Grid Spacing: Unlike traditional grid strategies, this system adapts to market volatility by increasing the distance between grid entries as the market becomes more volatile.
2. Volume-Based Entry Confirmation: The strategy does not enter positions unless confirmed by a volume spike, ensuring that trades are not placed during low liquidity periods or market noise.
3. Layered Risk Management: The strategy offers multiple layers of risk management, including both fixed and dynamic stop-loss/take-profit levels, ensuring robust capital protection.
---
Usage Guidelines:
* Best suited for trending markets, where price is more likely to follow a sustained move in one direction. The strategy is also effective in volatile markets where prices oscillate but within a broader trend.
* For scalping or short-term trading, this strategy works best on major timeframes (30m – 1H).
* Customize the parameter to suit your trading style. The provided default settings are meant to offer a balanced risk-reward approach, but they can be adjusted based on personal risk tolerance.
---
Disclaimer:
* This strategy does not guarantee profits. Always use it with proper capital risk management and ensure it fits your trading style.
* Backtest results are based on historical data and may differ from live trading conditions due to slippage, spreads, and other factors.
EMA PPO StratejisiA great strategy for those who want to make money. Sell when the price breaks the EMA 175 line down, A signals strategy that generates Strategic Trading based on the price indicator and temperature and EMA 400
Three Inside Breakout (With 2:1 TP/SL + VWAP Filter)Buy only when the 3-candle breakout pattern is above VWAP.
Sell only when the pattern is below VWAP.
Auto-calculated TP and SL lines drawn on the chart.
VWAP plotted clearly for visual confirmation.
EMA400 + PPO StratejisiA great strategy for those who want to make money. Sell when the price breaks the EMA 180 line down, A signals strategy that generates Strategic Trading based on the price indicator and temperature and EMA 400
Antony.N4A -MGC ORB StrategyAntony.N4A – MGC ORB Quartile Strategy v6.3
MGC ORB Quartile is a structured breakout strategy based on the Opening Range Breakout (ORB), enhanced with smart momentum and trend filters. It is designed for disciplined intraday execution and adaptable risk profiles.
🔹 Key Features
Opening Range Breakout (ORB):
Automatically defines a breakout window (default: 09:30–09:45) and triggers entries when price breaks the high or low of that range.
Standard Deviation Profit Targets:
Supports SD0.5, SD1.0, SD1.5, and SD2.0 targets relative to the ORB range.
EMA Filtering (200-period):
Filters trades based on EMA direction and price position to validate breakout direction and avoid false entries.
Range Filtering:
Detects directional bias and volatility trends using smoothed range logic.
Momentum Triggering:
Validates breakout momentum and allows entries when directional momentum is positive and increasing.
⚙️ Trade Management Rules
Entry:
Triggered at the close of a 5-minute candle confirming a breakout of the ORB range.
Stop Loss:
Defined by structural invalidation (quartile boundaries & mid-range buffers).
Take Profit Strategy:
75% closed at SD1.0 level
Remaining 25% trailed to further SD2 target
SL is moved to breakeven after partial exit
Execution Controls:
No pyramiding
No re-entries (cooldown enforced)
🔁 Trading Modes & Backtest Results
1️⃣ Conservative Mode
Strictest filters combine: EMA filtering + RG filter for trend + Momentum Triggering
Excellent for clean-trend environments
Backtest (7 months):
✅ Win Rate: 73%
🧾 Total Trades: 15
💵 Earnings: $2314 (11.57R, R = $200)
📉 Max Red Days: 1
🟥 Max Drawdown: $196
2️⃣ Moderate Mode
Balanced filters: EMA filtering + RG filter + Momentum
Optimized for broader market adaptability
Backtest (7 months):
✅ Win Rate: 72%
🧾 Total Trades: 32
💵 Earnings: $4373 (21.87R)
📉 Max Red Days: 3
🟥 Max Drawdown: $392
3️⃣ Aggressive Mode
No EMA filter – higher opportunity, higher risk
Only RG trend + Momentum confirmation
Ideal for experienced traders in strong trends
Backtest (45 months):
✅ Win Rate: 64%
🧾 Total Trades: 45
💵 Earnings: $5126 (25.63R)
📉 Max Red Days: 4
🟥 Max Drawdown: $545
👨💻 Developed by Antony.N4A
Built for strategic intraday traders, system developers, and backtesters.
For access, customization, or licensing details, contact the developer directly.
Protected script. Redistribution without permission is prohibited.
Antony.N4A -NQ ORB Quartile Str v6.3Antony.N4A – NQ ORB Quartile Strategy v6.3
A precision-engineered intraday breakout system built for the Nasdaq futures market, combining the Opening Range Breakout (ORB) logic with dynamic standard deviation targets, structural filters, and multi-layer risk management.
🧠 Key Features
Opening Range Breakout (ORB):
Automatically defines a breakout window (default: 09:30–09:45) and triggers entries when price breaks the high or low of that range.
Standard Deviation Profit Targets:
Supports SD0.5, SD1.0, SD1.5, and SD2.0 targets relative to the ORB range.
EMA Filtering (200-period):
Filters trades based on EMA direction and price position to validate breakout direction and avoid false entries.
Range Filtering:
Detects directional bias and volatility trends using smoothed range logic.
Momentum Triggering:
Validates breakout momentum and allows entries when directional momentum is positive and increasing.
⚙️ User Inputs
ORB Settings: Timeframe, session, and timezone customization
Entry Window: Define when trades are allowed to trigger
Day Filters: Enable/disable trading by weekday
SD Targets: Configure exit % and active levels (SD0.5 – SD2.0)
EMA Filter & Sensitivity
Cross Filter (Anti-chop logic)
Range Filter Parameters
Visual Toggles: ORB range, SD levels, EMA clouds
🎯 Trade Management Rules
Entry:
Triggered at the close of a 5-minute candle confirming a breakout of the ORB range.
Stop Loss:
Defined by structural invalidation (quartile boundaries & mid-range buffers).
Take Profit Strategy:
75% closed at SD1.0 level
Remaining 25% trailed to further SD2 target
SL is moved to breakeven after partial exit
Execution Controls:
No pyramiding
No re-entries (cooldown enforced)
🔧 Trading Modes
✅ Safe Mode
EMA Filter: Enabled
EMA Sensitivity: 19
Range Filter: Disabled
Ideal for conservative setups and reduced noise environments
🔥 Aggressive Mode
EMA Filter: Enabled
EMA Sensitivity: 5
Range Filter: Disabled
Suited for high-frequency setups and faster breakouts
📊 Backtest Performance (7-Month Sample)
Safe Mode:
Win Rate: 66%
Total Trades: 29
Net PnL: +21.79R (~$4,357 with R = $200)
Max Red Days: 3
Max Drawdown: -$663
Best Month: +9R, Worst Month: -2R
Aggressive Mode:
Win Rate: 63%
Total Trades: 52
Net PnL: +30R (~$6,080)
Max Red Days: 6
Max Drawdown: -$1,357
Best Month: +12R, Worst Month: -3.2R
👨💻 Developed by Antony.N4A
This tool is crafted for strategic intraday traders, system developers, and backtesters.
For access, customization, or licensing options, contact the developer directly.
Protected script. Redistribution or reuse without permission is prohibited.
Price Statistical Strategy-Z Score V 1.01
Price Statistical Strategy – Z Score V 1.01
Overview
A technical breakdown of the logic and components of the “Price Statistical Strategy – Z Score V 1.01”.
This script implements a smoothed Z-Score crossover mechanism applied to the closing price to detect potential statistical deviations from local price mean. The strategy operates solely on price data (close) and includes signal spacing control and momentum-based candle filters. No volume-based or trend-detection components are included.
Core Methodology
The strategy is built on the statistical concept of Z-Score, which quantifies how far a value (closing price) is from its recent average, normalized by standard deviation. Two moving averages of the raw Z-Score are calculated: a short-term and a long-term smoothed version. The crossover between them generates long entries and exits.
Signal Conditions
Entry Condition:
A long position is opened when the short-term smoothed Z-Score crosses above the long-term smoothed Z-Score, and additional entry conditions are met.
Exit Condition:
The position is closed when the short-term Z-Score crosses below the long-term Z-Score, provided the exit conditions allow.
Signal Gapping:
A minimum number of bars (Bars gap between identical signals) must pass between repeated entry or exit signals to reduce noise.
Momentum Filter:
Entries are prevented during sequences of three or more consecutively bullish candles, and exits are prevented during three or more consecutively bearish candles.
Z-Score Function
The Z-Score is calculated as:
Z = (Close - SMA(Close, N)) / STDEV(Close, N)
Where N is the base period selected by the user.
Input Parameters
Enable Smoothed Z-Score Strategy
Enables or disables the Z-Score strategy logic. When disabled, no trades are executed.
Z-Score Base Period
Defines the number of bars used to calculate the simple moving average and standard deviation for the Z-Score. This value affects how responsive the raw Z-Score is to price changes.
Short-Term Smoothing
Sets the smoothing window for the short-term Z-Score. Higher values produce smoother short-term signals, reducing sensitivity to short-term volatility.
Long-Term Smoothing
Sets the smoothing window for the long-term Z-Score, which acts as the reference line in the crossover logic.
Bars gap between identical signals
Minimum number of bars that must pass before another signal of the same type (entry or exit) is allowed. This helps reduce redundant or overly frequent signals.
Trade Visualization Table
A table positioned at the bottom-right displays live PnL for open trades:
Entry Price
Unrealized PnL %
Text colors adapt based on whether unrealized profit is positive, negative, or neutral.
Technical Notes
This strategy uses only close prices — no trend indicators or volume components are applied.
All calculations are based on simple moving averages and standard deviation over user-defined windows.
Designed as a minimal, isolated Z-Score engine without confirmation filters or multi-factor triggers.
ATR-Based Entropy Strategy (Cooldown + Profit-Aware Exit)Just a random idea, after reading "The Hitchhiker's Guide to the Galaxy" (been reading that book multiple times since I was 13).
The fundamental question of life, the universe and everything else is number 42, which reflects the seemingly absurd nature of the search for meaning.
"So Long, and thanks for all the fish..."
QQQ Strategy v2 ESL | easy-peasy-x This is a strategy optimized for QQQ (and SPY) for the 1H timeframe. It significantly outperforms passive buy-and-hold approach. With settings adjustments, it can be used on various assets like stocks and cryptos and various timeframes, although the default out of the box settings favor QQQ 1H.
The strategy uses various triggers to take both long and short trades. These can be adjusted in settings. If you try a different asset, see what combination of triggers works best for you.
Some of the triggers employ LuxAlgo's Ultimate RSI - shoutout to him for great script, check it out here .
Other triggers are based on custom signed standard deviation - basically the idea is to trade Bollinger Bands expansions (long to the upside, short to the downside) and fade or stay out of contractions.
There are three key moving averages in the strategy - LONG MA, SHORT MA, BASIC MA. Long and Short MAs are guides to eyes on the chart and also act as possible trend filters (adjustable in settings). Basic MA acts as guide to eye and a possible trade trigger (adjustable in settings).
There are a few trend filters the strategy can use - moving average, signed standard deviation, ultimate RSI or none. The filters act as an additional condition on triggers, making the strategy take trades only if both triggers and trend filter allows. That way one can filter out trades with unfavorable risk/reward (for instance, don't long if price is under the MA200). Different trade filters can be used for long and short trades.
The strategy employs various stop loss types, the default of which is a trailing %-based stop loss type. ATR-based stop loss is also available. The default 1.5% trailing stop loss is suitable for leveraged trading.
Lastly, the strategy can trigger take profit orders if certain conditions are met, adjustable in settings. Also, it can hold onto winning trades and exit only after stop out (in which case, consecutive triggers to take other positions will be ignored until stop out).
Let me know if you like it and if you use it, what kind of tweaks would you like to see.
With kind regards,
easy-peasy-x
Three Candle Bullish Engulfing StrategyThe Three Candle Bullish Engulfing Strategy is a versatile, multi-mode trading system designed for TradingView, combining classic candlestick patterns with momentum confirmation and dynamic risk management. This script supports both swing trading and intraday approaches, as well as an optional RSI-based breakout mode for additional signal filtering.
Key Features:
Three Candle Pattern Detection:
The strategy identifies potential trend reversal points using a three-candle pattern:
The first candle is a strong bullish (or bearish) move.
The second candle is a doji or small-bodied candle, indicating indecision.
The third candle is a bullish (or bearish) engulfing candle that closes above (or below) the previous high (or low), confirming the reversal.
Flexible Trading Modes:
Swing Long Only: Enter long trades on bullish three-candle setups.
Intraday Long & Short: Trade both long and short based on bullish and bearish three-candle patterns, with automatic session-end exits.
RSI Breakout Mode: Enter long trades when the 1-hour RSI exceeds a user-defined threshold (default 80) and a bullish candle forms, with breakout confirmation and a fixed-percentage stop loss.
Visual Aids:
Plots the RSI breakout trigger price and stop loss on the chart for easy monitoring.
How It Works:
Three Candle Pattern Entries:
Long Entry: Triggered when a bullish candle is followed by a doji, then a bullish engulfing candle closes above the previous high.
Short Entry (Intraday only): Triggered by the inverse pattern—bearish candle, doji, then bearish engulfing candle closing below the previous low.
RSI Breakout Entries:
When the RSI on a higher timeframe (default 1 hour) exceeds the set threshold and a bullish candle forms, the script records a trigger price.
A long trade is entered if the price breaks above this trigger, with a stop loss set a fixed percentage below.
Exits:
Positions are closed if the trailing stop is hit, the session ends (for intraday mode), or the stop loss is triggered in RSI breakout mode.
In RSI breakout mode, positions are also closed if a new breakout trigger forms while in position.
DACUT趋势041Each time you open a position, you only have a very small position. Once you determine the trend, you can increase your position accordingly.
MACD + RSI + EMA + BB + ATR Day Trading StrategyEntry Conditions and Signals
The strategy implements a multi-layered filtering approach to entry conditions, requiring alignment across technical indicators, timeframes, and market conditions .
Long Entry Requirements
Trend Filter: Fast EMA (9) must be above Slow EMA (21), price must be above Fast EMA, and higher timeframe must confirm uptrend
MACD Signal: MACD line crosses above signal line, indicating increasing bullish momentum
RSI Condition: RSI below 70 (not overbought) but above 40 (showing momentum)
Volume & Volatility: Current volume exceeds 1.2x 20-period average and ATR shows sufficient market movement
Time Filter: Trading occurs during optimal hours (9:30-11:30 AM ET) when market volatility is typically highest
Exit Strategies
The strategy employs multiple exit mechanisms to adapt to changing market conditions and protect profits :
Stop Loss Management
Initial Stop: Placed at 2.0x ATR from entry price, adapting to current market volatility
Trailing Stop: 1.5x ATR trailing stop that moves up (for longs) or down (for shorts) as price moves favorably
Time-Based Exits: All positions closed by end of trading day (4:00 PM ET) to avoid overnight risk
Best Practices for Implementation
Settings
Chart Setup: 5-minute timeframe for execution with 15-minute chart for trend confirmation
Session Times: Focus on 9:30-11:30 AM ET trading for highest volatility and opportunity
【SY】AI推送7.0//@version=6
strategy("【SY】AI推送7.0", overlay=true)
// === Supertrend ===
= ta.supertrend(3.1, 15)
// === 均线组 ===
ema1 = ta.ema(close, 20)
ema5 = ta.ema(close, 34)
ema10 = ta.ema(close, 55)
ma15 = ta.sma(close, 15)
ma80 = ta.sma(close, 80)
// === MACD 多周期 ===
macdCycle = input.string("中周期", title="信号周期", options= )
fastLength = macdCycle == "大周期" ? 24 : macdCycle == "小周期" ? 6 : 12
slowLength = macdCycle == "大周期" ? 52 : macdCycle == "小周期" ? 13 : 26
signalSmoothing = macdCycle == "大周期" ? 18 : macdCycle == "小周期" ? 5 : 9
= ta.macd(close, fastLength, slowLength, signalSmoothing)
macd_dead_cross = ta.crossunder(macdLine, signalLine)
macd_golden_cross = ta.crossover(macdLine, signalLine)
// === 参数设置 ===
alert_keyword = input.string(defval = "监控警告提示", title = "钉钉推送关键词", options = )
// === 趋势与信号 ===
golden_cross = ta.crossover(close, ema10)
dead_cross = ta.crossunder(close, ema10)
duo = close > ema10
kong = close < ema10
condition_1 = close > ma80
is_up_trend = direction < 0
is_down_trend = direction > 0
// === 柱颜色 ===
var color kColor = color.navy
if is_up_trend and duo and condition_1
kColor := color.new(#00ff00, 10)
else if is_up_trend and duo
kColor := color.new(#b8ebba, 13)
else if is_down_trend and kong and not condition_1
kColor := color.new(#ff0000, 10)
else if is_down_trend and kong
kColor := color.new(#e8a3a3, 13)
barcolor(kColor)
// === 趋势填充 ===
up_line = plot(is_up_trend ? supertrend : na, title="Up direction", color=color.green, style=plot.style_linebr)
down_line = plot(is_down_trend ? supertrend : na, title="Down direction", color=color.red, style=plot.style_linebr)
close_line = plot(close, display=display.none)
fill(up_line, close_line, color=color.new(color.green, 67))
fill(down_line, close_line, color=color.new(color.red, 67))
plot(ma80, title="趋势线", color=condition_1 ? color.new(#1cef5b, 0) : color.new(#ed0b0b, 0), linewidth=5)
plot(ma15, title="干扰信号", color=color.yellow, linewidth=2)
// === 信号判定 ===
is_green_bar = kColor == color.new(#00ff00, 10) or kColor == color.new(#64f568, 13)
is_red_bar = kColor == color.new(#ff0000, 10) or kColor == color.new(#e45454, 13)
is_yellow_ma = condition_1
is_blue_ma = not condition_1
long_signal_raw = is_green_bar and is_yellow_ma and is_up_trend
short_signal_raw = is_red_bar and is_blue_ma and is_down_trend
var string last_signal = "none"
show_long_signal = long_signal_raw and last_signal != "long"
show_short_signal = short_signal_raw and last_signal != "short"
plotshape(show_long_signal, location=location.belowbar, color=color.green, style=shape.labelup, text="多", textcolor=color.white)
plotshape(show_short_signal, location=location.abovebar, color=color.red, style=shape.labeldown, text="空", textcolor=color.white)
// === 策略执行 ===
var float sl_long = na
var float sl_short = na
style = input.string("标准型", title="风格", options= )
float tp1_rate = na
float tp2_rate = na
float tp3_rate = na
if style == "保守型"
tp1_rate := 0.005
tp2_rate := 0.01
tp3_rate := 0.02
else if style == "激进型"
tp1_rate := 0.015
tp2_rate := 0.03
tp3_rate := 0.06
else
tp1_rate := 0.01
tp2_rate := 0.02
tp3_rate := 0.04
long_in_position = strategy.position_size > 0
short_in_position = strategy.position_size < 0
if show_long_signal
strategy.close("Short")
strategy.entry("Long", strategy.long)
last_signal := "long"
sl_long := supertrend
strategy.exit("固定止损多", from_entry="Long", stop=sl_long)
if show_short_signal
strategy.close("Long")
strategy.entry("Short", strategy.short)
last_signal := "short"
sl_short := supertrend
strategy.exit("固定止损空", from_entry="Short", stop=sl_short)
long_entry = strategy.position_avg_price
short_entry = strategy.position_avg_price
tp1_long = long_entry * (1 + tp1_rate)
tp2_long = long_entry * (1 + tp2_rate)
tp3_long = long_entry * (1 + tp3_rate)
tp1_short = short_entry * (1 - tp1_rate)
tp2_short = short_entry * (1 - tp2_rate)
tp3_short = short_entry * (1 - tp3_rate)
var float tp1_plot = na
var float tp2_plot = na
var float tp3_plot = na
if long_in_position
tp1_plot := tp1_long
tp2_plot := tp2_long
tp3_plot := tp3_long
else if short_in_position
tp1_plot := tp1_short
tp2_plot := tp2_short
tp3_plot := tp3_short
else
tp1_plot := na
tp2_plot := na
tp3_plot := na
plot(tp1_plot, title="止盈线1", color=long_in_position ? color.green : short_in_position ? color.red : na, linewidth=1, style=plot.style_linebr)
plot(tp2_plot, title="止盈线2", color=long_in_position ? color.green : short_in_position ? color.red : na, linewidth=1, style=plot.style_linebr)
plot(tp3_plot, title="止盈线3", color=long_in_position ? color.green : short_in_position ? color.red : na, linewidth=1, style=plot.style_linebr)
plot(long_in_position ? sl_long : na, title="多单止损", color=color.new(color.fuchsia, 0), style=plot.style_linebr)
plot(short_in_position ? sl_short : na, title="空单止损", color=color.new(color.fuchsia, 0), style=plot.style_linebr)
var label tp1_label = na
var label tp2_label = na
var label tp3_label = na
var label sl_label = na
if not na(tp1_label)
label.delete(tp1_label)
if not na(tp2_label)
label.delete(tp2_label)
if not na(tp3_label)
label.delete(tp3_label)
if not na(sl_label)
label.delete(sl_label)
if not na(tp1_plot)
tp1_label := label.new(bar_index, tp1_plot, text="止盈1", style=label.style_label_left, color=color.new(color.green, 0), textcolor=color.white, size=size.small)
if not na(tp2_plot)
tp2_label := label.new(bar_index, tp2_plot, text="止盈2", style=label.style_label_left, color=color.new(color.green, 0), textcolor=color.white, size=size.small)
if not na(tp3_plot)
tp3_label := label.new(bar_index, tp3_plot, text="止盈3", style=label.style_label_left, color=color.new(color.green, 0), textcolor=color.white, size=size.small)
if long_in_position and not na(sl_long)
sl_label := label.new(bar_index, sl_long, text="止损", style=label.style_label_left, color=color.fuchsia, textcolor=color.white, size=size.small)
else if short_in_position and not na(sl_short)
sl_label := label.new(bar_index, sl_short, text="止损", style=label.style_label_left, color=color.fuchsia, textcolor=color.white, size=size.small)
// === 修正后的预警价逻辑 ===
tp_long_str = str.tostring(tp1_long, format.mintick) + "-" + str.tostring(tp2_long, format.mintick) + "-" + str.tostring(tp3_long, format.mintick)
tp_short_str = str.tostring(tp1_short, format.mintick) + "-" + str.tostring(tp2_short, format.mintick) + "-" + str.tostring(tp3_short, format.mintick)
if show_long_signal
long_entry_price = close
long_dist = long_entry_price - sl_long
pre_alert_price = long_entry_price - long_dist * 0.8
alert_str_long = "{\"text\":{\"策略类型\":\"" + alert_keyword + "\",\"监控币种\":\"" + syminfo.ticker + "\",\"方向\":\"开多\",\"预警价格\":\"" + str.tostring(long_entry_price, format.mintick) + " - " + str.tostring(pre_alert_price, format.mintick) + "\",\"监控止盈\":\"" + tp_long_str + "\",\"监控止损\":\"" + str.tostring(sl_long, format.mintick) + "\",\"监控时间\":\"" + str.tostring(timenow, "yyyy-MM-dd HH:mm") + "\",\"附注\":\"交易点位仅为技术交流学习,欢迎大家交流讨论!任何市场都有交易风险,希望大家努力工作,热爱生活,提升自己的能力永远都是第一位的!\"}}"
alert(alert_str_long, alert.freq_once_per_bar)
if show_short_signal
short_entry_price = close
short_dist = short_entry_price - sl_short
pre_alert_price = short_entry_price - short_dist * 0.8
alert_str_short = "{\"text\":{\"策略类型\":\"" + alert_keyword + "\",\"监控币种\":\"" + syminfo.ticker + "\",\"方向\":\"开空\",\"预警价格\":\"" + str.tostring(short_entry_price, format.mintick) + " - " + str.tostring(pre_alert_price, format.mintick) + "\",\"监控止盈\":\"" + tp_short_str + "\",\"监控止损\":\"" + str.tostring(sl_short, format.mintick) + "\",\"监控时间\":\"" + str.tostring(timenow, "yyyy-MM-dd HH:mm") + "\",\"附注\":\"交易点位仅为技术交流学习,欢迎大家交流讨论!任何市场都有交易风险,希望大家努力工作,热爱生活,提升自己的能力永远都是第一位的!\"}}"
alert(alert_str_short, alert.freq_once_per_bar)
Multi-Indicator Trend-Following Strategy v6Multi-Indicator Trend-Following Strategy v6
This strategy uses a combination of technical indicators to identify potential trend-following trade entries and exits. It is intended for educational and research purposes.
How it works:
Moving Averages (EMA): Entry signals are generated on crossovers between a fast and slow exponential moving average.
RSI Filter: Confirms momentum with a threshold above/below 50 for long/short entries.
Volume Confirmation: Requires volume to exceed a moving average multiplied by a user-defined factor.
ATR-Based Risk Management: Stop loss and take profit levels are calculated using the Average True Range (ATR), allowing for dynamic risk control based on market volatility.
Customizable Inputs:
Fast/Slow MA lengths
RSI length and levels
MACD settings (used in calculation, not directly in signal)
Volume MA and multiplier
ATR period and multipliers for stop loss and take profit
Notes:
This strategy does not guarantee future results.
It is provided for analysis and backtesting only.
Alerts are available for buy/sell conditions.
Feel free to adjust parameters to explore different market conditions and asset classes.
FVG Strategy with BOS + Visual TP/SL// === Strategy Description ===
// This strategy is based on:
// 1. Detection of Fair Value Gaps (FVG) — price inefficiencies between candles.
// 2. Confirmation of market direction via Break of Structure (BOS).
// 3. Entry at the FVG retest in the direction of the last BOS.
// 4. Stop-loss placed beyond the FVG zone with a user-defined tick offset.
// 5. Take-profit calculated using a custom risk/reward ratio (e.g., 1:2).
// 6. Compound growth: position size is based on a dynamic virtual balance × leverage.
// 7. Balance is updated after each trade using strategy net profit.
// 8. Visual TP/SL levels and BOS labels are drawn on the chart.
Long Explosive V1The “Long Explosive V1” strategy calculates the percentage change in price from the last closing price of the candlestick, so that if it increases by a certain percentage it goes long, but if it decreases by another percentage it sends an exit order, so that the percentage limits above and below the current price function as inherent stop loss and take profit, with the benefit of taking advantage of the volatility of the bull market.
Entries and exits are always at the market and based on percentage changes in the price. Of course, the default configuration of the strategy considers a position with a 5% risk control, modest initial capital and standard commissions, which helps to obtain realistic results and protect the user from unexpectedly controlled potential losses.
It is again emphasized that it is always advisable to adjust the parameters of the strategy well, so that the risk-reward is well controlled.
Advanced Holy Grail Strategy with filtersAdvanced Holy Grail Strategy with Filters
This strategy is a robust trend-trading system designed for TradingView, leveraging a unique combination of momentum, volatility, volume, and institutional pivot filters to maximize high-probability entries and exits.
Key Features:
Multi-Timeframe MACD & RSI Filters:
Uses MACD and RSI on user-selected timeframes for advanced momentum confirmation. Long trades require both bullish MACD and RSI above 50; short trades require bearish MACD and RSI below 40.
Camarilla Pivots Integration:
Filters entries based on price location relative to Camarilla R3 (for longs) and S3 (for shorts), helping to align trades with institutional-level support/resistance.
Volume Filter:
Confirms trades only when volume exceeds its 20-bar simple moving average, adding a participation/confirmation filter.
Fake Rally Detection:
Identifies and visually marks “fake rallies” (sudden moves exceeding a configurable ATR-based threshold) to help traders avoid chasing unsustainable moves.
Configurable Cooldown:
Prevents overtrading by spacing out entries.
Intelligent Exits:
Uses both RSI and MACD momentum shifts for closing trades, aiming to capture larger trend moves while protecting gains.
Visuals & Alerts:
Plots fake rally bars (FR) directly on the chart for both long and short scenarios.
Customizable alerts for entries and exits (long, short, close), ready for automation or notifications.
Customizable Inputs:
User can configure MACD, RSI, ATR, fake rally threshold, and volume filter parameters, as well as MACD and RSI timeframes.
Use Case:
Ideal for traders seeking a confluence-based system that filters out weak or risky setups, with added institutional logic and protection against news-driven price spikes or “fakeouts.”
Disclaimer: No strategy is guaranteed. Test thoroughly before live trading. Use position sizing and risk management at all times.
La mia strategiathe strategy is based on the search for a trend reversal, so first a reversal of the RSI and then an EMA cross
XRP Grid Trading Strategy (BingX M Futures) v2Hammo's first attempt at making a profitable trading strategy using XRP
EMA Crossover Strategy With TrendSellRuleThis is an updated and improved version of an EMA Crossover strategy.
In usual EMA crossover, the buy and sell happens on the crossover of the EMAs e.g. a buy signal is generated if a EMA 10 crosses up EMA 50 and the sell signal happens when EMA 10 crosses down EMA 50. The problem comes here is that in a consolidation mode, the buy, sell happens a lot and can result in a lot of small losses which accumulate over time.
With this script, we are trying to refine the buying and selling process to take fewer trades and to keep profitable trades ratio higher, thus generating more profit.
The buy rules are EMA 10 must be atleast 3% above (configurable) from EMA 50 and the close should be greater that EMA 50, to generate a long signal
For sell rules, we are considering the trend rules here, where we see that there are consecutive 3 red bars (3 distribution days) and the gap from top is -5% OR its a Bearish crossover.