Vinay StrategyCondition Met Action
MACD > Signal + Price above SAR + Supertrend Green ✅ Enter Long
Price stays above SAR but MACD fluctuates Hold Long
MACD < Signal (Bearish) but Price still above SAR Hold Long
MACD < Signal + Price closes below SAR ❌ Exit Long
MACD < Signal + Price below SAR + Supertrend Red ✅ Enter Short
Price stays below SAR but MACD fluctuates Hold Short
MACD > Signal (Bullish) but Price still below SAR Hold Short
MACD > Signal + Price closes above SAR ❌ Exit Short
M-oscillator
Bot V17 Flip 30 s CavalierMaxPresentazione della Strategia "Bot XFlip 30 s CavalierMax"
Scopri la potenza di una strategia di trading innovativa, progettata per sfruttare al massimo i movimenti di inversione del mercato. La nostra soluzione automatizzata "Bot XFlip 30 s CavalierMax" offre un approccio sofisticato per entrare ed uscire dalle posizioni, garantendo una gestione dinamica del rischio e delle dimensioni degli ordini.
Caratteristiche Chiave:
Flip con Ritardo per Entrate Precise:
Dopo ogni inversione (flip), la strategia introduce un ritardo di una candela prima di attivare la prossima entry. Questo meccanismo riduce il rischio di false inversioni e assicura una conferma solida del cambiamento di tendenza.
Utilizzo di Candele Heikin Ashi e Time Frame M15:
Per ottenere segnali più fluidi e ridurre la volatilità intrinseca del mercato, la strategia è ottimizzata per l’uso con candele Heikin Ashi. Inoltre, il time frame consigliato per la visualizzazione è M15, garantendo un equilibrio perfetto tra tempestività e affidabilità dei segnali.
Gestione Avanzata del Rischio e del Money Management:
La strategia integra un sistema di trailing stop loss basato sull’equity, con input personalizzabili per adattarsi al profilo di rischio dell’utente. Inoltre, la dimensione dinamica dell’ordine si adatta automaticamente in base ai profitti o alle perdite, massimizzando il potenziale di guadagno.
Tecnologie Innovative di Analisi:
Sfrutta un mix di indicatori personalizzati e tecniche di regressione kernel per prevedere i movimenti del mercato. Il sistema applica filtri basati su volatilità, regime e ADX, garantendo l’entrata in posizioni solo quando le condizioni di mercato sono favorevoli.
Perché Scegliere "Bot XFlip 30 s CavalierMax":
Precisione nei Segnali: Il ritardo di una candela dopo il flip aiuta a evitare segnali prematuri, migliorando la precisione delle entrate e delle uscite.
Facilità d'Uso: Ottimizzato per Heikin Ashi e il time frame M15, è ideale sia per trader esperti che per chi desidera avvicinarsi al mondo del trading automatizzato.
Massima Personalizzazione: Gli input regolabili permettono di adattare la strategia alle specifiche esigenze e alla tolleranza al rischio di ogni trader.
Innovazione e Affidabilità: Con una combinazione di analisi tecnica avanzata e tecniche di machine learning, la strategia è pensata per dare risultati consistenti in un mercato in continua evoluzione.
Contatti:
Per maggiori informazioni e per scoprire come implementare "Bot XFlip 30 s CavalierMax" nel tuo trading, contattaci all'indirizzo: info@forex4all.og
Scegli l'innovazione, scegli l'efficacia: trasforma il tuo trading con "Bot XFlip 30 s CavalierMax"!
LuxSignals | Trillionaire TierYou can see the Author's instructions below to get access to this indicator
Our automated trading bot is engineered for traders who demand transparency, realistic backtesting, and disciplined risk management. The system is designed not only to deliver signals but also to operate under strict trading conditions that mimic real-world markets. Every element of the strategy has been fine‐tuned so that its performance metrics—whether measured by win rate, total profit, or profit factor—this all is controlled by LuxSignals’ algorithm. This algorithm is exactly what makes it unique from all other indicators on the market: The algorithm looks at 100 possible numbers for an input and then decided on the best one - eventually you have to enter this number into the settings, leaving you with no need to adjust the settings yourself via trial and error.
Why you need to change inputs
LuxSignals is on tradingview.com, which uses the coding language "Pine Script" for its indicators. Unfortunately, Pine Script is very limited in its capabilities and can't run too many calculations at a time or can't make multiple backtests at once. Each backtest with different settings requires an indicator to load again.
An indicator will load when it's added to the chart or if its settings have changed.
This is why you have to change LuxSignals' inputs a few times so it can collect the necessary data from backtests over time to decide on its best settings. With Pine Script it's impossible to run so many backtests at once, it would require it to load longer than a minute at once, but the limit for TradingView's free tier is 20 seconds.
How LuxSignals' algorithm works
LuxSignals actually only has two inputs: Input 1 and Input 2. The minimum input for each is 2, the maximum LuxSignals can recommend is 200. You can also use higher numbers than 200 to see its backtesting results.
At the end of each process (changing the inputs many times), you will receive the best settings for the exact chart and timeframe you are on for the starting settings you had.
In total LuxSignals has to decide on one settings pair of Input 1 and Input 2 from 40'000 possible ones (200 x 200 possible combinations). It does that by calculating the hypothetical backtesting results (the profit factor) of 100 different settings at once.
You can control for which Input these hypothetical results are with the "optimize for" setting. So if you optimize for Input 1, LuxSignals calculates 100 hypothetical results for all possible inputs of Input 1, ranging from 2 to 100. When you use extension, it test the inputs from 100 to 200. The same goes for Input 2.
Now Input 1 and Input 2 affect each other's backtesting results, that's why you have to switch between optimizing for one to another.
Strategy and Signal Generation
At the core of the bot is a refined indicator that blends classic technical analysis tools with a proprietary twist. The process is as follows:
* Average Price Calculation:
The system starts by computing the average price (AP) using the formula for HLC3 (the average of the high, low, and close prices). This balanced approach captures a comprehensive view of market price action.
* Exponential Smoothing:
An exponential moving average (EMA) over a period (n₁) is applied to the AP to obtain a smoothed value (ESA). This step filters out short-term noise while maintaining sensitivity to market changes.
* Volatility Measurement:
The absolute difference between the AP and its smoothed counterpart is then subjected to another EMA (using the same period n₁) to generate a dynamic volatility metric (D). This measurement adapts to market fluctuations.
* Normalization:
The difference between the AP and ESA is normalized by dividing it by (0.015 × D). This creates a channel indicator (CI) that scales according to current volatility levels.
* WaveTrend Oscillator Formation:
A second EMA (over period n₂) is applied to the normalized value (CI) to produce the final oscillator value (WT1). The WaveTrend oscillator, therefore, encapsulates both trend strength and market volatility in a single metric.
* Signal Generation:
Trading signals are derived from the oscillator’s behavior:
* A buy signal is triggered when WT1 crosses above zero.
* A sell signal is triggered when WT1 crosses below zero.
This carefully layered approach ensures that the signals are both timely and reliable, which LuxSignals takes care of.
We decided to leave the strategy backtesting results out because we designed our own backtesting system, but we used the tradingview strategy capabilities when the trading bot is enabled in the settings.
When the bot is active, strategy mode automatically engages all realistic trading conditions. This includes using realistic account sizes, applying actual commission fees, and incorporating slippage—all calibrated to mirror live market conditions. This activation ensures that each trade is sized appropriately, with risk on any single trade limited to 5–10% of total equity, thereby preserving capital.
Please note that the following guidelines have not been fully met in our current testing process: our published backtesting results might not completely avoid potential misinterpretations by traders; we have not utilized an account size reflective of the average trader’s capital; realistic commission fees and slippage may have not been incorporated into our simulations.
In summary, while we did not apply a fully comprehensive simulation of every realistic trading condition for the backtesting, our design ensures that the strategy is equipped with realistic risk management and execution parameters when actively trading. This dual approach allows traders to benefit from both efficient signal validation and robust, live market performance without compromising on safety or accuracy.
Trading is risky & most day traders lose money. All content, tools, scripts, articles, & education provided by LuxSignals are purely for informational & educational purposes only. Past performance does not guarantee future results.
Conclusion
Our automated trading bot stands out due to its transparent and its commitment to realistic, robust strategy testing. it offers traders a dependable tool for navigating the markets. Whether you prioritize win rate, total profit, or profit factor, this system is built to adapt and perform under real-world conditions while preserving your capital.
Renko Buy & Sell StrategyMy ETH Contract Strategy
Hello everyone! I’ve designed a contract trading strategy specifically for ETH. The goal is to capture market volatility!
Strategy Objectives
Capture both long and short opportunities in ETH.
Use the closing price as the basis for opening and closing trades to reduce noise and avoid frequent intraday triggers.
Core Tool
Renko Chart
Core Concept
Generate buy and sell signals using the crossover of the Renko chart’s opening and closing prices, combined with dynamic adjustments based on ATR (Average True Range).
Risk Management
Position Sizing: Risk only 1 contract of the account balance per trade (adjustable).
Stop Loss
None. Close the position and open a new one when a reversal signal appears.
Take Profit
None. Close the position and open a new one when a reversal signal appears.
Why Use This Strategy?
Simple and Effective: Combines fast signals with trend filtering to avoid blind trading.
Usage Recommendations
Best suited for ETH, with optimal performance on 15-minute and 30-minute charts (also works for BTC). Not suitable for other coins. My tests started with $1,000, and the returns have been promising.
Trend-Based Major Swing Profit StrategySuited for Smart Money Controlled Markets, Particularly Central SOEs and Government-Owned Corporations in Chinese A-Shares.
Strategy Advantages
Trend Confirmation
The dual confirmation system (Yellow-Blue Ladder + Smart Money Flow) reduces false signals.
Adaptive Position Sizing
Graduated position reduction allows for capitalizing on trend continuation while managing risk.
Institutional Insight
The Smart Money component attempts to track market participation from larger, more sophisticated players.
Market Condition Awareness
Volatility and trend strength filters help avoid choppy, directionless markets.
example:300002-1d
Smart Money Following StrategyLarge-Cap Low-Volatility
example:000066-1h
Entry Conditions
A buy signal is generated when ALL of the following conditions are met:
Yellow-Blue Ladder shows an entry signal (Fast lower line > Slow lower line)
Institutional Money (MM_RSI) exceeds threshold (>5)
Market volatility is sufficient (ATR% > 3%)
Trend strength is adequate (ADX > 25)
Exit Conditions
Positions are closed when EITHER:
Yellow-Blue Ladder shows an exit signal (Fast upper line < Slow upper line)
Retail Money rises above threshold (>5), indicating excessive retail participation
$$ BTC,BNB,ETH & SOL ONLY
"Crypto Trend Strategy – Smart Entries & Top/Bottom Signals"
This strategy is designed for BTC, BNB, ETH, and SOL, using RSI, moving averages, and ATR to identify high-probability buy and short opportunities. It features:
✅ Smart Entries & Exits – Combines RSI and volume for precise entries, with ATR-based stop loss and take profit.
✅ Top & Bottom Signals – Labels potential market tops and bottoms based on RSI extremes and price action.
✅ Proven Performance – Backtested for 2024 with a 93.64% win rate and +189.83% annual profit.
Perfect for traders looking for reliable trend signals and optimized risk management. 🚀
$$ BTC,BNB,ETH & SOL ONLY
"Crypto Trend Strategy – Smart Entries & Top/Bottom Signals"
This strategy is designed for BTC, BNB, ETH, and SOL, using RSI, moving averages, and ATR to identify high-probability buy and short opportunities. It features:
✅ Smart Entries & Exits – Combines RSI and volume for precise entries, with ATR-based stop loss and take profit.
✅ Top & Bottom Signals – Labels potential market tops and bottoms based on RSI extremes and price action.
✅ Proven Performance – Backtested for 2024 with a 93.64% win rate and +189.83% annual profit.
Perfect for traders looking for reliable trend signals and optimized risk management. 🚀
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.
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.
[SHORT ONLY] Internal Bar Strength (IBS) Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a short position when the IBS indicates overbought conditions and exits when the IBS reaches oversold levels. This strategy is Short-Only and was designed to be used on the Daily timeframe for Stocks and ETFs.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- Low IBS (≤ 0.2) : Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8) : Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The IBS value rises to or above the Upper Threshold (default: 0.9).
The Closing price is greater than the previous bars High (close>high ).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
An exit Signal is generated when the IBS value drops to or below the Lower Threshold (default: 0.3). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy enters trades. Default is 0.9.
Lower Threshold: The IBS level at which the strategy exits short positions. Default is 0.3.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs markets and performs best when prices frequently revert to the mean.
The strategy can be optimized further using additional conditions such as using volume or volatility filters.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
Iron Bot Statistical Trend Filter📌 Iron Bot Statistical Trend Filter
📌 Overview
Iron Bot Statistical Trend Filter is an advanced trend filtering strategy that combines statistical methods with technical analysis.
By leveraging Z-score and Fibonacci levels, this strategy quantitatively analyzes market trends to provide high-precision entry signals.
Additionally, it includes an optional EMA filter to enhance trend reliability.
Risk management is reinforced with Stop Loss (SL) and four Take Profit (TP) levels, ensuring a balanced approach to risk and reward.
📌 Key Features
🔹 1. Statistical Trend Filtering with Z-Score
This strategy calculates the Z-score to measure how much the price deviates from its historical mean.
Positive Z-score: Indicates a statistically high price, suggesting a strong uptrend.
Negative Z-score: Indicates a statistically low price, signaling a potential downtrend.
Z-score near zero: Suggests a ranging market with no strong trend.
By using the Z-score as a filter, market noise is reduced, leading to more reliable entry signals.
🔹 2. Fibonacci Levels for Trend Reversal Detection
The strategy integrates Fibonacci retracement levels to identify potential reversal points in the market.
High Trend Level (Fibo 23.6%): When the price surpasses this level, an uptrend is likely.
Low Trend Level (Fibo 78.6%): When the price falls below this level, a downtrend is expected.
Trend Line (Fibo 50%): Acts as a midpoint, helping to assess market balance.
This allows traders to visually confirm trend strength and turning points, improving entry accuracy.
🔹 3. EMA Filter for Trend Confirmation (Optional)
The strategy includes an optional 200 EMA (Exponential Moving Average) filter for trend validation.
Price above 200 EMA: Indicates a bullish trend (long entries preferred).
Price below 200 EMA: Indicates a bearish trend (short entries preferred).
Enabling this filter reduces false signals and improves trend-following accuracy.
🔹 4. Multi-Level Take Profit (TP) and Stop Loss (SL) Management
To ensure effective risk management, the strategy includes four Take Profit levels and a Stop Loss:
Stop Loss (SL): Automatically closes trades when the price moves against the position by a certain percentage.
TP1 (+0.75%): First profit-taking level.
TP2 (+1.1%): A higher probability profit target.
TP3 (+1.5%): Aiming for a stronger trend move.
TP4 (+2.0%): Maximum profit target.
This system secures profits at different stages and optimizes risk-reward balance.
🔹 5. Automated Long & Short Trading Logic
The strategy is built using Pine Script®’s strategy.entry() and strategy.exit(), allowing fully automated trading.
Long Entry:
Price is above the trend line & high trend level.
Z-score is positive (indicating an uptrend).
(Optional) Price is also above the EMA for stronger confirmation.
Short Entry:
Price is below the trend line & low trend level.
Z-score is negative (indicating a downtrend).
(Optional) Price is also below the EMA for stronger confirmation.
This logic helps filter out unnecessary trades and focus only on high-probability entries.
📌 Trading Parameters
This strategy is designed for flexible capital management and risk control.
💰 Account Size: $5000
📉 Commissions and Slippage: Assumes 94 pips commission per trade and 1 pip slippage.
⚖️ Risk per Trade: Adjustable, with a default setting of 1% of equity.
These parameters help preserve capital while optimizing the risk-reward balance.
📌 Visual Aids for Clarity
To enhance usability, the strategy includes clear visual elements for easy market analysis.
✅ Trend Line (Blue): Indicates market midpoint and helps with entry decisions.
✅ Fibonacci Levels (Yellow): Highlights high and low trend levels.
✅ EMA Line (Green, Optional): Confirms long-term trend direction.
✅ Entry Signals (Green for Long, Red for Short): Clearly marked buy and sell signals.
These features allow traders to quickly interpret market conditions, even without advanced technical analysis skills.
📌 Originality & Enhancements
This strategy is developed based on the IronXtreme and BigBeluga indicators,
combining a unique Z-score statistical method with Fibonacci trend analysis.
Compared to conventional trend-following strategies, it leverages statistical techniques
to provide higher-precision entry signals, reducing false trades and improving overall reliability.
📌 Summary
Iron Bot Statistical Trend Filter is a statistically-driven trend strategy that utilizes Z-score and Fibonacci levels.
High-precision trend analysis
Enhanced accuracy with an optional EMA filter
Optimized risk management with multiple TP & SL levels
Visually intuitive chart design
Fully customizable parameters & leverage support
This strategy reduces false signals and helps traders ride the trend with confidence.
Try it out and take your trading to the next level! 🚀
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.
Internal Bar Strength (IBS) Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a long position when the IBS indicates oversold conditions and exits when the IBS reaches overbought levels. This strategy was designed to be used on the daily timeframe.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- **Low IBS (≤ 0.2)**: Indicates the close is near the bar's low, suggesting oversold conditions.
- **High IBS (≥ 0.8)**: Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The IBS value drops below the Lower Threshold (default: 0.2).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the IBS value rises to or above the Upper Threshold (default: 0.8). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy exits trades. Default is 0.8.
Lower Threshold: The IBS level at which the strategy enters long positions. Default is 0.2.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for ranging markets and performs best when prices frequently revert to the mean.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
Systematic Risk Aggregation ModelThe “Systematic Risk Aggregation Model” is a quantitative trading strategy implemented in Pine Script™ designed to assess and visualize market risk by aggregating multiple financial risk factors. This model uses a multi-dimensional scoring approach to quantify systemic risk, incorporating volatility, drawdowns, put/call ratios, tail risk, volume spikes, and the Sharpe ratio. It derives a composite risk score, which is dynamically smoothed and plotted alongside adaptive Bollinger Bands to identify trading opportunities. The strategy’s theoretical framework aligns with modern portfolio theory and risk management literature (Markowitz, 1952; Taleb, 2007).
-----------------------------------------------------------------------------------------------
Key Components of the Model
1. Volatility as a Risk Proxy
The model calculates the standard deviation of the closing price over a specified period (volatility_length) to quantify market uncertainty. Volatility is normalized to a score between 0 and 100, using its historical minimum and maximum values.
Reference: Volatility has long been regarded as a critical measure of financial risk and uncertainty in capital markets (Hull, 2008).
2. Drawdown Assessment
The drawdown metric captures the relative distance of the current price from the highest price over the specified period (drawdown_length). This is converted into a normalized score to reflect the magnitude of recent losses.
Reference: Drawdown is a key metric in risk management, often used to measure potential downside risk in portfolios (Maginn et al., 2007).
3. Put/Call Ratio as a Sentiment Indicator
The strategy integrates the put/call ratio, sourced from an external symbol, to assess market sentiment. High values often indicate bearish sentiment, while low values suggest bullish sentiment (Whaley, 2000). The score is normalized similarly to other metrics.
4. Tail Risk via Modified Z-Score
Tail risk is approximated using the modified Z-score, which measures the deviation of the closing price from its moving average relative to its standard deviation. This approach captures extreme price movements and potential “black swan” events.
Reference: Taleb (2007) discusses the importance of considering tail risks in financial systems.
5. Volume Spikes as a Proxy for Market Activity
A volume spike is defined as the ratio of current volume to its moving average. This ratio is normalized into a score, reflecting unusual trading activity, which may signal market turning points.
Reference: Volume analysis is a foundational tool in technical analysis and is often linked to price momentum (Murphy, 1999).
6. Sharpe Ratio for Risk-Adjusted Returns
The Sharpe ratio measures the risk-adjusted return of the asset, using the mean log return divided by its standard deviation over the same period. This ratio is transformed into a score, reflecting the attractiveness of returns relative to risk.
Reference: Sharpe (1966) introduced the Sharpe ratio as a standard measure of portfolio performance.
----------------------------------------------------------------------------------------------
Composite Risk Score
The composite risk score is calculated as a weighted average of the individual risk factors:
• Volatility: 30%
• Drawdown: 20%
• Put/Call Ratio: 20%
• Tail Risk (Z-Score): 15%
• Volume Spike: 10%
• Sharpe Ratio: 5%
This aggregation captures the multi-dimensional nature of systemic risk and provides a unified measure of market conditions.
----------------------------------------------------------------------------------------------
Dynamic Bands with Bollinger Bands
The composite risk score is smoothed using a moving average and bounded by Bollinger Bands (basis ± 2 standard deviations). These bands provide dynamic thresholds for identifying overbought and oversold market conditions:
• Upper Band: Signals overbought conditions, where risk is elevated.
• Lower Band: Indicates oversold conditions, where risk subsides.
----------------------------------------------------------------------------------------------
Trading Strategy
The strategy operates on the following rules:
1. Entry Condition: Enter a long position when the risk score crosses above the upper Bollinger Band, indicating elevated market activity.
2. Exit Condition: Close the long position when the risk score drops below the lower Bollinger Band, signaling a reduction in risk.
These conditions are consistent with momentum-based strategies and adaptive risk control.
----------------------------------------------------------------------------------------------
Conclusion
This script exemplifies a systematic approach to risk aggregation, leveraging multiple dimensions of financial risk to create a robust trading strategy. By incorporating well-established risk metrics and sentiment indicators, the model offers a comprehensive view of market dynamics. Its adaptive framework makes it versatile for various market conditions, aligning with contemporary advancements in quantitative finance.
----------------------------------------------------------------------------------------------
References
1. Hull, J. C. (2008). Options, Futures, and Other Derivatives. Pearson Education.
2. Maginn, J. L., Tuttle, D. L., McLeavey, D. W., & Pinto, J. E. (2007). Managing Investment Portfolios: A Dynamic Process. Wiley.
3. Markowitz, H. (1952). Portfolio Selection. The Journal of Finance, 7(1), 77–91.
4. Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance.
5. Sharpe, W. F. (1966). Mutual Fund Performance. The Journal of Business, 39(1), 119–138.
6. Taleb, N. N. (2007). The Black Swan: The Impact of the Highly Improbable. Random House.
7. Whaley, R. E. (2000). The Investor Fear Gauge. The Journal of Portfolio Management, 26(3), 12–17.
Kinetik Model [NantzOS]Description:
The Kinetik Model is a strategy that reinterprets the traditional stochastic oscillator to take advantage of momentum instead of the standard overbought/oversold reversal approach. Primarily operating upon zero line crosses, what you observe is the difference between the K and D plots. the first unique feature about this system is that the stochastic calculation has been made "boundless" in order to more accurately gauge the rate of momentum. It doesn't consolidate in upper or lower channels. The second feature is the dataset typically known as %K smoothing is set to a fixed value, the %K length and %D smoothing serve as a customizable length and signal. The third is that it takes trades based on the difference between the fixed %K and customizable %D, a reminder that is your oscillator display. This oscillator versus the traditional stochastic is comparable to the MACD histogram versus the MACD line plots. The fourth feature is that the user dynamically tests the upper and lower thresholds, displayed with a color background on the oscillator, to act as a filtration method. The system won't take shorts if momentum is above the upper threshold and won't take longs if it's performing below the lower threshold. Lastly, this system uses a trailing stop exit strategy, which can be deactivated, and the option to test long only.
Features Summarized:
A reimagined stochastic that operates without fixed boundries, offering flexibility for properly observing momentum.
High and low levels act as extreme zones for highlighting strong trends.
Users can modify data length, signal input, and thresholds from the settings to suit their preferred asset and time frame.
A built-in optional stop-loss mechanism with adjustable sensitivity, enabling tighter or more relaxed risk management.
Includes and optional long only setting and candle coloring with signals.
How to Use:
Navigate to the indicator tab in TradingView to search and apply the Kinetik Model.
Access the settings icon on the indicator to navigate the style and settings:
Length: Modifies the amount of data used to calculate the oscillator.
Signal: Further calibrates the sensitivity of the final plot.
High/Low Thresholds: A single filtration method for defining extreme zones of momentum bias, which determines entry/exits along with the zero line crosses.
Remaining Settings: Customize stop loss calibration along with optional features and styling choice.
Oscillators have been a staple in financial analysis since the mid-20th century, with tools like the RSI, MACD, and Stochastic helping gauge overbought and oversold conditions. What makes the latter unique is that the stochastic utilizes highs and lows as opposed to various EMA rates of change. Kinetik's unique boundless stochastic calculation and K/D difference plotting are the heart of this strategy.
Kernel Regression Envelope with SMI OscillatorThis script combines the predictive capabilities of the **Nadaraya-Watson estimator**, implemented by the esteemed jdehorty (credit to him for his excellent work on the `KernelFunctions` library and the original Nadaraya-Watson Envelope indicator), with the confirmation strength of the **Stochastic Momentum Index (SMI)** to create a dynamic trend reversal strategy. The core idea is to identify potential overbought and oversold conditions using the Nadaraya-Watson Envelope and then confirm these signals with the SMI before entering a trade.
**Understanding the Nadaraya-Watson Envelope:**
The Nadaraya-Watson estimator is a non-parametric regression technique that essentially calculates a weighted average of past price data to estimate the current underlying trend. Unlike simple moving averages that give equal weight to all past data within a defined period, the Nadaraya-Watson estimator uses a **kernel function** (in this case, the Rational Quadratic Kernel) to assign weights. The key parameters influencing this estimation are:
* **Lookback Window (h):** This determines how many historical bars are considered for the estimation. A larger window results in a smoother estimation, while a smaller window makes it more reactive to recent price changes.
* **Relative Weighting (alpha):** This parameter controls the influence of different time frames in the estimation. Lower values emphasize longer-term price action, while higher values make the estimator more sensitive to shorter-term movements.
* **Start Regression at Bar (x\_0):** This allows you to exclude the potentially volatile initial bars of a chart from the calculation, leading to a more stable estimation.
The script calculates the Nadaraya-Watson estimation for the closing price (`yhat_close`), as well as the highs (`yhat_high`) and lows (`yhat_low`). The `yhat_close` is then used as the central trend line.
**Dynamic Envelope Bands with ATR:**
To identify potential entry and exit points around the Nadaraya-Watson estimation, the script uses **Average True Range (ATR)** to create dynamic envelope bands. ATR measures the volatility of the price. By multiplying the ATR by different factors (`nearFactor` and `farFactor`), we create multiple bands:
* **Near Bands:** These are closer to the Nadaraya-Watson estimation and are intended to identify potential immediate overbought or oversold zones.
* **Far Bands:** These are further away and can act as potential take-profit or stop-loss levels, representing more extreme price extensions.
The script calculates both near and far upper and lower bands, as well as an average between the near and far bands. This provides a nuanced view of potential support and resistance levels around the estimated trend.
**Confirming Reversals with the Stochastic Momentum Index (SMI):**
While the Nadaraya-Watson Envelope identifies potential overextended conditions, the **Stochastic Momentum Index (SMI)** is used to confirm a potential trend reversal. The SMI, unlike a traditional stochastic oscillator, oscillates around a zero line. It measures the location of the current closing price relative to the median of the high/low range over a specified period.
The script calculates the SMI on a **higher timeframe** (defined by the "Timeframe" input) to gain a broader perspective on the market momentum. This helps to filter out potential whipsaws and false signals that might occur on the current chart's timeframe. The SMI calculation involves:
* **%K Length:** The lookback period for calculating the highest high and lowest low.
* **%D Length:** The period for smoothing the relative range.
* **EMA Length:** The period for smoothing the SMI itself.
The script uses a double EMA for smoothing within the SMI calculation for added smoothness.
**How the Indicators Work Together in the Strategy:**
The strategy enters a long position when:
1. The closing price crosses below the **near lower band** of the Nadaraya-Watson Envelope, suggesting a potential oversold condition.
2. The SMI crosses above its EMA, indicating positive momentum.
3. The SMI value is below -50, further supporting the oversold idea on the higher timeframe.
Conversely, the strategy enters a short position when:
1. The closing price crosses above the **near upper band** of the Nadaraya-Watson Envelope, suggesting a potential overbought condition.
2. The SMI crosses below its EMA, indicating negative momentum.
3. The SMI value is above 50, further supporting the overbought idea on the higher timeframe.
Trades are closed when the price crosses the **far band** in the opposite direction of the trade. A stop-loss is also implemented based on a fixed value.
**In essence:** The Nadaraya-Watson Envelope identifies areas where the price might be deviating significantly from its estimated trend. The SMI, calculated on a higher timeframe, then acts as a confirmation signal, suggesting that the momentum is shifting in the direction of a potential reversal. The ATR-based bands provide dynamic entry and exit points based on the current volatility.
**How to Use the Script:**
1. **Apply the script to your chart.**
2. **Adjust the "Kernel Settings":**
* **Lookback Window (h):** Experiment with different values to find the smoothness that best suits the asset and timeframe you are trading. Lower values make the envelope more reactive, while higher values make it smoother.
* **Relative Weighting (alpha):** Adjust to control the influence of different timeframes on the Nadaraya-Watson estimation.
* **Start Regression at Bar (x\_0):** Increase this value if you want to exclude the initial, potentially volatile, bars from the calculation.
* **Stoploss:** Set your desired stop-loss value.
3. **Adjust the "SMI" settings:**
* **%K Length, %D Length, EMA Length:** These parameters control the sensitivity and smoothness of the SMI. Experiment to find settings that work well for your trading style.
* **Timeframe:** Select the higher timeframe you want to use for SMI confirmation.
4. **Adjust the "ATR Length" and "Near/Far ATR Factor":** These settings control the width and sensitivity of the envelope bands. Smaller ATR lengths make the bands more reactive to recent volatility.
5. **Customize the "Color Settings"** to your preference.
6. **Observe the plots:**
* The **Nadaraya-Watson Estimation (yhat)** line represents the estimated underlying trend.
* The **near and far upper and lower bands** visualize potential overbought and oversold zones based on the ATR.
* The **fill areas** highlight the regions between the near and far bands.
7. **Look for entry signals:** A long entry is considered when the price touches or crosses below the lower near band and the SMI confirms upward momentum. A short entry is considered when the price touches or crosses above the upper near band and the SMI confirms downward momentum.
8. **Manage your trades:** The script provides exit signals when the price crosses the far band. The fixed stop-loss will also close trades if the price moves against your position.
**Justification for Combining Nadaraya-Watson Envelope and SMI:**
The combination of the Nadaraya-Watson Envelope and the SMI provides a more robust approach to identifying potential trend reversals compared to using either indicator in isolation. The Nadaraya-Watson Envelope excels at identifying potential areas where the price is overextended relative to its recent history. However, relying solely on the envelope can lead to false signals, especially in choppy or volatile markets. By incorporating the SMI as a confirmation tool, we add a momentum filter that helps to validate the potential reversals signaled by the envelope. The higher timeframe SMI further helps to filter out noise and focus on more significant shifts in momentum. The ATR-based bands add a dynamic element to the entry and exit points, adapting to the current market volatility. This mashup aims to leverage the strengths of each indicator to create a more reliable trading strategy.
LETF Leveraged Edge Strategy v1.5Overview
The strategy is based on Stochastics to detect trends and then makes Buys and Sell based on custom entry and exit criteria as described below in the Execution Logic Rules section. It will NOT work with standard Stochastics.
This is not a standard Stochastics implementation. It has been customized and modified, and does not match any widely known Stochastics variations (like Fast, Slow, or Full Stochastics) in its smoothing and iterative calculation process with:
• A unique smoothing mechanism.
• Iterative calculations.
• Additional conditional logic for strategy execution.
This strategy is designed to focus on volatile, liquid leveraged ETFs to capture gains equal to or better than Buy and Hold, and mitigate the risk of trading with a goal of reducing drawdown to a lot less than Buy and Hold. It has had successful backtest performance to varying degrees with TQQQ, SOXL, FNGU, TECL, FAS, UPRO, NAIL and SPXL. Results have not been good on other LETFs that have been backtested.
Performance
In this backtest the Net Profit shows to be $4,561 or 45.61%. Considering the initial order size was $1,000 I have to wonder if the Strategy Tester is calculating this correctly. The Strategy Tester Performance Summary shows the Buy and Hold Return at $61,165 or 611.7%. Based on calculating the price of the last shares sold, less the price paid, times the number of initial shares purchased, my math shows the Buy and Hold Gain at $4,572 or about equal with the strategy performance in this case. The Performance Summary also states the strategy had a Max DD of 3.46% which I believe is incorrect. Based on other backtests I’ve done, I believe the strategy drawdown here was closer to 28.4% and the Buy and Hold Drawdown at 82.7%. I manually calculated the Buy and Hold drawdown.
How it Works
The author provides training and support resource materials for this at his website. The strategy execution logic is driven by these rules:
Execution Logic Rules
Buy the LETF When:
BR #1a) The Daily Fast Line (FL) crosses above the Daily Slow Line (SL) and the FL is between the Low (L*) and High (H*) Range set (often referred to as Oversold and Overbought Lines). This can execute (Buy) any trading day of the week.
BR #1b) Re-Buy the next day after any Stop or Take Profit Sell if the Buy Rule condition is true (FL is above SL), if not, remain in cash and wait for the next Buy Signal.
Sell the LETF When:
SR #1a) The Daily Fast Line (FL) crosses below Daily Slow Line (SL) within the Low (L*) and High (H*) Range (often referred to as Oversold and Overbought Lines). “Crossunder Range Exit” This can execute (Sell) any trading day of the week.
SR #1b) If the (FL) crosses Below the SL above the Exit Level*, wait. Only Sell if the FL drops down below the Exit Level* “Crossunder Level Exit” This can execute (Sell) any trading day of the week.
SR #2a) Sell at the open any day the gap-down price is at or below the 1-Day Stop%*, based on previous day’s closing price (Execute on the day it happens.)
SR #2b) Sell intraday any day the price is at or below the 1-Day Stop %*, based on previous day’s closing price (Execute on the day it happens.)
SR #3a) Sell at the open any day the price is at or below the Trailing Stop %*, based on highest intraday price since Buy date (Execute on the day it happens.)
SR #3b) Sell intraday any day the price is at or below the Trailing Stop%*, based on highest intraday price since Buy date (Execute on the day it happens.)
SR #4) Sell any day when the opening price exceeds, or intraday price meets the Profit Target % price* (Execute on the day it happens.)
SR #5) After each Sell go to Rule BR #1b to determine if a Re-Buy should occur the next day, or stay in cash until next Buy Signal
Settings:
Properties Tab – Initial Capital has been set to $10,000 and order size 10% of Equity, 0.1% commission and 3 Ticks for slippage. Net order size is $1,000
Input Tab:
Stochastic
Timeframe is selected to Daily or Weekly based on preference. Daily has more trades, but on average higher profitability.
Type: Proprietary (best selection for most LETFs, but a few will work better with the Full selection
%k Length 20, %K Smoothing 14, %D Smoothing (many LETFs work better with a specific Stoch setting, often each different) A List of these is provided for your starting point.
Trade Settings
Direction: Longs (This strategy only works on the Long side)
Stop Type: Trailing is recommended, but Fixed is an option.
Stop % (based on user risk tolerance)
PD Stop % (Suggest start at 5%. Based on volatility of LETF and is a stop percentage from prior day’s close. Designed to protect against sudden market volatility. Will need to balance between strategy performance and user risk tolerance)
Profit Target: User preference. (I can help with suggestions based on historical performance)
Entry/Exit Conditions
Enter on Tie: Default Checked – if a Fast line crosses a Slow line for a Buy signal, but doesn’t do so in the range set, this will trigger if it crosses at a tie.
Renter – Default Checked – If stopped out of a position, this tells the strategy to re-buy the position the next day if the conditions are still positive.
Exit Level: This is a exit level for a Fast cross below a Slow line that takes place above the Sell Range, but only happens if the Fast continues down to the level set. These usually don’t happen often, but can have a significant impact on performance. Unfortunately, it’s a trial and error process starting with 90 and working down to see if there’s any positive impact.
Trade Range
Buy Range: Start at typical 20 to 80. Expand the low end down first to check on performance impact. Normally a wide buying range is better for performance.
Sell Range: Start at 20 to 80 and tighten gradually to see performance impact. In some cases a very tight sell range does better. I have worked on our primary LETFs for many months to determine ranges for each that typically produce better results.
External Indicator: Some additional indicators have a positive impact on the strategy performance by increasing P/l, reducing drawdown and reducing the number of trades. This is not always the case and each LETF and time period for the LETF will have a bearing on whether the secondary indicator will help or not. Two that have helped are the MACD Histogram, and the Sloe-Velocity Indicator by Kamleshkumar43. Sometimes a couple of different indicators will have a positive impact, then it’s a personal preference which you pick to use with the strategy.
Since this strategy is focused on a very narrow selection of liquid LETFs, I have a lot of experience experimenting with the settings for the primary ones and can suggest things that will help. Additional training on the rules, working with the settings, and mitigating some of the negative trades during choppy markets is available at the website.
Chart
The strategy can be selected to use either a Daily or Weekly version of stochastic. This is important because the characteristics are different while still generating very good gains and minimal drawdowns. Generally, the daily stochastic will have a greater number of, and certainly more frequent, trades than the weekly stochastic. However, on average the daily version of the stochastic will generates greater profitability.
The Settings tabs have tooltip icons that will assist in inputting values that correspond to the written rules for the strategy, and some include specific rule detail.
Buying
The strategy generates Buy signals with the Fast line crossing over the Slow line within a “Buy Range” which is adjusted based on volatility of the leveraged ETF. This is unique in that a default is set for these entries to occur if the values are tied and doesn’t need to be within the high and low range if that occurs. The trader can select in the strategy for this to occur the same day, if he’s selected a Daily Stochastic timeframe, or at the end of the trading week if he’s selected a Weekly stochastic timeframe. The volatility of a leveraged ETF will sometimes cause a shake-out exit, a trailing stop can be hit, or there can be an exit based on taking a profit. A big part of the timing challenge was how to handle these. The strategy normally (set as a default) will immediately re-buy the next day only if the original buy conditions are still true. This helps capture gains when conditions are still favorable but keeps the trader out when they’re not.
Selling
Exits are handled in several ways. The strategy will exit if there is a fast line cross below a slow line within the “range”. The range is adjusted based on volatility of the leveraged ETF. The exit occurs at the close of the day if the trader has selected to use a Daily stochastic setting. The exit will occur at the end of the trading week if the trader has chosen a weekly stochastic strategy. The trader will set a level based on the instrument and volatility for another exit type. The level will sometimes coincide with the range exit high level but does not need to. If a fast line crosses down through a slow line above the level set, and then comes down to that level, the strategy will exit the position.
Another unique aspect of the strategy is the PD Stop setting. This is short for “Prior Day”, Rather than a normal stop based on the price paid for a position, the PD Stop is based on a percentage drop from the previous day’s closing price. This helps account for the volatility of the leveraged ETF and will cause an exit quickly if there’s a market, or index moving event. This helps capture gains and reduce risk should there be continued pullback.
Exits will also occur based on setting a trailing stop level and profit taking level. These are adjusted based on the leveraged ETFs volatility and historical performance.
Limitations
Choppy, or sideways markets are the most prone to poor performance and potential for being stopped out multiple times. If stopped out two consecutive times, make sure you’re monitoring market health and there are clear signs of a new uptrend such as a 10D and 21D MA in proper alignment and moving up. If you get a Buy signal from the strategy and you’re not confident yet about market and price direction then it’s fine to wait a day, or several days, to enter after the Buy signal when you have greater confidence about market direction. The author can help with a short list of tactical rules developed for these sideways or choppy markets.
This strategy has proven successful backtest results with a very limited set of LETFs as discussed earlier. The author does not know if it will prove successful with any others, or other types of ETFs such as 2X or plain ETFs. A lot more testing needs to be done.
The strategy buys and sells , excluding stops or take profit, at the market close. It can be very challenging to enter an order at market close.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script do not provide any financial advice and are for educational and entertainment purposes only.
TTM Grid StrategyThis strategy uses a TTM (based on EMAs of highs and lows) to determine the market's trend direction.
It then deploys a grid trading system around a dynamically updated base price, with the grid's direction and levels adjusting based on the trend.
Trades are executed as the price crosses the predefined grid levels, with the strategy risking a set percentage of equity per trade.
Core Strategy Logic:
TTM State Calculation (ttmState() function):
* Calculates two EMAs based on the `ttmPeriod`: one for the lows (`lowMA`) and one for the highs (`highMA`).
* Defines two threshold levels: `lowThird` (1/3 from the bottom) and `highThird` (2/3 from the bottom) of the range between `highMA` and `lowMA`.
* Returns the current TTM state as an integer:
+ `1` if the close price is above `highThird` (indicating an uptrend).
+ `0` if the close price is below `lowThird` (indicating a downtrend).
+ `-1` if the close price is between `lowThird` and `highThird` (indicating a neutral state).
MultiLayer Awesome Oscillator Saucer Strategy [Skyrexio]Overview
MultiLayer Awesome Oscillator Saucer Strategy leverages the combination of Awesome Oscillator (AO), Williams Alligator, Williams Fractals and Exponential Moving Average (EMA) to obtain the high probability long setups. Moreover, strategy uses multi trades system, adding funds to long position if it considered that current trend has likely became stronger. Awesome Oscillator is used for creating signals, while Alligator and Fractal are used in conjunction as an approximation of short-term trend to filter them. At the same time EMA (default EMA's period = 100) is used as high probability long-term trend filter to open long trades only if it considers current price action as an uptrend. More information in "Methodology" and "Justification of Methodology" paragraphs. The strategy opens only long trades.
Unique Features
No fixed stop-loss and take profit: Instead of fixed stop-loss level strategy utilizes technical condition obtained by Fractals and Alligator to identify when current uptrend is likely to be over (more information in "Methodology" and "Justification of Methodology" paragraphs)
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Multilayer trades opening system: strategy uses only 10% of capital in every trade and open up to 5 trades at the same time if script consider current trend as strong one.
Short and long term trend trade filters: strategy uses EMA as high probability long-term trend filter and Alligator and Fractal combination as a short-term one.
Methodology
The strategy opens long trade when the following price met the conditions:
1. Price closed above EMA (by default, period = 100). Crossover is not obligatory.
2. Combination of Alligator and Williams Fractals shall consider current trend as an upward (all details in "Justification of Methodology" paragraph)
3. Awesome Oscillator shall create the "Saucer" long signal (all details in "Justification of Methodology" paragraph). Buy stop order is placed one tick above the candle's high of last created "Saucer signal".
4. If price reaches the order price, long position is opened with 10% of capital.
5. If currently we have opened position and price creates and hit the order price of another one "Saucer" signal another one long position will be added to the previous with another one 10% of capital. Strategy allows to open up to 5 long trades simultaneously.
6. If combination of Alligator and Williams Fractals shall consider current trend has been changed from up to downtrend, all long trades will be closed, no matter how many trades has been opened.
Script also has additional visuals. If second long trade has been opened simultaneously the Alligator's teeth line is plotted with the green color. Also for every trade in a row from 2 to 5 the label "Buy More" is also plotted just below the teeth line. With every next simultaneously opened trade the green color of the space between teeth and price became less transparent.
Strategy settings
In the inputs window user can setup strategy setting: EMA Length (by default = 100, period of EMA, used for long-term trend filtering EMA calculation). User can choose the optimal parameters during backtesting on certain price chart.
Justification of Methodology
Let's go through all concepts used in this strategy to understand how they works together. Let's start from the easies one, the EMA. Let's briefly explain what is EMA. The Exponential Moving Average (EMA) is a type of moving average that gives more weight to recent prices, making it more responsive to current price changes compared to the Simple Moving Average (SMA). It is commonly used in technical analysis to identify trends and generate buy or sell signals. It can be calculated with the following steps:
1.Calculate the Smoothing Multiplier:
Multiplier = 2 / (n + 1), Where n is the number of periods.
2. EMA Calculation
EMA = (Current Price) × Multiplier + (Previous EMA) × (1 − Multiplier)
In this strategy uses EMA an initial long term trend filter. It allows to open long trades only if price close above EMA (by default 50 period). It increases the probability of taking long trades only in the direction of the trend.
Let's go to the next, short-term trend filter which consists of Alligator and Fractals. Let's briefly explain what do these indicators means. The Williams Alligator, developed by Bill Williams, is a technical indicator designed to spot trends and potential market reversals. It uses three smoothed moving averages, referred to as the jaw, teeth, and lips:
Jaw (Blue Line): The slowest of the three, based on a 13-period smoothed moving average shifted 8 bars ahead.
Teeth (Red Line): The medium-speed line, derived from an 8-period smoothed moving average shifted 5 bars forward.
Lips (Green Line): The fastest line, calculated using a 5-period smoothed moving average shifted 3 bars forward.
When these lines diverge and are properly aligned, the "alligator" is considered "awake," signaling a strong trend. Conversely, when the lines overlap or intertwine, the "alligator" is "asleep," indicating a range-bound or sideways market. This indicator assists traders in identifying when to act on or avoid trades.
The Williams Fractals, another tool introduced by Bill Williams, are used to pinpoint potential reversal points on a price chart. A fractal forms when there are at least five consecutive bars, with the middle bar displaying the highest high (for an up fractal) or the lowest low (for a down fractal), relative to the two bars on either side.
Key Points:
Up Fractal: Occurs when the middle bar has a higher high than the two preceding and two following bars, suggesting a potential downward reversal.
Down Fractal: Happens when the middle bar shows a lower low than the surrounding two bars, hinting at a possible upward reversal.
Traders often combine fractals with other indicators to confirm trends or reversals, improving the accuracy of trading decisions.
How we use their combination in this strategy? Let’s consider an uptrend example. A breakout above an up fractal can be interpreted as a bullish signal, indicating a high likelihood that an uptrend is beginning. Here's the reasoning: an up fractal represents a potential shift in market behavior. When the fractal forms, it reflects a pullback caused by traders selling, creating a temporary high. However, if the price manages to return to that fractal’s high and break through it, it suggests the market has "changed its mind" and a bullish trend is likely emerging.
The moment of the breakout marks the potential transition to an uptrend. It’s crucial to note that this breakout must occur above the Alligator's teeth line. If it happens below, the breakout isn’t valid, and the downtrend may still persist. The same logic applies inversely for down fractals in a downtrend scenario.
So, if last up fractal breakout was higher, than Alligator's teeth and it happened after last down fractal breakdown below teeth, algorithm considered current trend as an uptrend. During this uptrend long trades can be opened if signal was flashed. If during the uptrend price breaks down the down fractal below teeth line, strategy considered that uptrend is finished with the high probability and strategy closes all current long trades. This combination is used as a short term trend filter increasing the probability of opening profitable long trades in addition to EMA filter, described above.
Now let's talk about Awesome Oscillator's "Sauser" signals. Briefly explain what is the Awesome Oscillator. The Awesome Oscillator (AO), created by Bill Williams, is a momentum-based indicator that evaluates market momentum by comparing recent price activity to a broader historical context. It assists traders in identifying potential trend reversals and gauging trend strength.
AO = SMA5(Median Price) − SMA34(Median Price)
where:
Median Price = (High + Low) / 2
SMA5 = 5-period Simple Moving Average of the Median Price
SMA 34 = 34-period Simple Moving Average of the Median Price
Now we know what is AO, but what is the "Saucer" signal? This concept was introduced by Bill Williams, let's briefly explain it and how it's used by this strategy. Initially, this type of signal is a combination of the following AO bars: we need 3 bars in a row, the first one shall be higher than the second, the third bar also shall be higher, than second. All three bars shall be above the zero line of AO. The price bar, which corresponds to third "saucer's" bar is our signal bar. Strategy places buy stop order one tick above the price bar which corresponds to signal bar.
After that we can have the following scenarios.
Price hit the order on the next candle in this case strategy opened long with this price.
Price doesn't hit the order price, the next candle set lower low. If current AO bar is increasing buy stop order changes by the script to the high of this new bar plus one tick. This procedure repeats until price finally hit buy order or current AO bar become decreasing. In the second case buy order cancelled and strategy wait for the next "Saucer" signal.
If long trades has been opened strategy use all the next signals until number of trades doesn't exceed 5. All trades are closed when the trend changes to downtrend according to combination of Alligator and Fractals described above.
Why we use "Saucer" signals? If AO above the zero line there is a high probability that price now is in uptrend if we take into account our two trend filters. When we see the decreasing bars on AO and it's above zero it's likely can be considered as a pullback on the uptrend. When we see the stop of AO decreasing and the first increasing bar has been printed there is a high probability that this local pull back is finished and strategy open long trade in the likely direction of a main trend.
Why strategy use only 10% per signal? Sometimes we can see the false signals which appears on sideways. Not risking that much script use only 10% per signal. If the first long trade has been open and price continue going up and our trend approximation by Alligator and Fractals is uptrend, strategy add another one 10% of capital to every next saucer signal while number of active trades no more than 5. This capital allocation allows to take part in long trades when current uptrend is likely to be strong and use only 10% of capital when there is a high probability of sideways.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.11.25. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 10%
Maximum Single Position Loss: -5.10%
Maximum Single Profit: +22.80%
Net Profit: +2838.58 USDT (+28.39%)
Total Trades: 107 (42.99% win rate)
Profit Factor: 3.364
Maximum Accumulated Loss: 373.43 USDT (-2.98%)
Average Profit per Trade: 26.53 USDT (+2.40%)
Average Trade Duration: 78 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 3h BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Balthazar by Aloupay📈 BALTHAZAR BY ALOUPAY: Advanced Trading Strategy for Precision and Reliability
BALTHAZAR BY ALOUPAY is a comprehensive trading strategy developed for TradingView, designed to assist traders in making informed and strategic trading decisions. By integrating multiple technical indicators, this strategy aims to identify optimal entry and exit points, manage risk effectively, and enhance overall trading performance.
🌟 Key Features
1. Integrated Indicator Suite
Exponential Moving Averages (EMAs) : Utilizes Fast (12), Medium (26), and Slow (50) EMAs to determine trend direction and strength.
Stochastic RSI : Employs Stochastic RSI with customizable smoothing periods to assess momentum and potential reversal points.
Average True Range (ATR) : Calculates dynamic stop loss and take profit levels based on market volatility using ATR multipliers.
MACD Confirmation : Incorporates MACD histogram analysis to validate trade signals, enhancing the reliability of entries.
2. Customizable Backtesting Parameters
Date Range Selection: Allows users to define specific backtesting periods to evaluate strategy performance under various market conditions.
Timezone Adaptability: Ensures accurate time-based filtering in alignment with the chart's timezone settings.
3. Advanced Risk Management
Dynamic Stop Loss & Take Profit: Automatically adjusts exit points using ATR multipliers to adapt to changing market volatility.
Position Sizing: Configurable to risk a sustainable percentage of equity per trade (recommended: 5-10%) to maintain disciplined money management.
4. Clear Trade Signals
Long & Short Entries: Generates actionable signals based on the convergence of EMA alignment, Stochastic RSI crossovers, and MACD confirmation.
Automated Exits: Implements predefined take profit and stop loss levels to secure profits and limit losses without emotional interference.
5. Visual Enhancements
EMA Visualization: Displays Fast, Medium, and Slow EMAs on the chart for easy trend identification.
Stochastic RSI Indicators: Uses distinct shapes to indicate bullish and bearish momentum shifts.
Risk Levels Display: Clearly marks take profit and stop loss levels on the chart for transparent risk-reward assessment.
🔍 Strategy Mechanics
Trend Identification with EMAs
Bullish Trend: Fast EMA (12) > Medium EMA (26) > Slow EMA (50)
Bearish Trend: Fast EMA (12) < Medium EMA (26) < Slow EMA (50)
Momentum Confirmation with Stochastic RSI
Bullish Signal: %K line crosses above %D line, indicating upward momentum.
Bearish Signal: %K line crosses below %D line, signaling downward momentum.
Volatility-Based Risk Management with ATR
Stop Loss: Positioned at 1.0 ATR below (for long) or above (for short) the entry price.
Take Profit: Positioned at 4.0 ATR above (for long) or below (for short) the entry price.
MACD Confirmation
Long Trades: Executed only when the MACD histogram is positive.
Short Trades: Executed only when the MACD histogram is negative.
💱 Recommended Forex Pairs
While BALTHAZAR BY ALOUPAY has shown robust performance on the 4-hour timeframe for Gold (XAU/USD), it is also well-suited for the following highly liquid forex pairs:
EUR/USD (Euro/US Dollar)
GBP/USD (British Pound/US Dollar)
USD/JPY (US Dollar/Japanese Yen)
AUD/USD (Australian Dollar/US Dollar)
USD/CAD (US Dollar/Canadian Dollar)
NZD/USD (New Zealand Dollar/US Dollar)
EUR/GBP (Euro/British Pound)
These pairs offer high liquidity and favorable trading conditions that complement the strategy's indicators and risk management features.
⚙️ Customization Options
Backtesting Parameters
Start Date: Define the beginning of the backtesting period.
End Date: Define the end of the backtesting period.
EMAs Configuration
Fast EMA Length: Default is 12.
Medium EMA Length: Default is 26.
Slow EMA Length: Default is 50.
Source: Default is Close price.
Stochastic RSI Configuration
%K Smoothing: Default is 5.
%D Smoothing: Default is 4.
RSI Length: Default is 14.
Stochastic Length: Default is 14.
RSI Source: Default is Close price.
ATR Configuration
ATR Length: Default is 14.
ATR Smoothing Method: Options include RMA, SMA, EMA, WMA (default: RMA).
Stop Loss Multiplier: Default is 1.0 ATR.
Take Profit Multiplier: Default is 4.0 ATR.
MACD Configuration
MACD Fast Length: Default is 12.
MACD Slow Length: Default is 26.
MACD Signal Length: Default is 9.
📊 Why Choose BALTHAZAR BY ALOUPAY?
Comprehensive Integration: Combines trend, momentum, and volatility indicators for a multifaceted trading approach.
Automated Precision: Eliminates emotional decision-making with rule-based entry and exit signals.
Robust Risk Management: Protects capital through dynamic stop loss and take profit levels tailored to market conditions.
User-Friendly Customization: Easily adjustable settings to align with individual trading styles and risk tolerance.
Proven Reliability: Backtested over extensive periods across various market environments to ensure consistent performance.
Disclaimer : Trading involves significant risk of loss and is not suitable for every investor. Past performance is not indicative of future results. Always conduct your own research and consider your financial situation before engaging in trading activities.
CCI Threshold StrategyThe CCI Threshold Strategy is a trading approach that utilizes the Commodity Channel Index (CCI) as a momentum indicator to identify potential buy and sell signals in financial markets. The CCI is particularly effective in detecting overbought and oversold conditions, providing traders with insights into possible price reversals. This strategy is designed for use in various financial instruments, including stocks, commodities, and forex, and aims to capitalize on price movements driven by market sentiment.
Commodity Channel Index (CCI)
The CCI was developed by Donald Lambert in the 1980s and is primarily used to measure the deviation of a security's price from its average price over a specified period.
The formula for CCI is as follows:
CCI=(TypicalPrice−SMA)×0.015MeanDeviation
CCI=MeanDeviation(TypicalPrice−SMA)×0.015
where:
Typical Price = (High + Low + Close) / 3
SMA = Simple Moving Average of the Typical Price
Mean Deviation = Average of the absolute deviations from the SMA
The CCI oscillates around a zero line, with values above +100 indicating overbought conditions and values below -100 indicating oversold conditions (Lambert, 1980).
Strategy Logic
The CCI Threshold Strategy operates on the following principles:
Input Parameters:
Lookback Period: The number of periods used to calculate the CCI. A common choice is 9, as it balances responsiveness and noise.
Buy Threshold: Typically set at -90, indicating a potential oversold condition where a price reversal is likely.
Stop Loss and Take Profit: The strategy allows for risk management through customizable stop loss and take profit points.
Entry Conditions:
A long position is initiated when the CCI falls below the buy threshold of -90, indicating potential oversold levels. This condition suggests that the asset may be undervalued and due for a price increase.
Exit Conditions:
The long position is closed when the closing price exceeds the highest price of the previous day, indicating a bullish reversal. Additionally, if the stop loss or take profit thresholds are hit, the position will be exited accordingly.
Risk Management:
The strategy incorporates optional stop loss and take profit mechanisms, which can be toggled on or off based on trader preference. This allows for flexibility in risk management, aligning with individual risk tolerances and trading styles.
Benefits of the CCI Threshold Strategy
Flexibility: The CCI Threshold Strategy can be applied across different asset classes, making it versatile for various market conditions.
Objective Signals: The use of quantitative thresholds for entry and exit reduces emotional bias in trading decisions (Tversky & Kahneman, 1974).
Enhanced Risk Management: By allowing traders to set stop loss and take profit levels, the strategy aids in preserving capital and managing risk effectively.
Limitations
Market Noise: The CCI can produce false signals, especially in highly volatile markets, leading to potential losses (Bollinger, 2001).
Lagging Indicator: As a lagging indicator, the CCI may not always capture rapid market movements, resulting in missed opportunities (Pring, 2002).
Conclusion
The CCI Threshold Strategy offers a systematic approach to trading based on well-established momentum principles. By focusing on overbought and oversold conditions, traders can make informed decisions while managing risk effectively. As with any trading strategy, it is crucial to backtest the approach and adapt it to individual trading styles and market conditions.
References
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Lambert, D. (1980). Commodity Channel Index. Technical Analysis of Stocks & Commodities, 2, 3-5.
Pring, M. J. (2002). Technical Analysis Explained. New York: McGraw-Hill.
Tversky, A., & Kahneman, D. (1974). Judgment under uncertainty: Heuristics and biases. Science, 185(4157), 1124-1131.
DSL Strategy [DailyPanda]
Overview
The DSL Strategy by DailyPanda is a trading strategy that synergistically combines the idea from indicators to create a more robust and reliable trading tool. By integrating these indicators, the strategy enhances signal accuracy and provides traders with a comprehensive view of market trends and momentum shifts. This combination allows for better entry and exit points, improved risk management, and adaptability to various market conditions.
Combining ideas from indicators adds value by:
Enhancing Signal Confirmation : The strategy requires alignment between trend and momentum before generating trade signals, reducing false entries.
Improving Accuracy : By integrating price action with momentum analysis, the strategy captures more reliable trading opportunities.
Providing Comprehensive Market Insight : The combination offers a better perspective on the market, considering both the direction (trend) and the strength (momentum) of price movements.
How the Components Work Together
1. Trend Identification with DSL Indicator
Dynamic Signal Lines : Calculates upper and lower DSL lines based on a moving average (SMA) and dynamic thresholds derived from recent highs and lows with a specified offset. These lines adapt to market conditions, providing real-time trend insights.
ATR-Based Bands : Adds bands around the DSL lines using the Average True Range (ATR) multiplied by a width factor. These bands account for market volatility and help identify potential stop-loss levels.
Trend Confirmation : The relationship between the price, DSL lines, and bands determines the current trend. For example, if the price consistently stays above the upper DSL line, it indicates a bullish trend.
2. Momentum Analysis
RSI Calculation : Computes the RSI over a specified period to measure the speed and change of price movements.
Zero-Lag EMA (ZLEMA) : Applies a ZLEMA to the RSI to minimize lag and produce a more responsive oscillator.
DSL Application on Oscillator : Implements the DSL concept on the oscillator by calculating dynamic upper and lower levels. This helps identify overbought or oversold conditions more accurately.
Signal Generation : Detects crossovers between the oscillator and its DSL lines. A crossover above the lower DSL line signals potential bullish momentum, while a crossover below the upper DSL line signals potential bearish momentum.
3. Integrated Signal Filtering
Confluence Requirement : A trade signal is generated only when both the DSL indicator and oscillator agree. For instance, a long entry requires both an uptrend confirmation from the DSL indicator and a bullish momentum signal from the oscillator.
Risk Management Integration : The strategy uses the DSL indicator's bands for setting stop-loss levels and calculates take-profit levels based on a user-defined risk-reward ratio. This ensures that every trade has a predefined risk management plan.
--------------------------------------------------------------------------------------------
Originality and Value Added to the Community
Unique Synergy : While both indicators are available individually, this strategy is original in how it combines them to enhance their strengths and mitigate their weaknesses, offering a novel approach not present in existing scripts.
Enhanced Reliability : By requiring confirmation from both trend and momentum indicators, the strategy reduces false signals and increases the likelihood of successful trades.
Versatility : The customizable parameters allow traders to adapt the strategy to different instruments, timeframes, and trading styles, making it a valuable tool for a wide range of trading scenarios.
Educational Contribution : The script demonstrates an effective method of combining indicators for improved trading performance, providing insights that other traders can learn from and apply to their own strategies.
--------------------------------------------------------------------------------------------
How to Use the Strategy
Adding the Strategy to Your Chart
Apply the DSL Strategy to your desired trading instrument and timeframe on TradingView.
--------------------------------------------------------------------------------------------
Configuring Parameters
DSL Indicator Settings :
Length (len) : Adjusts the sensitivity of the DSL lines (default is 34).
Offset : Determines the look-back period for threshold calculations (default is 30).
Bands Width (width) : Changes the distance of the ATR-based bands from the DSL lines (default is 1).
DSL-BELUGA Oscillator Settings :
Beluga Length (len_beluga) : Sets the period for the RSI calculation in the oscillator (default is 10).
DSL Lines Mode (dsl_mode) : Chooses between "Fast" (more responsive) and "Slow" (smoother) modes for the oscillator's DSL lines.
Risk Management :
Risk Reward (risk_reward) : Defines your desired risk-reward ratio for calculating take-profit levels (default is 1.5).
--------------------------------------------------------------------------------------------
Interpreting Signals
Long Entry Conditions :
Trend Confirmation : Price is above the upper DSL line and the upper DSL band (dsl_up1 > dsl_dn).
Price Behavior : The last three candles have both their opens and closes above the upper DSL line.
Momentum Signal : The DSL-BELUGA oscillator crosses above its lower DSL line (up_signal), indicating bullish momentum.
Short Entry Conditions :
Trend Confirmation : Price is below the lower DSL line and the lower DSL band (dsl_dn < dsl_up1).
Price Behavior : The last three candles have both their opens and closes below the lower DSL band.
Momentum Signal : The DSL-BELUGA oscillator crosses below its upper DSL line (dn_signal), indicating bearish momentum.
Exit Conditions :
Stop-Loss : Automatically set at the DSL indicator's band level (upper band for longs, lower band for shorts).
Take-Profit : Calculated based on the risk-reward ratio and the initial risk determined by the stop-loss distance.
Visual Aids
Signal Arrows : Upward green arrows for long entries and downward blue arrows for short entries appear on the chart when conditions are met.
Stop-Loss and Take-Profit Lines : Red and green lines display the calculated stop-loss and take-profit levels for active trades.
Background Highlighting : The chart background subtly changes color to indicate when a signal has been generated.
Backtesting and Optimization
Use TradingView's strategy tester to backtest the strategy over historical data.
Adjust parameters to optimize performance for different instruments or market conditions.
Regularly review backtesting results to ensure the strategy remains effective.