Göstergeler ve stratejiler
Trend MagicTrend Magic is an indicator identity Multi time frame Trend. Ideal time frame 5 Min
Long Entry :
Long term Line is Green and price goes above blue line taka a long position
Short Entry :
Long term Line is Red and price goes below both red line take a short position
Recession Warning Model [BackQuant]Recession Warning Model
Overview
The Recession Warning Model (RWM) is a Pine Script® indicator designed to estimate the probability of an economic recession by integrating multiple macroeconomic, market sentiment, and labor market indicators. It combines over a dozen data series into a transparent, adaptive, and actionable tool for traders, portfolio managers, and researchers. The model provides customizable complexity levels, display modes, and data processing options to accommodate various analytical requirements while ensuring robustness through dynamic weighting and regime-aware adjustments.
Purpose
The RWM fulfills the need for a concise yet comprehensive tool to monitor recession risk. Unlike approaches relying on a single metric, such as yield-curve inversion, or extensive economic reports, it consolidates multiple data sources into a single probability output. The model identifies active indicators, their confidence levels, and the current economic regime, enabling users to anticipate downturns and adjust strategies accordingly.
Core Features
- Indicator Families : Incorporates 13 indicators across five categories: Yield, Labor, Sentiment, Production, and Financial Stress.
- Dynamic Weighting : Adjusts indicator weights based on recent predictive accuracy, constrained within user-defined boundaries.
- Leading and Coincident Split : Separates early-warning (leading) and confirmatory (coincident) signals, with adjustable weighting (default 60/40 mix).
- Economic Regime Sensitivity : Modulates output sensitivity based on market conditions (Expansion, Late-Cycle, Stress, Crisis), using a composite of VIX, yield-curve, financial conditions, and credit spreads.
- Display Options : Supports four modes—Probability (0-100%), Binary (four risk bins), Lead/Coincident, and Ensemble (blended probability).
- Confidence Intervals : Reflects model stability, widening during high volatility or conflicting signals.
- Alerts : Configurable thresholds (Watch, Caution, Warning, Alert) with persistence filters to minimize false signals.
- Data Export : Enables CSV output for probabilities, signals, and regimes, facilitating external analysis in Python or R.
Model Complexity Levels
Users can select from four tiers to balance simplicity and depth:
1. Essential : Focuses on three core indicators—yield-curve spread, jobless claims, and unemployment change—for minimalistic monitoring.
2. Standard : Expands to nine indicators, adding consumer confidence, PMI, VIX, S&P 500 trend, money supply vs. GDP, and the Sahm Rule.
3. Professional : Includes all 13 indicators, incorporating financial conditions, credit spreads, JOLTS vacancies, and wage growth.
4. Research : Unlocks all indicators plus experimental settings for advanced users.
Key Indicators
Below is a summary of the 13 indicators, their data sources, and economic significance:
- Yield-Curve Spread : Difference between 10-year and 3-month Treasury yields. Negative spreads signal banking sector stress.
- Jobless Claims : Four-week moving average of unemployment claims. Sustained increases indicate rising layoffs.
- Unemployment Change : Three-month change in unemployment rate. Sharp rises often precede recessions.
- Sahm Rule : Triggers when unemployment rises 0.5% above its 12-month low, a reliable recession indicator.
- Consumer Confidence : University of Michigan survey. Declines reflect household pessimism, impacting spending.
- PMI : Purchasing Managers’ Index. Values below 50 indicate manufacturing contraction.
- VIX : CBOE Volatility Index. Elevated levels suggest market anticipation of economic distress.
- S&P 500 Growth : Weekly moving average trend. Declines reduce wealth effects, curbing consumption.
- M2 + GDP Trend : Monitors money supply and real GDP. Simultaneous declines signal credit contraction.
- NFCI : Chicago Fed’s National Financial Conditions Index. Positive values indicate tighter conditions.
- Credit Spreads : Proxy for corporate bond spreads using 10-year vs. 2-year Treasury yields. Widening spreads reflect stress.
- JOLTS Vacancies : Job openings data. Significant drops precede hiring slowdowns.
- Wage Growth : Year-over-year change in average hourly earnings. Late-cycle spikes often signal economic overheating.
Data Processing
- Rate of Change (ROC) : Optionally applied to capture momentum in data series (default: 21-bar period).
- Z-Score Normalization : Standardizes indicators to a common scale (default: 252-bar lookback).
- Smoothing : Applies a short moving average to final signals (default: 5-bar period) to reduce noise.
- Binary Signals : Generated for each indicator (e.g., yield-curve inverted or PMI below 50) based on thresholds or Z-score deviations.
Probability Calculation
1. Each indicator’s binary signal is weighted according to user settings or dynamic performance.
2. Weights are normalized to sum to 100% across active indicators.
3. Leading and coincident signals are aggregated separately (if split mode is enabled) and combined using the specified mix.
4. The probability is adjusted by a regime multiplier, amplifying risk during Stress or Crisis regimes.
5. Optional smoothing ensures stable outputs.
Display and Visualization
- Probability Mode : Plots a continuous 0-100% recession probability with color gradients and confidence bands.
- Binary Mode : Categorizes risk into four levels (Minimal, Watch, Caution, Alert) for simplified dashboards.
- Lead/Coincident Mode : Displays leading and coincident probabilities separately to track signal divergence.
- Ensemble Mode : Averages traditional and split probabilities for a balanced view.
- Regime Background : Color-coded overlays (green for Expansion, orange for Late-Cycle, amber for Stress, red for Crisis).
- Analytics Table : Optional dashboard showing probability, confidence, regime, and top indicator statuses.
Practical Applications
- Asset Allocation : Adjust equity or bond exposures based on sustained probability increases.
- Risk Management : Hedge portfolios with VIX futures or options during regime shifts to Stress or Crisis.
- Sector Rotation : Shift toward defensive sectors when coincident signals rise above 50%.
- Trading Filters : Disable short-term strategies during high-risk regimes.
- Event Timing : Scale positions ahead of high-impact data releases when probability and VIX are elevated.
Configuration Guidelines
- Enable ROC and Z-score for consistent indicator comparison unless raw data is preferred.
- Use dynamic weighting with at least one economic cycle of data for optimal performance.
- Monitor stress composite scores above 80 alongside probabilities above 70 for critical risk signals.
- Adjust adaptation speed (default: 0.1) to 0.2 during Crisis regimes for faster indicator prioritization.
- Combine RWM with complementary tools (e.g., liquidity metrics) for intraday or short-term trading.
Limitations
- Macro indicators lag intraday market moves, making RWM better suited for strategic rather than tactical trading.
- Historical data availability may constrain dynamic weighting on shorter timeframes.
- Model accuracy depends on the quality and timeliness of economic data feeds.
Final Note
The Recession Warning Model provides a disciplined framework for monitoring economic downturn risks. By integrating diverse indicators with transparent weighting and regime-aware adjustments, it empowers users to make informed decisions in portfolio management, risk hedging, or macroeconomic research. Regular review of model outputs alongside market-specific tools ensures its effective application across varying market conditions.
Fraktály a Trendovkyal shlash dlka sklhsda hasd klnasdnlkcalknacs 654 as64asd 65ads 156as 13ads 32asd 165as
XAUUSD Trendline Breakout + RSI + MA Signal//@version=5
indicator("XAUUSD Trendline Breakout + RSI + MA Signal", overlay=true)
// --- Inputs ---
lengthFast = input.int(10, title="Fast MA Length")
lengthSlow = input.int(30, title="Slow MA Length")
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// --- Moving Averages ---
fastMA = ta.sma(close, lengthFast)
slowMA = ta.sma(close, lengthSlow)
// --- RSI ---
rsi = ta.rsi(close, rsiLength)
// --- Trendline (Manual input) ---
// Use fixed default price values here, change manually based on your chart.
trend_x1 = input.int(20, title="Trendline Point 1 X (bars ago)")
trend_y1 = input.float(3000.0, title="Trendline Point 1 Y (price)") // constant default
trend_x2 = input.int(2, title="Trendline Point 2 X (bars ago)")
trend_y2 = input.float(3100.0, title="Trendline Point 2 Y (price)") // constant default
bar_idx1 = bar_index - trend_x1
bar_idx2 = bar_index - trend_x2
trendline_y_value(bar) =>
m = (trend_y2 - trend_y1) / (bar_idx2 - bar_idx1)
c = trend_y1 - m * bar_idx1
m * bar + c
trend_y_curr = trendline_y_value(bar_index)
trend_y_prev = trendline_y_value(bar_index - 1)
// --- Signals ---
// Trendline breakout
buyBreakout = (close < trend_y_prev) and (close > trend_y_curr)
sellBreakout = (close > trend_y_prev) and (close < trend_y_curr)
// MA crossover
maBuy = ta.crossover(fastMA, slowMA)
maSell = ta.crossunder(fastMA, slowMA)
// RSI confirmation
rsiBuy = rsi < rsiOversold
rsiSell = rsi > rsiOverbought
// Final buy/sell signal with all conditions
buySignal = buyBreakout and maBuy and rsiBuy
sellSignal = sellBreakout and maSell and rsiSell
// --- Plot ---
plot(fastMA, color=color.blue, title="Fast MA")
plot(slowMA, color=color.orange, title="Slow MA")
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Plot trendline
var line trendLine = na
if barstate.islast
if na(trendLine)
trendLine := line.new(bar_idx1, trend_y1, bar_idx2, trend_y2, color=color.yellow, width=2)
else
line.set_xy1(trendLine, bar_idx1, trend_y1)
line.set_xy2(trendLine, bar_idx2, trend_y2)
// --- Alerts ---
alertcondition(buySignal, title="Buy Alert", message="XAUUSD Buy Signal")
alertcondition(sellSignal, title="Sell Alert", message="XAUUSD Sell Signal")
Inside Bars / Nested Bars (+ Gaps) [jenaparadies]📌 Features
Highlight inside bars
Highlight bars that remain within the range of a mother bar (called nested bars )
Highlight the mother bar (optional)
Highlight consecutive nested bars using a visual box (optional)
Enable no-gap candle logic (optional, see below)
Show no-gap candles on the chart (optional)
Fully customizable colors and appearance
📌 Method
An inside bar is any candle whose high is lower than or equal to the previous candle's high, and whose low is higher than or equal to the previous candle's low. In other words, the entire price action of the inside bar remains within the range of the previous candle without exceeding it. The preceding candle is referred to as the mother bar .
Occasionally, the candle following the inside bar may break above or below the inside bar's range, while still remaining fully within the high and low of the mother bar. These candles are referred to as nested bars and are highlighted in a different color.
Optionally, sequences of consecutive nested bars can be enclosed within a box to emphasize consolidation zones.
📌 No-Gap Candles (Optional)
This feature adjusts each candle’s opening price so that it matches the closing price of the previous candle. It is particularly useful for assets that frequently experience large gaps between candles.
By extending each candle's effective range to include the previous candle's close, the indicator maintains structural consistency over timeframes, especially when the open price deviates significantly from the prior close. Inside bars are then identified relative to the extended range of the mother bar.
Optionally, the adjusted no-gap candles can be visualized directly on the chart for better clarity.
🎁 Bonus
Activating the "Show No-Gap Candles" option transforms any line chart into a gap-free bar chart ‒ ideal for visualizing economic data such as inflation rates.
FLD Area - Future Lines of Demarcation by Nibbio996FLD Area v12 - Future Lines of Demarcation
Overview
Advanced FLD (Future Lines of Demarcation) indicator with area visualization for cycle analysis. Projects price levels into the future by half the cycle period, displaying high, low, and median as colored areas.
What are FLDs?
Future Lines of Demarcation are price levels shifted forward in time by approximately half the cycle wavelength. Used in cycle analysis to identify potential support/resistance levels and trend changes.
Key Features
Area visualization between high/low FLD lines with customizable colors
Three bands: Upper, Lower, and Total area with independent transparency
Dynamic labels: Customizable text with period display
Status line integration showing real-time FLD values
Flexible display options: Toggle individual lines, labels, and info displays
Parameters
Period: Cycle length (default: 40)
Colors: Customizable for main, upper, and lower areas
Transparency: Adjustable area opacity (0-100)
Labels: Toggle and customize indicator identification
Display Options: Individual lines, status info, top labels
Usage
Set Period based on your cycle analysis
Customize colors and transparency for chart clarity
Configure labels for identification
Analyze where price interacts with projected FLD areas
Applications
Cycle turning point identification
Dynamic support/resistance levels
Trend analysis with FLD projections
Multi-timeframe cycle analysis
FLD Area v12 by Nibbio996
Pine Script v5 | Overlay Indicator
For educational purposes. Use proper risk management.
MA 12 + 48After crossing the two moving averages, the indicator looks for a set of conditions to be fulfilled, after which it gives a buy or sell signal.
MP Master VWAP [BackQuant]MP Master VWAP
Overview
MP Master VWAP is an, volume-weighted average price suite. It re-anchors automatically to any time partition you select—Day, Week, Month, Quarter or Year—and builds an adaptive standard-deviation envelope, optional pivot clusters and context-aware candle colouring so you can read balance, imbalance and auction edges in a single glance. We use private methods on calculating key levels, making them adaptive and more responsive. This is not just a plain VWAP.
Key Components
• Anchored VWAP core – The engine resets VWAP the instant a new session for the chosen anchor begins. Separator lines and a live high–low box make those rotations obvious.
• Dynamic sigma bands – Three upper and three lower bands, scaled by real-time standard deviation. 1-σ filters noise, 2-σ marks momentum, 3-σ flags exhaustion.
• Previous-period memory – The prior session’s VWAP and bands stay on-screen in a muted style so you can trade retests of last month’s value without clutter.
• High-precision price labels – VWAP and every active band print their prices on the hard right edge; labels vanish if you want a cleaner chart.
• Pivot package – Choose Traditional, Fibonacci or Camarilla calculations on a Daily, Weekly or Monthly look-back. Levels plot as subtle circles that complement, not compete with, the VWAP map.
• Context candles – Bars tint relative to their location: vivid red above U2, soft red between U1-U2, neutral grey inside value, soft green between L2-L1, vivid green below L2.
Customisation Highlights
Period section
• Anchor reset drop-down
• Toggles for separator lines and period high/low
Band section
• Independent visibility for L1/U1, L2/U2, L3/U3
• Individual multipliers to fit any volatility profile
• Optional real-time price labels
Pivot section
• Three formula choices
• Independent timeframe—mix a Monthly VWAP with Weekly Camarilla for confluence
Visual section
• Separate switches for current vs previous envelopes
• Candle-colour toggle for traders who prefer raw price bars
Colour section
• Full palette selectors to match dark or light themes instantly
Some Potential Ways it can be used:
Mean-reversion fade – Price spikes into U2 or U3 and stalls (especially at a pivot). Fade back toward VWAP; scale out at U1 and VWAP.
Trend continuation – Close above U1 on rising volume; trail a stop behind U1. Mirror setup for shorts under L1.
Breakout validation – Session gaps below previous VWAP but quickly reclaims it. Use the cross-above alert to automate entry and target U1 / U2.
Overnight inventory flush – Globex extremes that tag L2 / U2 often reverse at the cash open; scalp rotations back to VWAP.
Risk framing – Let the gap between VWAP and L2 / U2 dictate position size, keeping reward-to-risk consistent across assets.
Alerts Included
• Cross above / below current VWAP
• Cross first sigma bands (U1 / L1)
• Break above second sigma bands (U2) or below L2
• Touch of third sigma bands (U3 / L3)
• Cross of previous-period VWAP
• New period high or low
Best Practices
• Tighten sigma multipliers on thin-liquidity symbols; widen them on index futures or high-cap crypto.
• Pair the envelope with order-flow or footprint tools to confirm participation at band edges.
• On intraday charts, anchor a higher-timeframe VWAP (e.g., Monthly on a 15-minute) to reveal institutional accumulation.
• Treat the previous period’s VWAP as yesterday’s fair value—gaps that never revisit it often morph into trend days.
Final Notes
MP Master VWAP condenses auction-market theory into one readable overlay: automatic period resets, adaptive deviation bands, historical memory, multi-style pivots and self-explanatory colour coding. You can deploy it on equities, futures, crypto or FX—wherever volume meets time, VWAP remains the benchmark of true price discovery.
FxCult BOT Pro+💎 FxCult BOT Pro+ – The Ultimate Smart Money Companion for XAU/USD
FxCult BOT Pro+ is a premium invite-only indicator designed for serious traders who want to trade like institutions, not retail. Built specifically for XAU/USD scalping and intraday strategy, this tool combines Smart Money Concepts (SMC), volume footprints, and real-time price structure to deliver high-accuracy entries with confidence.
🔍 Key Features:
✅ Validated Fair Value Gaps (FVG)
✅ Order Blocks (OB) with mitigation cleanup
✅ CHoCH (Change of Character)
✅ Volume-based MCMP footprints & low-volume zones
✅ Auto-removal of invalidated zones
✅ Entry + Exit marker plotting
✅ Trailing stop logic (ATR-based)
✅ Branded chart visuals (Dark + Light themes)
✅ Perfect Setup snapshots for marketing
📈 Built for Traders Who Demand:
• Precision entries during high-liquidity moments
• Institutional logic for navigating smart money moves
• Clarity in structure – no clutter, just zones that matter
• Backtest support + real-time trading compatibility
💼 Access Tiers:
🔹 $99/month – Subscription
🔸 $299 – Lifetime License
🧪 7-Day Free Trial (Limited Slots)
🔐 Invite-only access – message us to apply
📲 Contact & Onboarding:
📍 Telegram: @FxCultSupport
📤 DM for brochure, previews & access code
📎 PDF Brochure + Chart Samples Available
Note: This script is protected and distributed only to approved users. For onboarding or partnership, contact us directly via Telegram.
uk100_funThis strategy is long only and works on the UK100 hourly chart only. It is designed to find ideal entry points based off of pivot points and the hourly 8 ema.
us100_fun_1This strategy works on the US100 only and is designed to trade entries points based off of the 4-hourly 8 ema.
TrailingPE//@version=6
indicator("TrailingPE", shorttitle="TPE", overlay=true)
// === USER INPUTS ===
pos_x = input.string("Right", "Horizontal Position", options= )
pos_y = input.string("Top", "Vertical Position", options= )
text_color = input.color(color.white, "Text Color")
bg_color = input.color(color.new(color.blue, 80), "Background Color")
text_size = input.string("Normal", "Font Size", options= )
// === POSITION MAPPING ===
get_position_y() =>
switch pos_y
"Top" =>
switch pos_x
"Left" => position.top_left
"Center" => position.top_center
"Right" => position.top_right
"Middle" =>
switch pos_x
"Left" => position.middle_left
"Center" => position.middle_center
"Right" => position.middle_right
"Bottom" =>
switch pos_x
"Left" => position.bottom_left
"Center" => position.bottom_center
"Right" => position.bottom_right
get_text_size() =>
switch text_size
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
// === PE CALCULATION ===
eps_ttm = request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE_DILUTED", "TTM")
if na(eps_ttm)
eps_ttm := request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE_BASIC", "TTM")
current_price = close
pe_ratio = eps_ttm > 0 ? current_price / eps_ttm : na
is_data_valid = not na(pe_ratio) and eps_ttm > 0
// === COMPACT SINGLE-LINE DISPLAY ===
if barstate.islast
var table pe_table = table.new(get_position_y(), 1, 1,
bgcolor=bg_color,
border_width=1,
border_color=color.gray)
table.clear(pe_table, 0, 0, 0, 0)
if is_data_valid
// Single line: "PE : Value" - removed text_style parameter
pe_rounded = math.ceil(pe_ratio)
pe_text = "PE : " + str.tostring(pe_rounded)
table.cell(pe_table, 0, 0, pe_text,
text_color=text_color,
text_size=get_text_size(),
bgcolor=bg_color)
else
table.cell(pe_table, 0, 0, "PE : N/A",
text_color=color.red,
text_size=get_text_size(),
bgcolor=bg_color)
Second Candle High/Low TrackerThis is a modified version of Tom Hougard's SRS. This has been optimised to work on custom time frames on Indian Market timing. So beware of that, and select a lower timeframe chart than the timeframe you select for your system indicator. Same timeframes work as well. On a higher timeframe, the indicator goes random. So avoid.
Anyways most back testing entry and exit will be more accurate on lower timeframes. Hope this will help anyone who follows Tom.
Multi Averages - CustomizableThis script adds up to 5 moving averages to your plot!
Both type and length are customizable.
Auto AVWAP (Anchored-VWAP) with Breakout ScreenerAuto AVWAP (Anchored-VWAP) with Breakout Screener. fINAL VERSION
Wx2 Treasure Box – Institutional Entry🧩 Indicator Overview: Wx2 Treasure Box – Institutional Entry
Designed to detect Institutional Bars (IBs) and visualize high-probability entry zones, this script helps traders align with potential smart-money activity.
Institutional Bars are defined as Entry of Smart Money
⚙️ How It Works
20-period and 200-period Simple Moving Averages are plotted to show short‑ and long‑term trend direction.
On identification of an IB:
A label “IB” is placed above the bar.
A rectangular box is drawn around its high–low range, extending several bars to the right to mark the trade zone
Trade Signals & Setup Guidelines
Buy Entry:
Trigger: Price breaks above the box.
Stop Loss (SL): Set just below the box bottom.
Sell Entry:
Trigger: Price piercing below the box.
SL: Placed above the box top.
Risk-to-Reward Ratio (RRR):
Target RRR of 1:2 is recommended
Best Execution Zone:
Treasure Box is the best with 20SMA+200 SMA+Price in it.
📽️ Video Link
You’ve linked a YouTube video for explanation:
Watch Here
Momentum Buy/Sell signals (Nikko) v1.0📊 Momentum Volume Box Range Buy/Sell Signals (Nikko) v1.0
This indicator is a multi-factor momentum-based tool that helps identify potential Buy and Sell signals:
🔍 What it does
It combines several well-known indicators into a hybrid signal system and displays heatmaps, momentum lines, and Buy/Sell labels.
📈 How to use it
Buy Signals are shown when the hybrid K line crosses above D line in strong downward zones (oversold).
Sell Signals appear when K crosses below D, but only if a minimum profit % is reached since the last Buy.
The background heatmap color changes based on combined RSI and Vortex intensity:
Greenish = Bullish strength
Reddish = Bearish weakness
🟢 Buy/Sell Labels
Buy Labels: Triggered when strong downward momentum reverses (or price drops deeply).
Sell Labels: Only shown if price has moved up by the user-defined % profit since the last Buy.
🔧 Customization Options
You can toggle on/off:
Heatmap
Hybrid signal lines
Buy/Sell labels
Stochastic RSI area plot
Volume range and profile
EMA overlays (20, 50, 100, 200)
All major color elements are adjustable for visual clarity.
💡 Best Practices
Use on any timeframe, but it works best with higher timeframes (1H+).
Look for convergence between strong heatmap color and hybrid signal crossover.
Combine with price action or EMA trend context for better accuracy.
Note: This indicator is designed as a trading companion, not a standalone strategy. It combines multiple timeframes and parameters that would be difficult to monitor manually. Its purpose is to visually simplify complex signals, helping reduce the risk of poor entries.
However, it's essential to also consider macroeconomic factors, news events, and overall market sentiment, as they can significantly impact price action. Always use proper risk management and do your own research (DYOR).
Simple Trading ChecklistCustomisable Simple Trading Checklist
This script overlays a fully customizable trading checklist directly onto your chart, providing an at-a-glance reminder of key trading steps and conditions before entering a position.
It is especially useful for discretionary or rule-based traders who want a consistent on-screen process to follow.
Modular Range-Trading Strategy (V9.2)# 模块化震荡行情策略 (V9.2)
# Modular Range-Trading Strategy (V9.2)
## 策略简介 | Strategy Overview
该策略基于布林带 (Bollinger Bands)、RSI、MACD、ADX 等经典指标的组合,通过多逻辑模块化结构识别震荡区间的价格反转机会,支持多空双向操作,并在相同逻辑下允许智能加仓,适用于震荡市场的回测和研究。
This strategy combines classic indicators such as Bollinger Bands, RSI, MACD, and ADX to identify price reversal opportunities within ranging markets. It features a modular multi-logic structure, allowing both long and short trades with intelligent pyramiding under the same logic. It is designed for backtesting and research in range-bound conditions.
---
## 功能特点 | Key Features
- **多逻辑结构**:支持多套震荡逻辑(动能确认均值回归、布林带极限反转等)。
- **加仓与仓位互斥**:同逻辑下可智能加仓,不同逻辑间自动互斥,避免冲突。
- **回测可调时间范围**:可自定义回测起止时间,精准评估策略表现。
- **指标可视化**:布林带、RSI、MACD 及动态 ATR 止损线实时绘图。
- **K线收盘确认信号**:通过 `barstate.isconfirmed` 控制信号,避免未收盘的虚假信号。
- **Multi-logic structure**: Supports multiple range-trading logics (e.g., momentum-based mean reversion, Bollinger Band reversals).
- **Pyramiding with mutual exclusion**: Allows intelligent pyramiding within the same logic while preventing conflicts between different logics.
- **Adjustable backtesting range**: Customizable start and end dates for accurate performance evaluation.
- **Visual indicators**: Real-time plotting of Bollinger Bands, RSI, MACD, and dynamic ATR stop lines.
- **Close-bar confirmation**: Uses `barstate.isconfirmed` to avoid false signals before bar close.
---
## 使用说明 | Usage
1. 将该脚本添加到 TradingView 图表。
2. 在参数中设置回测时间段和指标参数。
3. 仅用于学习与策略研究,请勿直接用于实盘交易。
1. Add this script to your TradingView chart.
2. Configure backtesting dates and indicator parameters as needed.
3. For educational and research purposes only. **Not for live trading.**
---
## ⚠️ 免责声明 | Disclaimer
本策略仅供学习和研究使用,不构成任何形式的投资建议。
作者不参与任何实盘交易、资金管理或收益分成,也不保证策略盈利能力。
严禁将本脚本用于任何非法集资、私募募资或与虚拟货币相关的金融违法活动。
使用本策略即表示您自行承担所有风险与法律责任。
This strategy is for educational and research purposes only and does not constitute investment advice.
The author does not participate in live trading, asset management, or profit sharing, nor guarantee profitability.
The use of this script in illegal fundraising, private placements, or cryptocurrency-related financial activities is strictly prohibited.
By using this strategy, you accept all risks and legal responsibilities.
---
Perfect Triple EMA Cross (15min Only)//@version=5
indicator("Perfect Triple EMA Cross (15min Only)", overlay=true)
// ==== Inputs ====
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
// ==== Timeframe Check ====
is15min = (timeframe.period == "15")
// ==== Conditions ====
buyCond = is15min and ta.crossover(ema20, ema50) and ema20 > ema50 and ema50 > ema200
sellCond = is15min and ta.crossunder(ema20, ema50) and ema20 < ema50 and ema50 < ema200
// ==== Plots ====
plot(ema20, title="EMA 20", color=color.orange, linewidth=1)
plot(ema50, title="EMA 50", color=color.blue, linewidth=1)
plot(ema200, title="EMA 200", color=color.red, linewidth=2)
plotshape(buyCond, title="BUY", location=location.belowbar, style=shape.labelup, color=color.green, size=size.normal, text="BUY")
plotshape(sellCond, title="SELL", location=location.abovebar, style=shape.labeldown, color=color.red, size=size.normal, text="SELL")
// ==== Alerts ====
alertcondition(buyCond, title="BUY Signal", message="Triple EMA BUY Signal (15min)")
alertcondition(sellCond, title="SELL Signal", message="Triple EMA SELL Signal (15min)")