Strategy Stats [presentTrading]Hello! it's another weekend. This tool is a strategy performance analysis tool. Looking at the TradingView community, it seems few creators focus on this aspect. I've intentionally created a shared version. Welcome to share your idea or question on this.
█ Introduction and How it is Different
Strategy Stats is a comprehensive performance analytics framework designed specifically for trading strategies. Unlike standard strategy backtesting tools that simply show cumulative profits, this analytics suite provides real-time, multi-timeframe statistical analysis of your trading performance.
Multi-timeframe analysis: Automatically tracks performance metrics across the most recent time periods (last 7 days, 30 days, 90 days, 1 year, and 4 years)
Advanced statistical measures: Goes beyond basic metrics to include Information Coefficient (IC) and Sortino Ratio
Real-time feedback: Updates performance statistics with each new trade
Visual analytics: Color-coded performance table provides instant visual feedback on strategy health
Integrated risk management: Implements sophisticated take profit mechanisms with 3-step ATR and percentage-based exits
BTCUSD Performance
The table in the upper right corner is a comprehensive performance dashboard showing trading strategy statistics.
Note: While this presentation uses Vegas SuperTrend as the underlying strategy, this is merely an example. The Stats framework can be applied to any trading strategy. The Vegas SuperTrend implementation is included solely to demonstrate how the analytics module integrates with a trading strategy.
⚠️ Timeframe Limitations
Important: TradingView's backtesting engine has a maximum storage limit of 10,000 bars. When using this strategy stats framework on smaller timeframes such as 1-hour or 2-hour charts, you may encounter errors if your backtesting period is too long.
Recommended Timeframe Usage:
Ideal for: 4H, 6H, 8H, Daily charts and above
May cause errors on: 1H, 2H charts spanning multiple years
Not recommended for: Timeframes below 1H with long history
█ Strategy, How it Works: Detailed Explanation
The Strategy Stats framework consists of three primary components: statistical data collection, performance analysis, and visualization.
🔶 Statistical Data Collection
The system maintains several critical data arrays:
equityHistory: Tracks equity curve over time
tradeHistory: Records profit/loss of each trade
predictionSignals: Stores trade direction signals (1 for long, -1 for short)
actualReturns: Records corresponding actual returns from each trade
For each closed trade, the system captures:
float tradePnL = strategy.closedtrades.profit(tradeIndex)
float tradeReturn = strategy.closedtrades.profit_percent(tradeIndex)
int tradeType = entryPrice < exitPrice ? 1 : -1 // Direction
🔶 Performance Metrics Calculation
The framework calculates several key performance metrics:
Information Coefficient (IC):
The correlation between prediction signals and actual returns, measuring forecast skill.
IC = Correlation(predictionSignals, actualReturns)
Where Correlation is the Pearson correlation coefficient:
Correlation(X,Y) = (nΣXY - ΣXY) / √
Sortino Ratio:
Measures risk-adjusted return focusing only on downside risk:
Sortino = (Avg_Return - Risk_Free_Rate) / Downside_Deviation
Where Downside Deviation is:
Downside_Deviation = √
R_i represents individual returns, T is the target return (typically the risk-free rate), and n is the number of observations.
Maximum Drawdown:
Tracks the largest percentage drop from peak to trough:
DD = (Peak_Equity - Trough_Equity) / Peak_Equity * 100
🔶 Time Period Calculation
The system automatically determines the appropriate number of bars to analyze for each timeframe based on the current chart timeframe:
bars_7d = math.max(1, math.round(7 * barsPerDay))
bars_30d = math.max(1, math.round(30 * barsPerDay))
bars_90d = math.max(1, math.round(90 * barsPerDay))
bars_365d = math.max(1, math.round(365 * barsPerDay))
bars_4y = math.max(1, math.round(365 * 4 * barsPerDay))
Where barsPerDay is calculated based on the chart timeframe:
barsPerDay = timeframe.isintraday ?
24 * 60 / math.max(1, (timeframe.in_seconds() / 60)) :
timeframe.isdaily ? 1 :
timeframe.isweekly ? 1/7 :
timeframe.ismonthly ? 1/30 : 0.01
🔶 Visual Representation
The system presents performance data in a color-coded table with intuitive visual indicators:
Green: Excellent performance
Lime: Good performance
Gray: Neutral performance
Orange: Mediocre performance
Red: Poor performance
█ Trade Direction
The Strategy Stats framework supports three trading directions:
Long Only: Only takes long positions when entry conditions are met
Short Only: Only takes short positions when entry conditions are met
Both: Takes both long and short positions depending on market conditions
█ Usage
To effectively use the Strategy Stats framework:
Apply to existing strategies: Add the performance tracking code to any strategy to gain advanced analytics
Monitor multiple timeframes: Use the multi-timeframe analysis to identify performance trends
Evaluate strategy health: Review IC and Sortino ratios to assess predictive power and risk-adjusted returns
Optimize parameters: Use performance data to refine strategy parameters
Compare strategies: Apply the framework to multiple strategies to identify the most effective approach
For best results, allow the strategy to generate sufficient trade history for meaningful statistical analysis (at least 20-30 trades).
█ Default Settings
The default settings have been carefully calibrated for cryptocurrency markets:
Performance Tracking:
Time periods: 7D, 30D, 90D, 1Y, 4Y
Statistical measures: Return, Win%, MaxDD, IC, Sortino Ratio
IC color thresholds: >0.3 (green), >0.1 (lime), <-0.1 (orange), <-0.3 (red)
Sortino color thresholds: >1.0 (green), >0.5 (lime), <0 (red)
Multi-Step Take Profit:
ATR multipliers: 2.618, 5.0, 10.0
Percentage levels: 3%, 8%, 17%
Short multiplier: 1.5x (makes short take profits more aggressive)
Stop loss: 20%
Strategy
The Crypto Wizard# The Crypto Wizard (Cwiz)
## Advanced Trading Framework for Cryptocurrency Markets
! (placeholder.com)
The Crypto Wizard (Cwiz) offers a customizable, robust trading framework designed specifically for cryptocurrency market volatility. This open-source foundation provides essential components for building profitable automated trading strategies.
### Key Performance Indicators
| Metric | Value |
|--------|-------|
| Profit Factor | 1.992 |
| Sortino Ratio | 5.589 |
| Win Rate | ~40% |
| Max Drawdown | 15.82% |
### Core Features
- **Position Scaling System**: Intelligent position sizing with customizable multipliers and risk controls
- **Multi-layered Exit Strategy**: Combined take-profit, fixed stop-loss, and trailing stop mechanisms
- **Customizable Entry Framework**: Easily integrate your own entry signals and conditions
- **Comprehensive Visualization Tools**: Real-time performance tracking with position labels and indicators
### Setup Instructions
```pine PHEMEX:FARTCOINUSDT.P
// 1. Add to your chart and configure basic parameters
// 2. Adjust risk parameters based on your risk tolerance
// 3. Customize entry conditions or use defaults
// 4. Back-test across various market conditions
// 5. Enable live trading with careful monitoring
```
### Risk Management
Cwiz implements a sophisticated risk management system with:
- Automatic position size scaling
- User-defined maximum consecutive trades
- ATR-based dynamic stop loss placement
- Built-in circuit breakers for extreme market conditions
### Customization Options
The framework is designed for flexibility without compromising core functionality. Key customization points:
- Entry signal generation
- Position sizing parameters
- Stop loss and take profit multipliers
- Visualization preferences
### Recommended Usage
Best suited for volatile cryptocurrency markets with sufficient liquidity. Performs optimally in trending conditions but includes mechanisms to manage ranging markets.
---
*Disclaimer: Trading involves significant risk. Past performance is not indicative of future results. Always test thoroughly before live deployment.*
Futuristic Trend PredictorAI-based trend predictor. converting it to a strategy for backtesting. thanks.
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.
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.
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.
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.
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.
Best MA Pair Finder (Crossover Strategy)This indicator automatically identifies the optimal pair of moving averages (MAs) for a crossover strategy using all available historical data. It offers several MA options—including SMA, EMA, and TEMA—allowing users to select the desired type in the settings. The indicator supports two strategy modes: “Long Only” and “Buy & Sell”, which can be chosen via the options.
For each MA pair combination, the indicator performs a backtest and calculates the profit factor, considering only those pairs where the total number of trades meets or exceeds the user-defined "Minimum Trades" threshold. This parameter ensures that the selected optimal pair is based on a statistically meaningful sample rather than on a limited number of trades.
The results provided by this indicator are based on historical data and backtests, which may not guarantee future performance. Users should conduct their own analysis and use proper risk management before making trading decisions.
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.
Advanced Momentum Scanner [QuantAlgo]Introducing the Advanced Momentum Scanner by QuantAlgo , a sophisticated technical indicator that leverages multiple EMA combinations, momentum metrics, and adaptive visualization techniques to provide deep insights into market trends and momentum shifts. It is particularly valuable for those looking to identify high-probability trading and investing opportunities based on trend changes and momentum shifts across any market and timeframe.
🟢 Technical Foundation
The Advanced Momentum Scanner utilizes sophisticated trend analysis techniques to identify market momentum and trend direction. The core strategy employs a multi-layered approach with four different EMA periods:
Ultra-Fast EMA for quick trend changes detection
Fast EMA for short-term trend analysis
Mid EMA for intermediate confirmation
Slow EMA for long-term trend identification
For momentum detection, the indicator implements a Rate of Change (RoC) calculation to measure price momentum over a specified period. It further enhances analysis by incorporating RSI readings, volatility measurements through ATR, and optional volume confirmation. When these elements align, the indicator generates various trading signals based on the selected sensitivity mode.
🟢 Key Features & Signals
1. Multi-Period Trend Identification
The indicator combines multiple EMAs of different lengths to provide comprehensive trend analysis within the same timeframe, displaying the information through color-coded visual elements on the chart.
When an uptrend is detected, chart elements are colored with the bullish theme color (default: green/teal).
Similarly, when a downtrend is detected, chart elements are colored with the bearish theme color (default: red).
During neutral or indecisive periods, chart elements are colored with a neutral gray color, providing clear visual distinction between trending and non-trending market conditions.
This visualization provides immediate insights into underlying trend direction without requiring separate indicators, helping traders and investors quickly identify the market's current state.
2. Trend Strength Information Panel
The trend panel operates in three different sensitivity modes (Conservative, Aggressive, and Balanced), each affecting how the indicator processes and displays market information.
The Conservative mode prioritizes signal reliability over frequency, showing only strong trend movements with high conviction levels.
The Aggressive mode detects early trend changes, providing more frequent signals but potentially more false positives.
The Balanced mode offers a middle ground with moderate signal frequency and reliability.
Regardless of the selected mode, the panel displays:
Current trend direction (UPTREND, DOWNTREND, or NEUTRAL)
Trend strength percentage (0-100%)
Early detection signals when applicable
The active sensitivity mode
This comprehensive approach helps traders and investors:
→ Assess the strength and reliability of current market trends
→ Identify early potential trend changes before full confirmation
→ Make more informed trading and investing decisions based on trend context
3. Customizable Visualization Settings
This indicator offers extensive visual customization options to suit different trading/investing styles and preferences:
Display options:
→ Fully customizable uptrend, downtrend, and neutral colors
→ Color-coded price bars showing trend direction
→ Dynamic gradient bands visualizing potential trend channels
→ Optional background coloring based on trend intensity
→ Adjustable transparency levels for all visual elements
These visualization settings can be fine-tuned through the indicator's interface, allowing traders and investors to create a personalized chart environment that emphasizes the most relevant information for their strategy.
The indicator also features a comprehensive alert system with notifications for:
New trend formations (uptrend, downtrend, neutral)
Early trend change signals
Momentum threshold crossovers
Other significant market conditions
Alerts can be delivered through TradingView's notification system, making it easy to stay informed of important market developments even when you are away from the charts.
🟢 Practical Usage Tips
→ Trend Analysis and Interpretation: The indicator visualizes trend direction and strength directly on the chart through color-coding and the information panel, allowing traders and investors to immediately identify the current market context. This information helps in assessing the potential for continuation or reversal.
→ Signal Generation Strategies: The indicator generates potential trading signals based on trend direction, momentum confirmation, and selected sensitivity mode. Users can choose between Conservative (fewer but more reliable signals), Balanced (moderate approach), or Aggressive (more frequent but potentially less reliable signals).
→ Multi-Period Trend Assessment: Through its layered EMA approach, the indicator enables users to understand trend conditions across different lookback periods within the same timeframe. This helps in identifying the dominant trend and potential turning points.
🟢 Pro Tips
Adjust EMA periods based on your timeframe:
→ Lower values for shorter timeframes and more frequent signals
→ Higher values for higher timeframes and more reliable signals
Fine-tune sensitivity mode based on your trading style:
→ "Conservative" for position trading/long-term investing and fewer false signals
→ "Balanced" for swing trading/medium-term investing with moderate signal frequency
→ "Aggressive" for scalping/day trading and catching early trend changes
Look for confluence between components:
→ Strong trend strength percentage and direction in the information panel
→ Overall market context aligning with the expected direction
Use for multiple trading approaches:
→ Trend following during strong momentum periods
→ Counter-trend trading at band extremes during overextension
→ Early trend change detection with sensitivity adjustments
→ Stop loss placement using dynamic bands
Combine with:
→ Volume indicators like the Volume Delta & Order Block Suite for additional confirmation
→ Support/resistance analysis for strategic entry/exit points
→ Multiple timeframe analysis for broader market context
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.
*Auto Backtest & Optimize EngineFull-featured Engine for Automatic Backtesting and parameter optimization. Allows you to test millions of different combinations of stop-loss and take profit parameters, including on any connected indicators.
⭕️ Key Futures
Quickly identify the optimal parameters for your strategy.
Automatically generate and test thousands of parameter combinations.
A simple Genetic Algorithm for result selection.
Saves time on manual testing of multiple parameters.
Detailed analysis, sorting, filtering and statistics of results.
Detailed control panel with many tooltips.
Display of key metrics: Profit, Win Rate, etc..
Comprehensive Strategy Score calculation.
In-depth analysis of the performance of different types of stop-losses.
Possibility to use to calculate the best Stop-Take parameters for your position.
Ability to test your own functions and signals.
Customizable visualization of results.
Flexible Stop-Loss Settings:
• Auto ━ Allows you to test all types of Stop Losses at once(listed below).
• S.VOLATY ━ Static stop based on volatility (Fixed, ATR, STDEV).
• Trailing ━ Classic trailing stop following the price.
• Fast Trail ━ Accelerated trailing stop that reacts faster to price movements.
• Volatility ━ Dynamic stop based on volatility indicators.
• Chandelier ━ Stop based on price extremes.
• Activator ━ Dynamic stop based on SAR.
• MA ━ Stop based on moving averages (9 different types).
• SAR ━ Parabolic SAR (Stop and Reverse).
Advanced Take-Profit Options:
• R:R: Risk/Reward ━ sets TP based on SL size.
• T.VOLATY ━ Calculation based on volatility indicators (Fixed, ATR, STDEV).
Testing Modes:
• Stops ━ Cyclical stop-loss testing
• Pivot Point Example ━ Example of using pivot points
• External Example ━ Built-in example how test functions with different parameters
• External Signal ━ Using external signals
⭕️ Usage
━ First Steps:
When opening, select any point on the chart. It will not affect anything until you turn on Manual Start mode (more on this below).
The chart will immediately show the best results of the default Auto mode. You can switch Part's to try to find even better results in the table.
Now you can display any result from the table on the chart by entering its ID in the settings.
Repeat steps 3-4 until you determine which type of Stop Loss you like best. Then set it in the settings instead of Auto mode.
* Example: I flipped through 14 parts before I liked the first result and entered its ID so I could visually evaluate it on the chart.
Then select the stop loss type, choose it in place of Auto mode and repeat steps 3-4 or immediately follow the recommendations of the algorithm.
Now the Genetic Algorithm at the bottom right will prompt you to enter the Parameters you need to search for and select even better results.
Parameters must be entered All at once before they are updated. Enter recommendations strictly in fields with the same names.
Repeat steps 5-6 until there are approximately 10 Part's left or as you like. And after that, easily pour through the remaining Parts and select the best parameters.
━ Example of the finished result.
━ Example of use with Takes
You can also test at the same time along with Take Profit. In this example, I simply enabled Risk/Reward mode and immediately specified in the TP field Maximum RR, Minimum RR and Step. So in this example I can test (3-1) / 0.1 = 20 Takes of different sizes. There are additional tips in the settings.
━
* Soon you will start to understand how the system works and things will become much easier.
* If something doesn't work, just reset the engine settings and start over again.
* Use the tips I have left in the settings and on the Panel.
━ Details:
Sort ━ Sorting results by Score, Profit, Trades, etc..
Filter ━ Filtring results by Score, Profit, Trades, etc..
Trade Type ━ Ability to disable Long\Short but only from statistics.
BackWin ━ Backtest Window Number of Candle the script can test.
Manual Start ━ Enabling it will allow you to call a Stop from a selected point. which you selected when you started the engine.
* If you have a real open position then this mode can help to save good Stop\Take for it.
1 - 9 Сheckboxs ━ Allow you to disable any stop from Auto mode.
Ex Source - Allow you to test Stops/Takes from connected indicators.
Connection guide:
//@version=6
indicator("My script")
rsi = ta.rsi(close, 14)
buy = not na(rsi) and ta.crossover (rsi, 40) // OS = 40
sell = not na(rsi) and ta.crossunder(rsi, 60) // OB = 60
Signal = buy ? +1 : sell ? -1 : 0
plot(Signal, "🔌Connector🔌", display = display.none)
* Format the signal for your indicator in a similar style and then select it in Ex Source.
⭕️ How it Works
Hypothesis of Uniform Distribution of Rare Elements After Mixing.
'This hypothesis states that if an array of N elements contains K valid elements, then after mixing, these valid elements will be approximately uniformly distributed.'
'This means that in a random sample of k elements, the proportion of valid elements should closely match their proportion in the original array, with some random variation.'
'According to the central limit theorem, repeated sampling will result in an average count of valid elements following a normal distribution.'
'This supports the assumption that the valid elements are evenly spread across the array.'
'To test this hypothesis, we can conduct an experiment:'
'Create an array of 1,000,000 elements.'
'Select 1,000 random elements (1%) for validation.'
'Shuffle the array and divide it into groups of 1,000 elements.'
'If the hypothesis holds, each group should contain, on average, 1~ valid element, with minor variations.'
* I'd like to attach more details to My hypothesis but it won't be very relevant here. Since this is a whole separate topic, I will leave the minimum part for understanding the engine.
Practical Application
To apply this hypothesis, I needed a way to generate and thoroughly mix numerous possible combinations. Within Pine, generating over 100,000 combinations presents significant challenges, and storing millions of combinations requires excessive resources.
I developed an efficient mechanism that generates combinations in random order to address these limitations. While conventional methods often produce duplicates or require generating a complete list first, my approach guarantees that the first 10% of possible combinations are both unique and well-distributed. Based on my hypothesis, this sampling is sufficient to determine optimal testing parameters.
Most generators and randomizers fail to accommodate both my hypothesis and Pine's constraints. My solution utilizes a simple Linear Congruential Generator (LCG) for pseudo-randomization, enhanced with prime numbers to increase entropy during generation. I pre-generate the entire parameter range and then apply systematic mixing. This approach, combined with a hybrid combinatorial array-filling technique with linear distribution, delivers excellent generation quality.
My engine can efficiently generate and verify 300 unique combinations per batch. Based on the above, to determine optimal values, only 10-20 Parts need to be manually scrolled through to find the appropriate value or range, eliminating the need for exhaustive testing of millions of parameter combinations.
For the Score statistic I applied all the same, generated a range of Weights, distributed them randomly for each type of statistic to avoid manual distribution.
Score ━ based on Trade, Profit, WinRate, Profit Factor, Drawdown, Sharpe & Sortino & Omega & Calmar Ratio.
⭕️ Notes
For attentive users, a little tricks :)
To save time, switch parts every 3 seconds without waiting for it to load. After 10-20 parts, stop and wait for loading. If the pause is correct, you can switch between the rest of the parts without loading, as they will be cached. This used to work without having to wait for a pause, but now it does slower. This will save a lot of time if you are going to do a deeper backtest.
Sometimes you'll get the error “The scripts take too long to execute.”
For a quick fix you just need to switch the TF or Ticker back and forth and most likely everything will load.
The error appears because of problems on the side of the site because the engine is very heavy. It can also appear if you set too long a period for testing in BackWin or use a heavy indicator for testing.
Manual Start - Allow you to Start you Result from any point. Which in turn can help you choose a good stop-stick for your real position.
* It took me half a year from idea to current realization. This seems to be one of the few ways to build something automatic in backtest format and in this particular Pine environment. There are already better projects in other languages, and they are created much easier and faster because there are no limitations except for personal PC. If you see solutions to improve this system I would be glad if you share the code. At the moment I am tired and will continue him not soon.
Also You can use my previosly big Backtest project with more manual settings(updated soon)
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.