Smoothed Heiken Ashi- HODL FLIP V2Smoothed Heiken Ashi - HODL FLIP V2:
Strategy Overview
The SHA HODL FLIP V2 strategy combines smoothed Heikin Ashi candles with a dual EMA approach to identify trend changes in cryptocurrency markets. Unlike traditional "HODL" (Hold On for Dear Life) strategies that only capture upside, this system aims to capture both upward and downward price movements by automatically "flipping" your entire position between long and short depending on the trend direction, allowing you to grow your holdings through complete market cycles.
Technical Approach
The strategy uses a unique two-layer smoothing method:
Primary smoothing: Calculates Heikin Ashi candles using a standard EMA (default: 14 periods)
Secondary smoothing: Further refines the signal by applying an additional EMA filter (default: 8 periods)
This double-smoothing technique reduces false signals and market noise, providing clearer trend identification. The strategy generates entry and exit signals when the color of the smoothed Heikin Ashi candles changes from red to green (long signal) or green to red (short signal).
Capital Allocation
This strategy is designed to utilize 100% of your available capital, effectively "flipping" your entire position between long and short positions as market trends change. Using 1x leverage for short positions keeps risk profile similar to holding spot positions.
Trade Management
Entry Logic: Enter long positions when smoothed HA candles turn green, and short positions when they turn red
Exit Logic: Manually exit your position when an opposing signal appears
Risk Management: Rather than using traditional stop-losses, the strategy relies on trend reversal signals to manage risk
Timeframe Selection
While the strategy can be applied to multiple timeframes, it typically performs best on daily, 2-day, and 3-day charts. Each cryptocurrency pair may have optimal timeframe settings, and backtesting is recommended to determine the most effective parameters for specific assets.
Performance Characteristics
The Smoothed Heiken Ashi HODL FLIP V2 strategy aims to outperform traditional buy-and-hold approaches by:
Capturing gains during bull markets (like traditional HODL)
Generating additional profits during downtrends (unlike traditional HODL)
Preserving capital during major market corrections
During trending markets (both up and down), the strategy tends to perform exceptionally well, generating substantial returns. As with most trend-following systems, performance may reduce during choppy, sideways markets, but the strategy is designed to quickly recover and generate excess profits once a clear trend reasserts itself.
Visualization
The strategy provides clear visual signals directly on your chart:
Green and red candles indicating the current trend direction
Triangular markers showing entry points
A blue horizontal line displaying your current entry price
This complete trading system offers a disciplined, systematic approach to cryptocurrency trading that aims to maximize returns throughout full market cycles rather than just during bull markets. Each asset has very unique settings so thorough backtesting is recommended instead of using 1 setting for all assets.
This is available in an Indicator version which can provide automatic connection to exchanges via webhooks and signal bots, so this can be a hands of strategy. It's called "Smoothed Heiken Ashi Candles with Delayed Signals" . The signals appear at the opening of the next bar, opposed to the close of the existing bar here. Essentially identical, but visually different buy 1 bar.
تحليل الاتجاه
Moving Average Shift WaveTrend StrategyMoving Average Shift WaveTrend Strategy
🧭 Overview
The Moving Average Shift WaveTrend Strategy is a trend-following and momentum-based trading system designed to be overlayed on TradingView charts. It executes trades based on the confluence of multiple technical conditions—volatility, session timing, trend direction, and oscillator momentum—to deliver logical and systematic trade entries and exits.
🎯 Strategy Objectives
Enter trades aligned with the prevailing long-term trend
Exit trades on confirmed momentum reversals
Avoid false signals using session timing and volatility filters
Apply structured risk management with automatic TP, SL, and trailing stops
⚙️ Key Features
Selectable MA types: SMA, EMA, SMMA (RMA), WMA, VWMA
Dual-filter logic using a custom oscillator and moving averages
Session and volatility filters to eliminate low-quality setups
Trailing stop, configurable Take Profit / Stop Loss logic
“In-wave flag” prevents overtrading within the same trend wave
Visual clarity with color-shifting candles and entry/exit markers
📈 Trading Rules
✅ Long Entry Conditions:
Price is above the selected MA
Oscillator is positive and rising
200-period EMA indicates an uptrend
ATR exceeds its median value (sufficient volatility)
Entry occurs between 09:00–17:00 (exchange time)
Not currently in an active wave
🔻 Short Entry Conditions:
Price is below the selected MA
Oscillator is negative and falling
200-period EMA indicates a downtrend
All other long-entry conditions are inverted
❌ Exit Conditions:
Take Profit or Stop Loss is hit
Opposing signals from oscillator and MA
Trailing stop is triggered
🛡️ Risk Management Parameters
Pair: ETH/USD
Timeframe: 4H
Starting Capital: $3,000
Commission: 0.02%
Slippage: 2 pips
Risk per Trade: 2% of account equity (adjustable)
Total Trades: 224
Backtest Period: May 24, 2016 — April 7, 2025
Note: Risk parameters are fully customizable to suit your trading style and broker conditions.
🔧 Trading Parameters & Filters
Time Filter: Trades allowed only between 09:00–17:00 (exchange time)
Volatility Filter: ATR must be above its median value
Trend Filter: Long-term 200-period EMA
📊 Technical Settings
Moving Average
Type: SMA
Length: 40
Source: hl2
Oscillator
Length: 15
Threshold: 0.5
Risk Management
Take Profit: 1.5%
Stop Loss: 1.0%
Trailing Stop: 1.0%
👁️ Visual Support
MA and oscillator color changes indicate directional bias
Clear chart markers show entry and exit points
Trailing stops and risk controls are transparently managed
🚀 Strategy Improvements & Uniqueness
In-wave flag avoids repeated entries within the same trend phase
Filtering based on time, volatility, and trend ensures higher-quality trades
Dynamic high/low tracking allows precise trailing stop placement
Fully rule-based execution reduces emotional decision-making
💡 Inspirations & Attribution
This strategy is inspired by the excellent concept from:
ChartPrime – “Moving Average Shift”
It expands on the original idea with advanced trade filters and trailing logic.
Source reference:
📌 Summary
The Moving Average Shift WaveTrend Strategy offers a rule-based, reliable approach to trend trading. By combining trend and momentum filters with robust risk controls, it provides a consistent framework suitable for various market conditions and trading styles.
⚠️ Disclaimer
This script is for educational purposes only. Trading involves risk. Always use proper backtesting and risk evaluation before applying in live markets.
Dskyz (DAFE) MAtrix with ATR-Powered Precision Dskyz (DAFE) MAtrix with ATR-Powered Precision
This cutting‐edge futures trading strategy built to thrive in rapidly changing market conditions. Developed for high-frequency futures trading on instruments such as the CME Mini MNQ, this strategy leverages a matrix of sophisticated moving averages combined with ATR-based filters to pinpoint high-probability entries and exits. Its unique combination of adaptable technical indicators and multi-timeframe trend filtering sets it apart from standard strategies, providing enhanced precision and dynamic responsiveness.
imgur.com
Core Functional Components
1. Advanced Moving Averages
A distinguishing feature of the DAFE strategy is its robust, multi-choice moving averages (MAs). Clients can choose from a wide array of MAs—each with specific strengths—in order to fine-tune their trading signals. The code includes user-defined functions for the following MAs:
imgur.com
Hull Moving Average (HMA):
The hma(src, len) function calculates the HMA by using weighted moving averages (WMAs) to reduce lag considerably while smoothing price data. This function computes an intermediate WMA of half the specified length, then a full-length WMA, and finally applies a further WMA over the square root of the length. This design allows for rapid adaptation to price changes without the typical delays of traditional moving averages.
Triple Exponential Moving Average (TEMA):
Implemented via tema(src, len), TEMA uses three consecutive exponential moving averages (EMAs) to effectively cancel out lag and capture price momentum. The final formula—3 * (ema1 - ema2) + ema3—produces a highly responsive indicator that filters out short-term noise.
Double Exponential Moving Average (DEMA):
Through the dema(src, len) function, DEMA calculates an EMA and then a second EMA on top of it. Its simplified formula of 2 * ema1 - ema2 provides a smoother curve than a single EMA while maintaining enhanced responsiveness.
Volume Weighted Moving Average (VWMA):
With vwma(src, len), this MA accounts for trading volume by weighting the price, thereby offering a more contextual picture of market activity. This is crucial when volume spikes indicate significant moves.
Zero Lag EMA (ZLEMA):
The zlema(src, len) function applies a correction to reduce the inherent lag found in EMAs. By subtracting a calculated lag (based on half the moving average window), ZLEMA is exceptionally attuned to recent price movements.
Arnaud Legoux Moving Average (ALMA):
The alma(src, len, offset, sigma) function introduces ALMA—a type of moving average designed to be less affected by outliers. With parameters for offset and sigma, it allows customization of the degree to which the MA reacts to market noise.
Kaufman Adaptive Moving Average (KAMA):
The custom kama(src, len) function is noteworthy for its adaptive nature. It computes an efficiency ratio by comparing price change against volatility, then dynamically adjusts its smoothing constant. This results in an MA that quickly responds during trending periods while remaining smoothed during consolidation.
Each of these functions—integrated into the strategy—is selectable by the trader (via the fastMAType and slowMAType inputs). This flexibility permits the tailored application of the MA most suited to current market dynamics and individual risk management preferences.
2. ATR-Based Filters and Risk Controls
ATR Calculation and Volatility Filter:
The strategy computes the Average True Range (ATR) over a user-defined period (atrPeriod). ATR is then used to derive both:
Volatility Assessment: Expressed as a ratio of ATR to closing price, ensuring that trades are taken only when volatility remains within a safe, predefined threshold (volatilityThreshold).
ATR-Based Entry Filters: Implemented as atrFilterLong and atrFilterShort, these conditions ensure that for long entries the price is sufficiently above the slow MA and vice versa for shorts. This acts as an additional confirmation filter.
Dynamic Exit Management:
The exit logic employs a dual approach:
Fixed Stop and Profit Target: Stops and targets are set at multiples of ATR (fixedStopMultiplier and profitTargetATRMult), helping manage risk in volatile markets.
Trailing Stop Adjustments: A trailing stop is calculated using the ATR multiplied by a user-defined offset (trailOffset), which captures additional profits as the trade moves favorably while protecting against reversals.
3. Multi-Timeframe Trend Filtering
The strategy enhances its signal reliability by leveraging a secondary, higher timeframe analysis:
15-Minute Trend Analysis:
By retrieving 15-minute moving averages (fastMA15m and slowMA15m) via request.security, the strategy determines the broader market trend. This secondary filter (enabled or disabled through useTrendFilter) ensures that entries are aligned with the prevailing market direction, thereby reducing the incidence of false signals.
4. Signal and Execution Logic
Combined MA Alignment:
The entry conditions are based primarily on the alignment of the fast and slow MAs. A long condition is triggered when the current price is above both MAs and the fast MA is above the slow MA—complemented by the ATR filter and volume conditions. The reverse applies for a short condition.
Volume and Time Window Validation:
Trades are permitted only if the current volume exceeds a minimum (minVolume) and the current hour falls within the predefined trading window (tradingStartHour to tradingEndHour). An additional volume spike check (comparing current volume to a moving average of past volumes) further filters for optimal market conditions.
Comprehensive Order Execution:
The strategy utilizes flexible order execution functions that allow pyramiding (up to 10 positions), ensuring that it can scale into positions as favorable conditions persist. The use of both market entries and automated exits (with profit targets, stop-losses, and trailing stops) ensures that risk is managed at every step.
5. Integrated Dashboard and Metrics
For transparency and real-time analysis, the strategy includes:
On-Chart Visualizations:
Both fast and slow MAs are plotted on the chart, making it easy to see the market’s technical foundation.
Dynamic Metrics Dashboard:
A built-in table displays crucial performance statistics—including current profit/loss, equity, ATR (both raw and as a percentage), and the percentage gap between the moving averages. These metrics offer immediate insight into the health and performance of the strategy.
Input Parameters: Detailed Breakdown
Every input is meticulously designed to offer granular control:
Fast & Slow Lengths:
Determine the window size for the fast and slow moving averages. Smaller values yield more sensitivity, while larger values provide a smoother, delayed response.
Fast/Slow MA Types:
Choose the type of moving average for fast and slow signals. The versatility—from basic SMA and EMA to more complex ones like HMA, TEMA, ZLEMA, ALMA, and KAMA—allows customization to fit different market scenarios.
ATR Parameters:
atrPeriod and atrMultiplier shape the volatility assessment, directly affecting entry filters and risk management through stop-loss and profit target levels.
Trend and Volume Filters:
Inputs such as useTrendFilter, minVolume, and the volume spike condition help confirm that a trade occurs in active, trending markets rather than during periods of low liquidity or market noise.
Trading Hours:
Restricting trade execution to specific hours (tradingStartHour and tradingEndHour) helps avoid illiquid or choppy markets outside of prime trading sessions.
Exit Strategies:
Parameters like trailOffset, profitTargetATRMult, and fixedStopMultiplier provide multiple layers of risk management and profit protection by tailoring how exits are generated relative to current market conditions.
Pyramiding and Fixed Trade Quantity:
The strategy supports multiple entries within a trend (up to 10 positions) and sets a predefined trade quantity (fixedQuantity) to maintain consistent exposure and risk per trade.
Dashboard Controls:
The resetDashboard input allows for on-the-fly resetting of performance metrics, keeping the strategy’s performance dashboard accurate and up-to-date.
Why This Strategy is Truly Exceptional
Multi-Faceted Adaptability:
The ability to switch seamlessly between various moving average types—each suited to particular market conditions—enables the strategy to adapt dynamically. This is a testament to the high level of coding sophistication and market insight infused within the system.
Robust Risk Management:
The integration of ATR-based stops, profit targets, and trailing stops ensures that every trade is executed with well-defined risk parameters. The system is designed to mitigate unexpected market swings while optimizing profit capture.
Comprehensive Market Filtering:
By combining moving average crossovers with volume analysis, volatility thresholds, and multi-timeframe trend filters, the strategy only enters trades under the most favorable conditions. This multi-layered filtering reduces noise and enhances signal quality.
-Final Thoughts-
The Dskyz Adaptive Futures Elite (DAFE) MAtrix with ATR-Powered Precision strategy is not just another trading algorithm—it is a multi-dimensional, fully customizable system built on advanced technical principles and sophisticated risk management techniques. Every function and input parameter has been carefully engineered to provide traders with a system that is both powerful and transparent.
For clients seeking a state-of-the-art trading solution that adapts dynamically to market conditions while maintaining strict discipline in risk management, this strategy truly stands in a class of its own.
****Please show support if you enjoyed this strategy. I'll have more coming out in the near future!!
-Dskyz
Caution
DAFE is experimental, not a profit guarantee. Futures trading risks significant losses due to leverage. Backtest, simulate, and monitor actively before live use. All trading decisions are your responsibility.
⛅ CloudEdgeCloudEdge Strategy Description
This strategy uses key elements of the Ichimoku Cloud to analyze market trends and identify potential reversal signals. It incorporates the calculations of Tenkan-sen, Kijun-sen, Senkou Span A, Senkou Span B, and Chikou Span. Based on eight bullish signals—such as the price rising compared to its past level, the price trading above the Tenkan-sen, the Tenkan-sen crossing above the Kijun-sen, and recent crossovers involving the Chikou Span—the strategy determines entry and exit points.
When the number of bullish signals meets or exceeds a predefined threshold, a long (buy) position is entered and any short (sell) positions are closed.
Conversely, if the number of bullish signals falls below the specified bearish threshold, a short position is initiated and any long positions are closed.
The chart visually represents the strategy’s components by plotting the Ichimoku lines, the cloud (Kumo), signal markers, and a label displaying the count of bullish signals. This aids in understanding the underlying market structure and assessing the strategy's effectiveness.
Heiken Ashi Supertrend ADX - StrategyHeiken Ashi Supertrend ADX Strategy
Overview
This strategy combines the power of Heiken Ashi candles, Supertrend indicator, and ADX filter to identify strong trend movements across multiple timeframes. Designed primarily for the cryptocurrency market but adaptable to any tradable asset, this system focuses on capturing momentum in established trends while employing a sophisticated triple-layer stop loss mechanism to protect capital and secure profits.
Strategy Mechanics
Entry Signals
The strategy uses a unique blend of technical signals to identify high-probability trade entries:
Heiken Ashi Candles: Looks specifically for Heiken Ashi candles with minimal or no wicks, which signal strong momentum and trend continuation. These "full-bodied" candles represent periods where price moved decisively in one direction with minimal retracement.
Supertrend Filter : Confirms the underlying trend direction using the Supertrend indicator (default factor: 3.0, ATR period: 10). Entries are aligned with the prevailing Supertrend direction.
ADX Filter (Optional) : Can be enabled to focus only on stronger trending conditions, filtering out choppy or ranging markets. When enabled, trades only trigger when ADX is above the specified threshold (default: 25).
Exit Signals
Positions are closed when either:
An opposing signal appears (Heiken Ashi candle with no wick in the opposite direction)
Any of the three stop loss mechanisms are triggered
Triple-Layer Stop Loss System
The strategy employs a sophisticated three-tier stop loss approach:
ATR Trailing Stop: Adapts to market volatility and locks in profits as the trend extends. This stop moves in the direction of the trade, capturing profit without exiting too early during normal price fluctuations.
Swing Point Stop : Uses natural market structure (recent highs/lows over a lookback period) to place stops at logical support/resistance levels, honoring the market's own rhythm.
Insurance Stop: A percentage-based safety net that protects against sudden adverse moves immediately after entry. This is particularly valuable when the swing point stop might be positioned too far from entry, providing immediate capital protection.
Optimization Features
Customizable Filters: All components (Supertrend, ADX) can be enabled/disabled to adapt to different market conditions
Adjustable Parameters: Fine-tune ATR periods, Supertrend factors, and ADX thresholds
Flexible Stop Loss Settings: Each of the three stop loss mechanisms can be individually enabled/disabled with customizable parameters
Best Practices for Implementation
Recommended Timeframes: Works best on 4-hour charts and above, where trends develop more reliably
Market Conditions: Performs well across various market conditions due to the ADX filter's ability to identify meaningful trends
Position Sizing: The strategy uses a percentage of equity approach (default: 3%) for position sizing
Performance Characteristics
When properly optimized, this strategy has demonstrated profit factors exceeding 3 in backtesting. The approach typically produces generous winners while limiting losses through its multi-layered stop loss system. The ATR trailing stop is particularly effective at capturing extended trends, while the insurance stop provides immediate protection against adverse moves.
The visual components on the chart make it easy to follow the strategy's logic, with position status, entry prices, and current stop levels clearly displayed.
This strategy represents a complete trading system with clearly defined entry and exit rules, adaptive stop loss mechanisms, and built-in risk management through position sizing.
PythonEx Global ALL MARKET FRIENDLY QUANTITATIVE STRATEGY
SUITABLE FOR ALL MARKETS
GOLD✅
FOREX✅
CRYPTO✅
INDIAN✅
US MARKETS✅
Things To Remember
* ONLY use 1hr Timeframe
* Trail your own Stoploss ,as the system has huge stoploss (not suitable for PROPFIRM ACs)
* Suitable for options and futures
* Great results when used with 1:2 , 1:3 RR
OneTrend EMAThis strategy uses exponential moving averages (EMA) to define market trend direction and employs a dynamic ATR-based threshold adjusted by a custom ADX calculation to generate bullish (blue) and bearish (pink) zones. It enters long positions when the fast EMA exceeds the threshold (blue zone) and exits when it falls below the threshold (pink zone), providing clear, rule-based signals for trend-following trades. Pros include adaptive thresholding that reflects market volatility and trend strength, while cons are potential lag in sideways or choppy markets and susceptibility to whipsaws in volatile conditions.
Crypto Investing StrategyStrategy to invest in Crypto and any long term growing asset class.
Features
Investing start time
Investing end time
RSI value to buy (should be below 50)
RSI value to sell (should be above 70)
RSI value for overbought confirmation (should be above 70)
Exit percentage (what % to exit from portfolio)
伦敦开盘突破策略 V3(含统计+盈亏比)Used for 5-minute BTC perpetual contracts, open an order with a fixed position of 0.1 BTC and a balance of USD 1,000. COINBASE:BTCUSD
Dskyz Adaptive Futures Elite (DAFE)Dskyz Adaptive Futures Edge (DAFE)
imgur.com
A Dynamic Futures Trading Strategy
DAFE adapts to market volatility and price action using technical indicators and advanced risk management. It’s built for high-stakes futures trading (e.g., MNQ, BTCUSDT.P), offering modular logic for scalpers and swing traders alike.
Key Features
Adaptive Moving Averages
Dynamic Logic: Fast and slow SMAs adjust lengths via ATR, reacting to momentum shifts and smoothing in calm markets.
Signals: Long entry on fast SMA crossing above slow SMA with price confirmation; short on cross below.
RSI Filtering (Optional)
Momentum Check: Confirms entries with RSI crossovers (e.g., above oversold for longs). Toggle on/off with custom levels.
Fine-Tuning: Adjustable lookback and thresholds (e.g., 60/40) for precision.
Candlestick Pattern Recognition
Eng|Enhanced Detection: Identifies strong bullish/bearish engulfing patterns, validated by volume and range strength (vs. 10-period SMA).
Conflict Avoidance: Skips trades if both patterns appear in the lookback window, reducing whipsaws.
Multi-Timeframe Trend Filter
15-Minute Alignment: Syncs intrabar trades with 15-minute SMA trends; optional for flexibility.
Dollar-Cost Averaging (DCA) New!
Scaling: Adds up to a set number of entries (e.g., 4) on pullbacks/rallies, spaced by ATR multiples.
Control: Caps exposure and resets on exit, enhancing trend-following potential.
Trade Execution & Risk Management
Entry Rules: Prioritizes moving averages or patterns (user choice), with volume, volatility, and time filters.
Stops & Trails:
Initial Stop: ATR-based (2–3.5x, volatility-adjusted).
Trailing Stop: Locks profits with configurable ATR offset and multiplier.
Discipline
Cooldown: Pauses post-exit (e.g., 0–5 minutes).
Min Hold: Ensures trades last a set number of bars (e.g., 2–10).
Visualization & Tools
Charts: Overlays MAs, stops, and signals; trend shaded in background.
Dashboard: Shows position, P&L, win rate, and more in real-time.
Debugging: Logs signal details for optimization.
Input Parameters
Parameter Purpose Suggested Use
Use RSI Filter - Toggle RSI confirmation *Disable 4 price-only
trading
RSI Length - RSI period (e.g., 14) *7–14 for sensitivity
RSI Overbought/Oversold - Adjust for market type *Set levels (e.g., 60/40)
Use Candlestick Patterns - Enables engulfing signals *Disable for MA focus
Pattern Lookback - Pattern window (e.g., 19) *10–20 bars for balance
Use 15m Trend Filter - Align with 15-min trend *Enable for trend trades
Fast/Slow MA Length - Base MA lengths (e.g., 9/19) *10–25 / 30–60 per
timeframe
Volatility Threshold - Filters volatile spikes *Max ATR/close (e.g., 1%)
Min Volume - Entry volume threshold *Avoid illiquid periods
(e.g., 10)
ATR Length - ATR period (e.g., 14) *Standard volatility
measure
Trailing Stop ATR Offset - Trail distance (e.g., 0.5) *0.5–1.5 for tightness
Trailing Stop ATR Multi - Trail multiplier (e.g., 1.0) *1–3 for trend room
Cooldown Minutes - Post-exit pause (e.g., 0–5) *Prevents overtrading
Min Bars to Hold - Min trade duration (e.g., 2) *5–10 for intraday
Trading Hours - Active window (e.g., 9–16) *Focus on key sessions
Use DCA - Toggle DCA *Enable for scaling
Max DCA Entries - Cap entries (e.g., 4) *Limit risk exposure
DCA ATR Multiplier Entry spacing (e.g., 1.0) *1–2 for wider gaps
Compliance
Realistic Testing: Fixed quantities, capital, and slippage for accurate backtests.
Transparency: All logic is user-visible and adjustable.
Risk Controls: Cooldowns, stops, and hold periods ensure stability.
Flexibility: Adapts to various futures and timeframes.
Summary
DAFE excels in volatile futures markets with adaptive logic, DCA scaling, and robust risk tools. Currently in prop account testing, it’s a powerful framework for precision trading.
Caution
DAFE is experimental, not a profit guarantee. Futures trading risks significant losses due to leverage. Backtest, simulate, and monitor actively before live use. All trading decisions are your responsibility.
OneTrend Vegas TunnelOneTrend Vegas Tunnel is a trend-following breakout strategy that uses multiple exponential moving averages (EMAs) to dynamically define a trading channel and filter false breakout signals.
The strategy constructs a primary channel—known as the Vegas Tunnel—using a 144-period and a 169-period EMA, while a 12-day EMA acts as an entry filter to confirm bullish or bearish breakouts (with trades taken only when both price and the 12-day EMA break above or below the tunnel, respectively).
Additionally, the strategy employs manually calculated ADX and RSI values to “double‐confirm” the trend — while a secondary channel (576- and 676‑period EMAs, colored in gray) provides a long‑term trend reference.
Please note that this script is intended solely for backtesting and educational purposes and does not constitute financial advice.
Follow Line Strategy Version 2.5 (React HTF)Follow Line Strategy v2.5 (React HTF) - TradingView Script Usage
This strategy utilizes a "Follow Line" concept based on Bollinger Bands and ATR to identify potential trading opportunities. It includes advanced features like optional working hours filtering, higher timeframe (HTF) trend confirmation, and improved trend-following entry/exit logic. Version 2.5 introduces reactivity to HTF trend changes for more adaptive trading.
Key Features:
Follow Line: The core of the strategy. It dynamically adjusts based on price breakouts beyond Bollinger Bands, using either the low/high or ATR-adjusted levels.
Bollinger Bands: Uses a standard Bollinger Bands setup to identify overbought/oversold conditions.
ATR Filter: Optionally uses the Average True Range (ATR) to adjust the Follow Line offset, providing a more dynamic and volatility-adjusted entry point.
Optional Trading Session Filter: Allows you to restrict trading to specific hours of the day.
Higher Timeframe (HTF) Confirmation: A significant feature that allows you to confirm trade signals with the trend on a higher timeframe. This can help to filter out false signals and improve the overall win rate.
HTF Selection Method: Choose between Auto and Manual HTF selection:
Auto: The script automatically determines the appropriate HTF based on the current chart timeframe (e.g., 1min -> 15min, 5min -> 4h, 1h -> 1D, Daily -> Monthly).
Manual: Allows you to select a specific HTF using the Manual Higher Timeframe input.
Trend-Following Entries/Exits: The strategy aims to enter trades in the direction of the established trend, using the Follow Line to define the trend.
Reactive HTF Trend Changes: v2.5 exits positions not only based on the trade timeframe (TTF) trend changing, but also when the higher timeframe trend reverses against the position. This makes the strategy more responsive to larger market movements.
Alerts: Provides buy and sell alerts for convenient trading signal notifications.
Visualizations: Plots the Follow Line for both the trade timeframe and the higher timeframe (optional), making it easy to understand the strategy's logic.
How to Use:
Add to Chart: Add the "Follow Line Strategy Version 2.5 (React HTF)" script to your TradingView chart.
Configure Settings: Customize the strategy's settings to match your trading style and preferences. Here's a breakdown of the key settings:
Indicator Settings:
ATR Period: The period used to calculate the ATR. A smaller period is more sensitive to recent price changes.
Bollinger Bands Period: The period used for the Bollinger Bands calculation. A longer period results in smoother bands.
Bollinger Bands Deviation: The number of standard deviations from the moving average that the Bollinger Bands are plotted. Higher deviations create wider bands.
Use ATR for Follow Line Offset?: Enable to use ATR to calculate the Follow Line offset. Disable to use the simple high/low.
Show Trade Signals on Chart?: Enable to show BUY/SELL labels on the chart.
Time Filter:
Use Trading Session Filter?: Enable to restrict trading to specific hours of the day.
Trading Session: The trading session to use (e.g., 0930-1600 for regular US stock market hours). Use 0000-2400 for all hours.
Higher Timeframe Confirmation:
Enable HTF Confirmation?: Enable to use the HTF trend to filter trade signals. If enabled, only trades in the direction of the HTF trend will be taken.
HTF Selection Method: Choose between "Auto" and "Manual" HTF selection.
Manual Higher Timeframe: If "Manual" is selected, choose the specific HTF (e.g., 240 for 4 hours, D for daily).
Show HTF Follow Line?: Enable to plot the HTF Follow Line on the chart.
Understanding the Signals:
Buy Signal: The price breaks above the upper Bollinger Band, and the HTF (if enabled) confirms the uptrend.
Sell Signal: The price breaks below the lower Bollinger Band, and the HTF (if enabled) confirms the downtrend.
Exit Long: The trade timeframe trend changes to downtrend or the higher timeframe trend changes to downtrend.
Exit Short: The trade timeframe trend changes to uptrend or the higher timeframe trend changes to uptrend.
Alerts:
The script includes alert conditions for buy and sell signals. To set up alerts, click the "Alerts" button in TradingView and select the desired alert condition from the script. The alert message provides the ticker and interval.
Backtesting and Optimization:
Use TradingView's Strategy Tester to backtest the strategy on different assets and timeframes.
Experiment with different settings to optimize the strategy for your specific trading style and risk tolerance. Pay close attention to the ATR Period, Bollinger Bands settings, and the HTF confirmation options.
Tips and Considerations:
HTF Confirmation: The HTF confirmation can significantly improve the strategy's performance by filtering out false signals. However, it can also reduce the number of trades.
Risk Management: Always use proper risk management techniques, such as stop-loss orders and position sizing, when trading any strategy.
Market Conditions: The strategy may perform differently in different market conditions. It's important to backtest and optimize the strategy for the specific markets you are trading.
Customization: Feel free to modify the script to suit your specific needs. For example, you could add additional filters or entry/exit conditions.
Pyramiding: The pyramiding = 0 setting prevents multiple entries in the same direction, ensuring the strategy doesn't compound losses. You can adjust this value if you prefer to pyramid into winning positions, but be cautious.
Lookahead: The lookahead = barmerge.lookahead_off setting ensures that the HTF data is calculated based on the current bar's closed data, preventing potential future peeking bias.
Trend Determination: The logic for determining the HTF trend and reacting to changes is critical. Carefully review the f_calculateHTFData function and the conditions for exiting positions to ensure you understand how the strategy responds to different market scenarios.
Disclaimer:
This script is for informational and educational purposes only. It is not financial advice, and you should not trade based solely on the signals generated by this script. Always do your own research and consult with a qualified financial advisor before making any trading decisions. The author is not responsible for any losses incurred as a result of using this script.
Scalping 15min: EMA + MACD + RSI + ATR-based SL/TP📈 Strategy: 15-Minute Scalping — EMA + MACD + RSI + ATR-based SL/TP
This scalping strategy is designed for 15-minute charts and combines trend-following and momentum confirmation with dynamic stop loss and take profit levels based on volatility.
🔧 Indicators Used:
EMA 50 — identifies the main trend
MACD Histogram — confirms momentum direction
RSI (14) — filters overbought/oversold conditions
ATR (14) — dynamically sets SL and TP based on market volatility
📊 Entry Conditions:
Long Entry:
Price is above EMA 50
MACD histogram is positive
RSI is above 50 but below 70
Short Entry:
Price is below EMA 50
MACD histogram is negative
RSI is below 50 but above 30
🛑 Risk Management:
Stop Loss: 1×ATR (user-configurable)
Take Profit: 2×ATR (user-configurable)
These values can be adjusted in the script inputs depending on your risk/reward preference or market conditions.
⚠️ Notes:
Strategy is optimized for scalping fast-moving pairs (e.g. crypto, forex).
Works best in trending markets.
Use backtesting and forward testing before live trading.
Multi-Timeframe Reversal StrategyThis is my first published indicator. In spirit of this community it is free and I welcome any input to make it better. working on future projects on volume and taking tips from more experienced developers.
EMA Crossover (Short Focus with Trailing Stop)This strategy utilizes a combination of Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to generate entry and exit signals for both long and short positions. The core of the strategy is based on the 13-period EMA (short EMA) crossing the 33-period EMA (long EMA) for entering long trades, while a 13-period EMA crossing the 25-period EMA (mid EMA) generates short trade signals. The 100-period SMA and 200-period SMA serve as additional trend indicators to provide context for the market conditions. The strategy aims to capitalize on trend reversals and momentum shifts in the market.
The strategy is designed to execute trades swiftly with an emphasis on entering positions when conditions align in real time. For long entries, the strategy initiates a buy when the 13 EMA is greater than the 33 EMA, indicating a bullish trend. For short entries, the 13 EMA crossing below the 33 EMA signals a bearish trend, prompting a short position. Importantly, the code includes built-in exit conditions for both long and short positions. Long positions are exited when the 13 EMA falls below the 33 EMA, while short positions are closed when the 13 EMA crosses above the 25 EMA.
A key feature of the strategy is the use of trailing stops for both long and short positions. This dynamic exit method adjusts the stop level as the market moves in favor of the trade, locking in profits while reducing the risk of losses. The trailing stop for long positions is based on the high price of the current bar, while the trailing stop for short positions is set using the low price, providing more flexibility in managing risk. This trailing stop mechanism helps to capture profits from favorable market moves while ensuring that positions are exited if the market moves against them.
This strategy works best on the daily timeframe and is optimized for major cryptocurrency pairs. The daily chart allows for the EMAs to provide more reliable signals, as the strategy is designed to capture broader trends rather than short-term market fluctuations. Using it on major crypto pairs increases its effectiveness as these assets tend to have strong and sustained trends, providing better opportunities for the strategy to perform well.
Uptrick X PineIndicators: Z-Score Flow StrategyThis strategy is based on the Z-Score Flow Indicator developed by Uptrick. Full credit for the original concept and logic goes to Uptrick.
The Z-Score Flow Strategy combines statistical mean-reversion logic with trend filtering, RSI confirmation, and multi-mode trade execution, offering a flexible and structured approach to trading both reversals and trend continuations.
Core Concepts Behind Z-Score Flow
1. Z-Score Mean Reversion Logic
The Z-score measures how far current price deviates from its statistical mean, in standard deviations.
A high positive Z-score (e.g. > 2) suggests price is overbought and may revert downward.
A low negative Z-score (e.g. < -2) suggests price is oversold and may revert upward.
The strategy uses Z-score thresholds to trigger signals when price deviates far enough from its mean.
2. Trend Filtering with EMA
To prevent counter-trend entries, the strategy includes a trend filter based on a 50-period EMA:
Only allows long entries if price is below EMA (mean-reversion in downtrends).
Only allows short entries if price is above EMA (mean-reversion in uptrends).
3. RSI Confirmation and Lockout System
An RSI smoothing mechanism helps confirm signals and avoid whipsaws:
RSI must be below 30 and rising to allow buys.
RSI must be above 70 and falling to allow sells.
Once a signal occurs, it is "locked out" until RSI re-enters the neutral zone (30–70).
This avoids multiple signals in overextended zones and reduces overtrading.
Entry Signal Logic
A buy or sell is triggered when:
Z-score crosses below (buy) or above (sell) the threshold.
RSI smoothed condition is met (oversold and rising / overbought and falling).
The trend condition (EMA filter) aligns.
A cooldown period has passed since the last opposite trade.
This layered approach helps ensure signal quality and timing precision.
Trade Modes
The strategy includes three distinct trade modes to adapt to various market behaviors:
1. Standard Mode
Trades are opened using the Z-score + RSI + trend filter logic.
Each signal must pass all layered conditions.
2. Zero Cross Mode
Trades are based on the Z-score crossing zero.
This mode is useful in trend continuation setups, rather than mean reversion.
3. Trend Reversal Mode
Trades occur when the mean slope direction changes, i.e., basis line changes color.
Helps capture early trend shifts with less lag.
Each mode can be customized for long-only, short-only, or long & short execution.
Visual Components
1. Z-Score Mean Line
The basis (mean) line is colored based on slope direction.
Green = bullish slope, Purple = bearish slope, Gray = flat.
A wide shadow band underneath reflects current trend momentum.
2. Gradient Fill to Price
A gradient zone between price and the mean reflects:
Price above mean = bearish zone with purple overlay.
Price below mean = bullish zone with teal overlay.
This visual aid quickly reveals market positioning relative to equilibrium.
3. Signal Markers
"𝓤𝓹" labels appear for buy signals.
"𝓓𝓸𝔀𝓷" labels appear for sell signals.
These are colored and positioned according to trend context.
Customization Options
Z-Score Period & Thresholds: Define sensitivity to price deviations.
EMA Trend Filter Length: Filter entries with long-term bias.
RSI & Smoothing Periods: Fine-tune RSI confirmation conditions.
Cooldown Period: Prevent signal spam and enforce timing gaps.
Slope Index: Adjust how far back to compare mean slope.
Visual Settings: Toggle mean lines, gradients, and more.
Use Cases & Strategy Strengths
1. Mean-Reversion Trading
Ideal for catching pullbacks in trending markets or fading overextended price moves.
2. Trend Continuation or Reversal
With multiple trade modes, traders can choose between fading price extremes or trading slope momentum.
3. Signal Clarity and Risk Control
The combination of Z-score, RSI, EMA trend, and cooldown logic provides high-confidence signals with built-in filters.
Conclusion
The Z-Score Flow Strategy by Uptrick X PineIndicators is a versatile and structured trading system that:
Fuses statistical deviation (Z-score) with technical filters.
Provides both mean-reversion and trend-based entry logic.
Uses visual overlays and signal labels for clarity.
Prevents noise-driven trades via cooldown and lockout systems.
This strategy is well-suited for traders seeking a data-driven, multi-condition entry framework that can adapt to various market types.
Full credit for the original concept and indicator goes to Uptrick.
Smart Money Pivot Strategy [Jason Kasei]This strategy is designed to identify key pivot points (Pivot High and Pivot Low) in the market and leverage the "Smart Money" concept to capture price breakout opportunities. It supports both long and short trades, offering customizable stop-loss (SL) and take-profit (TP) settings, while visually plotting pivot points and breakout signals on the chart.
Core Features
Pivot Point Detection:
Utilizes ta.pivothigh and ta.pivotlow functions to detect the highest (Pivot High) and lowest (Pivot Low) points within a specified period (default: 20 bars).
Trading Signals:
Long Signal: Triggered when the price breaks above a previous Pivot High, indicating a potential uptrend.
Short Signal: Triggered when the price breaks below a previous Pivot Low, indicating a potential downtrend.
How It Works
Detects Pivot High (PH) and Pivot Low (PL) over the specified period and records their price and time.
Triggers a long entry when the price breaks above a Pivot High and a short entry when it falls below a Pivot Low.
Sets exit conditions automatically based on predefined SL and TP percentages after entry.
Plots breakout points and levels on the chart for analysis.
Considerations
The strategy relies on accurate pivot point detection; adjust the period parameter based on market volatility.
In highly volatile markets, consider widening the stop loss to avoid frequent triggering.
Combine with other indicators or analysis methods to validate signals and avoid blind trading.
Multi-EMA Crossover StrategyMulti-EMA Crossover Strategy
This strategy uses multiple exponential moving average (EMA) crossovers to identify bullish trends and execute long trades. The approach involves progressively stronger signals as different EMA pairs cross, indicating increasing bullish momentum. Each crossover triggers a long entry, and the intensity of bullish sentiment is reflected in the color of the bars on the chart. Conversely, bearish trends are represented by red bars.
Strategy Logic:
First Long Entry: When the 1-day EMA crosses above the 5-day EMA, it signals initial bullish momentum.
Second Long Entry: When the 3-day EMA crosses above the 10-day EMA, it confirms stronger bullish sentiment.
Third Long Entry: When the 5-day EMA crosses above the 20-day EMA, it indicates further trend strength.
Fourth Long Entry: When the 10-day EMA crosses above the 40-day EMA, it suggests robust long-term bullish momentum.
The bar colors reflect these conditions:
More blue bars indicate stronger bullish sentiment as more short-term EMAs are above their longer-term counterparts.
Red bars represent bearish conditions when short-term EMAs are below longer-term ones.
Example: Bitcoin Trading on a Daily Timeframe
Bullish Scenario:
Imagine Bitcoin is trading at $30,000 on March 31, 2025:
First Signal: The 1-day EMA crosses above the 5-day EMA at $30,000. This suggests initial upward momentum, prompting a small long entry.
Second Signal: A few days later, the 3-day EMA crosses above the 10-day EMA at $31,000. This confirms strengthening bullish sentiment; another long position is added.
Third Signal: The 5-day EMA crosses above the 20-day EMA at $32,500, indicating further upward trend development; a third long entry is executed.
Fourth Signal: Finally, the 10-day EMA crosses above the 40-day EMA at $34,000. This signals robust long-term bullish momentum; a fourth long position is entered.
Bearish Scenario:
Suppose Bitcoin reverses from $34,000 to $28,000:
The 1-day EMA crosses below the 5-day EMA at $33,500.
The 3-day EMA dips below the 10-day EMA at $32,000.
The 5-day EMA falls below the 20-day EMA at $30,000.
The final bearish signal occurs when the 10-day EMA drops below the 40-day EMA at $28,000.
The bars turn increasingly red as bearish conditions strengthen.
Advantages of This Strategy:
Progressive Confirmation: Multiple crossovers provide layered confirmation of trend strength.
Visual Feedback: Bar colors help traders quickly assess market sentiment and adjust positions accordingly.
Flexibility: Suitable for trending markets like Bitcoin during strong rallies or downturns.
Limitations:
Lagging Signals: EMAs are lagging indicators and may react slowly to sudden price changes.
False Breakouts: Crossovers in choppy markets can lead to whipsaws or false signals.
This strategy works best in trending markets and should be combined with additional risk management techniques, e.g., stop loss or optimal position sizes (Kelly Criterion).
02 SMC + BB Breakout (Improved)This strategy combines Smart Money Concepts (SMC) with Bollinger Band breakouts to identify potential trading opportunities. SMC focuses on identifying key price levels and market structure shifts, while Bollinger Bands help pinpoint overbought/oversold conditions and potential breakout points. The strategy also incorporates higher timeframe trend confirmation to filter out trades that go against the prevailing trend.
Key Components:
Bollinger Bands:
Calculated using a Simple Moving Average (SMA) of the closing price and a standard deviation multiplier.
The strategy uses the upper and lower bands to identify potential breakout points.
The SMA (basis) acts as a centerline and potential support/resistance level.
The fill between the upper and lower bands can be toggled by the user.
Higher Timeframe Trend Confirmation:
The strategy allows for optional confirmation of the current trend using a higher timeframe (e.g., daily).
It calculates the SMA of the higher timeframe's closing prices.
A bullish trend is confirmed if the higher timeframe's closing price is above its SMA.
This helps filter out trades that go against the prevailing long-term trend.
Smart Money Concepts (SMC):
Order Blocks:
Simplified as recent price clusters, identified by the highest high and lowest low over a specified lookback period.
These levels are considered potential areas of support or resistance.
Liquidity Zones (Swing Highs/Lows):
Identified by recent swing highs and lows, indicating areas where liquidity may be present.
The Swing highs and lows are calculated based on user defined lookback periods.
Market Structure Shift (MSS):
Identifies potential changes in market structure.
A bullish MSS occurs when the closing price breaks above a previous swing high.
A bearish MSS occurs when the closing price breaks below a previous swing low.
The swing high and low values used for the MSS are calculated based on the user defined swing length.
Entry Conditions:
Long Entry:
The closing price crosses above the upper Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bullish.
A bullish MSS must have occurred.
Short Entry:
The closing price crosses below the lower Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bearish.
A bearish MSS must have occurred.
Exit Conditions:
Long Exit:
The closing price crosses below the Bollinger Band basis.
Or the Closing price falls below 99% of the order block low.
Short Exit:
The closing price crosses above the Bollinger Band basis.
Or the closing price rises above 101% of the order block high.
Position Sizing:
The strategy calculates the position size based on a fixed percentage (5%) of the strategy's equity.
This helps manage risk by limiting the potential loss per trade.
Visualizations:
Bollinger Bands (upper, lower, and basis) are plotted on the chart.
SMC elements (order blocks, swing highs/lows) are plotted as lines, with user-adjustable visibility.
Entry and exit signals are plotted as shapes on the chart.
The Bollinger band fill opacity is adjustable by the user.
Trading Logic:
The strategy aims to capitalize on Bollinger Band breakouts that are confirmed by SMC signals and higher timeframe trend. It looks for breakouts that align with potential market structure shifts and key price levels (order blocks, swing highs/lows). The higher timeframe filter helps avoid trades that go against the overall trend.
In essence, the strategy attempts to identify high-probability breakout trades by combining momentum (Bollinger Bands) with structural analysis (SMC) and trend confirmation.
Key User-Adjustable Parameters:
Bollinger Bands Length
Standard Deviation Multiplier
Higher Timeframe
Higher Timeframe Confirmation (on/off)
SMC Elements Visibility (on/off)
Order block lookback length.
Swing lookback length.
Bollinger band fill opacity.
This detailed description should provide a comprehensive understanding of the strategy's logic and components.
***DISCLAIMER: This strategy is for educational purposes only. It is not financial advice. Past performance is not indicative of future results. Use at your own risk. Always perform thorough backtesting and forward testing before using any strategy in live trading.***
EMA 10/55/200 - LONG ONLY MTF (4h with 1D & 1W confirmation)Title: EMA 10/55/200 - Long Only Multi-Timeframe Strategy (4h with 1D & 1W confirmation)
Description:
This strategy is designed for trend-following long entries using a combination of exponential moving averages (EMAs) on the 4-hour chart, confirmed by higher timeframe trends from the daily (1D) and weekly (1W) charts.
🔍 How It Works
🔹 Entry Conditions (4h chart):
EMA 10 crosses above EMA 55 and price is above EMA 55
OR
EMA 55 crosses above EMA 200
OR
EMA 10 crosses above EMA 500
These entries indicate short-term momentum aligning with medium/long-term trend strength.
🔹 Confirmation (multi-timeframe alignment):
Daily (1D): EMA 55 is above EMA 200
Weekly (1W): EMA 55 is above EMA 200
This ensures that we only enter long trades when the higher timeframes support an uptrend, reducing false signals during sideways or bearish markets.
🛑 Exit Conditions
Bearish crossover of EMA 10 below EMA 200 or EMA 500
Stop Loss: 5% below entry price
⚙️ Backtest Settings
Capital allocation per trade: 10% of equity
Commission: 0.1%
Slippage: 2 ticks
These are realistic conditions for crypto, forex, and stocks.
📈 Best Used On
Timeframe: 4h
Instruments: Trending markets like BTC/ETH, FX majors, or growth stocks
Works best in volatile or trending environments
⚠️ Disclaimer
This is a backtest tool and educational resource. Always validate on demo accounts before applying to real capital. Do your own due diligence.
Buy on 5% dip strategy with time adjustment
This script is a strategy called "Buy on 5% Dip Strategy with Time Adjustment 📉💡," which detects a 5% drop in price and triggers a buy signal 🔔. It also automatically closes the position once the set profit target is reached 💰, and it has additional logic to close the position if the loss exceeds 14% after holding for 230 days ⏳.
Strategy Explanation
Buy Condition: A buy signal is triggered when the price drops 5% from the highest price reached 🔻.
Take Profit: The position is closed when the price hits a 1.22x target from the average entry price 📈.
Forced Sell Condition: If the position is held for more than 230 days and the loss exceeds 14%, the position is automatically closed 🚫.
Leverage & Capital Allocation: Leverage is adjustable ⚖️, and you can set the percentage of capital allocated to each trade 💸.
Time Limits: The strategy allows you to set a start and end time ⏰ for trading, making the strategy active only within that specific period.
Code Credits and References
Credits: This script utilizes ideas and code from @QuantNomad and jangdokang for the profit table and algorithm concepts 🔧.
Sources:
Monthly Performance Table Script by QuantNomad:
ZenAndTheArtOfTrading's Script:
Strategy Performance
This strategy provides risk management through take profit and forced sell conditions and includes a performance table 📊 to track monthly and yearly results. You can compare backtest results with real-time performance to evaluate the strategy's effectiveness.
The performance numbers shown in the backtest reflect what would have happened if you had used this strategy since the launch date of the SOXL (the Direxion Daily Semiconductor Bull 3x Shares ETF) 📅. These results are not hypothetical but based on actual performance from the day of the ETF’s launch 📈.
Caution ⚠️
No Guarantee of Future Results: The results are based on historical performance from the launch of the SOXL ETF, but past performance does not guarantee future results. It’s important to approach with caution when applying it to live trading 🔍.
Risk Management: Leverage and capital allocation settings are crucial for managing risk ⚠️. Make sure to adjust these according to your risk tolerance ⚖️.