15min ACTIVE Rangeevery 9:30 am New York Time, Gold prints a high Volume 15 min Candle: "ACTIVE RANGE"
Every time gold prints a candle in which it has a higher candle than the current "ACTIVE RANGE" there would be a new "ACTIVE RANGE"
Breakout and retest the ACTIVE Range
Индикаторы и стратегии
多单ETH/XRP/LTC/IP/分段止盈(优先成本区止损)Experience the backtesting of a 30x leverage If you need a long-term strategy, please send me a message.
多单ETH/XRP/LTC/IP/分段止盈(优先成本区止损)Feel the 30x leverage effect on the entire historical BTC data. Release your hands and take off!
SuperTrended Moving Averages Strategyself use
used in 1 second timeframe
please let me publish it aaa
Diabolos Long What the strategy tries to do
It looks for RSI dips into oversold, then waits for RSI to recover above a chosen level before placing a limit buy slightly below the current price. If the limit doesn’t fill within a few bars, it cancels it. Once in a trade, it sets a fixed take-profit and stop-loss. It can pyramid up to 3 entries.
Step-by-step
1) Inputs you control
RSI Length (rsiLen), Oversold level (rsiOS), and a re-entry threshold (rsiEntryLevel) you want RSI to reach after oversold.
Entry offset % (entryOffset): how far below the current close to place your limit buy.
Cancel after N bars (cancelAfterBars): if still not filled after this many bars, the limit order is canceled.
Risk & compounding knobs: initialRisk (% of equity for first order), compoundRate (% to artificially grow the equity base after each signal), plus fixed TP% and SL%.
2) RSI logic (arming the setup)
It calculates rsi = ta.rsi(close, rsiLen).
If RSI falls below rsiOS, it sets a flag inOversold := true (this “arms” the next potential long).
A long signal (longCondition) happens only when:
inOversold is true (we were oversold),
RSI comes back above rsiOS,
and RSI is at least rsiEntryLevel.
So: dip into OS → recover above OS and to your threshold → signal fires.
3) Placing the entry order
When longCondition is true:
It computes a limit price: close * (1 - entryOffset/100) (i.e., below the current bar’s close).
It sizes the order as positionRisk / close, where:
positionRisk starts as accountEquity * (initialRisk/100).
accountEquity was set once at script start to strategy.equity.
It places a limit long: strategy.order("Long Entry", strategy.long, qty=..., limit=limitPrice).
It then resets inOversold := false (disarms until RSI goes oversold again).
It remembers the bar index (orderBarIndex := bar_index) so it can cancel later if unfilled.
Important nuance about “compounding” here
After signaling, it does:
compoundedEquity := compoundedEquity * (1 + compoundRate/100)
positionRisk := compoundedEquity * (initialRisk/100)
This means your future order sizes grow by a fixed compound rate every time a signal occurs, regardless of whether previous trades won or lost. It’s not tied to actual PnL; it’s an artificial growth curve. Also, accountEquity was captured only once at start, so it doesn’t automatically track live equity changes.
4) Auto-cancel the limit if it doesn’t fill
On each bar, if bar_index - orderBarIndex >= cancelAfterBars, it does strategy.cancel("Long Entry") and clears orderBarIndex.
If the order already filled, cancel does nothing (there’s nothing pending with that id).
Behavioral consequence: Because you set inOversold := false at signal time (not on fill), if a limit order never fills and later gets canceled, the strategy will not fire a new entry until RSI goes below oversold again to re-arm.
5) Managing the open position
If strategy.position_size > 0, it reads the avg entry price, then sets:
takeProfitPrice = avgEntryPrice * (1 + exitGainPercentage/100)
stopLossPrice = avgEntryPrice * (1 - stopLossPercentage/100)
It places a combined exit:
strategy.exit("TP / SL", from_entry="Long Entry", limit=takeProfitPrice, stop=stopLossPrice)
With pyramiding=3, multiple fills can stack into one net long position. Using the same from_entry id ties the TP/SL to that logical entry group (not per-layer). That’s OK in TradingView (it will manage TP/SL for the position), but you don’t get per-layer TP/SL.
6) Visuals & alerts
It plots a green triangle under the bar when the long signal condition occurs.
It exposes an alert you can hook to: “Покупка при достижении уровня”.
A quick example timeline
RSI drops below rsiOS → inOversold = true (armed).
RSI rises back above rsiOS and reaches rsiEntryLevel → signal.
Strategy places a limit buy a bit below current price.
4a) If price dips to fill within cancelAfterBars, you’re long. TP/SL are set as fixed % from avg entry.
4b) If price doesn’t dip enough, after N bars the limit is canceled. The system won’t re-try until RSI becomes oversold again.
Key quirks to be aware of
Risk sizing isn’t PnL-aware. accountEquity is frozen at start, and compoundedEquity grows on every signal, not on wins. So size doesn’t reflect real equity changes unless you rewrite it to use strategy.equity each time and (optionally) size by stop distance.
Disarm on signal, not on fill. If a limit order goes stale and is canceled, the system won’t try again unless RSI re-enters oversold. That’s intentional but can reduce fills.
Single TP/SL id for pyramiding. Works, but you can’t manage each add-on with different exits.
Natural Gas Intraday Strategy [15m] with Partial Profit & TrailBuy when:
1. Close > EMA 100 and EMA 20 > EMA 100
2. MACD (8,21,5) > Signal and histogram rising
3. RSI > 60
4. ATR > threshold (avoid flat market)
Sell when:
1. Close < EMA 100 and EMA 20 < EMA 100
2. MACD (8,21,5) < Signal and histogram falling
3. RSI < 40
4. ATR > threshold
Exit:
• SL = recent swing ± 0.5 ATR
• TP1 = 1 ATR, trail rest with EMA 20
Zero Lag + Momentum Bias StrategyZero Lag + Momentum Bias Strategy (MTF + Strong MBI + R:R + Partial TP + Alerts)
NSE/FT/INTRADAYIt combines technical indicators and momentum signals to capture quick price movements while managing risk effectively. The strategy emphasizes fast execution, strict stop-loss placement, and disciplined profit booking, making it suitable for traders who prefer multiple trades within the same day rather than holding overnight positions.
Macro Momentum – 4-Theme, Vol Target, RebalanceMacro Momentum — 4-Theme, Vol Target, Rebalance
Purpose. A macro-aware strategy that blends four economic “themes”—Business Cycle, Trade/USD, Monetary Policy, and Risk Sentiment—into a single, smoothed Composite signal. It then:
gates entries/exits with hysteresis bands,
enforces optional regime filters (200-day bias), and
sizes the position via volatility targeting with caps for long/short exposure.
It’s designed to run on any chart (index, ETF, futures, single stocks) while reading external macro proxies on a chosen Signal Timeframe.
How it works (high level)
Build four theme signals from robust macro proxies:
Business Cycle: XLI/XLU and Copper/Gold momentum, confirmed by the chart’s price vs a long SMA (default 200D).
Trade / USD: DXY momentum (sign-flipped so a rising USD is bearish for risk assets).
Monetary Policy: 10Y–2Y curve slope momentum and 10Y yield trend (steepening & falling 10Y = risk-on; rising 10Y = risk-off).
Risk Sentiment: VIX momentum (bearish if higher) and HYG/IEF momentum (bullish if credit outperforms duration).
Normalize & de-noise.
Optional Winsorization (MAD or stdev) clamps outliers over a lookback window.
Optional Z-score → tanh mapping compresses to ~ for stable weighting.
Theme lines are SMA-smoothed; the final Composite is LSMA-smoothed (linreg).
Decide direction with hysteresis.
Enter/hold long when Composite ≥ Entry Band; enter/hold short when Composite ≤ −Entry Band.
Exit bands are tighter than entry bands to avoid whipsaws.
Apply regime & direction constraints.
Optional Long-only above 200MA (chart symbol) and/or Short-only below 200MA.
Global Direction control (Long / Short / Both) and Invert switch.
Size via volatility targeting.
Realized close-to-close vol is annualized (choose 9-5 or 24/7 market profile).
Target exposure = TargetVol / RealizedVol, capped by Max Long/Max Short multipliers.
Quantity is computed from equity; futures are rounded to whole contracts.
Rebalance cadence & execution.
Trades are placed on Weekly / Monthly / Quarterly rebalance bars or when the sign of exposure flips.
Optional ATR stop/TP for single-stock style risk management.
Inputs you’ll actually tweak
General
Signal Timeframe: Where macro is sampled (e.g., D/W).
Rebalance Frequency: Weekly / Monthly / Quarterly.
ROC & SMA lengths: Defaults for theme momentum and the 200D regime filter.
Normalization: Z-score (tanh) on/off.
Winsorization
Toggle, lookback, multiplier, MAD vs Stdev.
Risk / Sizing
Target Annualized Vol & Realized Vol Lookback.
Direction (Long/Short/Both) and Invert.
Max long/short exposure caps.
Advanced Thresholds
Theme/Composite smoothing lengths.
Entry/Exit bands (hysteresis).
Regime / Execution
Long-only above 200MA, Short-only below 200MA.
Stops/TP (optional)
ATR length and SL/TP multiples.
Theme Weights
Per-theme scalars so you can push/pull emphasis (e.g., overweight Policy during rate cycles).
Macro Proxies
Symbols for each theme (XLI, XLU, HG1!, GC1!, DXY, US10Y, US02Y, VIX, HYG, IEF). Swap to alternatives as needed (e.g., UUP for DXY).
Signals & logic (under the hood)
Business Cycle = ½ ROC(XLI/XLU) + ½ ROC(Copper/Gold), then confirmed by (price > 200SMA ? +1 : −1).
Trade / USD = −ROC(DXY).
Monetary Policy = 0.6·ROC(10Y–2Y) − 0.4·ROC(10Y).
Risk Sentiment = −0.6·ROC(VIX) + 0.4·ROC(HYG/IEF).
Each theme → (optional Winsor) → (robust z or scaled ROC) → tanh → SMA smoothing.
Composite = weighted average → LSMA smoothing → compare to bands → dir ∈ {−1,0,+1}.
Rebalance & flips. Orders fire on your chosen cadence or when the sign of exposure changes.
Position size. exposure = clamp(TargetVol / realizedVol, maxLong/Short) × dir.
Note: The script also exposes Gross Exposure (% equity) and Signed Exposure (× equity) as diagnostics. These can help you audit how vol-targeting and caps translate into sizing over time.
Visuals & alerts
Composite line + columns (color/intensity reflect direction & strength).
Entry/Exit bands with green/red fills for quick polarity reads.
Hidden plots for each Theme if you want to show them.
Optional rebalance labels (direction, gross & signed exposure, σ).
Background heatmap keyed to Composite.
Alerts
Enter/Inc LONG when Composite crosses up (and on rebalance bars).
Enter/Inc SHORT when Composite crosses down (and on rebalance bars).
Exit to FLAT when Composite returns toward neutral (and on rebalance bars).
Practical tips
Start higher timeframes. Daily signals with Monthly rebalance are a good baseline; weekly signals with quarterly rebalances are even cleaner.
Tune Entry/Exit bands before anything else. Wider bands = fewer trades and less noise.
Weights reflect regime. If policy dominates markets, raise Monetary Policy weight; if credit stress drives moves, raise Risk Sentiment.
Proxies are swappable. Use UUP for USD, or futures-continuous symbols that match your data plan.
Futures vs ETFs. Quantity auto-rounds for futures; ETFs accept fractional shares. Check contract multipliers when interpreting exposure.
Caveats
Macro proxies can repaint at the selected signal timeframe as higher-TF bars form; that’s intentional for macro sampling, but test live.
Vol targeting assumes reasonably stationary realized vol over the lookback; if markets regime-shift, revisit volLook and targetVol.
If you disable normalization/winsorization, themes can become spikier; expect more hysteresis band crossings.
What to change first (quick start)
Set Signal Timeframe = D, Rebalance = Monthly, Z-score on, Winsor on (MAD).
Entry/Exit bands: 0.25 / 0.12 (defaults), then nudge until trade count and turnover feel right.
TargetVol: try 10% for diversified indices; lower for single stocks, higher for vol-sell strategies.
Leave weights = 1.0 until you’ve inspected the four theme lines; then tilt deliberately.
Not Your Daddy's EMA CrossoverNot Your Daddy's EMA Crossover - Quick Guide
What It Does
This isn't your typical 50/200 EMA crossover. It uses academically-proven, optimized EMA periods specifically backtested for crypto markets. Instead of generic settings, it adapts to different trading styles with research-backed parameter combinations that have demonstrated real returns.
Core Logic
Enters when fast EMA crosses slow EMA in the trend direction (confirmed by 200 SMA filter)
Exits either on opposite EMA cross (trend-following) or at fixed profit targets (scalping)
Uses a 200 SMA to filter trades - only longs above it, only shorts below it
Key Settings & Toggles
1. Trading Style (Auto-adjusts EMA periods):
"15 Min Scalping": 9/21 EMA - Fast-paced, frequent signals
"1 Hour Swing": 13/48 EMA - For swing trading
"Daily Trend": 15/150 MA - Captured +97.87% in bull runs
2. Entry Method:
"Crossover Entry": Enters immediately on EMA cross
"Pullback to EMA Entry": Waits for first pullback to slow EMA (better risk/reward)
3. Exit Method:
"EMA Cross Exit": Trend-following, lets winners run until EMAs reverse
"Fixed % Target (Scalping)": Quick 0.5-1% profits with tight stops
4. Optional Features:
MACD Confirmation: Adds 6-15-1 MACD filter for higher-probability setups
Periodic Compounding: Compounds every 30 hours (research shows 1-30 hour compounding is optimal)
Recommended Timeframes
📊 Match your chart to your selection:
Select "15 Min Scalping" → Use 15-minute chart
Select "1 Hour Swing" → Use 1-hour chart
Select "Daily Trend" → Use daily chart
I personally like this on the daily, which coincidentally is printing a long signal today on Bitcoin.
Enjoy!
TPFX - Unified Strategy v8.1 (COT + Valuation + S/D + Seasonal)
TPFX - Unified Strategy v8.1: A 5-in-1 Confluence Model
The TPFX Unified Strategy is a comprehensive trading model that integrates five distinct market analysis modules into a single indicator. Its primary function is to generate high-confluence entry and exit signals by requiring validation across multiple layers of market analysis. This approach aims to minimize noise and focus trading activity on moments of strong directional agreement.
Core Analytical Modules:
1. COT Index (Commitment of Traders): Quantifies the relative extreme positioning of major market participants (Commercials, Large Speculators) over a user-defined lookback period to identify overextended sentiment.
2. COT Momentum: Utilizes Commercial net positioning to detect momentum shifts, based on either a new high/low logic or a Moving Average crossover.
3. Valuation Trigger: Compares the relative performance of the current symbol against a reference asset (e.g., DXY) to determine periods of comparative overvaluation or undervaluation.
4. Supply and Demand (S/D) Zones: Automatically identifies and plots institutional S/D zones based on specific candle patterns. These zones provide precise entry, stop-loss, and dynamic take-profit targets upon activation and retest.
5. Seasonal Filter: Applies a calendar-based constraint to limit trade entry to historically favorable or unfavorable periods for the specific asset.
Key Strategy Features:
* Modular Control: All five modules can be independently enabled or disabled via input settings, allowing the user to customize the required confluence level for signal generation.
* Flexible Exit Management: The strategy supports four primary exit methodologies:
* Fixed TP/SL: Standard point or percentage-based risk management.
* Dynamic (S/D Zones): Uses the S/D zone boundaries for stop-loss and either a fixed R:R ratio or the nearest opposite zone for take-profit.
* Opposite Signal: Closes a position when a full, confirmed signal in the opposite direction is generated.
* Mean Reversion: Closes the position when the COT Index or Valuation Line reverts to a defined mean level.
* Risk Parameters: Includes configurable order size, trade direction filtering (Long, Short, Both), and adjustable parameters for S/D zone detection logic.
v8.1 Update: This version features a syntax correction within the Supply/Demand Zones calculation block to ensure reliable zone detection and trigger logic.
This tool is designed for systematic traders seeking to align their decisions with fundamental flows and order book imbalances.
(Note: Full functionality relies on access to the Commitment of Traders data feed, which may require a subscription.)
高频策略优化版-空头Open Condition Reversal: Change the condition of the TEMA fast line above the slow line to the condition of the fast line below the slow line RSI condition from " buy above the threshold " to " short below the threshold ", and adjust the default threshold from 30 to 70 (more suitable for shorting overbought area) moving average direction judgment from up to down stop-loss direction adjustment: Short stop-loss Settings above the entry price (entry price * (1 + i _ sl) ) Short stop-loss set below the entry price (entry price * (1-tp) Tracking stop-loss level adjusted to below the entry price MACD logic adjustment: Preferred use of the bearish pattern as a short signal bullish pattern for closing risk management: Maintained a dynamic stop-loss mechanism, adjusted to protect the market from the bottom of the visual stop-loss strategy: The visual marking of the ACD energy column is convenient for monitoring signals to be fully tested before use, especially for adjusting RSI thresholds and stop-loss parameters to suit the characteristics of specific trading varieties.
Kootch Moon Phase Strategy🌙 Moon Phases Equity Strategy
This strategy explores the relationship between lunar cycles and equity price action.
It is based on a simple idea: markets may respond differently around New Moons and Full Moons.
🛠 How it works
• New Moon → Long Entry
The strategy enters a long position at the first bar after a New Moon event.
• Full Moon → Exit
The strategy closes the long position at the first bar after the following Full Moon.
• Optional Filters
• 200-day Moving Average (on by default): only take longs in bullish regimes.
• ATR-based Stops & Targets: risk management can be added with configurable multiples of ATR.
• Minimum Gap: ensures a cooldown period between trades to avoid clustering.
• Position Sizing: by default, trades risk a configurable % of equity (set to 35%).
📊 Notes
• This script is designed for equities (stocks, ETFs).
• It is a long-only system by default. If you enable “Always Flip,” the script will alternate long/short each lunar phase, but that is more experimental.
• Results can vary widely depending on the underlying asset. Trending stocks (e.g., AMZN, AAPL, SPY) tend to perform better with the long-only mode.
• Risk/Reward tracking in R-multiples is included for more consistent performance evaluation.
⚠️ Disclaimer
This strategy is for educational and research purposes only. It does not guarantee profitability and should not be used as financial advice. Past performance does not indicate future results. Always backtest on your preferred instruments and use sound risk management.
SMC 自動交易 - 4HR- BTC適用# SMC Automated Trading Strategy Whitepaper - Stepped Enhanced Edition
## 1. Strategy Overview
This strategy is designed based on the Smart Money Concept (SMC), integrating Order Block (OB), Change of Character (CHoCH), and strict pullback confirmation conditions. The goal is to enhance trading accuracy and strictly control risk, specifically tailored for trading competitions, meeting the requirements of stability and efficiency.
### Core Strategy Concepts:
- Precise identification of key trend reversal points.
- Strict pullback confirmation to avoid chasing tops or bottoms.
- Clear risk management and take-profit mechanisms to maintain stable risk-reward ratio.
- Supports trading time filtering (Kill Zone) to capture prime volatility windows.
- Multiple visual aids for quick in-trade signal recognition.
## 2. Strategy Logic Flow
### 1. Kill Zone (Optional Activation)
- Default trading time: Taiwan time 15:00 - 18:00.
- Purpose: Focus on high-volatility periods to reduce false signals in choppy markets.
### 2. Order Block Detection
- Current candle range exceeds the previous candle by a specified multiplier (default 0.8).
- Bullish OB: Bullish candle with expanded range.
- Bearish OB: Bearish candle with expanded range.
- Flexible OB sensitivity adjustment according to market volatility.
### 3. Change of Character (CHoCH)
- Initial trend reversal confirmation:
- Bullish CHoCH: Close above previous candle’s high.
- Bearish CHoCH: Close below previous candle’s low.
### 4. Pullback Confirmation (Core Condition)
- Avoid premature entries by requiring a pullback to the prior OB:
- Long: Pullback touches the previous Bullish OB high.
- Short: Pullback touches the previous Bearish OB low.
### 5. Fair Value Gap (FVG) Detection (Optional)
- Detect price imbalances as additional confirmation signals.
## 3. Entry Logic
### Long Position:
- Previous Bullish OB is formed.
- Current candle completes a pullback to the prior OB high.
- Current candle closes above the previous high (CHoCH confirmation).
- (Optional) Within Kill Zone.
### Short Position:
- Previous Bearish OB is formed.
- Current candle completes a pullback to the prior OB low.
- Current candle closes below the previous low (CHoCH confirmation).
- (Optional) Within Kill Zone.
## 4. Risk Management & Exit Strategy
### Stop Loss:
- Long: Current candle’s low minus buffer points (default 50 points).
- Short: Current candle’s high plus buffer points (default 50 points).
### Take Profit:
- Default Risk-Reward Ratio (RR): 2.0 (customizable).
- Automatically calculates target take-profit level.
### Full Automation:
- This is a fully automated strategy. Orders are placed automatically upon conditions being met, requiring no manual intervention.
## 5. Visual Aids
- Bullish OB: Green upward triangle.
- Bearish OB: Red downward triangle.
- Bullish CHoCH: Blue circle.
- Bearish CHoCH: Orange circle.
- FVG: Highlighted zones (optional).
> **Advantage:** Quick market status recognition during trades, improving strategy transparency.
## 6. Strategy Advantages
✅ Dual trend reversal confirmation: OB + CHoCH.
✅ Strict pullback requirement to reduce false breakouts.
✅ Clear risk control and stable risk-reward ratio.
✅ Visual aids + time filter for clear in-trade decisions.
✅ Fully automated trading reduces human error.
## 7. Application Scenarios
- Trading competitions: Designed for high win-rate and strict risk control.
- FTMO and similar evaluation challenges.
- Intraday or swing trading strategy frameworks.
- High-volatility assets: Crypto / Forex / Index CFDs.
## 8. Risk Warning
- Strategy is based on historical backtesting; live trading should consider slippage and liquidity risks.
- During high volatility periods, use proper money management tools and strictly execute stop losses.
## 9. Version Note
Version: Stepped Enhanced Edition (Updated April 2025)
Developer: natwad3000
三均線中頻策略 v3.0 - R=2.5 + 進場點點標記📌 Core Strategy Concept
This is a medium-frequency trend-following model that utilizes three Simple Moving Averages to determine bullish or bearish alignment. It then enters trades in the direction of the trend when price confirms a breakout and applies a fixed risk-to-reward ratio (R). Stop loss and take profit levels are dynamically calculated based on moving averages, ensuring clear risk control and systematic execution.
✅ Strategy Advantages
📏 Clear Rules Trade conditions based on triple SMA alignment and price breakout; easy to replicate.
🛡 Defined Risk Stop loss and take profit are calculated based on moving averages with a fixed R ratio, ensuring disciplined risk management.
⚖️ Balanced Frequency Medium trade frequency avoids overtrading while still capturing sufficient opportunities.
👁 Visual Markers Entry points are visually marked on the chart for easy backtesting and live tracking.
Universal Breakout Strategy [KedArc Quant]Description:
A flexible breakout framework where you can test different logics (Prev Day, Bollinger, Volume, ATR, EMA Trend, RSI Confirm, Candle Confirm, Time Filter) under one system.
Choose your breakout mode, and the strategy will handle entries, exits, and optional risk management (ATR stops, take-profits, daily loss guard, cooldowns).
An on-chart info table shows live mode values (like Prev High/Low, Bollinger levels, RSI, etc.) plus P&L stats for quick analysis.
Use it to compare which breakout style works best on your instrument and timeframe, whether intraday, swing, or positional trading
🔑 Why it’s useful
* Flexibility: Switch between breakout strategies without loading different indicators.
* Clarity: On-chart info table displays current mode, relevant indicator levels, and live strategy P&L stats.
* Testing efficiency: Quickly A/B test different breakout styles under the same backtest environment.
* Transparency: Every trade is rule-based and displayed with entry/exit markers.
🚀 How it helps traders
* Lets you experiment with breakout strategies quickly without loading multiple scripts.
* Helps identify which breakout method fits your instrument & timeframe.
* Gives clear on-chart visual + statistical feedback for confident decision-making.
⚙️ Input Configuration
* Breakout Mode → choose which strategy to test:
* *Prev Day* → breakouts of yesterday’s High/Low.
* *Bollinger* → Upper/Lower BB pierce.
* *Volume* → Breakout confirmed with volume above average.
* *ATR Stop* → Wide range breakout using ATR filter.
* *Time Filter* → Breakouts inside defined session hours.
* *EMA Trend* → Breakouts only in EMA fast > slow alignment.
* *RSI Confirm* → Breakouts with RSI confirmation (e.g. >55 for longs).
* *Candle Confirm* → Breakouts validated by bullish/bearish candle.
* Lookback / ATR / Bollinger inputs → adjust sensitivity.
* Intrabar mode → option to evaluate breakouts using bar highs/lows instead of closes.
* Table options → show/hide info table, show/hide P&L stats, choose corner placement.
📈 Entry & Exit Logic
* Entry → occurs when breakout condition of chosen mode is met.
* Exit → default exits via opposite signals or optional stop/target if enabled.
* Session filter → optional auto-flat at session end.
* P&L management → optional daily loss guard, cooldown between trades, and ATR-based stop/take profit.
❓ FAQ — Choosing the best setup
Q: Which strategy should I use for which chart?
* *Prev Day Breakouts*: Best on indices, FX, and liquid futures with strong daily levels.
* *Bollinger*: Works well in range-bound environments, or crypto pairs with volatility compression.
* *Volume*: Good on equities where breakout strength is tied to volume spikes.
* *ATR Stop*: Suits volatile instruments (commodities, crypto).
* *EMA Trend*: Useful in trending markets (stocks, indices).
* *RSI Confirm*: Adds momentum filter, better for swing trades.
* *Candle Confirm*: Ideal for scalpers needing visual confirmation.
* *Time Filter*: For intraday traders who want signals only in high-liquidity sessions.
Q: What timeframe should I use?
* Intraday traders → 5m to 15m (Time Filter, Candle Confirm).
* Swing traders → 1H to 4H (EMA Trend, RSI Confirm, ATR Stop).
* Position traders → Daily (Prev Day, Bollinger).
* Breakout
A trade entry condition triggered when price crosses above a resistance level (for longs) or below a support level (for shorts).
* Prev Day High/Low
Formula:
Prev High = High of (Day )
Prev Low = Low of (Day )
* Bollinger Bands
Formula:
Basis = SMA(Close, Length)
Upper Band = Basis + (Multiplier × StdDev(Close, Length))
Lower Band = Basis – (Multiplier × StdDev(Close, Length))
* Volume Confirmation
A breakout is only valid if:
Volume > SMA(Volume, Length)
* ATR (Average True Range)
Measures volatility.
Formula:
ATR = SMA(True Range, Length)
where True Range = max(High–Low, |High–Close |, |Low–Close |)
* EMA (Exponential Moving Average)
Weighted moving average giving more weight to recent prices.
Formula:
EMA = (Price × α) + (EMA × (1–α))
with α = 2 / (Length + 1)
* RSI (Relative Strength Index)
Momentum oscillator scaled 0–100.
Formula:
RSI = 100 – (100 / (1 + RS))
where RS = Avg(Gain, Length) ÷ Avg(Loss, Length)
* Candle Confirmation
Bullish candle: Close > Open AND Close > Close
Bearish candle: Close < Open AND Close < Close
Win Rate (%)
Formula:
Win Rate = (Winning Trades ÷ Total Trades) × 100
* Average Trade P&L
Formula:
Avg Trade = Net Profit ÷ Total Trades
📊 Performance Notes
The Universal Breakout Strategy is designed as a framework rather than a single-asset optimized system. Results will vary depending on the chart, timeframe, and asset chosen.
On the current defaults (15-minute, INR-denominated example), the backtest produced 132 trades over the selected period. This provides a statistically sufficient sample size.
Win rate (~35%) is relatively low, but this is balanced by a positive reward-to-risk ratio (~1.8). In practice, a lower win rate with larger wins versus smaller losses is sustainable.
The average P&L per trade is close to breakeven under default settings. This is expected, as the strategy is not tuned for a single symbol but offered as a universal breakout framework.
Commissions (0.1%) and slippage (1 tick) are included in the simulation, ensuring realistic conditions.
Risk management is conservative, with order sizing set at 1 unit per trade. This avoids over-leveraging and keeps exposure well under the 5-10% equity risk guideline.
👉 Traders are encouraged to:
Experiment with inputs such as ATR period, breakout length, or Bollinger parameters.
Test across different timeframes and instruments (equities, futures, forex, crypto) to find optimal setups.
Combine with filters (trend direction, volatility regimes, or volume conditions) for further refinement.
⚠️ Disclaimer This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
SRFRZ EMA Crossover with RSI StrategySRFRZ EMA Crossover with RSI Strategy
1. Overview
Strategy Name: SRFRZ EMA Crossover with RSI Strategy
Summary: A trend-following strategy designed for Indian stock and index markets, operating on any timeframe (optimized for 1H or 4H charts). It combines a 9-period and 21-period EMA crossover with RSI confirmation to identify high-probability long entries during the Indian trading session (9:15 AM–3:25 PM IST). Backtested with a fixed 20% capital allocation per trade, 3% stop loss, and 50% take profit, it aims for consistent returns in trending markets.
Intended Audience: Intermediate traders familiar with EMA and RSI, seeking automated signals for Indian markets.
2. How It Works (Core Logic)
Entry Conditions (Long/Buy Signal):
Primary Trigger: A "Golden Cross" occurs when the 9-period EMA crosses above the 21-period EMA, signaling bullish momentum.
RSI Confirmation: RSI (14-period) must be above 55, or cross above 55, to confirm strong momentum.
Trend Filter: The 9-period EMA must remain above the 21-period EMA for delayed RSI-triggered entries.
Session Filter: Trades are only executed during the Indian market session (9:15 AM–3:25 PM IST, Monday–Friday).
Exit Conditions:
Take Profit (TP): Fixed at 50% above the entry price (e.g., entry at ₹100, TP at ₹150).
Stop Loss (SL): Fixed at 3% below the entry price (e.g., entry at ₹100, SL at ₹97).
Indicator-Based Exit: Close the position if a "Death Cross" occurs (21-period EMA crosses above 9-period EMA).
Position Sizing: Allocates 20% of initial capital (₹100,000 default) per trade, calculated as (initial_capital * 0.20) / entry_price.
3. Key Indicators & Parameters
Primary Indicators:
EMA (9-period): Fast-moving average to capture short-term trends (plotted in blue).
EMA (21-period): Slower-moving average for trend confirmation (plotted in red).
RSI (14-period): Measures momentum, with a threshold of 55 for bullish confirmation (plotted in purple).
Customizable Settings in Pine Script:
initial_capital: Default ₹100,000 (adjust based on your account size).
qty_percent: Default 20% of capital per trade (adjust for risk tolerance).
sl_percent: Default 3% stop loss (adjust for volatility).
tp_percent: Default 50% take profit (adjust for reward targets).
session_time: Default "0915-1525:1234567" (Indian session, adjustable for other markets).
Default Values: Optimized for Indian stocks/indices (e.g., NIFTY 50) on 1H or 4H charts.
Risk Management:
Always use the built-in 3% stop loss.
Avoid trading during major news events (e.g., RBI announcements), as Pine Script cannot filter these.
Risk only 20% of capital per trade to diversify exposure.
Pro Tips:
Combine with support/resistance levels for manual confirmation.
Test on a demo account to validate performance on your chosen asset.
Monitor RSI for overbought conditions (>70) to anticipate reversals.
4. Visuals on Chart
Plotted Indicators:
Blue line: 9-period EMA.
Red line: 21-period EMA.
Purple line: RSI (14-period) in a separate pane.
Trade Signals:
Green triangle (below bar): Long entry.
Red triangle (above bar): Long exit (via TP, SL, or Death Cross).
5. Disclaimer & Notes
Risk Warning: Past performance is not indicative of future results. Trading involves significant risk. This strategy is for educational purposes only and is not financial advice.
Customization: The script is open-source (modify freely). Fork it to add short-selling logic or additional filters.
Note: The strategy avoids trades during non-session hours but cannot filter news events. Manually check economic calendars.
Add the script to your chart and adjust inputs (e.g., capital, TP/SL percentages).
Enable alerts for "Long Entry" and "Long Exit TP/SL" or "EMA Exit" to automate signals.
Optionally, connect to a broker via webhooks for auto-trading (consult your broker’s API).
Swing High Low by MIRRORPIPThis strategy finds swing high and lows and marks them as SH and SL respectively.
if the pattern tries to form higher high it will trigger a buy signal
if the pattern tries to form lower low, it will trigger a short signal
This setup is very popular among price action lovers
Intraday Momentum for Volatile Stocks 29.09The strategy targets intraday momentum breakouts in volatile stocks when the broader market (Nifty) is in an uptrend. It enters long positions when stocks move significantly above their daily opening price with sufficient volume confirmation, then manages the trade using dynamic ATR-based stops and profit targets.
Entry Conditions
Price Momentum Filter: The stock must move at least 2.5% above its daily opening price, indicating strong bullish momentum. This percentage threshold is customizable and targets gap-up scenarios or strong intraday breakouts.
Volume Confirmation: Daily cumulative volume must exceed the 20-day average volume, ensuring institutional participation and genuine momentum. This prevents false breakouts on low volume.
Market Regime Filter: The Nifty index must be trading above its 50-day SMA, indicating a favorable market environment for momentum trades. This macro filter helps avoid trades during bearish market conditions.
Money Flow Index: MFI must be above 50, confirming buying pressure and positive money flow into the stock. This adds another layer of momentum confirmation.
Time Restriction: Trades are only initiated before 3:00 PM to ensure sufficient time for position management and avoid end-of-day volatility.
Exit Management
ATR Trailing Stop Loss: Uses a 3x ATR multiplier for dynamic stop-loss placement that trails higher highs, protecting profits while giving trades room to breathe. The trailing mechanism locks in gains as the stock moves favorably.
Profit Target: Set at 4x ATR above the entry price, providing a favorable risk-reward ratio based on the stock's volatility characteristics. This adaptive approach adjusts targets based on individual stock behavior.
Position Reset: Both stops and targets reset when not in a position, ensuring fresh calculations for each new trade.
Key Strengths
Volatility Adaptation: The ATR-based approach automatically adjusts risk parameters to match current market volatility levels. Higher volatility stocks get wider stops, while calmer stocks get tighter management.
Multi-Timeframe Filtering: Combines intraday price action with daily volume patterns and market regime analysis for robust signal generation.
Risk Management Focus: The strategy prioritizes capital preservation through systematic stop-loss placement and position sizing considerations.
Considerations for NSE Trading
This strategy appears well-suited for NSE intraday momentum trading, particularly for mid-cap and small-cap stocks that exhibit high volatility. The Nifty filter helps align trades with broader market sentiment, which is crucial in the Indian market context where sectoral and index movements strongly influence individual stocks.
The 2.5% threshold above open price is appropriate for volatile NSE stocks, though traders might consider adjusting this parameter based on the specific stocks being traded. The strategy's emphasis on volume confirmation is particularly valuable in the NSE environment where retail participation can create misleading price movements without institutional backin
DEMARED with ATR StopLoss & Dynamic Risk (v5)DEMARED with ATR StopLoss & Dynamic Risk
This strategy combines Double Exponential Moving Averages (DEMA) with EMA and Donchian midline filters to capture trend-following signals. A long entry is triggered when both DEMA pairs are aligned bullishly, price is above EMA, and above the Donchian midpoint. Exits occur on opposite signals or when the ATR-based stop loss is hit.
Key features:
ATR Stop Loss: dynamic stop based on ATR with user-defined multiplier.
Dynamic Risk Management: position size is automatically calculated based on account equity and risk percentage.
Visualization: plots stop loss, EMA, Donchian midline, and optional bar coloring.
Flexible Display: toggle all indicator visuals on/off with a single input.
The goal is to provide a trend-following system with controlled risk and adaptability across different markets and timeframes.
AstraAlgo BacktesterOVERVIEW
The AstraAlgo Backtester allows traders to simulate and evaluate trading strategies directly on TradingView. By simulating trades across different timeframes and markets, it provides valuable insights into win rates, drawdowns, and overall strategy effectiveness.
SIGNAL MODES
Signal Modes generate proprietary trade signals based on live price data. Users can choose between Off, Basic, Advanced, or Custom modes to evaluate strategies under different conditions and refine their trading approach.
ADJUSTABLE BACKTESTING
Parameters for historical simulations can be customized to test different market conditions and trading scenarios. This allows traders to measure strategy performance, including win rate, profit/loss, and risk/reward ratios, helping refine and optimize strategies before live execution.
BAR COLORING
Bar Coloring highlights bullish and bearish bars on historical charts, allowing traders to visually assess trend direction and trade outcomes during backtesting. This makes it easier to analyze momentum and strategy effectiveness at a glance.
ASTRA CLOUD
Astra Cloud overlays dynamic support and resistance levels on live price data. These zones adapt automatically to past market movements, helping traders identify areas where trades would have reacted, aiding strategy evaluation and optimization.
EMA Crossover Strategy (15m)50 and 200 ema crossing when leaving anchor. when 50 and 200 crosses will give you direction of where market is going. wait for a pull back and take trade. sl on highest or lowest point of apex tp open . when you see multiple equal ( low or High) get put of trade.






















