Seçmeli İndikatör Stratejisi
It is a strategy formed with different indicators.
You can determine take profit and stop.
You can use it as a template and create your own strategies.
You can change the values of the indicators from the settings section.
Strategy
Money Printer V3 – BTC 15M EMA Crossover Strategy🚀 Overview
Money Printer V3 is a trend-following strategy built for crypto markets. It uses fast EMA crossovers with RSI filtering, optional MACD and volume confirmation, and ATR-based trailing stops to capture high-probability momentum trades. This version is optimized for 15-minute timeframes with responsive parameters to increase trade frequency and signal clarity.
📈 How It Works
Buy Conditions:
Fast EMA crosses above Slow EMA
RSI > 40 (customizable)
Optional: MACD histogram > 0
Optional: Volume above 1.5x 20-period average
Sell Conditions:
Opposite of the buy conditions
Risk Management:
Stop-loss and trailing stop are dynamically set using ATR
Position size based on account equity and ATR distance (2% risk per trade)
⚙️ Default Settings
Fast EMA: 5
Slow EMA: 20
RSI Threshold: 40
MACD Filter: OFF
Volume Filter: ON
ATR SL Multiplier: 2.5
ATR Trailing Multiplier: 3.5
Risk: 2% of equity per trade
Initial Capital: $5,000
Commission: 0.1%
Slippage: 0.5%
📊 Backtest Notes
Tested on BTC/USD 15-minute timeframe from 2018 to 2024
Produces 100+ trades for statistically relevant sample size
Strategy is not predictive — it reacts to confirmed trends with filters to reduce false signals
Past performance does not guarantee future results
📌 How to Use
Add this strategy to your BTC/USD 15M chart
Customize the input parameters to match your trading style
Enable alerts for buy/sell conditions
Always forward test before using with real funds
⚠️ Disclaimer
This script is for educational and research purposes only. Use at your own risk. Markets are unpredictable, and no strategy can guarantee profits. Always use proper risk management.
Statistical Arbitrage Pairs Trading - Long-Side OnlyThis strategy implements a simplified statistical arbitrage (" stat arb ") approach focused on mean reversion between two correlated instruments. It identifies opportunities where the spread between their normalized price series (Z-scores) deviates significantly from historical norms, then executes long-only trades anticipating reversion to the mean.
Key Mechanics:
1. Spread Calculation: The strategy computes Z-scores for both instruments to normalize price movements, then tracks the spread between these Z-scores.
2. Modified Z-Score: Uses a robust measure combining the median and Median Absolute Deviation (MAD) to reduce outlier sensitivity.
3. Entry Signal: A long position is triggered when the spread’s modified Z-score falls below a user-defined threshold (e.g., -1.0), indicating extreme undervaluation of the main instrument relative to its pair.
4. Exit Signal: The position closes automatically when the spread reverts to its historical mean (Z-score ≥ 0).
Risk management:
Trades are sized as a percentage of equity (default: 10%).
Includes commissions and slippage for realistic backtesting.
Momentum Strategy with Selectable PositionsThis strategy is written based on momentum 5 and 10. If both momentums are positive, it takes a long position and when both momentums are negative, it takes a short position.
Dow Theory Trend Strategy v3Title: Dow Theory Trend Strategy
Description:
This Pine Script implements a trading strategy based on classic Dow Theory principles for trend identification. It analyzes pivot highs and lows to determine uptrends (Higher Highs & Higher Lows) and downtrends (Lower Highs & Lower Lows), entering trades when the trend direction is confirmed to change.
This version (v3) includes several key features and improvements:
Core Dow Theory Logic: Identifies trends based on confirmed sequences of pivot points detected using ta.pivothigh() and ta.pivotlow().
Improved Trend Persistence: The script confirms an uptrend only on both a Higher High (HH) and Higher Low (HL), and a downtrend on both a Lower High (LH) and Lower Low (LL). Crucially, if neither condition is met, the script maintains the previous trend state (trendDirection ), leading to smoother trend following compared to logic that frequently resets to neutral.
Manual Trend Override: A user input allows you to override the automatic Dow Theory trend detection. You can set the strategy to:
Auto: Follow the calculated Dow Theory trend signals.
Long Only: Only take long entry signals.
Short Only: Only take short entry signals.
Tick-Based Stop Loss & Take Profit: Optional Stop Loss (SL) and Take Profit (TP) levels can be enabled. These are set in Ticks from the entry price using strategy.exit().
Important: You must understand what a 'tick' (syminfo.mintick) represents for the specific instrument you are trading when setting the stopLossTicks and takeProfitTicks inputs (e.g., for EURUSD with mintick=0.00001, a 20 pip SL = 200 ticks).
Clear Visualizations:
Background color changes to reflect the detected Dow Theory trend (Blue for Up, Red for Down, Gray for Undetermined).
Optional markers for confirmed pivot points.
Optional labels indicating confirmed trend change signals (potential entry points).
Code Structure Note: This version defines the options for the "Manual Trend Mode" input directly inline within the input.string() function to potentially improve compatibility for users who experienced issues with copy-pasting previous versions that used a separate array definition.
How it Works:
Pivots are identified using the pivotLookback period (note the inherent lag).
The trend direction (trendDirection) is updated based on HH/HL or LH/LL confirmations, otherwise, it persists.
Strategy enters long on changedToUp (if allowed by mode) and short on changedToDown (if allowed by mode).
If enabled, strategy.exit places SL and TP orders based on the specified number of ticks immediately upon entry.
Inputs:
Calculation Settings:
pivotLookback: Controls pivot detection sensitivity and lag.
Display Settings:
Show Pivot Points: Toggle pivot markers.
Show Trend Change Signals: Toggle entry signal labels.
Strategy Settings:
Manual Trend Mode: Select "Auto", "Long Only", or "Short Only".
Risk Management:
Use Stop Loss: Enable/disable SL.
Stop Loss (Ticks): Set SL distance in ticks.
Use Take Profit: Enable/disable TP.
Take Profit (Ticks): Set TP distance in ticks.
How to Use:
Add the script to your TradingView chart.
Access the Settings panel for the script.
Configure the pivotLookback appropriate for your timeframe and instrument.
Choose your desired Manual Trend Mode.
Enable and configure the Stop Loss (Ticks) and Take Profit (Ticks) carefully, based on the instrument's tick size and your risk management plan.
Use the Strategy Tester tab to backtest performance on historical data.
Disclaimer:
This script is provided for educational and informational purposes only. Trading strategies based on Dow Theory involve inherent lag. Past performance is not indicative of future results. Financial markets involve risk, and you should not trade with capital you cannot afford to lose. Always conduct thorough backtesting and implement robust risk management practices before considering any live trading. This script does not constitute financial advice.
Dow Theory Trend StrategyDow Theory Trend Strategy (Pine Script)
Overview
This Pine Script implements a trading strategy based on the core principles of Dow Theory. It visually identifies trends (uptrend, downtrend) by analyzing pivot highs and lows and executes trades when the trend direction changes. This script is an improved version that features refined trend determination logic and strategy implementation.
Core Concept: Dow Theory
The script uses a fundamental Dow Theory concept for trend identification:
Uptrend: Characterized by a series of Higher Highs (HH) and Higher Lows (HL).
Downtrend: Characterized by a series of Lower Highs (LH) and Lower Lows (LL).
How it Works
Pivot Point Detection:
It uses the built-in ta.pivothigh() and ta.pivotlow() functions to identify significant swing points (potential highs and lows) in the price action.
The pivotLookback input determines the number of bars to the left and right required to confirm a pivot. Note that this introduces a natural lag (equal to pivotLookback bars) before a pivot is confirmed.
Improved Trend Determination:
The script stores the last two confirmed pivot highs and the last two confirmed pivot lows.
An Uptrend (trendDirection = 1) is confirmed only when the latest pivot high is higher than the previous one (HH) AND the latest pivot low is higher than the previous one (HL).
A Downtrend (trendDirection = -1) is confirmed only when the latest pivot high is lower than the previous one (LH) AND the latest pivot low is lower than the previous one (LL).
Key Improvement: If neither a clear uptrend nor a clear downtrend is confirmed based on the latest pivots, the script maintains the previous trend state (trendDirection := trendDirection ). This differs from simpler implementations that might switch to a neutral/range state (e.g., trendDirection = 0) more frequently. This approach aims for smoother trend following, acknowledging that trends often persist through periods without immediate new HH/HL or LH/LL confirmations.
Trend Change Detection:
The script monitors changes in the trendDirection variable.
changedToUp becomes true when the trend shifts to an Uptrend (from Downtrend or initial state).
changedToDown becomes true when the trend shifts to a Downtrend (from Uptrend or initial state).
Visualizations
Background Color: The chart background is colored to reflect the currently identified trend:
Blue: Uptrend (trendDirection == 1)
Red: Downtrend (trendDirection == -1)
Gray: Initial state or undetermined (trendDirection == 0)
Pivot Points (Optional): Small triangles (shape.triangledown/shape.triangleup) can be displayed above pivot highs and below pivot lows if showPivotPoints is enabled.
Trend Change Signals (Optional): Labels ("▲ UP" / "▼ DOWN") can be displayed when a trend change is confirmed (changedToUp / changedToDown) if showTrendChange is enabled. These visually mark the potential entry points for the strategy.
Strategy Logic
Entry Conditions:
Enters a long position (strategy.long) using strategy.entry("L", ...) when changedToUp becomes true.
Enters a short position (strategy.short) using strategy.entry("S", ...) when changedToDown becomes true.
Position Management: The script uses strategy.entry(), which automatically handles position reversal. If the strategy is long and a short signal occurs, strategy.entry() will close the long position and open a new short one (and vice-versa).
Inputs
pivotLookback: The number of bars on each side to confirm a pivot high/low. Higher values mean pivots are confirmed later but may be more significant.
showPivotPoints: Toggle visibility of pivot point markers.
showTrendChange: Toggle visibility of the trend change labels ("▲ UP" / "▼ DOWN").
Key Improvements from Original
Smoother Trend Logic: The trend state persists unless a confirmed reversal pattern (opposite HH/HL or LH/LL) occurs, reducing potential whipsaws in choppy markets compared to logic that frequently resets to neutral.
Strategy Implementation: Converted from a pure indicator to a strategy capable of executing backtests and potentially live trades based on the Dow Theory trend changes.
Disclaimer
Dow Theory signals are inherently lagging due to the nature of pivot confirmation.
The effectiveness of the strategy depends heavily on the market conditions and the chosen pivotLookback setting.
This script serves as a basic template. Always perform thorough backtesting and implement proper risk management (e.g., stop-loss, take-profit, position sizing) before considering any live trading.
Configurable MA Cross (MA-X) StrategyThis is a simple crossover strategy with configurable moving averages for entry and exits. You can also select the type of moving average you want to use. Support moving averages are SMA, EMA, WMA and HMA.
Why?
Trend following using crossovers is a very common strategy though people use different combinations of moving averages and types. I was also experimenting the same and decided to create this instead of changing the code every time I wanted to try a different period or moving averages.
With a right combination, you can make this work for nearly any sufficiently liquid instrument. The default combination of 21 (Fast) and 55 (Slow) EMA along with 34 EMA for exit works well on COINBASE:BTCUSD (4H/1D) and NSE:NIFTY (1D) though it needs to be tested more. TBH I haven't tried it on any other instrument so far but that's easy to do with simple and flexible options.
Enjoy!
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.
VIDYA Auto-Trading(Reversal Logic)Overview
This script is a dynamic trend-following strategy based on the Variable Index Dynamic Average (VIDYA). It adapts in real time to market volatility, aiming to enhance entry precision and optimize risk management.
---
Strategy Objectives
The objective of this strategy is to respond swiftly to sudden price movements and trend reversals, providing consistent and reliable trade signals. It is designed to be intuitive and efficient for traders of all levels.
---
Key Features
- **Momentum Sensitivity via VIDYA**: Reacts quickly to momentum shifts, allowing for accurate trend-following entries.
- **Volatility-Based ATR Bands**: Automatically adjusts stop levels and entry conditions based on current market volatility.
- **Intuitive Trend Visualization**: Uptrends are marked with green zones, and downtrends with red zones, giving traders clear visual guidance.
---
Trading Rules
- **Long Entry**: Triggered when price crosses above the upper band. Any existing short position is closed.
- **Short Entry**: Triggered when price crosses below the lower band. Any existing long position is closed.
- **Exit Conditions**: Positions are reversed based on signal changes, using a position reversal strategy.
---
Risk Management Parameters
- ETHUSD
- Account Size: $7,000
- Commission: 1 pips per round-trip trade
- Slippage: 1 pip
- Risk per Trade: 10% of account equity (adjustable)
- Number of trades: 262
---
### Trading Parameters & Considerations
- **VIDYA Length**: Defines the trend calculation period (e.g., 14)
- **Momentum Period**: Used for Chande Momentum Oscillator (CMO) calculation
- **ATR Band Distance**: Coefficient to adjust band width (e.g., 1.5)
- **Price Source**: Select from close, open, high, or low
- **Trend Colors**: Customizable colors for uptrend and downtrend zones
- **Display Options**: Toggle visibility of trend lines, bands, and other visuals
---
### Visual Support
Trend zones, entry points, and directional shifts are clearly plotted on the chart. These visual cues enhance the analytical experience and support faster decision-making.
---
### Strategy Improvements & Uniqueness
Inspired by the public work of BigBeluga, this script evolves the original concept with meaningful enhancements. By combining VIDYA and ATR bands, it offers greater adaptability and practical value compared to conventional trend-following strategies.
---
### Summary
This strategy offers a responsive and adaptive approach to trend trading, built on momentum detection and volatility-adjusted risk management. It balances clarity, precision, and practicality—making it a powerful tool for traders seeking reliable trend signals.
Rally Base Drop SND Pivots Strategy [LuxAlgo X PineIndicators]This strategy is based on the Rally Base Drop (RBD) SND Pivots indicator developed by LuxAlgo. Full credit for the concept and original indicator goes to LuxAlgo.
The Rally Base Drop SND Pivots Strategy is a non-repainting supply and demand trading system that detects pivot points based on Rally, Base, and Drop (RBD) candles. This strategy automatically identifies key market structure levels, allowing traders to:
Identify pivot-based supply and demand (SND) zones.
Use fixed criteria for trend continuation or reversals.
Filter out market noise by requiring structured price formations.
Enter trades based on breakouts of key SND pivot levels.
How the Rally Base Drop SND Pivots Strategy Works
1. Pivot Point Detection Using RBD Candles
The strategy follows a rigid market structure methodology, where pivots are detected only when:
A Rally (R) consists of multiple consecutive bullish candles.
A Drop (D) consists of multiple consecutive bearish candles.
A Base (B) is identified as a transition between Rallies and Drops, acting as a pivot point.
The pivot level is confirmed when the formation is complete.
Unlike traditional fractal-based pivots, RBD Pivots enforce stricter structural rules, ensuring that each pivot:
Has a well-defined bullish or bearish price movement.
Reduces false signals caused by single-bar fluctuations.
Provides clear supply and demand levels based on structured price movements.
These pivot levels are drawn on the chart using color-coded boxes:
Green zones represent bullish pivot levels (Rally Base formations).
Red zones represent bearish pivot levels (Drop Base formations).
Once a pivot is confirmed, the high or low of the base candle is used as the reference level for future trades.
2. Trade Entry Conditions
The strategy allows traders to select from three trading modes:
Long Only – Only takes long trades when bullish pivot breakouts occur.
Short Only – Only takes short trades when bearish pivot breakouts occur.
Long & Short – Trades in both directions based on pivot breakouts.
Trade entry signals are triggered when price breaks through a confirmed pivot level:
Long Entry:
A bullish pivot level is formed.
Price breaks above the bullish pivot level.
The strategy enters a long position.
Short Entry:
A bearish pivot level is formed.
Price breaks below the bearish pivot level.
The strategy enters a short position.
The strategy includes an optional mode to reverse long and short conditions, allowing traders to experiment with contrarian entries.
3. Exit Conditions Using ATR-Based Risk Management
This strategy uses the Average True Range (ATR) to calculate dynamic stop-loss and take-profit levels:
Stop-Loss (SL): Placed 1 ATR below entry for long trades and 1 ATR above entry for short trades.
Take-Profit (TP): Set using a Risk-Reward Ratio (RR) multiplier (default = 6x ATR).
When a trade is opened:
The entry price is recorded.
ATR is calculated at the time of entry to determine stop-loss and take-profit levels.
Trades exit automatically when either SL or TP is reached.
If reverse conditions mode is enabled, stop-loss and take-profit placements are flipped.
Visualization & Dynamic Support/Resistance Levels
1. Pivot Boxes for Market Structure
Each pivot is marked with a colored box:
Green boxes indicate bullish demand zones.
Red boxes indicate bearish supply zones.
These boxes remain on the chart to act as dynamic support and resistance levels, helping traders identify key price reaction zones.
2. Horizontal Entry, Stop-Loss, and Take-Profit Lines
When a trade is active, the strategy plots:
White line → Entry price.
Red line → Stop-loss level.
Green line → Take-profit level.
Labels display the exact entry, SL, and TP values, updating dynamically as price moves.
Customization Options
This strategy offers multiple adjustable settings to optimize performance for different market conditions:
Trade Mode Selection → Choose between Long Only, Short Only, or Long & Short.
Pivot Length → Defines the number of required Rally & Drop candles for a pivot.
ATR Exit Multiplier → Adjusts stop-loss distance based on ATR.
Risk-Reward Ratio (RR) → Modifies take-profit level relative to risk.
Historical Lookback → Limits how far back pivot zones are displayed.
Color Settings → Customize pivot box colors for bullish and bearish setups.
Considerations & Limitations
Pivot Breakouts Do Not Guarantee Reversals. Some pivot breaks may lead to continuation moves instead of trend reversals.
Not Optimized for Low Volatility Conditions. This strategy works best in trending markets with strong momentum.
ATR-Based Stop-Loss & Take-Profit May Require Optimization. Different assets may require different ATR multipliers and RR settings.
Market Noise May Still Influence Pivots. While this method filters some noise, fake breakouts can still occur.
Conclusion
The Rally Base Drop SND Pivots Strategy is a non-repainting supply and demand system that combines:
Pivot-based market structure analysis (using Rally, Base, and Drop candles).
Breakout-based trade entries at confirmed SND levels.
ATR-based dynamic risk management for stop-loss and take-profit calculation.
This strategy helps traders:
Identify high-probability supply and demand levels.
Trade based on structured market pivots.
Use a systematic approach to price action analysis.
Automatically manage risk with ATR-based exits.
The strict pivot detection rules and built-in breakout validation make this strategy ideal for traders looking to:
Trade based on market structure.
Use defined support & resistance levels.
Reduce noise compared to traditional fractals.
Implement a structured supply & demand trading model.
This strategy is fully customizable, allowing traders to adjust parameters to fit their market and trading style.
Full credit for the original concept and indicator goes to LuxAlgo.
Liquidity Sweep Filter Strategy [AlgoAlpha X PineIndicators]This strategy is based on the Liquidity Sweep Filter developed by AlgoAlpha. Full credit for the concept and original indicator goes to AlgoAlpha.
The Liquidity Sweep Filter Strategy is a non-repainting trading system designed to identify liquidity sweeps, trend shifts, and high-impact price levels. It incorporates volume-based liquidation analysis, trend confirmation, and dynamic support/resistance detection to optimize trade entries and exits.
This strategy helps traders:
Detect liquidity sweeps where major market participants trigger stop losses and liquidations.
Identify trend shifts using a volatility-based moving average system.
Analyze volume distribution with a built-in volume profile visualization.
Filter noise by differentiating between major and minor liquidity sweeps.
How the Liquidity Sweep Filter Strategy Works
1. Trend Detection Using Volatility-Based Filtering
The strategy applies a volatility-adjusted moving average system to determine trend direction:
A central trend line is calculated using an EMA smoothed over a user-defined length.
Upper and lower deviation bands are created based on the average price deviation over multiple periods.
If price closes above the upper band, the strategy signals an uptrend.
If price closes below the lower band, the strategy signals a downtrend.
This approach ensures that trend shifts are confirmed only when price significantly moves beyond normal market fluctuations.
2. Liquidity Sweep Detection
Liquidity sweeps occur when price temporarily breaks key levels, triggering stop-loss liquidations or margin call events. The strategy tracks swing highs and lows, marking potential liquidity grabs:
Bearish Liquidity Sweeps – Price breaks a recent high, then reverses downward.
Bullish Liquidity Sweeps – Price breaks a recent low, then reverses upward.
Volume Integration – The strategy analyzes trading volume at each sweep to differentiate between major and minor sweeps.
Key levels where liquidity sweeps occur are plotted as color-coded horizontal lines:
Red lines indicate bearish liquidity sweeps.
Green lines indicate bullish liquidity sweeps.
Labels are displayed at each sweep, showing the volume of liquidated positions at that level.
3. Volume Profile Analysis
The strategy includes an optional volume profile visualization, displaying how trading volume is distributed across different price levels.
Features of the volume profile:
Point of Control (POC) – The price level with the highest traded volume is marked as a key area of interest.
Bounding Box – The profile is enclosed within a transparent box, helping traders visualize the price range of high trading activity.
Customizable Resolution & Scale – Traders can adjust the granularity of the profile to match their preferred time frame.
The volume profile helps identify zones of strong support and resistance, making it easier to anticipate price reactions at key levels.
Trade Entry & Exit Conditions
The strategy allows traders to configure trade direction:
Long Only – Only takes long trades.
Short Only – Only takes short trades.
Long & Short – Trades in both directions.
Entry Conditions
Long Entry:
A bullish trend shift is confirmed.
A bullish liquidity sweep occurs (price sweeps below a key level and reverses).
The trade direction setting allows long trades.
Short Entry:
A bearish trend shift is confirmed.
A bearish liquidity sweep occurs (price sweeps above a key level and reverses).
The trade direction setting allows short trades.
Exit Conditions
Closing a Long Position:
A bearish trend shift occurs.
The position is liquidated at a predefined liquidity sweep level.
Closing a Short Position:
A bullish trend shift occurs.
The position is liquidated at a predefined liquidity sweep level.
Customization Options
The strategy offers multiple adjustable settings:
Trade Mode: Choose between Long Only, Short Only, or Long & Short.
Trend Calculation Length & Multiplier: Adjust how trend signals are calculated.
Liquidity Sweep Sensitivity: Customize how aggressively the strategy identifies sweeps.
Volume Profile Display: Enable or disable the volume profile visualization.
Bounding Box & Scaling: Control the size and position of the volume profile.
Color Customization: Adjust colors for bullish and bearish signals.
Considerations & Limitations
Liquidity sweeps do not always result in reversals. Some price sweeps may continue in the same direction.
Works best in volatile markets. In low-volatility environments, liquidity sweeps may be less reliable.
Trend confirmation adds a slight delay. The strategy ensures valid signals, but this may result in slightly later entries.
Large volume imbalances may distort the volume profile. Adjusting the scale settings can help improve visualization.
Conclusion
The Liquidity Sweep Filter Strategy is a volume-integrated trading system that combines liquidity sweeps, trend analysis, and volume profile data to optimize trade execution.
By identifying key price levels where liquidations occur, this strategy provides valuable insight into market behavior, helping traders make better-informed trading decisions.
Key use cases for this strategy:
Liquidity-Based Trading – Capturing moves triggered by stop hunts and liquidations.
Volume Analysis – Using volume profile data to confirm high-activity price zones.
Trend Following – Entering trades based on confirmed trend shifts.
Support & Resistance Trading – Using liquidity sweep levels as dynamic price zones.
This strategy is fully customizable, allowing traders to adapt it to different market conditions, timeframes, and risk preferences.
Full credit for the original concept and indicator goes to AlgoAlpha.
Market Trend Levels Non-Repainting [BigBeluga X PineIndicators]This strategy is based on the Market Trend Levels Detector developed by BigBeluga. Full credit for the concept and original indicator goes to BigBeluga.
The Market Trend Levels Detector Strategy is a non-repainting trend-following strategy that identifies market trend shifts using two Exponential Moving Averages (EMA). It also detects key price levels and allows traders to apply multiple filters to refine trade entries and exits.
This strategy is designed for trend trading and enables traders to:
Identify trend direction based on EMA crossovers.
Detect significant market levels using labeled trend lines.
Use multiple filter conditions to improve trade accuracy.
Avoid false signals through non-repainting calculations.
How the Market Trend Levels Detector Strategy Works
1. Core Trend Detection Using EMA Crossovers
The strategy detects trend shifts using two EMAs:
Fast EMA (default: 12 periods) – Reacts quickly to price movements.
Slow EMA (default: 25 periods) – Provides a smoother trend confirmation.
A bullish crossover (Fast EMA crosses above Slow EMA) signals an uptrend , while a bearish crossover (Fast EMA crosses below Slow EMA) signals a downtrend .
2. Market Level Detection & Visualization
Each time an EMA crossover occurs, a trend level line is drawn:
Bullish crossover → A green line is drawn at the low of the crossover candle.
Bearish crossover → A purple line is drawn at the high of the crossover candle.
Lines can be extended to act as support and resistance zones for future price action.
Additionally, a small label (●) appears at each crossover to mark the event on the chart.
3. Trade Entry & Exit Conditions
The strategy allows users to choose between three trading modes:
Long Only – Only enters long trades.
Short Only – Only enters short trades.
Long & Short – Trades in both directions.
Entry Conditions
Long Entry:
A bullish EMA crossover occurs.
The trade direction setting allows long trades.
Filter conditions (if enabled) confirm a valid long signal.
Short Entry:
A bearish EMA crossover occurs.
The trade direction setting allows short trades.
Filter conditions (if enabled) confirm a valid short signal.
Exit Conditions
Long Exit:
A bearish EMA crossover occurs.
Exit filters (if enabled) indicate an invalid long position.
Short Exit:
A bullish EMA crossover occurs.
Exit filters (if enabled) indicate an invalid short position.
Additional Trade Filters
To improve trade accuracy, the strategy allows traders to apply up to 7 additional filters:
RSI Filter: Only trades when RSI confirms a valid trend.
MACD Filter: Ensures MACD histogram supports the trade direction.
Stochastic Filter: Requires %K line to be above/below threshold values.
Bollinger Bands Filter: Confirms price position relative to the middle BB line.
ADX Filter: Ensures the trend strength is above a set threshold.
CCI Filter: Requires CCI to indicate momentum in the right direction.
Williams %R Filter: Ensures price momentum supports the trade.
Filters can be enabled or disabled individually based on trader preference.
Dynamic Level Extension Feature
The strategy provides an optional feature to extend trend lines until price interacts with them again:
Bullish support lines extend until price revisits them.
Bearish resistance lines extend until price revisits them.
If price breaks a line, the line turns into a dotted style , indicating it has been breached.
This helps traders identify key levels where trend shifts previously occurred, providing useful support and resistance insights.
Customization Options
The strategy includes several adjustable settings :
Trade Direction: Choose between Long Only, Short Only, or Long & Short.
Trend Lengths: Adjust the Fast & Slow EMA lengths.
Market Level Extension: Decide whether to extend support/resistance lines.
Filters for Trade Confirmation: Enable/disable individual filters.
Color Settings: Customize line colors for bullish and bearish trend shifts.
Maximum Displayed Lines: Limit the number of drawn support/resistance lines.
Considerations & Limitations
Trend Lag: As with any EMA-based strategy, signals may be slightly delayed compared to price action.
Sideways Markets: This strategy works best in trending conditions; frequent crossovers in sideways markets can produce false signals.
Filter Usage: Enabling multiple filters may reduce trade frequency, but can also improve trade quality.
Line Overlap: If many crossovers occur in a short period, the chart may become cluttered with multiple trend levels. Adjusting the "Display Last" setting can help.
Conclusion
The Market Trend Levels Detector Strategy is a non-repainting trend-following system that combines EMA crossovers, market level detection, and customizable filters to improve trade accuracy.
By identifying trend shifts and key price levels, this strategy can be used for:
Trend Confirmation – Using EMA crossovers and filters to confirm trend direction.
Support & Resistance Trading – Identifying dynamic levels where price reacts.
Momentum-Based Trading – Combining EMA crossovers with additional momentum filters.
This strategy is fully customizable and can be adapted to different trading styles, timeframes, and market conditions.
Full credit for the original concept and indicator goes to BigBeluga.
Gradient Trend Filter STRATEGY [ChartPrime/PineIndicators]This strategy is based on the Gradient Trend Filter indicator developed by ChartPrime. Full credit for the concept and indicator goes to ChartPrime.
The Gradient Trend Filter Strategy is designed to execute trades based on the trend analysis and filtering system provided by the Gradient Trend Filter indicator. It integrates a noise-filtered trend detection system with a color-gradient visualization, helping traders identify trend strength, momentum shifts, and potential reversals.
How the Gradient Trend Filter Strategy Works
1. Noise Filtering for Smoother Trends
To reduce false signals caused by market noise, the strategy applies a three-stage smoothing function to the source price. This function ensures that trend shifts are detected more accurately, minimizing unnecessary trade entries and exits.
The filter is based on an Exponential Moving Average (EMA)-style smoothing technique.
It processes price data in three successive passes, refining the trend signal before generating trade entries.
This filtering technique helps eliminate minor fluctuations and highlights the true underlying trend.
2. Multi-Layered Trend Bands & Color-Based Trend Visualization
The Gradient Trend Filter constructs multiple trend bands around the filtered trend line, acting as dynamic support and resistance zones.
The mid-line changes color based on the trend direction:
Green for uptrends
Red for downtrends
A gradient cloud is formed around the trend line, dynamically shifting colors to provide early warning signals of trend reversals.
The outer bands function as potential support and resistance, helping traders determine stop-loss and take-profit zones.
Visualization elements used in this strategy:
Trend Filter Line → Changes color between green (bullish) and red (bearish).
Trend Cloud → Dynamically adjusts color based on trend strength.
Orange Markers → Appear when a trend shift is confirmed.
Trade Entry & Exit Conditions
This strategy automatically enters trades based on confirmed trend shifts detected by the Gradient Trend Filter.
1. Trade Entry Rules
Long Entry:
A bullish trend shift is detected (trend direction changes to green).
The filtered trend value crosses above zero, confirming upward momentum.
The strategy enters a long position.
Short Entry:
A bearish trend shift is detected (trend direction changes to red).
The filtered trend value crosses below zero, confirming downward momentum.
The strategy enters a short position.
2. Trade Exit Rules
Closing a Long Position:
If a bearish trend shift occurs, the strategy closes the long position.
Closing a Short Position:
If a bullish trend shift occurs, the strategy closes the short position.
The trend shift markers (orange diamonds) act as a confirmation signal, reinforcing the validity of trade entries and exits.
Customization Options
This strategy allows traders to adjust key parameters for flexibility in different market conditions:
Trade Direction: Choose between Long Only, Short Only, or Long & Short .
Trend Length: Modify the length of the smoothing function to adapt to different timeframes.
Line Width & Colors: Customize the visual appearance of trend lines and cloud colors.
Performance Table: Enable or disable the equity performance table that tracks historical trade results.
Performance Tracking & Reporting
A built-in performance table is included to monitor monthly and yearly trading performance.
The table calculates monthly percentage returns, displaying them in a structured format.
Color-coded values highlight profitable months (blue) and losing months (red).
Tracks yearly cumulative performance to assess long-term strategy effectiveness.
Traders can use this feature to evaluate historical performance trends and optimize their strategy settings accordingly.
How to Use This Strategy
Identify Trend Strength & Reversals:
Use the trend line and cloud color changes to assess trend strength and detect potential reversals.
Monitor Momentum Shifts:
Pay attention to gradient cloud color shifts, as they often appear before the trend line changes color.
This can indicate early momentum weakening or strengthening.
Act on Trend Shift Markers:
Use orange diamonds as confirmation signals for trend shifts and trade entry/exit points.
Utilize Cloud Bands as Support/Resistance:
The outer bands of the cloud serve as dynamic support and resistance, helping with stop-loss and take-profit placement.
Considerations & Limitations
Trend Lag: Since the strategy applies a smoothing function, entries may be slightly delayed compared to raw price action.
Volatile Market Conditions: In high-volatility markets, trend shifts may occur more frequently, leading to higher trade frequency.
Optimized for Trend Trading: This strategy is best suited for trending markets and may produce false signals in sideways (ranging) conditions.
Conclusion
The Gradient Trend Filter Strategy is a trend-following system based on the Gradient Trend Filter indicator by ChartPrime. It integrates noise filtering, trend visualization, and gradient-based color shifts to help traders identify strong market trends and potential reversals.
By combining trend filtering with a multi-layered cloud system, the strategy provides clear trade signals while minimizing noise. Traders can use this strategy for long-term trend trading, momentum shifts, and support/resistance-based decision-making.
This strategy is a fully automated system that allows traders to execute long, short, or both directions, with customizable settings to adapt to different market conditions.
Credit for the original concept and indicator goes to ChartPrime.
Simple APF Strategy Backtesting [The Quant Science]Simple backtesting strategy for the quantitative indicator Autocorrelation Price Forecasting. This is a Buy & Sell strategy that operates exclusively with long orders. It opens long positions and generates profit based on the future price forecast provided by the indicator. It's particularly suitable for trend-following trading strategies or directional markets with an established trend.
Main functions
1. Cycle Detection: Utilize autocorrelation to identify repetitive market behaviors and cycles.
2. Forecasting for Backtesting: Simulate trades and assess the profitability of various strategies based on future price predictions.
Logic
The strategy works as follow:
Entry Condition: Go long if the hypothetical gain exceeds the threshold gain (configurable by user interface).
Position Management: Sets a take-profit level based on the future price.
Position Sizing: Automatically calculates the order size as a percentage of the equity.
No Stop-Loss: this strategy doesn't includes any stop loss.
Example Use Case
A trader analyzes a dayli period using 7 historical bars for autocorrelation.
Sets a threshold gain of 20 points using a 5% of the equity for each trade.
Evaluates the effectiveness of a long-only strategy in this period to assess its profitability and risk-adjusted performance.
User Interface
Length: Set the length of the data used in the autocorrelation price forecasting model.
Thresold Gain: Minimum value to be considered for opening trades based on future price forecast.
Order Size: percentage size of the equity used for each single trade.
Strategy Limit
This strategy does not use a stop loss. If the price continues to drop and the future price forecast is incorrect, the trader may incur a loss or have their capital locked in the losing trade.
Disclaimer!
This is a simple template. Use the code as a starting point rather than a finished solution. The script does not include important parameters, so use it solely for educational purposes or as a boilerplate.
TEMA OBOS Strategy PakunTEMA OBOS Strategy
Overview
This strategy combines a trend-following approach using the Triple Exponential Moving Average (TEMA) with Overbought/Oversold (OBOS) indicator filtering.
By utilizing TEMA crossovers to determine trend direction and OBOS as a filter, it aims to improve entry precision.
This strategy can be applied to markets such as Forex, Stocks, and Crypto, and is particularly designed for mid-term timeframes (5-minute to 1-hour charts).
Strategy Objectives
Identify trend direction using TEMA
Use OBOS to filter out overbought/oversold conditions
Implement ATR-based dynamic risk management
Key Features
1. Trend Analysis Using TEMA
Uses crossover of short-term EMA (ema3) and long-term EMA (ema4) to determine entries.
ema4 acts as the primary trend filter.
2. Overbought/Oversold (OBOS) Filtering
Long Entry Condition: up > down (bullish trend confirmed)
Short Entry Condition: up < down (bearish trend confirmed)
Reduces unnecessary trades by filtering extreme market conditions.
3. ATR-Based Take Profit (TP) & Stop Loss (SL)
Adjustable ATR multiplier for TP/SL
Default settings:
TP = ATR × 5
SL = ATR × 2
Fully customizable risk parameters.
4. Customizable Parameters
TEMA Length (for trend calculation)
OBOS Length (for overbought/oversold detection)
Take Profit Multiplier
Stop Loss Multiplier
EMA Display (Enable/Disable TEMA lines)
Bar Color Change (Enable/Disable candle coloring)
Trading Rules
Long Entry (Buy Entry)
ema3 crosses above ema4 (Golden Cross)
OBOS indicator confirms up > down (bullish trend)
Execute a buy position
Short Entry (Sell Entry)
ema3 crosses below ema4 (Death Cross)
OBOS indicator confirms up < down (bearish trend)
Execute a sell position
Take Profit (TP)
Entry Price + (ATR × TP Multiplier) (Default: 5)
Stop Loss (SL)
Entry Price - (ATR × SL Multiplier) (Default: 2)
TP/SL settings are fully customizable to fine-tune risk management.
Risk Management Parameters
This strategy emphasizes proper position sizing and risk control to balance risk and return.
Trading Parameters & Considerations
Initial Account Balance: $7,000 (adjustable)
Base Currency: USD
Order Size: 10,000 USD
Pyramiding: 1
Trading Fees: $0.94 per trade
Long Position Margin: 50%
Short Position Margin: 50%
Total Trades (M5 Timeframe): 128
Deep Test Results (2024/11/01 - 2025/02/24)BTCUSD-5M
Total P&L:+1638.20USD
Max equity drawdown:694.78USD
Total trades:128
Profitable trades:44.53
Profit factor:1.45
These settings aim to protect capital while maintaining a balanced risk-reward approach.
Visual Support
TEMA Lines (Three EMAs)
Trend direction is indicated by color changes (Blue/Orange)
ema3 (short-term) and ema4 (long-term) crossover signals potential entries
OBOS Histogram
Green → Strong buying pressure
Red → Strong selling pressure
Blue → Possible trend reversal
Entry & Exit Markers
Blue Arrow → Long Entry Signal
Red Arrow → Short Entry Signal
Take Profit / Stop Loss levels displayed
Strategy Improvements & Uniqueness
This strategy is based on indicators developed by "l_lonthoff" and "jdmonto0", but has been significantly optimized for better entry accuracy, visual clarity, and risk management.
Enhanced Trend Identification with TEMA
Detects early trend reversals using ema3 & ema4 crossover
Reduces market noise for a smoother trend-following approach
Improved OBOS Filtering
Prevents excessive trading
Reduces unnecessary risk exposure
Dynamic Risk Management with ATR-Based TP/SL
Not a fixed value → TP/SL adjusts to market volatility
Fully customizable ATR multiplier settings
(Default: TP = ATR × 5, SL = ATR × 2)
Summary
The TEMA + OBOS Strategy is a simple yet powerful trading method that integrates trend analysis and oscillators.
TEMA for trend identification
OBOS for noise reduction & overbought/oversold filtering
ATR-based TP/SL settings for dynamic risk management
Before using this strategy, ensure thorough backtesting and demo trading to fine-tune parameters according to your trading style.
Non-Repainting Renko Emulation Strategy [PineIndicators]Introduction: The Repainting Problem in Renko Strategies
Renko charts are widely used in technical analysis for their ability to filter out market noise and emphasize price trends. Unlike traditional candlestick charts, which are based on fixed time intervals, Renko charts construct bricks only when price moves by a predefined amount. This makes them useful for trend identification while reducing small fluctuations.
However, Renko-based trading strategies often fail in live trading due to a fundamental issue: repainting .
Why Do Renko Strategies Repaint?
Most trading platforms, including TradingView, generate Renko charts retrospectively based on historical price data. This leads to the following issues:
Renko bricks can change or disappear when new data arrives.
Backtesting results do not reflect real market conditions. Strategies may appear highly profitable in backtests because historical data is recalculated with hindsight.
Live trading produces different results than backtesting. Traders cannot know in advance whether a new Renko brick will form until price moves far enough.
Objective of the Renko Emulator
This script simulates Renko behavior on a standard time-based chart without repainting. Instead of using TradingView’s built-in Renko charting, which recalculates past bricks, this approach ensures that once a Renko brick is formed, it remains unchanged .
Key benefits:
No past bricks are recalculated or removed.
Trading strategies can execute reliably without false signals.
Renko-based logic can be applied on a time-based chart.
How the Renko Emulator Works
1. Parameter Configuration & Initialization
The script defines key user inputs and variables:
brickSize : Defines the Renko brick size in price points, adjustable by the user.
renkoPrice : Stores the closing price of the last completed Renko brick.
prevRenkoPrice : Stores the price level of the previous Renko brick.
brickDir : Tracks the direction of Renko bricks (1 = up, -1 = down).
newBrick : A boolean flag that indicates whether a new Renko brick has been formed.
brickStart : Stores the bar index at which the current Renko brick started.
2. Identifying Renko Brick Formation Without Repainting
To ensure that the strategy does not repaint, Renko calculations are performed only on confirmed bars.
The script calculates the difference between the current price and the last Renko brick level.
If the absolute price difference meets or exceeds the brick size, a new Renko brick is formed.
The new Renko price level is updated based on the number of bricks that would fit within the price movement.
The direction (brickDir) is updated , and a flag ( newBrick ) is set to indicate that a new brick has been formed.
3. Visualizing Renko Bricks on a Time-Based Chart
Since TradingView does not support live Renko charts without repainting, the script uses graphical elements to draw Renko-style bricks on a standard chart.
Each time a new Renko brick forms, a colored rectangle (box) is drawn:
Green boxes → Represent bullish Renko bricks.
Red boxes → Represent bearish Renko bricks.
This allows traders to see Renko-like formations on a time-based chart, while ensuring that past bricks do not change.
Trading Strategy Implementation
Since the Renko emulator provides a stable price structure, it is possible to apply a consistent trading strategy that would otherwise fail on a traditional Renko chart.
1. Entry Conditions
A long trade is entered when:
The previous Renko brick was bearish .
The new Renko brick confirms an upward trend .
There is no existing long position .
A short trade is entered when:
The previous Renko brick was bullish .
The new Renko brick confirms a downward trend .
There is no existing short position .
2. Exit Conditions
Trades are closed when a trend reversal is detected:
Long trades are closed when a new bearish brick forms.
Short trades are closed when a new bullish brick forms.
Key Characteristics of This Approach
1. No Historical Recalculation
Once a Renko brick forms, it remains fixed and does not change.
Past price action does not shift based on future data.
2. Trading Strategies Operate Consistently
Since the Renko structure is stable, strategies can execute without unexpected changes in signals.
Live trading results align more closely with backtesting performance.
3. Allows Renko Analysis Without Switching Chart Types
Traders can apply Renko logic without leaving a standard time-based chart.
This enables integration with indicators that normally cannot be used on traditional Renko charts.
Considerations When Using This Strategy
Trade execution may be delayed compared to standard Renko charts. Since new bricks are only confirmed on closed bars, entries may occur slightly later.
Brick size selection is important. A smaller brickSize results in more frequent trades, while a larger brickSize reduces signals.
Conclusion
This Renko Emulation Strategy provides a method for using Renko-based trading strategies on a time-based chart without repainting. By ensuring that bricks do not change once formed, it allows traders to use stable Renko logic while avoiding the issues associated with traditional Renko charts.
This approach enables accurate backtesting and reliable live execution, making it suitable for trend-following and swing trading strategies that rely on Renko price action.
is_strategyCorrection-Adaptive Trend Strategy (Open-Source)
Core Advantage: Designed specifically for the is_correction indicator, with full transparency and customization options.
Key Features:
Open-Source Code:
✅ Full access to the strategy logic – study how every trade signal is generated.
✅ Freedom to customize – modify entry/exit rules, risk parameters, or add new indicators.
✅ No black boxes – understand and trust every decision the strategy makes.
Built for is_correction:
Filters out false signals during market noise.
Works only in confirmed trends (is_correction = false).
Adaptable for Your Needs:
Change Take Profit/Stop Loss ratios directly in the code.
Add alerts, notifications, or integrate with other tools (e.g., Volume Profile).
For Developers/Traders:
Use the code as a template for your own strategies.
Test modifications risk-free on historical data.
How the Strategy Works:
Main Goal:
Automatically buys when the price starts rising and sells when it starts falling, but only during confirmed trends (ignoring temporary pullbacks).
What You See on the Chart:
📈 Up arrows ▼ (below the candle) = Buy signal.
📉 Down arrows ▲ (above the candle) = Sell signal.
Gray background = Market is in a correction (no trades).
Key Mechanics:
Buy Condition:
Price closes higher than the previous candle + is_correction confirms the main trend (not a pullback).
Example: Red candle → green candle → ▼ arrow → buy.
Sell Condition:
Price closes lower than the previous candle + is_correction confirms the trend (optional: turn off short-selling in settings).
Exit Rules:
Closes trades automatically at:
+0.5% profit (adjustable in settings).
-0.5% loss (adjustable).
Or if a reverse signal appears (e.g., sell signal after a buy).
User-Friendly Settings:
Sell – On (default: ON):
ON → Allows short-selling (selling when price falls).
OFF → Strategy only buys and closes positions.
Revers (default: OFF):
ON → Inverts signals (▼ = sell, ▲ = buy).
%Profit & %Loss:
Adjust these values (0-30%) to increase/decrease profit targets and risk.
Example Scenario:
Buy Signal:
Price rises for 3 days → green ▼ arrow → strategy buys.
Stop loss set 0.5% below entry price.
If price keeps rising → trade closes at +0.5% profit.
Correction Phase:
After a rally, price drops for 1 day → gray background → strategy ignores the drop (no action).
Stop Loss Trigger:
If price drops 0.5% from entry → trade closes automatically.
Key Features:
Correction Filter (is_correction):
Acts as a “noise filter” → avoids trades during temporary pullbacks.
Flexibility:
Disable short-selling, flip signals, or tweak profit/loss levels in seconds.
Transparency:
Open-source code → see exactly how every signal is generated (click “Source” in TradingView).
Tips for Beginners:
Test First:
Run the strategy on historical data (click the “Chart” icon in TradingView).
See how it performed in the past.
Customize It:
Increase %Profit to 2-3% for volatile assets like crypto.
Turn off Sell – On if short-selling confuses you.
Trust the Stop Loss:
Even if you think the price will rebound, the strategy will close at -0.5% to protect your capital.
Where to Find Settings:
Click the strategy name on the top-left of your chart → adjust sliders/toggles in the menu.
Русская Версия
Трендовая стратегия с открытым кодом
Главное преимущество: Полная прозрачность логики и адаптация под ваши нужды.
Особенности:
Открытый исходный код:
✅ Видите всю «кухню» стратегии – как формируются сигналы, когда открываются сделки.
✅ Меняйте правила – корректируйте тейк-профит, стоп-лосс или добавляйте новые условия.
✅ Никаких секретов – вы контролируете каждое правило.
Заточка под is_correction:
Игнорирует ложные сигналы в коррекциях.
Работает только в сильных трендах (is_correction = false).
Гибкая настройка:
Подстройте параметры под свой риск-менеджмент.
Добавьте свои индикаторы или условия для входа.
Для трейдеров и разработчиков:
Используйте код как основу для своих стратегий.
Тестируйте изменения на истории перед реальной торговлей.
Простыми словами:
Почему это удобно:
Открытый код = полный контроль. Вы можете:
Увидеть, как именно стратегия решает купить или продать.
Изменить правила закрытия сделок (например, поставить TP=2% вместо 1.5%).
Добавить новые условия (например, торговать только при высоком объёме).
Примеры кастомизации:
Новички: Меняйте только TP/SL в настройках (без кодинга).
Продвинутые: Добавьте RSI-фильтр, чтобы избегать перекупленности.
Разработчики: Встройте стратегию в свою торговую систему.
Как начать:
Скачайте код из TradingView.
Изучите логику в разделе strategy.entry/exit.
Меняйте параметры в блоке input.* (безопасно!).
Тестируйте изменения и оптимизируйте под свои цели.
Как работает стратегия:
Главная задача:
Автоматически покупает, когда цена начинает расти, и продаёт, когда падает. Но делает это «умно» — только когда рынок в основном тренде, а не во временном откате (коррекции).
Что видно на графике:
📈 Стрелки вверх ▼ (под свечой) — сигнал на покупку.
📉 Стрелки вниз ▲ (над свечой) — сигнал на продажу.
Серый фон — рынок в коррекции (не торгуем).
Как это работает:
Когда покупаем:
Если цена закрылась выше предыдущей и индикатор is_correction показывает «основной тренд» (не коррекция).
Пример: Была красная свеча → стала зелёная → появилась стрелка ▼ → покупаем.
Когда продаём:
Если цена закрылась ниже предыдущей и is_correction подтверждает тренд (опционально, можно отключить в настройках).
Когда закрываем сделку:
Автоматически при достижении:
+0.5% прибыли (можно изменить в настройках).
-0.5% убытка (можно изменить).
Или если появился противоположный сигнал (например, после покупки пришла стрелка продажи).
Настройки для чайников:
«Sell – On» (включено по умолчанию):
Если включено → стратегия будет продавать в шорт.
Если выключено → только покупки и закрытие позиций.
«Revers» (выключено по умолчанию):
Если включить → стратегия будет работать наоборот (стрелки ▼ = продажа, ▲ = покупка).
«%Profit» и «%Loss»:
Меняйте эти цифры (от 0 до 30), чтобы увеличить/уменьшить прибыль и риски.
Пример работы:
Сигнал на покупку:
Цена 3 дня растет → появляется зелёная стрелка ▼ → стратегия покупает.
Стоп-лосс ставится на 0.5% ниже цены входа.
Если цена продолжает расти → сделка закрывается при +0.5% прибыли.
Коррекция:
После роста цена падает на 1 день → фон становится серым → стратегия игнорирует это падение (не закрывает сделку).
Стоп-лосс:
Если цена упала на 0.5% от точки входа → сделка закрывается автоматически.
Важные особенности:
Фильтр коррекций (is_correction):
Это «защита от шума» — стратегия не реагирует на мелкие откаты, работая только в сильных трендах.
Гибкие настройки:
Можно запретить шорты, перевернуть сигналы или изменить уровни прибыли/убытка за 2 клика.
Прозрачность:
Весь код открыт → вы можете увидеть, как формируется каждый сигнал (меню «Исходник» в TradingView).
Советы для новичков:
Начните с теста:
Запустите стратегию на исторических данных (кнопка «Свеча» в окне TradingView).
Посмотрите, как она работала в прошлом.
Настройте под себя:
Увеличьте %Profit до 2-3%, если торгуете валюты.
Отключите «Sell – On», если не понимаете шорты.
Доверяйте стоп-лоссу:
Даже если кажется, что цена развернётся — стратегия закроет сделку при -0.5%, защитив ваш депозит.
Где найти настройки:
Кликните на название стратегии в верхнем левом углу графика → откроется меню с ползунками и переключателями.
Важно: Стратегия предоставляет «рыбу» – чтобы она стала «уловистой», адаптируйте её под свой стиль торговли!
Breakouts With Timefilter Strategy [LuciTech]This strategy captures breakout opportunities using pivot high/low breakouts while managing risk through dynamic stop-loss placement and position sizing. It includes a time filter to limit trades to specific sessions.
How It Works
A long trade is triggered when price closes above a pivot high, and a short trade when price closes below a pivot low.
Stop-loss can be set using ATR, prior candle high/low, or a fixed point value. Take-profit is based on a risk-reward multiplier.
Position size adjusts based on the percentage of equity risked.
Breakout signals are marked with triangles, and entry, stop-loss, and take-profit levels are plotted.
moving average filter: Bullish breakouts only trigger above the MA, bearish breakouts below.
The time filter shades the background during active trading hours.
Customization:
Adjustable pivot length for breakout sensitivity.
Risk settings: percentage risked, risk-reward ratio, and stop-loss type.
ATR settings: length, smoothing method (RMA, SMA, EMA, WMA).
Moving average filter (SMA, EMA, WMA, VWMA, HMA) to confirm breakouts.
ADX for BTC [PineIndicators]The ADX Strategy for BTC is a trend-following system that uses the Average Directional Index (ADX) to determine market strength and momentum shifts. Designed for Bitcoin trading, this strategy applies a customizable ADX threshold to confirm trend signals and optionally filters entries using a Simple Moving Average (SMA). The system features automated entry and exit conditions, dynamic trade visualization, and built-in trade tracking for historical performance analysis.
⚙️ Core Strategy Components
1️⃣ Average Directional Index (ADX) Calculation
The ADX indicator measures trend strength without indicating direction. It is derived from the Positive Directional Movement (+DI) and Negative Directional Movement (-DI):
+DI (Positive Directional Index): Measures upward price movement.
-DI (Negative Directional Index): Measures downward price movement.
ADX Value: Higher values indicate stronger trends, regardless of direction.
This strategy uses a default ADX length of 14 to smooth out short-term fluctuations while detecting sustainable trends.
2️⃣ SMA Filter (Optional Trend Confirmation)
The strategy includes a 200-period SMA filter to validate trend direction before entering trades. If enabled:
✅ Long Entry is only allowed when price is above a long-term SMA multiplier (5x the standard SMA length).
✅ If disabled, the strategy only considers the ADX crossover threshold for trade entries.
This filter helps reduce entries in sideways or weak-trend conditions, improving signal reliability.
📌 Trade Logic & Conditions
🔹 Long Entry Conditions
A buy signal is triggered when:
✅ ADX crosses above the threshold (default = 14), indicating a strengthening trend.
✅ (If SMA filter is enabled) Price is above the long-term SMA multiplier.
🔻 Exit Conditions
A position is closed when:
✅ ADX crosses below the stop threshold (default = 45), signaling trend weakening.
By adjusting the entry and exit ADX levels, traders can fine-tune sensitivity to trend changes.
📏 Trade Visualization & Tracking
Trade Markers
"Buy" label (▲) appears when a long position is opened.
"Close" label (▼) appears when a position is exited.
Trade History Boxes
Green if a trade is profitable.
Red if a trade closes at a loss.
Trend Tracking Lines
Horizontal lines mark entry and exit prices.
A filled trade box visually represents trade duration and profitability.
These elements provide clear visual insights into trade execution and performance.
⚡ How to Use This Strategy
1️⃣ Apply the script to a BTC chart in TradingView.
2️⃣ Adjust ADX entry/exit levels based on trend sensitivity.
3️⃣ Enable or disable the SMA filter for trend confirmation.
4️⃣ Backtest performance to analyze historical trade execution.
5️⃣ Monitor trade markers and history boxes for real-time trend insights.
This strategy is designed for trend traders looking to capture high-momentum market conditions while filtering out weak trends.
MACD Volume Strategy for XAUUSD (15m) [PineIndicators]The MACD Volume Strategy is a momentum-based trading system designed for XAUUSD on the 15-minute timeframe. It integrates two key market indicators: the Moving Average Convergence Divergence (MACD) and a volume-based oscillator to identify strong trend shifts and confirm trade opportunities. This strategy uses dynamic position sizing, incorporates leverage customization, and applies structured entry and exit conditions to improve risk management.
⚙️ Core Strategy Components
1️⃣ Volume-Based Momentum Calculation
The strategy includes a custom volume oscillator to filter trade signals based on market activity. The oscillator is derived from the difference between short-term and long-term volume trends using Exponential Moving Averages (EMAs)
Short EMA (default = 5) represents recent volume activity.
Long EMA (default = 8) captures broader volume trends.
Positive values indicate rising volume, supporting momentum-based trades.
Negative values suggest weak market activity, reducing signal reliability.
By requiring positive oscillator values, the strategy ensures momentum confirmation before entering trades.
2️⃣ MACD Trend Confirmation
The strategy uses the MACD indicator as a trend filter. The MACD is calculated as:
Fast EMA (16-period) detects short-term price trends.
Slow EMA (26-period) smooths out price fluctuations to define the overall trend.
Signal Line (9-period EMA) helps identify crossovers, signaling potential trend shifts.
Histogram (MACD – Signal) visualizes trend strength.
The system generates trade signals based on MACD crossovers around the zero line, confirming bullish or bearish trend shifts.
📌 Trade Logic & Conditions
🔹 Long Entry Conditions
A buy signal is triggered when all the following conditions are met:
✅ MACD crosses above 0, signaling bullish momentum.
✅ Volume oscillator is positive, confirming increased trading activity.
✅ Current volume is at least 50% of the previous candle’s volume, ensuring market participation.
🔻 Short Entry Conditions
A sell signal is generated when:
✅ MACD crosses below 0, indicating bearish momentum.
✅ Volume oscillator is positive, ensuring market activity is sufficient.
✅ Current volume is less than 50% of the previous candle’s volume, showing decreasing participation.
This multi-factor approach filters out weak or false signals, ensuring that trades align with both momentum and volume dynamics.
📏 Position Sizing & Leverage
Dynamic Position Calculation:
Qty = strategy.equity × leverage / close price
Leverage: Customizable (default = 1x), allowing traders to adjust risk exposure.
Adaptive Sizing: The strategy scales position sizes based on account equity and market price.
Slippage & Commission: Built-in slippage (2 points) and commission (0.01%) settings provide realistic backtesting results.
This ensures efficient capital allocation, preventing overexposure in volatile conditions.
🎯 Trade Management & Exits
Take Profit & Stop Loss Mechanism
Each position includes predefined profit and loss targets:
Take Profit: +10% of risk amount.
Stop Loss: Fixed at 10,100 points.
The risk-reward ratio remains balanced, aiming for controlled drawdowns while maximizing trade potential.
Visual Trade Tracking
To improve trade analysis, the strategy includes:
📌 Trade Markers:
"Buy" label when a long position opens.
"Close" label when a position exits.
📌 Trade History Boxes:
Green for profitable trades.
Red for losing trades.
📌 Horizontal Trade Lines:
Shows entry and exit prices.
Helps identify trend movements over multiple trades.
This structured visualization allows traders to analyze past performance directly on the chart.
⚡ How to Use This Strategy
1️⃣ Apply the script to a XAUUSD (Gold) 15m chart in TradingView.
2️⃣ Adjust leverage settings as needed.
3️⃣ Enable backtesting to assess past performance.
4️⃣ Monitor volume and MACD conditions to understand trade triggers.
5️⃣ Use the visual trade markers to review historical performance.
The MACD Volume Strategy is designed for short-term trading, aiming to capture momentum-driven opportunities while filtering out weak signals using volume confirmation.
Balance of Power for US30 4H [PineIndicators]The Balance of Power (BoP) Strategy is a momentum-based trading system for the US30 index on a 4-hour timeframe. It measures the strength of buyers versus sellers in each candle using the Balance of Power (BoP) indicator and executes trades based on predefined threshold crossovers. The strategy includes dynamic position sizing, adjustable leverage, and visual trade tracking.
⚙️ Core Strategy Mechanics
Positive values indicate buying strength.
Negative values indicate selling strength.
Values close to 1 suggest strong bullish momentum.
Values close to -1 indicate strong bearish pressure.
The strategy uses fixed threshold crossovers to determine trade entries and exits.
📌 Trade Logic
Entry Conditions
Long Entry: When BoP crosses above 0.8, signaling strong buying pressure.
Exit Conditions
Position Close: When BoP crosses below -0.8, indicating a shift to selling pressure.
This threshold-based system filters out low-confidence signals and focuses on high-momentum shifts.
📏 Position Sizing & Leverage
Leverage: Adjustable by the user (default = 5x).
Risk Management: Position size adapts dynamically based on equity fluctuations.
📊 Trade Visualization & History Tracking
Trade Markers:
"Buy" labels appear when a long position is opened.
"Close" labels appear when a position is exited.
Trade History Boxes:
Green for profitable trades.
Red for losing trades.
These elements provide clear visual tracking of past trade execution.
⚡ Usage & Customization
1️⃣ Apply the script to a US30 4H chart in TradingView.
2️⃣ Adjust leverage settings as needed.
3️⃣ Review trade signals and historical performance with visual markers.
4️⃣ Enable backtesting to evaluate past performance.
This strategy is designed for momentum-based trading and is best suited for volatile market conditions.
TSI Long/Short for BTC 2HThe TSI Long/Short for BTC 2H strategy is an advanced trend-following system designed specifically for trading Bitcoin (BTC) on a 2-hour timeframe. It leverages the True Strength Index (TSI) to identify momentum shifts and executes both long and short trades in response to dynamic market conditions.
Unlike traditional moving average-based strategies, this script uses a double-smoothed momentum calculation, enhancing signal accuracy and reducing noise. It incorporates automated position sizing, customizable leverage, and real-time performance tracking, ensuring a structured and adaptable trading approach.
🔹 What Makes This Strategy Unique?
Unlike simple crossover strategies or generic trend-following approaches, this system utilizes a customized True Strength Index (TSI) methodology that dynamically adjusts to market conditions.
🔸 True Strength Index (TSI) Filtering – The script refines the TSI by applying double exponential smoothing, filtering out weak signals and capturing high-confidence momentum shifts.
🔸 Adaptive Entry & Exit Logic – Instead of fixed thresholds, it compares the TSI value against a dynamically determined high/low range from the past 100 bars to confirm trade signals.
🔸 Leverage & Risk Optimization – Position sizing is dynamically adjusted based on account equity and leverage settings, ensuring controlled risk exposure.
🔸 Performance Monitoring System – A built-in performance tracking table allows traders to evaluate monthly and yearly results directly on the chart.
📊 Core Strategy Components
1️⃣ Momentum-Based Trade Execution
The strategy generates long and short trade signals based on the following conditions:
✅ Long Entry Condition – A buy signal is triggered when the TSI crosses above its 100-bar highest value (previously set), confirming bullish momentum.
✅ Short Entry Condition – A sell signal is generated when the TSI crosses below its 100-bar lowest value (previously set), indicating bearish pressure.
Each trade execution is fully automated, reducing emotional decision-making and improving trading discipline.
2️⃣ Position Sizing & Leverage Control
Risk management is a key focus of this strategy:
🔹 Dynamic Position Sizing – The script calculates position size based on:
Account Equity – Ensuring trade sizes adjust dynamically with capital fluctuations.
Leverage Multiplier – Allows traders to customize risk exposure via an adjustable leverage setting.
🔹 No Fixed Stop-Loss – The strategy relies on reversals to exit trades, meaning each position is closed when the opposite signal appears.
This design ensures maximum capital efficiency while adapting to market conditions in real time.
3️⃣ Performance Visualization & Tracking
Understanding historical performance is crucial for refining strategies. The script includes:
📌 Real-Time Trade Markers – Buy and sell signals are visually displayed on the chart for easy reference.
📌 Performance Metrics Table – Tracks monthly and yearly returns in percentage form, helping traders assess profitability over time.
📌 Trade History Visualization – Completed trades are displayed with color-coded boxes (green for long trades, red for short trades), visually representing profit/loss dynamics.
📢 Why Use This Strategy?
✔ Advanced Momentum Detection – Uses a double-smoothed TSI for more accurate trend signals.
✔ Fully Automated Trading – Removes emotional bias and enforces discipline.
✔ Customizable Risk Management – Adjust leverage and position sizing to suit your risk profile.
✔ Comprehensive Performance Tracking – Integrated reporting system provides clear insights into past trades.
This strategy is ideal for Bitcoin traders looking for a structured, high-probability system that adapts to both bullish and bearish trends on the 2-hour timeframe.
📌 How to Use: Simply add the script to your 2H BTC chart, configure your leverage settings, and let the system handle trade execution and tracking! 🚀
highs&lowsone of my first strategy: highs&lows
This strategy takes the highest high and the lowest low of a specified timeframe and specified bar count.
It will then takes the average between these two extremes to create a center line.
This creates a range of high middle and low.
Then the strategy takes the current market movement
which is the direct average(no specified timeframe and specified bar count) of the current high and low.
Using this "current market movement" within the range of high middle and low it determins when to buy and then sell the asset.
*********note***************
-this strategy is (bullish)
-works good with most futures assets that have volatility/ decent movement
(might add more details if I forget any)
(work in progress)
3x Supertrend (for Vietnamese stock market and vn30f1m)The 4Vietnamese 3x Supertrend Strategy is an advanced trend-following trading system developed in Pine Script™ and designed for publication on TradingView as an open-source strategy under the Mozilla Public License 2.0. This strategy leverages three Supertrend indicators with different ATR lengths and multipliers to identify optimal trade entries and exits while dynamically managing risk.
Key Features:
Option to build and hold long term positions with entry stop order. Try this to avoid market complex movement and retain long term investment style's benefits.
Advanced Entry & Exit Optimization: Includes configurable stop-loss mechanisms, pyramiding, and exit conditions tailored for different market scenarios.
Dynamic Risk Management: Implements features like selective stop-loss activation, trade window settings, and closing conditions based on trend reversals and loss management.
This strategy is particularly suited for traders seeking a systematic and rule-based approach to trend trading. By making it open-source, we aim to provide transparency, encourage community collaboration, and help traders refine and optimize their strategies for better performance.
License:
This script is released under the Mozilla Public License 2.0, allowing modifications and redistribution while maintaining open-source integrity.
Happy trading!