HMA Envelope BUY & SELL Strategy (Non-Repainting BY RAVI KHADSE)Done — I put the HMA Envelope BUY & SELL Strategy (Non-Repainting) script into the canvas as a code file.
Open the canvas document titled HMA Envelope BUY & SELL Strategy (Non-Repainting) to copy the Pine Script into TradingView.
MULTI time FRAME/session filter, different entry logic, alerts,
Indikator dan strategi
Kronos Scalper (RAVINDRA KHADSE) 11.11.2025Nice — below is a ready-to-copy TradingView Pine Script (v5) strategy named “Kronos Scalper”.
It’s a self-contained scalping strategy (non-repainting) with configurable EMAs trend filter, RSI entry filter, ATR-based stop loss / take profit, optional trailing stop, plots and entry/exit labels. Drop it into TradingView’s Pine editor and Add to Chart → Strategy Tester.
Dhanesh_CustomTrendlineLogicUsed framma in getting the trades.
You can also define the custom horizontal and an inclined trendline breaking of which can trigger the trade. Enjoy the script.
adrianasibaja_ ALGO (Liquidity/BOS/FVG + Sessions + Risk Locks)This strategy is an institutional-style automated trading system designed for XAU/USD and FTMO-funded accounts.
It combines liquidity sweeps, Break of Structure (BOS) and Fair Value Gap (FVG) confirmations with multi-filter confluences (RSI, ADX, ATR, EMA trend bias, and candle quality).
The algorithm automatically filters trades by session (London/New York), day of week, and volatility. It includes full FTMO risk management features such as daily loss lock, consecutive loss lock, and trade cooldowns.
EMA Breakout Algo StrategyA volatility‑based breakout strategy using EMA alignment and ATR filters for risk‑managed entries and exits.
Quasimodo Pattern Strategy Back Test [TradingFinder] QM Trading🔵 Introduction
The QM pattern, also known as the Quasimodo pattern, is one of the popular patterns in price action, and it is often used by technical analysts. The QM pattern is used to identify trend reversals and provides a very good risk-to-reward ratio. One of the advantages of the QM pattern is its high frequency and visibility in charts.
Additionally, due to its strength, it is highly profitable, and as mentioned, its risk-to-reward ratio is very good. The QM pattern is highly popular among traders in supply and demand, and traders also use this pattern.
The Price Action QM pattern, like other Price Action patterns, has two types: Bullish QM and Bearish QM patterns. To identify this pattern, you need to be familiar with its types to recognize it.
🔵 Identifying the QM Pattern
🟣 Bullish QM
In the bullish QM pattern, as you can see in the image below, an LL and HH are formed. As you can see, the neckline is marked as a dashed line. When the price reaches this range, it will start its upward movement.
🟣 Bearish QM
The Price Action QM pattern also has a bearish pattern. As you can see in the image below, initially, an HH and LL are formed. The neckline in this image is the dashed line, and when the LL is formed, the price reaches this neckline. However, it cannot pass it, and the downward trend resumes.
🔵 How to Use
The Quasimodo pattern is one of the clearest structures used to identify market reversals. It is built around the concept of a structural break followed by a pullback into an area of trapped liquidity. Instead of relying on lagging indicators, this pattern focuses purely on price action and how the market reacts after exhausting one side of liquidity. When understood correctly, it provides traders with precise entry points at the transition between trend phases.
🟣 Bullish Quasimodo
A bullish Quasimodo forms after a clear downtrend when sellers start losing control. The market continues to make lower lows until a sudden higher high appears, signaling that buyers are entering with strength. Price then pulls back to retest the previous low, creating what is known as the Quasimodo low.
This area often becomes the final trap for sellers before the market shifts upward. A visible rejection or displacement from this zone confirms bullish momentum. Traders usually place entries near this level, stops below the low, and targets at previous highs or the next resistance zone. Combining the setup with demand zones or Fair Value Gaps increases its accuracy.
🟣 Bearish Quasimodo
A bearish Quasimodo forms near the top of an uptrend when buyers begin to lose strength. The market continues to make higher highs until a sudden lower low breaks the bullish structure, showing that selling pressure is entering the market. Price then retraces upward to retest the previous high, forming the Quasimodo high, where breakout buyers are often trapped.
Once rejection appears at this level, it indicates a likely reversal. Traders can enter short near this area, with stop-losses placed above the high and targets near the next support or previous lows. The setup gains more reliability when aligned with supply zones, SMT divergence, or bearish Fair Value Gaps.
🔵 Setting
Pivot Period : You can use this parameter to use your desired period to identify the QM pattern. By default, this parameter is set to the number 5.
Take Profit Mode : You can choose your desired Take Profit in three ways. Based on the logic of the QM strategy, you can select two Take Profit levels, TP1 and TP2. You can also choose your take profit based on the Reward to Risk ratio. You must enter your desired R/R in the Reward to Risk Ratio parameter.
Stop Loss Refine : The loss limit of the QM strategy is based on its logic on the Head pattern. You can refine it using the ATR Refine option to prevent Stop Hunt. You can enter your desired coefficient in the Stop Loss ATR Adjustment Coefficient parameter.
Reward to Risk Ratio : If you set Take Profit Mode to R/R, you must enter your desired R/R here. For example, if your loss limit is 10 pips and you set R/R to 2, your take profit will be reached when the price is 20 pips away from your entry point.
Stop Loss ATR Adjustment Coefficient : If you set Stop Loss Refine to ATR Refine, you must adjust your loss limit coefficient here. For example, if your buy position's loss limit is at the price of 1000, and your ATR is 10, if you set Stop Loss ATR Adjustment Coefficient to 2, your loss limit will be at the price of 980.
Entry Level Validity : Determines how long the Entry level remains valid. The higher the level, the longer the entry level will remain valid. By default it is 2 and it can be set between 2 and 15.
🔵 Results
The following examples show the backtest results of the Quasimodo (QM) strategy in action. Each image is based on specific settings for the symbol, timeframe, and input parameters, illustrating how the QM logic can generate signals under different market conditions. The detailed configuration for each backtest is also displayed on the image.
⚠ Important Note : Even with identical settings and the same symbol, results may vary slightly across different brokers due to data feed variations and pricing differences.
Default Properties of Backtests :
OANDA:XAUUSD | TimeFrame: 5min | Duration: 1 Year :
BINANCE:BTCUSD | TimeFrame: 5min | Duration: 1 Year :
CAPITALCOM:US30 | TimeFrame: 5min | Duration: 1 Year :
NASDAQ:QQQ | TimeFrame: 5min | Duration: 5 Year :
OANDA:EURUSD | TimeFrame: 5min | Duration: 5 Year :
PEPPERSTONE:US500 | TimeFrame: 5min | Duration: 5 Year :
Morning Straddle Backtest + Range Filter Morning Straddle Backtest
Purpose:
This script tests a Morning Straddle concept where a trader enters both long and short breakout orders based on the overnight range (22:00–06:00 by default).
It is designed for backtesting the effectiveness of volatility breakouts following low-volume overnight sessions.
Setup
Overnight session: 22:00–06:00 (adjustable).
At the end of the overnight session, the script automatically places:
A long stop order above the range high.
A short stop order below the range low.
Both use an ATR-based buffer for cleaner breakouts (default 5%).
When one side triggers, the opposite order is cancelled if OCO mode is active.
Adjustable Parameters
- Session - Defines the overnight hours used for the range.
- ATR Length - Number of bars used for ATR calculation.
- ATR Buffer % - Distance above/below range for entry & stop placement.
- Risk:Reward Ratio - Determines the TP distance relative to SL.
- Stop-Loss - Choose between “Behind Range” or “Mid-Range (50%)” with ATR buffer added.
- OCO - Cancels opposite order once one side triggers.
- Close All EOD - Closes all open trades at the end of day (default 22:00).
- Range Filter – Enables filtering of trades only when the overnight range size falls within a defined threshold.
-Min Range / Max Range – Define acceptable range size boundaries.
-Display Units – Select whether the filter is measured in Price Change, Pips, or Points.
- Stats Panel Settings – Toggle visibility, position (Top/Bottom Left/Right), and background opacity.
Visual
The overnight range (22:00–06:00) is highlighted on the chart with a teal background for clarity.
No lines are drawn for the high and low.
Strategy Notes
Works best on 5m or 15m charts where the overnight range can be clearly defined.
Backtests should be run over multiple months to gauge performance consistency.
Can be adapted for other markets by adjusting session times and ATR settings. For example, S&P initial balance breakout using 14:30-15:30 range time.
Stats Panel Displays
- 20-Day Range Data: Maximum, Average, and Minimum range sizes.
- Today’s Range: With automatic classification — Huge, Normal, or Small.
- Average Winning Range: Average size of the overnight range on profitable days.
- Average Losing Range: Average size of the overnight range on losing days.
- Filter Status: Displays whether the range met the filter criteria — Range OK, Skipped, or Off.
Multi-EMA Session Breakout Strategythis is a strategy that use the session high and low and the EMA LOWS 2 3 6 9 110 355 AND 480
EMA Cross + RSI + ADX - Autotrade Strategy V2Overview
A versatile trend-following strategy combining EMA 9/21 crossovers with RSI momentum filtering and optional ADX trend strength confirmation. Designed for both cryptocurrency and traditional futures/options markets with built-in stop loss management and automated position reversals.
Key Features
Multi-Market Compatibility: Works on both crypto futures (Bitcoin, Ethereum) and traditional markets (NIFTY, Bank NIFTY, S&P 500 futures, equity options)
Triple Confirmation System: EMA crossover + RSI filter + ADX strength (optional)
Automated Risk Management: 2% stop loss with wick-touch detection
Position Auto-Reversal: Opposite signals automatically close and reverse positions
Webhook Ready: Six distinct alert messages for automation (Entry Buy/Sell, Close Long/Short, SL Hit Long/Short)
Performance Metrics
NIFTY Futures (15min): 50%+ win rate with ADX filter OFF
Crypto Markets: Requires extensive backtesting before live deployment
Optimal Timeframes: 15-minute to 1-hour charts (patience required for higher timeframes)
Strategy Logic
Entry Signals:
LONG: EMA 9 crosses above EMA 21 + RSI > 55 + ADX > 20 (if enabled)
SHORT: EMA 9 crosses below EMA 21 + RSI < 45 + ADX > 20 (if enabled)
Exit Signals:
Opposite EMA crossover (auto-closes current position)
Stop loss hit at 2% from entry price (tracks candle wicks)
Technical Indicators:
Fast EMA: 9-period (short-term trend)
Slow EMA: 21-period (primary trend)
RSI: 14-period with 55/45 thresholds (momentum confirmation)
ADX: 14-period with 20 threshold (trend strength filter - optional)
Market-Specific Settings
Traditional Markets (NIFTY, Bank NIFTY, S&P Futures, Options)
Recommended Settings:
ADX Filter: Turn OFF (less choppy, cleaner trends)
Timeframe: 15-minute chart
Win Rate: 50%+ on NIFTY Futures
Why No ADX: Traditional markets have more institutional participation and smoother price action, making ADX unnecessary
Cryptocurrency Markets (BTC, ETH, Altcoins)
Recommended Settings:
ADX Filter: Turn ON (ADX > 20)
Timeframe: 15-minute to 1-hour
Extensive backtesting required before live trading
Why ADX: Crypto markets are highly volatile and prone to false breakouts; ADX filters low-quality chop
Best Practices
✅ Backtest thoroughly on your specific instrument and timeframe
✅ Use larger timeframes (1H, 4H) for higher quality signals and better risk/reward
✅ Adjust RSI thresholds based on market volatility (try 52/48 for more signals, 60/40 for fewer but stronger)
✅ Monitor ADX effectiveness - disable for traditional markets, enable for crypto
✅ Proper position sizing - adjust default_qty_value based on your capital and instrument price
✅ Paper trade first - test for 2-4 weeks before risking real capital
Risk Management
Fixed 2% stop loss per trade (adjustable)
Stop loss tracks candle wicks for accurate execution
Positions auto-reverse on opposite signals (no manual intervention needed)
0.075% commission built into backtest (adjust for your broker)
Customization Options
All parameters are adjustable via inputs:
EMA periods (default: 9/21)
RSI length and thresholds (default: 14-period, 55/45 levels)
ADX length and threshold (default: 14-period, 20 threshold)
Stop loss percentage (default: 2%)
Webhook Automation
This strategy includes six distinct alert messages for automated trading:
"Entry Buy" - Long position opened
"Entry Sell" - Short position opened
"Close Long" - Long position closed on opposite crossover
"Close Short" - Short position closed on opposite crossover
"SL Hit Long" - Long stop loss triggered
"SL Hit Short" - Short stop loss triggered
Compatible with Delta Exchange, Binance Futures, 3Commas, Alertatron, and other webhook platforms.
Important Notes
⚠️ Crypto markets require extensive backtesting - volatility patterns differ significantly from traditional markets
⚠️ Higher timeframes = better results - 15min works but 1H/4H provide cleaner signals
⚠️ ADX toggle is critical - OFF for traditional markets, ON for crypto
⚠️ Not financial advice - always conduct your own research and use proper risk management
⚠️ Past performance ≠ future results - backtest results may not reflect live trading conditions
Disclaimer
This strategy is for educational and informational purposes only. Trading futures and options involves substantial risk of loss. Always backtest thoroughly, start with paper trading, and never risk more than you can afford to lose. The author assumes no responsibility for any trading losses incurred using this strategy.
3-Minute RSI and EMA Crossover Strategy 3-Minute RSI and EMA Crossover Sell Strategy with Exit Conditions and Re-entry
XAU/USD Weekly Volatility Strategy by WeTradeAIWeTradeAI - XAU/USD Weekly Volatility Strategy
This strategy is designed for Gold (XAU/USD) trading, leveraging a weekly market structure and volatility projection model. It dynamically identifies high-probability zones based on the prior week’s price action and adapts to intraday movement.
🔍 Core Logic:
Weekly High, Low & Midpoint: Defines structural balance for directional bias.
Projected Volatility Zones:
Green Zone: Upward projection from last week’s low.
Red Zone: Downward projection from last week’s high.
Half-Volatility Lines: Act as breakout or reversal triggers.
Monday Open: Serves as a temporary directional reference until midweek.
Daily High, Low, and Mid: Used for intraday stop-loss placement and validation.
🎯 Trade Entries:
Breakout Entries: Triggered when price breaks and holds above/below the Half-Vol levels.
Reversal Entries: Triggered by strong rejections near outer zones, reverting back toward equilibrium.
🛡️ Risk Management:
Dynamic Stop-Loss: Based on the previous day’s midpoint.
⏱️ Multi-Timeframe Usage:
4H – Weekly structure & context
1H – Trend alignment
15M – Precision entries
Multi-EMA Strategy (Low Source)this strategy use the ema low for its functionality 8 9 110 355 and 480
週一普跌策略 Monday shit Strategy Strategy Description / 策略敘述
EN
This strategy takes a short position at the start of each Monday, based on the hypothesis that cryptocurrency markets tend to experience post-weekend risk-off behavior.
The system enters a full-equity short position at the Tokyo open (Taipei 08:00), aiming to capture Monday downside pressure resulting from accumulated weekend information and macro sentiment adjustments when traditional financial markets reopen.
Risk management uses fixed percentage take-profit and stop-loss levels, emphasizing asymmetric reward-to-risk (large occasional gains, small frequent losses).
The model reflects the increasing alignment between crypto price behavior and traditional financial market cycles.
ZH-TW
本策略於每週一開盤時做空,基於假設加密資產在週末後具有風險釋放與補跌傾向。
系統會在台北時間早上 08:00 以全倉做空,目標捕捉因週末累積消息與傳統金融市場重新開盤所造成的下跌壓力。
風控採固定止盈、止損百分比,強調高報酬/低風險的不對稱結構(小虧多次、偶爾大賺)。
此模型反映加密貨幣市場行為與華爾街週期愈趨一致的市場現象。
AlgoIndexOS-ES-FuturesAlgoIndexOS — ES Futures Strategy v2.0 (5-Minute RTH)
Scope (read first)
ES on 5-minute only, RTH session. The strategy operates on U.S. Regular Trading Hours (09:30–16:00 ET) using a 5-minute ES chart. It builds an Opening Session Range (OSR) from the RTH open, then runs a breakout engine when internal quality conditions are met. Exits are target-based with an intrabar touch-to-flat safety. Positions are flattened at the RTH session end by default. Alerts can post JSON to your Webhook URL for automation.
What this is
One intraday engine with four curated presets (“Stages”) tuned for distinct segments of the NY session. Stages keep the core logic consistent while applying time-of-day context and conservative governors. Single invite-only listing; not a multi-post suite.
How it trades (high-level)
Range context: Builds and locks the OSR from the opening bell; entries only arm after the range is set.
Quality gating: Trades only when internal trend/volatility/confirmation conditions align (no parameter disclosure).
Breakout execution: Signals at bar close; bracket exits manage take-profit (limit) with an intrabar “TP-touch” safety to avoid phantom fills; optional stop-loss.
Session safety: Positions flat at RTH close by default (time exit).
(No settings or thresholds are disclosed; presets encapsulate research choices.)
Stages (session templates; one engine)
A single Stage selector chooses among four presets optimized for different parts of the RTH session (morning vs mid-day; long/short focus). Internal parameters remain fixed to preserve tested behavior.
Public inputs (kept minimal)
Stage (choose your preset)
TP / SL (points) shown for transparency; effective values are governed by the selected preset to maintain consistency with research.
Optional display overlays (status line/markers) for readability.
Alerts (how to use)
Create an alert on the strategy and choose Strategy → Order fills. Use a webhook if you want automation. The payload includes the exact chart symbol so it works on ES1! or a specific ES contract:
{
"tv_symbol": "{{ticker}}",
"tv_exchange": "{{exchange}}",
"action": "buy|sell|exit",
"price": {{close}},
"time": "{{timenow}}"
}
If your receiver needs a fixed root (e.g., “ES”), map it on your server using tv_symbol for context.
Backtest & assumptions
Backtest assumptions (initial capital, commission, slippage, margin) are user-configurable in TradingView. Results on your chart reflect your settings. This script evaluates ES fills on 5-minute RTH bars; live execution will differ.
Operating notes
Use on ES only, 5-minute timeframe, RTH session.
If you run multiple Stages, use separate charts/tabs and coordinate net exposure in your own tooling if needed.
Publish with a clean chart for clarity.
Disclosures (compliance)
No investment advice. This script is for research/education and tooling only. It does not provide investment, legal, tax, or accounting advice and does not recommend any security, instrument, or strategy. Use at your own risk.
Hypothetical performance (CFTC 4.41). Hypothetical or simulated results have many limitations, and no representation is made that any account will achieve similar outcomes. Past performance is not necessarily indicative of future results.
Futures risk. Trading futures involves substantial risk of loss and is not suitable for all investors. Leverage, gaps, slippage, and connectivity can cause losses exceeding initial investment.
Backtesting limitations. Results depend on data quality, chart resolution, session filters, and user assumptions; live execution will differ.
Intellectual property. © 2025 AlgoIndex. All Rights Reserved. Redistribution, resale, or decompilation prohibited without written consent.
Algosnipe trading day scalperThe Algosnipe Trading Day Scalper is an intraday trading strategy designed for active traders who aim to capture short-term price movements within the trading session. It blends price action, volatility, and volume-based logic to identify high-probability entry and exit zones while minimizing exposure time in the market.
FVG Session Break Strategy with ATR RR🧠 FVG Session Break Strategy with ATR RR — Timezone-Aware, Session-Savvy, and Risk-Calibrated
This strategy captures high-probability reversals and continuations by combining Fair Value Gap (FVG) imbalances with session-based breakout logic and ATR-calibrated risk management. It’s designed for traders who want to exploit structural inefficiencies during key market sessions — with precision and portability across global exchanges.
🔍 Core Logic:
Fair Value Gap Detection: Identifies bullish and bearish FVGs using a 3-bar displacement pattern.
Session Breakout Engine: Tracks session highs and lows (Asian, London, NY) and triggers trades only when price breaks these levels — ensuring trades occur at meaningful inflection points.
ATR-Based RR Control: Dynamically sizes stop-loss and take-profit levels using ATR × multiplier, maintaining consistent risk across volatility regimes.
🌐 Timezone-Aware Session Logic:
Session boundaries are defined in UTC-5 (e.g., NY: 0930–1600) but automatically converted to the exchange’s local timezone using timestamp("Etc/GMT+5", ...). This ensures:
Accurate session detection across all markets and assets
No manual timezone adjustments needed
Robust performance on crypto, forex, and global equities
📈 Visuals:
Session highs and lows plotted in orange
Bullish and bearish FVGs marked with green and red triangles
Strategy entries and exits shown on chart with full RR logic
This strategy is ideal for traders who want to combine structural edge with session context and disciplined risk.
The Butterfly Elephant EffectStrategy Overview: The Butterfly Elephant Effect
Concept & Philosophy:
Welcome to "The Butterfly Elephant Effect," a sophisticated multi-indicator strategy that operates on the principle that small, precise technical signals (the Butterfly) can trigger significant market moves (the Elephant Effect). This strategy is designed to identify high-probability reversal points by combining three powerful analytical systems into one cohesive framework. It seeks to catch major trend reversals at key support and resistance levels, using a confluence of volume, momentum, and overbought/oversold oscillators.
Core Components:
The strategy intelligently synthesizes three distinct systems:
Lucky Balls System (Volume & Trend):
Utilizes the Negative Volume Index (NVI) and Positive Volume Index (PVI) to understand smart money activity and trend strength.
Plots these indices on the price chart, scaled to the recent price range for actionable signals.
Generates signals when price interacts with a moving average envelope, identifying potential exhaustion points.
Momentum Confirmation System:
Combines RSI, CCI, and PPO momentum oscillators into a single, refined line.
This "Momentum Composite" line is used to confirm the strength of a reversal signal as it crosses the dynamic envelope bands.
Lucky Table System (Market Breadth & Confluence):
This is the heart of the strategy's filtering mechanism. It runs 36 different oscillator readings across 6 different timeframes for Stochastic, Williams %R, RSI, and MACD.
It counts the number of these oscillators that are in extreme overbought or oversold territory.
A "Lucky Table" signal is generated when the number of matching oscillators exceeds your customizable threshold (e.g., 30 out of 36), indicating a massive, multi-timeframe consensus on market exhaustion.
The Ultimate Signals:
The strategy's most powerful entries are the specially named signals that require a perfect storm of conditions:
🐘 Elephant Long Signal: Triggers when the Momentum System gives a buy, the Lucky Table shows extreme oversold consensus, AND the price is at or below the adjusted lower envelope band. This represents a potential major bullish reversal from a support zone.
🦋 Butterfly Short Signal: Triggers when the Momentum System gives a sell, the Lucky Table shows extreme overbought consensus, AND the price is at or above the adjusted upper envelope band. This represents a potential major bearish reversal from a resistance zone.
Key Features:
Visual Clarity: A rich set of plotshapes (🪜, 🐍, 🐸, ✈️, ⚽) makes it easy to identify the contributing signals from each subsystem on the chart.
Comprehensive Dashboard: A real-time table displays all 36 oscillator values from the Lucky Table, color-coded for quick assessment of market conditions.
Flexible Risk Management: Includes optional Profit Target and Stop Loss based on a percentage of entry price.
Highly Customizable: Every parameter—from lookback lengths and scale factors to the crucial match threshold—can be adjusted to fit your trading style and instrument.
How to Use:
Add the strategy to your chart.
Look for the primary Elephant (🐘) or Butterfly (🦋) signals near the envelope boundaries.
Use the Lucky Table on the top-right to confirm the strength of the oversold/overbought conditions.
Manage your trade using the built-in PT/SL or your own discretion.
Ideal For: Swing traders and position traders looking for high-conviction entries at potential market turning points.
Disclaimer: This is a complex strategy designed for educational and research purposes. Always test and forward-test any strategy in a simulated environment before committing real capital. Past performance is not indicative of future results.
PS Look out for the Frog :-)
QQQ TimingThis is a trend-following position trading strategy designed for the QQQ and the leveraged ETF QLD (ProShares Ultra QQQ). The primary goal is to capture multi-month holds for maximal profit.
Key Instruments & Performance
The strategy performs best with QLD, which yields far superior results compared to QQQ.
TQQQ (triple-leveraged) results in higher drawdowns and is not the optimal choice.
Important: The system is not intended for use with other indexes, individual stocks, or investments (like crypto or gold), as performance can vary widely.
Buy Signals
The strategy's signals are rooted in the S&P 500 Index (SPX), as testing showed it provides more reliable triggers than using QQQ itself.
Primary Buy Signal (Credit to IBD/Mike Webster): The SPX triggers a buy when its low closes above the 21-day Exponential Moving Average (EMA) for three consecutive days.
Refinement with Downtrend Lines: During corrective or bear periods, results and drawdowns can be significantly improved by incorporating downtrend lines. These lines connect lower highs. The strategy waits for the price to close above a drawn downtrend line before executing a buy. This refinement can modify the primary signal, either by allowing for an earlier entry or, in some cases, completely nullifying a false signal until the trend change proves itself.
Risk Management & Exit Strategy
Initial Buy Risk: A 3.7% stop loss is applied immediately upon the initial entry.
Initial Exit Rule: An exit is required if the QQQ's low drops below the 50-day Simple Moving Average (SMA).
Note: The 3.7% stop often provides protection when the initial buy occurs below the 50-day SMA. However, if QQQ is already trading above its 50-day SMA at the time of the SPX signal (indicating relative strength), historically, it has been better to use the 50-day SMA rule to give the position more room to run.
Trend Exit (Profit-Taking): To stay in a strong trend for the optimal amount of time, the long position is exited when a moving average crossover to the downside is triggered, based around the 107-day Simple Moving Average (SMA).
RastaRasta — Educational Strategy (Pine v5)
Momentum · Smoothing · Trend Study
Overview
The Rasta Strategy is a visual and educational framework designed to help traders study momentum transitions using the interaction between a fast-reacting EMA line and a slower smoothed reference line.
It is not a signal generator or profit system; it’s a learning tool for understanding how smoothing, crossovers, and filters interact under different market conditions.
The script displays:
A primary EMA line (the fast reactive wave).
A Smoothed line (using your chosen smoothing method).
Optional fog zones between them for quick visual context.
Optional DNA rungs connecting both lines to illustrate volatility compression and expansion.
Optional EMA 8 / EMA 21 trend filter to observe higher-time-frame alignment.
Core Idea
The Rasta model focuses on wave interaction. When the fast EMA crosses above the smoothed line, it reflects a shift in short-term momentum relative to background trend pressure. Cross-unders suggest weakening or reversal.
Rather than treating this as a trading “signal,” use it to observe structure, study trend alignment, and test how smoothing type affects reaction speed.
Smoothing Types Explained
The script lets you experiment with multiple smoothing techniques:
Type Description Use Case
SMA (Simple Moving Average) Arithmetic mean of the last n values. Smooth and steady, but slower. Trend-following studies; filters noise on higher time frames.
EMA (Exponential Moving Average) Weights recent data more. Responds faster to new price action. Momentum or reactive strategies; quick shifts and reversals.
RMA (Relative Moving Average) Used internally by RSI; smooths exponentially but slower than EMA. Momentum confirmation; balanced response.
WMA (Weighted Moving Average) Linear weights emphasizing the most recent data strongly. Intraday scalping; crisp but potentially noisy.
None Disables smoothing; uses the EMA line alone. Raw comparison baseline.
Each smoothing method changes how early or late the strategy reacts:
Faster smoothing (EMA/WMA) = more responsive, good for scalping.
Slower smoothing (SMA/RMA) = more stable, good for trend following.
Modes of Study
🔹 Scalper Mode
Use short EMA lengths (e.g., 3–5) and fast smoothing (EMA or WMA).
Focus on 1 min – 15 min charts.
Watch how quick crossovers appear near local tops/bottoms.
Fog and rung compression reveal volatility contraction before bursts.
Goal: study short-term rhythm and liquidity pulses.
🔹 Momentum Mode
Use moderate EMA (5–9) and RMA smoothing.
Ideal for 1 H–4 H charts.
Observe how the fog color aligns with trend shifts.
EMA 8 / 21 filter can act as macro bias; “Enter” labels will appear only in its direction when enabled.
Goal: study sustained motion between pullbacks and acceleration waves.
🔹 Trend-Follower Mode
Use longer EMA (13–21) with SMA smoothing.
Great for daily/weekly charts.
Focus on periods where fog stays unbroken for long stretches — these illustrate clear trend dominance.
Watch rung spacing: tight clusters often precede consolidations; wide rungs signal expanding volatility.
Goal: visualize slow-motion trend transitions and filter whipsaw conditions.
Components
EMA Line (Red): Fast-reacting short-term direction.
Smoothed Line (Yellow): Reference trend baseline.
Fog Zone: Green when EMA > Smoothed (up-momentum), red when below.
DNA Rungs: Thin connectors showing volatility structure.
EMA 8 / 21 Filter (optional):
When enabled, the strategy will only allow Enter events if EMA 8 > EMA 21.
Use this to study higher-trend gating effects.
Educational Applications
Momentum Visualization: Observe how the fast EMA “breathes” around the smoothed baseline.
Trend Transitions: Compare different smoothing types to see how early or late reversals are detected.
Noise Filtering: Experiment with fog opacity and smoothing lengths to understand trade-off between responsiveness and stability.
Risk Concept Simulation: Includes a simple fixed stop-loss parameter (default 13%) for educational demonstrations of position management in the Strategy Tester.
How to Use
Add to Chart → “Strategy.”
Works on any timeframe and instrument.
Adjust Parameters:
Length: base EMA speed.
Smoothing Type: choose SMA, EMA, RMA, or WMA.
Smoothing Length: controls delay and smoothness.
EMA 8 / 21 Filter: toggles trend gating.
Fog & Rungs: visual study options only.
Study Behavior:
Use Strategy Tester → List of Trades for entry/exit context.
Observe how different smoothing types affect early vs. late “Enter” points.
Compare trend periods vs. ranging periods to evaluate efficiency.
Combine with External Tools:
Overlay RSI, MACD, or Volume for deeper correlation analysis.
Use replay mode to visualize crossovers in live sequence.
Interpreting the Labels
Enter: Marks where fast EMA crosses above the smoothed line (or when filter flips positive).
Exit: Marks where fast EMA crosses back below.
These are purely analytical markers — they do not represent trade advice.
Educational Value
The Rasta framework helps learners explore:
Reaction time differences between moving-average algorithms.
Impact of smoothing on signal clarity.
Interaction of local and global trends.
Visualization of volatility contraction (tight DNA rungs) and expansion (wide fog zones).
It’s a sandbox for studying price structure, not a promise of profit.
Disclaimer
This script is provided for educational and research purposes only.
It does not constitute financial advice, trading signals, or performance guarantees. Past market behavior does not predict future outcomes.
Users are encouraged to experiment responsibly, record observations, and develop their own understanding of price behavior.
Author: Michael Culpepper (mikeyc747)
License: Educational / Open for study and modification with credit.
Philosophy:
“Learning the rhythm of the market is more valuable than chasing its profits.” — Rasta
EMA Wick A+ Retest StrategyThe EMA Wick A+ Retest Strategy is a precision pullback system built for high-probability trend entries. It uses a combination of:
EMA 21 dynamic trend filtering
ATR-based stop-loss and reward targeting (1:1.5 RR)
Wick retest logic, where the lower wick must touch the EMA and represent at least 50% of the candle's range
Optional filter: RSI > 50 for bullish momentum confirmation
This strategy is designed to capture institutional-style entries after a clean pullback in an uptrend.
✅ Clean signals
✅ High risk-to-reward setups
✅ Built for swing trading or intraday with strong trend bias
Ideal for Forex, Crypto, and Indices.
Use responsibly. Backtest before live trading.
Adaptive ATR Guardian PRO+ (Locked Lines)🎯 核心交易功能 / Core Trading Features
1. 智能参数配置系统 / Intelligent Parameter Configuration
多风格选择:稳健/激进/保守三种交易风格
Multi-style Selection: Conservative/Aggressive/Moderate trading styles
多时间周期:M5/M15/H1三种时间框架
Multi-timeframe: M5/M15/H1 timeframes
自适应参数:根据风格自动调整所有技术参数
Adaptive Parameters: Automatically adjusts all technical parameters based on style
2. 高级信号生成系统 / Advanced Signal Generation
双均线策略:快慢EMA交叉信号
Dual MA Strategy: Fast/Slow EMA crossover signals
趋势过滤:100周期EMA作为趋势方向过滤
Trend Filter: 100-period EMA for trend direction filtering
ADX强度确认:ADX > 最小值才确认趋势有效
ADX Strength Confirmation: ADX > minimum value for valid trend
交易时段控制:可设置交易开始和结束时间
Trading Session Control: Configurable start and end times
3. 智能风险管理 / Intelligent Risk Management
动态止损:基于ATR的智能止损计算
Dynamic Stop Loss: ATR-based intelligent stop loss calculation
分批止盈:TP1平仓50%,TP2平仓剩余50%
Partial Take Profit: TP1 closes 50%, TP2 closes remaining 50%
追踪止损:TP2部分启用追踪止损功能
Trailing Stop: TP2 portion uses trailing stop functionality
品种自适应:BTC和黄金品种特殊参数调整
Symbol Adaptation: Special parameter adjustments for BTC and Gold
4. 专业订单管理 / Professional Order Management
自动平仓:新信号自动平掉反向仓位
Auto Close: New signals automatically close opposite positions
仓位管理:基于账户权益的百分比仓位
Position Management: Percentage-based position sizing
佣金计算:包含交易佣金成本
Commission Calculation: Includes trading commission costs
📊 高级可视化功能 / Advanced Visualization Features
1. 实时交易线系统 / Real-time Trading Lines System
入场线:蓝色虚线,显示入场价格
Entry Line: Blue dashed line showing entry price
止损线:红色实线,显示止损价格
Stop Loss Line: Red solid line showing stop loss price
TP1线:青色实线,显示第一目标位
TP1 Line: Teal solid line showing first target
TP2线:青色实线,显示第二目标位
TP2 Line: Teal solid line showing second target
2. 智能标签管理 / Intelligent Label Management
动态字号:根据时间周期自动调整标签大小
Dynamic Font Size: Auto-adjusts label size based on timeframe
位置优化:标签固定在入场K线右侧3根位置
Position Optimization: Labels fixed 3 bars right of entry candle
实时更新:线条和标签随图表滚动延伸
Real-time Updates: Lines and labels extend with chart scrolling
3. 专业信息面板 / Professional Information Panel
策略状态:交易风格、时间周期、持仓方向
Strategy Status: Trading style, timeframe, position direction
指标数据:ADX强度、ATR波动率数值
Indicator Data: ADX strength, ATR volatility values
交易信息:入场价格、止损价格、止盈价格
Trade Information: Entry price, stop loss, take profit prices
实时更新:每根K线更新最新数据
Real-time Updates: Updates data on every candle
4. 模式状态标签 / Mode Status Label
顶部状态栏:显示周期、风格、ADX、ATR、持仓状态
Top Status Bar: Shows timeframe, style, ADX, ATR, position status
颜色编码:蓝色主题,专业视觉效果
Color Coding: Blue theme, professional visual appearance
⚙️ 技术特色功能 / Technical Special Features
1. 自适应波动率调整 / Adaptive Volatility Adjustment
ATR基准:基于14周期ATR计算
ATR Baseline: Based on 14-period ATR calculation
波动率调整:ATR相对于50周期均线的调整系数
Volatility Adjustment: ATR adjustment coefficient relative to 50-period MA
动态止盈:止盈距离根据波动率动态调整
Dynamic Take Profit: TP distances dynamically adjusted based on volatility
2. 多品种优化 / Multi-Symbol Optimization
BTC特殊处理:更大的止损倍数和TP2倍数
BTC Special Handling: Larger stop loss and TP2 multipliers
黄金特殊处理:适中的参数调整
Gold Special Handling: Moderate parameter adjustments
通用品种:标准参数适用于其他品种
General Symbols: Standard parameters for other symbols
3. 时间智能控制 / Intelligent Time Control
交易时段:可配置的交易时间窗口
Trading Sessions: Configurable trading time windows
时段逻辑:支持跨午夜的时间段设置
Session Logic: Supports cross-midnight time periods
时间过滤:只在交易时段内产生信号
Time Filtering: Only generates signals during trading hours
4. 内存管理优化 / Memory Management Optimization
自动清理:平仓时自动删除所有线条和标签
Auto Cleanup: Automatically deletes all lines and labels on position close
资源回收:避免图表元素堆积
Resource Recycling: Prevents chart element accumulation
性能优化:高效的实时更新机制
Performance Optimization: Efficient real-time update mechanism
🛡️ 风险控制功能 / Risk Control Features
1. 多层过滤系统 / Multi-layer Filtering System
趋势方向过滤 / Trend direction filtering
ADX强度过滤 / ADX strength filtering
交易时间过滤 / Trading time filtering
品种特性过滤 / Symbol characteristic filtering
2. 动态参数系统 / Dynamic Parameter System
快慢均线周期自适应 / Fast/slow MA period adaptation
止损倍数动态调整 / Stop loss multiplier dynamic adjustment
止盈倍数风格化配置 / Take profit multiplier style-based configuration
追踪止损灵敏度设置 / Trailing stop sensitivity settings
3. 资金管理 / Money Management
固定百分比仓位 / Fixed percentage position sizing
佣金成本计入 / Commission costs included
无金字塔加仓 / No pyramiding (no adding to positions)
自动反向平仓 / Automatic opposite position closing
📈 用户体验功能 / User Experience Features
1. 可视化定制 / Visualization Customization
交易线显示/隐藏开关 / Trading lines show/hide toggle
信息面板显示控制 / Information panel display control
线条延伸长度可调 / Line extension length adjustable
颜色方案统一管理 / Color scheme unified management
2. 实时监控 / Real-time Monitoring
持仓状态实时显示 / Real-time position status display
关键价格水平标记 / Key price level markings
指标数值动态更新 / Indicator values dynamic updates
交易统计信息 / Trading statistics information
3. 专业布局 / Professional Layout
右上角信息面板 / Top-right information panel
顶部状态标签 / Top status label
图表交易线条 / Chart trading lines
整洁的视觉层次 / Clean visual hierarchy






















