DCA Alpha 1.0 Trading Tool for Dollar-Cost Averaging
Description:
DCA Alpha 1.0 is a precision-engineered trading tool designed to assist traders and investors in accumulating assets during market downturns. Using proprietary algorithms that combine momentum decay, extreme price deviation metrics, trend dynamics, divergence analysis, and mean regression, it identifies potential bottom extreme zones in various asset classes such as indices, stocks, crypto, and commodities.
This indicator highlights market conditions where assets are oversold, undervalued, or experiencing capitulation—providing disciplined, unleveraged dollar-cost averaging (DCA) opportunities. Ideal for long-term growth strategies, DCA Alpha 1.0 helps cut through market noise, pinpointing moments of peak fear and maximum reward potential.
Whether navigating volatile crypto markets, timing corrections in indices, or accumulating commodities, DCA Alpha 1.0 serves as a vital tool for mastering the art of buying low and building your assets up strategically.
Instructions:
Getting Started:
Add the Indicator:
Install DCA Alpha 1.0 on your TradingView chart.
Select your preferred asset class: stocks, indices, crypto, or commodities.
Choose an appropriate timeframe (e.g., daily or weekly for long-term DCA strategies).
Customize Inputs: Adjust the following settings to align with your strategy:
Percentage of Equity to Trade: Define the portion of your portfolio to allocate per signal (default: 1% equity).
Profit Target Percentages: Set thresholds for locking in gains (default: 50% on lower timeframes, 500% on higher timeframes).
Zones and Signals:
Extreme Negative Zones:
What It Represents:
These zones highlight conditions where prices are deeply oversold, indicating extreme bearish sentiment. The market is likely nearing a bottom, offering high-probability buying opportunities.
Entry Signals:
When the price enters these extreme negative zones, visual markers (e.g., green triangles or other indicators) will signal a potential buying opportunity. These moments are indicative of market exhaustion, signaling that a reversal could be imminent.
Momentum Decay & Divergence:
Momentum decay occurs when price movement slows over time. In extreme negative zones, if prices continue to fall but at a diminishing rate (e.g., decreased volume or a fading oscillator), it suggests weakening bearish momentum. This, coupled with bullish divergence (oscillator forming higher lows while price makes lower lows), signifies a reversal, making it an ideal point to consider dollar-cost averaging into the asset.
Neutral Zones:
What It Represents:
The neutral zone is a state of market equilibrium, where prices are neither overbought nor oversold. The market is in a balanced state, with no strong trend emerging.
Mean Regression:
In a neutral zone, the market is reverting to its mean or average price after overreacting in either direction. A price transition from extreme zones (overbought/oversold) to the neutral zone suggests a reversion to the market's long-term average, making this a period of reduced volatility and uncertainty.
Entering or Exiting Neutral Zones:
Traders should avoid entering or exiting positions during neutral zone conditions unless transitioning from an extreme zone (negative or positive). Transitioning from an extreme negative zone to neutral may suggest an opportunity to accumulate assets gradually, while a shift from neutral to an extreme negative zone may indicate a deeper correction and warrant caution.
Momentum Decay & Divergence (Exiting Neutral Zone):
If prices are rising but the oscillator shows lower highs (bearish divergence), and momentum is fading, this could signal a pullback. A transition out of the neutral zone in this context may prompt traders to hold off on new positions or consider profit-taking.
Extreme Positive Zones:
What It Represents:
Markets can also become overbought or overvalued. When price enters extreme positive zones, the asset may be overvalued, suggesting potential selling or a waiting period.
Exit Signals:
Red triangle indicators signal potential exit points when prices reach overbought conditions, signaling a time to lock in profits and reduce exposure.
Momentum Decay & Divergence (Exiting Positive Zone):
When prices are making new highs but momentum is weakening (momentum decay) and the oscillator is showing lower highs (bearish divergence), this could indicate a faltering rally. Such conditions represent an ideal time to reduce exposure or exit positions.
Key Inputs for Customization:
Percentage of Equity to Trade:
This setting allows you to allocate a portion of your total portfolio per buy signal. By default, 1% of equity is used per signal, but this can be adjusted based on your risk tolerance and strategy.
Profit Target Percentages:
These thresholds help lock in gains once the price moves a set percentage in your favor.
Lower Timeframes: Default profit target of 50%.
Higher Timeframes: Default profit target of 500%.
These settings can be customized for specific risk/reward preferences.
Warning!!! : Aggressive Mode
Aggressive Mode is an advanced feature designed for traders who want to increase the frequency of signals during periods of market volatility. This mode will trigger more frequent entries, even into slightly less extreme zones, capturing short-term reversals.
What Aggressive Mode Does:
It amplifies signals by allowing the tool to identify more frequent price reversals, including brief market corrections, increasing trade frequency. While this can offer more trading opportunities, it also exposes you to higher risk.
Warning:
Aggressive Mode should be used only by experienced traders familiar with short-term volatility. The increased frequency of signals could lead to higher risk exposure. Ensure robust risk management practices, such as stop-loss orders and profit-taking strategies, are in place before activating this mode.
Default Setting:
Aggressive Mode is disabled by default. It can be activated at your discretion based on your experience level and risk appetite.
Best Practices:
Focus on High-Quality Assets: Prioritize assets with strong recovery potential (e.g., major indices, blue-chip cryptocurrencies).
Use Longer Timeframes: Minimize market noise and optimize your DCA strategy by focusing on higher timeframes (e.g., daily or weekly charts).
Review Trading Inputs: Regularly adjust your inputs to ensure they align with your financial goals and risk tolerance.
Implement Risk Management: Use stop-loss orders and profit targets to manage risk, especially when using Aggressive Mode.
Disclaimer:
DCA Alpha 1.0 is designed specifically for unleveraged, long-term dollar-cost averaging strategies. It is not intended for day trading or leveraged positions. The tool excels at identifying market dips but cannot guarantee success. Users are fully responsible for their own risk management, including the use of stop-losses, profit targets, and position sizing.
Aggressive Mode increases trade frequency and may lead to higher exposure and potential losses. Only experienced traders should consider using this mode. Always understand the risks involved before incorporating this tool into your trading strategy.
Penunjuk dan strategi
IU EMA Channel StrategyIU EMA Channel Strategy
Overview:
The IU EMA Channel Strategy is a simple yet effective trend-following strategy that uses two Exponential Moving Averages (EMAs) based on the high and low prices. It provides clear entry and exit signals by identifying price crossovers relative to the EMAs while incorporating a built-in Risk-to-Reward Ratio (RTR) for effective risk management.
Inputs ( Settings ):
- RTR (Risk-to-Reward Ratio): Define the ratio for risk-to-reward (default = 2).
- EMA Length: Adjust the length of the EMA channels (default = 100).
How the Strategy Works
1. EMA Channels:
- High-based EMA: EMA calculated on the high price.
- Low-based EMA: EMA calculated on the low price.
The area between these two EMAs creates a "channel" that visually highlights potential support and resistance zones.
2. Entry Rules:
- Long Entry: When the price closes above the high-based EMA (crossover).
- Short Entry: When the price closes below the low-based EMA (crossunder).
These entries ensure trades are taken in the direction of momentum.
3. Stop Loss (SL) and Take Profit (TP):
- Stop Loss:
- For long positions, the SL is set at the previous bar's low.
- For short positions, the SL is set at the previous bar's high.
- Take Profit:
- TP is automatically calculated using the Risk-to-Reward Ratio (RTR) you define.
- Example: If RTR = 2, the TP will be 2x the risk distance.
4. Exit Rules:
- Positions are closed at either the stop loss or the take profit level.
- The strategy manages exits automatically to enforce disciplined risk management.
Visual Features
1. EMA Channels:
- The high and low EMAs are dynamically color-coded:
- Green: Price is above the EMA (bullish condition).
- Red: Price is below the EMA (bearish condition).
- The area between the EMAs is shaded for better visual clarity.
2. Stop Loss and Take Profit Zones:
- SL and TP levels are plotted for both long and short positions.
- Zones are filled with:
- Red: Stop Loss area.
- Green: Take Profit area.
Be sure to manage your risk and position size properly.
DAILY Supertrend + EMA Crossover with RSI FilterThis strategy is a technical trading approach that combines multiple indicators—Supertrend, Exponential Moving Averages (EMAs), and the Relative Strength Index (RSI)—to identify and manage trades.
Core Components:
1. Exponential Moving Averages (EMAs):
Two EMAs, one with a shorter period (fast) and one with a longer period (slow), are calculated. The idea is to spot when the faster EMA crosses above or below the slower EMA. A fast EMA crossing above the slow EMA often suggests upward momentum, while crossing below suggests downward momentum.
2. Supertrend Indicator:
The Supertrend uses Average True Range (ATR) to establish dynamic support and resistance lines. These lines shift above or below price depending on the prevailing trend. When price is above the Supertrend line, the trend is considered bullish; when below, it’s considered bearish. This helps ensure that the strategy trades only in the direction of the overall trend rather than against it.
3. RSI Filter:
The RSI measures momentum. It helps avoid buying into markets that are already overbought or selling into markets that are oversold. For example, when going long (buying), the strategy only proceeds if the RSI is not too high, and when going short (selling), it only proceeds if the RSI is not too low. This filter is meant to improve the quality of the trades by reducing the chance of entering right before a reversal.
4. Time Filters:
The strategy only triggers entries during user-specified date and time ranges. This is useful if one wants to limit trading activity to certain trading sessions or periods with higher market liquidity.
5. Risk Management via ATR-based Stops and Targets:
Both stop loss and take profit levels are set as multiples of the ATR. ATR measures volatility, so when volatility is higher, both stops and profit targets adjust to give the trade more breathing room. Conversely, when volatility is low, stops and targets tighten. This dynamic approach helps maintain consistent risk management regardless of market conditions.
Overall Logic Flow:
- First, the market conditions are analyzed through EMAs, Supertrend, and RSI.
- When a buy (long) condition is met—meaning the fast EMA crosses above the slow EMA, the trend is bullish according to Supertrend, and RSI is below the specified “overbought” threshold—the strategy initiates or adds to a long position.
- Similarly, when a sell (short) condition is met—meaning the fast EMA crosses below the slow EMA, the trend is bearish, and RSI is above the specified “oversold” threshold—it initiates or adds to a short position.
- Each position is protected by an automatically calculated stop loss and a take profit level based on ATR multiples.
Intended Result:
By blending trend detection, momentum filtering, and volatility-adjusted risk management, the strategy aims to capture moves in the primary trend direction while avoiding entries at excessively stretched prices. Allowing multiple entries can potentially amplify gains in strong trends but also increases exposure, which traders should consider in their risk management approach.
In essence, this strategy tries to ride established trends as indicated by the Supertrend and EMAs, filter out poor-quality entries using RSI, and dynamically manage trade risk through ATR-based stops and targets.
ETH - 12HR Double Kernel Regression Strategy ETH Double Kernel Regression Strategy
This ETH -focused, 12-hour Double Kernel Regression strategy is designed to cut through market noise and guide you toward data-backed, higher-probability trades. By utilizing two kernel regression models—Fast and Slow—this approach gauges momentum shifts and confirms trends. The strategy intelligently switches between these kernels based on identifying FOMO patterns, allowing it to adapt to changing market conditions. This ensures you enter trades when the trend is genuinely gaining strength, rather than blindly "buying the dip."
Key Concepts
Fine-Tuned Since Inception:
The strategy’s logic and filters—including price thresholds, trend moving averages (MAs), and kernel confirmations—are meticulously fine-tuned to perform consistently across all market conditions. This proactive planning enables confident entries during bullish recoveries, eliminating the need to second-guess every signal.
“Buy the Rise, Sell the Dip” Logic:
Unlike the traditional mantra, this strategy waits for slow kernel confirmation before entering uptrends. When market conditions shift, it identifies optimal entry points and holds steady if the trade isn’t losing money. This reduces guesswork and helps prevent buying into false rallies.
Sell the Hype:
The crypto market is often cluttered with noise—meme coins, last-minute hype, and social media influencers. The Double Kernel Regression approach distinguishes genuine trends from hype-driven movements. When the price exceeds simple moving averages (SMAs), the fast kernel generates a sell signal. This carefully crafted strategy helps you navigate the chaotic landscape, especially during hype-driven rallies, and ensures you sell at the top.
Try It Out
Import this strategy into your TradingView platform and observe how it reacts in real-time as market conditions change. Evaluate the signals, adjust parameters if necessary, and experience firsthand how combining sound trading philosophy with a data-driven backbone can transform your trading journey.
ROBO STB GainCraft strategyPure Price Action Candlestick Strategy by ROBO STB
Overview
This strategy is built entirely on the principles of price action and candlestick analysis, designed for traders who prefer raw market data over traditional indicators. By focusing solely on candlestick patterns and their context within recent price movements, the strategy identifies high-probability entry and exit points in liquid markets.
Entry signals are generated based on these patterns appearing at significant market locations, such as after consolidations, pullbacks, or at key support/resistance levels.
Price Action Integration:
Instead of relying on oscillators or moving averages, the script leverages the inherent market structure provided by candlesticks to interpret potential trend reversals or continuations.
This approach provides a clearer view of market sentiment.
No External Indicators:
This script avoids the use of traditional indicators like RSI, MACD, or Bollinger Bands, offering a clean, uncluttered chart.
Risk Management (Optional):
Fixed-percentage risk management options can also be enabled, ensuring trades remain within acceptable risk parameters.
How the Strategy Works
Entry Conditions:
Buy Entry: A bullish candlestick pattern (e.g., bullish engulfing) forms after a period of consolidation or pullback, indicating potential upward momentum.
Sell Entry: A bearish candlestick pattern (e.g., bearish engulfing) suggests a downturn is likely.
Exit Conditions:
Exits are triggered by the appearance of reversal candlestick patterns or through predefined SL/TP levels.
The strategy adapts to varying market conditions by analyzing candlestick structures dynamically.
Ideal Use Cases
Short-Term Trading: Designed for day traders and scalpers targeting quick moves on shorter timeframes.
Highly Liquid Markets: Performs best in markets with high liquidity, such as Nifty, Bank Nifty, or major forex pairs, where candlestick patterns provide reliable signals.
30-Minute Timeframe: For optimal results, the strategy is recommended for use on a 30-minute timeframe.
Transparency and Realism
Backtesting Parameters:
The default backtesting settings simulate realistic trading conditions, including commissions and slippage, ensuring that results are not misleading.
Trade sizes are calibrated to risk sustainable amounts (.05% maximum equity per trade).
Dataset Selection:
This strategy has been tested on diverse datasets to produce a statistically significant number of trades, ensuring robust performance evaluation.
Why This Strategy is Unique
This script stands apart by offering a refined approach to price action trading. Unlike generic indicator mashups, it provides traders with an actionable, candlestick-focused methodology tailored for volatile, high-liquidity markets.
The strategy is both simple to understand and powerful in execution, making it an excellent tool for traders who want to develop their skills in raw price action analysis while maintaining strict risk management.
Key Features
Candlestick-Based Entry and Exit Signals:
1. Risk Management:
- Risk-to-Reward Ratio (RTR):
Set a customizable risk-to-reward ratio to calculate target prices based on stop-loss levels.
Default: 3:1
order size added -100
2. Opening Range Identification
- Opening Range High and Low:
The script detects the high and low of the first trading session using Pine Script's session functions.
These levels are plotted as visual guides on the chart:
- High: Lime-colored circles.
- Low: Red-colored circles.
3. Trade Entry Logic
- Long Entry:
A long trade is triggered when the price closes above the opening range high.
- Entry condition: Crossover of the price above the opening range high.
-Short Entry:
A short trade is triggered when the price closes below the opening range low.
- Entry condition: Crossunder of the price below the opening range low.
Both entries are conditional on the absence of an existing position.
4. Stop Loss and Take Profit
- Long Position:
- Stop Loss: Previous candle's low.
- Take Profit: Calculated based on the RTR.
- **Short Position:**
- **Stop Loss:** Previous candle's high.
- **Take Profit:** Calculated based on the RTR.
The strategy plots these levels for visual reference:
- Stop Loss: Red dashed lines.
- Take Profit: Green dashed lines.
5. Visual Enhancements
-Trade Level Highlighting:
The script dynamically shades the areas between the entry price and SL/TP levels:
- Red shading for the stop-loss region.
- Green shading for the take-profit region.
How to Use:
1.Input Configuration:
Adjust the Risk-to-Reward ratio, max trades per day, and session end time to suit your trading preferences.
2.Visual Cues:
Use the opening range high/low lines and shading to identify potential breakout opportunities.
3.Execution:
The strategy will automatically enter and exit trades based on the conditions. Review the plotted SL and TP levels to monitor the risk-reward setup.
Important Notes:
- This strategy is designed for intraday trading and works best in markets with high volatility during the opening session.
- Backtest the strategy on your preferred market and timeframe to ensure compatibility.
- Proper risk management and position sizing are essential when using this strategy in live markets.
Please let me know if you have any doubts.
MACD Aggressive Scalp SimpleComment on the Script
Purpose and Structure:
The script is a scalping strategy based on the MACD indicator combined with EMA (50) as a trend filter.
It uses the MACD histogram's crossover/crossunder of zero to trigger entries and exits, allowing the trader to capitalize on short-term momentum shifts.
The use of strategy.close ensures that positions are closed when specified conditions are met, although adjustments were made to align with Pine Script version 6.
Strengths:
Simplicity and Clarity: The logic is straightforward and focuses on essential scalping principles (momentum-based entries and exits).
Visual Indicators: The plotted MACD line, signal line, and histogram columns provide clear visual feedback for the strategy's operation.
Trend Confirmation: Incorporating the EMA(50) as a trend filter helps avoid trades that go against the prevailing trend, reducing the likelihood of false signals.
Dynamic Exit Conditions: The conditional logic for closing positions based on weakening momentum (via MACD histogram change) is a good way to protect profits or minimize losses.
Potential Improvements:
Parameter Inputs:
Make the MACD (12, 26, 9) and EMA(50) values adjustable by the user through input statements for better customization during backtesting.
Example:
pine
Copy code
macdFast = input(12, title="MACD Fast Length")
macdSlow = input(26, title="MACD Slow Length")
macdSignal = input(9, title="MACD Signal Line Length")
emaLength = input(50, title="EMA Length")
Stop Loss and Take Profit:
The strategy currently lacks explicit stop-loss or take-profit levels, which are critical in a scalping strategy to manage risk and lock in profits.
ATR-based or fixed-percentage exits could be added for better control.
Position Size and Risk Management:
While the script uses 50% of equity per trade, additional options (e.g., fixed position sizes or risk-adjusted sizes) would be beneficial for flexibility.
Avoid Overlapping Signals:
Add logic to prevent overlapping signals (e.g., opening a new position immediately after closing one on the same bar).
Backtesting Optimization:
Consider adding labels or markers (label.new or plotshape) to visualize entry and exit points on the chart for better debugging and analysis.
The inclusion of performance metrics like max drawdown, Sharpe ratio, or profit factor would help assess the strategy's robustness during backtesting.
Compatibility with Live Trading:
The strategy could be further enhanced with alert conditions using alertcondition to notify the trader of buy/sell signals in real-time.
3 EMA + RSI with Trail Stop [Free990] (LOW TF)This trading strategy combines three Exponential Moving Averages (EMAs) to identify trend direction, uses RSI to signal exit conditions, and applies both a fixed percentage stop-loss and a trailing stop for risk management. It aims to capture momentum when the faster EMAs cross the slower EMA, then uses RSI thresholds, time-based exits, and stops to close trades.
Short Explanation of the Logic
Trend Detection: When the 10 EMA crosses above the 20 EMA and both are above the 100 EMA (and the current price bar closes higher), it triggers a long entry signal. The reverse happens for a short (the 10 EMA crosses below the 20 EMA and both are below the 100 EMA).
RSI Exit: RSI crossing above a set threshold closes long trades; crossing below another threshold closes short trades.
Time-Based Exit: If a trade is in profit after a set number of bars, the strategy closes it.
Stop-Loss & Trailing Stop: A fixed stop-loss based on a percentage from the entry price guards against large drawdowns. A trailing stop dynamically tightens as the trade moves in favor, locking in potential gains.
Detailed Explanation of the Strategy Logic
Exponential Moving Average (EMA) Setup
Short EMA (out_a, length=10)
Medium EMA (out_b, length=20)
Long EMA (out_c, length=100)
The code calculates three separate EMAs to gauge short-term, medium-term, and longer-term trend behavior. By comparing their relative positions, the strategy infers whether the market is bullish (EMAs stacked positively) or bearish (EMAs stacked negatively).
Entry Conditions
Long Entry (entryLong): Occurs when:
The short EMA (10) crosses above the medium EMA (20).
Both EMAs (short and medium) are above the long EMA (100).
The current bar closes higher than it opened (close > open).
This suggests that momentum is shifting to the upside (short-term EMAs crossing up and price action turning bullish). If there’s an existing short position, it’s closed first before opening a new long.
Short Entry (entryShort): Occurs when:
The short EMA (10) crosses below the medium EMA (20).
Both EMAs (short and medium) are below the long EMA (100).
The current bar closes lower than it opened (close < open).
This indicates a potential shift to the downside. If there’s an existing long position, that gets closed first before opening a new short.
Exit Signals
RSI-Based Exits:
For long trades: When RSI exceeds a specified threshold (e.g., 70 by default), it triggers a long exit. RSI > short_rsi generally means overbought conditions, so the strategy exits to lock in profits or avoid a pullback.
For short trades: When RSI dips below a specified threshold (e.g., 30 by default), it triggers a short exit. RSI < long_rsi indicates oversold conditions, so the strategy closes the short to avoid a bounce.
Time-Based Exit:
If the trade has been open for xBars bars (configurable, e.g., 24 bars) and the trade is in profit (current price above entry for a long, or current price below entry for a short), the strategy closes the position. This helps lock in gains if the move takes too long or momentum stalls.
Stop-Loss Management
Fixed Stop-Loss (% Based): Each trade has a fixed stop-loss calculated as a percentage from the average entry price.
For long positions, the stop-loss is set below the entry price by a user-defined percentage (fixStopLossPerc).
For short positions, the stop-loss is set above the entry price by the same percentage.
This mechanism prevents catastrophic losses if the market moves strongly against the position.
Trailing Stop:
The strategy also sets a trail stop using trail_points (the distance in price points) and trail_offset (how quickly the stop “catches up” to price).
As the market moves in favor of the trade, the trailing stop gradually tightens, allowing profits to run while still capping potential drawdowns if the price reverses.
Order Execution Flow
When the conditions for a new position (long or short) are triggered, the strategy first checks if there’s an opposite position open. If there is, it closes that position before opening the new one (prevents going “both long and short” simultaneously).
RSI-based and time-based exits are checked on each bar. If triggered, the position is closed.
If the position remains open, the fixed stop-loss and trailing stop remain in effect until the position is exited.
Why This Combination Works
Multiple EMA Cross: Combining 10, 20, and 100 EMAs balances short-term momentum detection with a longer-term trend filter. This reduces false signals that can occur if you only look at a single crossover without considering the broader trend.
RSI Exits: RSI provides a momentum oscillator view—helpful for detecting overbought/oversold conditions, acting as an extra confirmation to exit.
Time-Based Exit: Prevents “lingering trades.” If the position is in profit but failing to advance further, it takes profit rather than risking a trend reversal.
Fixed & Trailing Stop-Loss: The fixed stop-loss is your safety net to cap worst-case losses. The trailing stop allows the strategy to lock in gains by following the trade as it moves favorably, thus maximizing profit potential while keeping risk in check.
Overall, this approach tries to capture momentum from EMA crossovers, protect profits with trailing stops, and limit risk through both a fixed percentage stop-loss and exit signals from RSI/time-based logic.
DemaRSI StrategyThis is a repost to a old script that cant be updated anymore, the request was made on Feb, 27, 2016.
Here's a engaging description for the tradingview script:
**DemaRSI Strategy: A Proven Trading System**
Join thousands of traders who have already experienced the power of this highly effective strategy. The DemaRSI system combines two powerful indicators - DEMA (Double Exponential Moving Average) and RSI (Relative Strength Index) - to generate profitable trades with minimal risk.
**Key Features:**
* **Trend-Following**: Our algorithm identifies strong trends using a combination of DEMA and RSI, allowing you to ride the waves of market momentum.
* **Risk Management**: The system includes built-in stop-loss and take-profit levels, ensuring that your gains are protected and losses are minimized.
* **Session-Based Trading**: Trade during specific sessions only (e.g., London or New York) for even more targeted results.
* **Customizable Settings**: Adjust the length of moving averages, RSI periods, and other parameters to suit your trading style.
**What You'll Get:**
* A comprehensive strategy that can be used with any broker or platform
* Easy-to-use interface with customizable settings
* Real-time performance metrics and backtesting capabilities
**Start Trading Like a Pro Today!**
This script is designed for intermediate to advanced traders who want to take their trading game to the next level. With its robust risk management features, this strategy can help you achieve consistent profits in various market conditions.
**Disclaimer:** This script is not intended as investment advice and should be used at your own discretion. Trading carries inherent risks, and losses are possible.
~Llama3
MicuRobert EMA Cross StrategyThis is a repost of a old strategy that cant be updated anymore, it was a request for a user made in Oct, 6, 2015
Here's a possible engaging description for the tradingview script:
**MicuRobert EMA Cross V2: A Powerful Trading Strategy**
Join the ranks of successful traders with this advanced strategy, designed to help you profit from market trends. The MicuRobert EMA Cross V2 combines two essential indicators - Exponential Moving Average (EMA) and Divergence EMA (DEMA) - to generate buy and sell signals.
**Key Features:**
* **Trading Session Filter**: Only trade during your preferred session, ensuring you're in sync with market conditions.
* **Trailing Stop**: Automatically adjust stop-loss levels to lock in profits or limit losses.
* **Customizable Trade Size**: Set the size of each trade based on your risk tolerance and trading goals.
**How it Works:**
The script uses two EMAs (5-period and 34-period) to identify trends. When the shorter EMA crosses above the longer one, a buy signal is generated. Conversely, when the shorter EMA falls below the longer one, a sell signal is triggered. The strategy also incorporates divergence analysis between price action and the EMAs.
**Visual Aids:**
* **EMA Plots**: Visualize the two EMAs on your chart to gauge market momentum.
* **Buy/Sell Signals**: See when buy or sell signals are generated, along with their corresponding entry prices.
* **Trailing Stop Lines**: Monitor stop-loss levels as they adjust based on price action.
**Get Started:**
Download this script and start trading like a pro! With its robust features and customizable settings, the MicuRobert EMA Cross V2 is an excellent addition to any trader's arsenal.
~Llama3
Custom Strategy: ETH Martingale 2.0Strategic characteristics
ETH Little Martin 2.0 is a self-developed trading strategy based on the Martingale strategy, mainly used for trading ETH (Ethereum). The core idea of this strategy is to place orders in the same direction at a fixed price interval, and then use Martin's multiple investment principle to reduce losses, but this is also the main source of losses.
Parameter description:
1 Interval: The minimum spacing for taking profit, stop loss, and opening/closing of orders. Different targets have different spacing. Taking ETH as an example, it is generally recommended to have a spacing of 2% for fluctuations in the target.
2 Base Price: This is the price at which you triggered the first order. Similarly, I am using ETH as an example. If you have other targets, I suggest using the initial value of a price that can be backtesting. The Base Price is only an initial order price and has no impact on subsequent orders.
3 Initial Order Amount: Users can set an initial order amount to control the risk of each transaction. If the stop loss is reached, we will double the amount based on this value. This refers to the value of the position held, not the number of positions held.
4 Loss Multiplier: The strategy will increase the next order amount based on the set multiple after the stop loss, in order to make up for the previous losses through a larger position. Note that after taking profit, it will be reset to 1 times the Initial Order Amount.
5. Long Short Operation: The first order of the strategy is a multiple entry, and in subsequent orders, if the stop loss is reached, a reverse order will be opened. The position value of a one-way order is based on the Loss Multiplier multiple investment, so it is generally recommended that the Loss Multiplier default to 2.
Improvement direction
Although this strategy already has a certain trading logic, there are still some improvement directions that can be considered:
1. Dynamic adjustment of spacing: Currently, the spacing is fixed, and it can be considered to dynamically adjust the spacing based on market volatility to improve the adaptability of the strategy. Try using dynamic spacing, which may be more suitable for the actual market situation.
2. Filtering criteria: Orders and no orders can be optimized separately. The biggest problem with this strategy is that it will result in continuous losses during fluctuations, and eventually increase the investment amount. You can consider filtering out some fluctuations or only focusing on trend trends.
3. Risk management: Add more risk management measures, such as setting a maximum loss limit to avoid huge losses caused by continuous stop loss.
4. Optimize the stop loss multiple: Currently, the stop loss multiple is fixed, and it can be considered to dynamically adjust the multiple according to market conditions to reduce risk.
Liquidity + Engulfment StrategyThis strategy identifies potential trading opportunities by combining bullish and bearish engulfing candle patterns with liquidity seal-off points. The logic is based on the concept of engulfing candles, which signal a shift in market sentiment, and liquidity lines, which represent local price extremes (highs and lows) that can indicate potential reversal or continuation points.
Key Features:
Mode Selection
The strategy allows for three modes: "Both", "Bullish Only", and "Bearish Only". Users can choose whether to trade both directions, only bullish setups, or only bearish setups.
Time Range
Users can define a specific time range for when the strategy is active, enabling tailored analysis and trade execution over a desired period.
Engulfing Candles
Bullish Engulfing: A candle that closes above the high of the previous bearish candle, signaling potential upward momentum.
Bearish Engulfing: A candle that closes below the low of the previous bullish candle, indicating a potential downtrend.
Liquidity Seal-Off Points
The strategy detects local highs and local lows within a specified lookback period, which can serve as critical support and resistance points.
A bullish signal is triggered when the price touches a lower liquidity point (local low), and a bearish signal is triggered at a higher liquidity point (local high).
Signal Confirmation
Signals are only triggered when both an engulfing candle and the price action at a liquidity seal-off point align. This helps filter out weaker signals.
Consecutive signals are prevented by locking the trade direction after an initial signal and waiting for the liquidity line to be broken before re-triggering a signal.
Entry and Exit Conditions
The strategy can enter both long (bullish) or short (bearish) positions based on the mode and signals.
Exit is based on opposing signals or reaching predefined stop-loss and take-profit levels.
Alerts
The strategy supports alert conditions to notify users when bullish engulfing after a lower liquidity touch or bearish engulfing after an upper liquidity touch is detected.
IU Opening range Breakout StrategyIU Opening Range Breakout Strategy
This Pine Script strategy is designed to capitalize on the breakout of the opening range, which is a popular trading approach. The strategy identifies the high and low prices of the opening session and takes trades based on price crossing these levels, with built-in risk management and trade limits for intraday trading.
Key Features:
1. Risk Management:
- Risk-to-Reward Ratio (RTR):
Set a customizable risk-to-reward ratio to calculate target prices based on stop-loss levels.
Default: 2:1
- Max Trades in a Day:
Specify the maximum number of trades allowed per day to avoid overtrading.
Default: 2 trades in a day.
- End-of-Day Close:
Automatically closes all open positions at a user-defined session end time to ensure no overnight exposure.
Default: 3:15 PM
2. Opening Range Identification
- Opening Range High and Low:
The script detects the high and low of the first trading session using Pine Script's session functions.
These levels are plotted as visual guides on the chart:
- High: Lime-colored circles.
- Low: Red-colored circles.
3. Trade Entry Logic
- Long Entry:
A long trade is triggered when the price closes above the opening range high.
- Entry condition: Crossover of the price above the opening range high.
-Short Entry:
A short trade is triggered when the price closes below the opening range low.
- Entry condition: Crossunder of the price below the opening range low.
Both entries are conditional on the absence of an existing position.
4. Stop Loss and Take Profit
- Long Position:
- Stop Loss: Previous candle's low.
- Take Profit: Calculated based on the RTR.
- **Short Position:**
- **Stop Loss:** Previous candle's high.
- **Take Profit:** Calculated based on the RTR.
The strategy plots these levels for visual reference:
- Stop Loss: Red dashed lines.
- Take Profit: Green dashed lines.
5. Visual Enhancements
-Trade Level Highlighting:
The script dynamically shades the areas between the entry price and SL/TP levels:
- Red shading for the stop-loss region.
- Green shading for the take-profit region.
- Entry Price Line:
A silver-colored line marks the average entry price for active trades.
How to Use:
1.Input Configuration:
Adjust the Risk-to-Reward ratio, max trades per day, and session end time to suit your trading preferences.
2.Visual Cues:
Use the opening range high/low lines and shading to identify potential breakout opportunities.
3.Execution:
The strategy will automatically enter and exit trades based on the conditions. Review the plotted SL and TP levels to monitor the risk-reward setup.
Important Notes:
- This strategy is designed for intraday trading and works best in markets with high volatility during the opening session.
- Backtest the strategy on your preferred market and timeframe to ensure compatibility.
- Proper risk management and position sizing are essential when using this strategy in live markets.
Overnight Effect High Volatility Crypto (AiBitcoinTrend)👽 Overview of the Strategy
This strategy leverages the overnight effect in the cryptocurrency market, specifically targeting the two-hour window from 21:00 UTC to 23:00 UTC. The strategy is designed to be applied only during periods of high volatility, which is determined using historical volatility data. This approach, inspired by research from Padyšák and Vojtko (2022), aims to capitalize on statistically significant return patterns observed during these hours.
Deep Backtesting with a High Volatility Filter
Deep Backtesting without a High Volatility Filter
👽 How the Strategy Works
Volatility Calculation:
Each day at 00:00 UTC, the strategy calculates the 30-day historical volatility of crypto returns (typically Bitcoin). The historical volatility is the standard deviation of the log returns over the past 30 days, representing the market's recent volatility level.
Median Volatility Benchmark:
The median of the 30-day historical volatility is calculated over a 365-day period (one year). This median acts as a benchmark to classify each day as either:
👾 High Volatility: When the current 30-day volatility exceeds the median volatility.
👾 Low Volatility: When the current 30-day volatility is below the median.
Trading Rule:
If the day is classified as a High Volatility Day, the strategy executes the following trades:
👾 Buy at 21:00 UTC.
👾 Sell at 23:00 UTC.
Trade Execution Details:
The strategy uses a 0.02% fee per trade.
Each trade is executed with 25% of the available capital. This allocation helps manage risk while allowing for compounding returns.
Rationale:
The returns during the 22:00 and 23:00 UTC hours have been found to be statistically significant during high volatility periods. The overnight effect is believed to drive this phenomenon due to the asynchronous closing hours of global financial markets. This creates unique trading opportunities in the cryptocurrency market, where exchanges remain open 24/7.
👽 Market Context and Global Time Zone Impact
👾 Why 21:00 to 23:00 UTC?
During this window, major traditional financial markets are closed:
NYSE (New York) closes at 21:00 UTC.
London and European markets are closed during these hours.
Asian markets (Tokyo, Hong Kong, etc.) open later, leaving this window largely unaffected by traditional trading flows.
This global market inactivity creates a period where significant moves can occur in the cryptocurrency market, particularly during high volatility.
👽 Strategy Parameters
Volatility Period: 30 days.
The lookback period for calculating historical volatility.
Median Period: 365 days.
The lookback period for calculating the median volatility benchmark.
Entry Time: 21:00 UTC.
Adjust this to your local time if necessary (e.g., 16:00 in New York, 22:00 in Stockholm).
Exit Time: 23:00 UTC.
Adjust this to your local time if necessary (e.g., 18:00 in New York, 00:00 midnight in Stockholm).
👽 Benefits of the Strategy
Seasonality Effect:
The strategy captures consistent patterns driven by the overnight effect and high volatility periods.
Risk Reduction:
Since trades are executed during a specific window and only on high volatility days, the strategy helps mitigate exposure to broader market risk.
Simplicity and Efficiency:
The strategy is moderately complex, making it accessible for traders while offering significant returns.
Global Applicability:
Suitable for traders worldwide, with clear guidelines on adjusting for local time zones.
👽 Considerations
Market Conditions: The strategy works best in a high-volatility environment.
Execution: Requires precise timing to enter and exit trades at the specified hours.
Time Zone Adjustments: Ensure you convert UTC times accurately based on your location to execute trades at the correct local times.
Disclaimer: This information is for entertainment purposes only and does not constitute financial advice. Please consult with a qualified financial advisor before making any investment decisions.
FXC NQ Opening Range Breakout Strategy V2.4Mechanical Strategy that trades breakouts on NQ futures on the 15min timeframe during the NYSE session. It's designed to manage Apex and Top Step accounts with the lowest risk possible.
Risk Disclaimer:
Past results as well as strategy tester reports do not indicate future performance. Guarantees do not exist in trading. By using this strategy you risk losing all your money.
Important:
It only trades on Monday, Wednesday and Friday and takes usually only 1 trade per trading day.
It works on the 15min timeframe only.
The settings are optimised already for NQ but feel free to change them.
How it works:
Every selected trading day it measures the range of the first 15min candle after the NYSE open. As soon as price closes above on the 15min timeframe, it will trade the breakout targeting a set risk to reward ratio. SL on the opposite side of the range. It will trail the SL after a set amount of points and uses a buffer of the set amount of points to trail it.
Settings:
Opening Range Time : This is the time of the day in hours and minutes when the strategy starts looking for trades. It's in the EST/ NY Timezone and set to 9:30-09:45 by default
because that's the NYSE open.
Session Time : This is the time of the day in hours and minutes until the strategy trades. It's in the EST/ NY Timezone and set to 09:45-14:45 by default.
because that's what gave the best results in backtesting. Open trades will get closed automatically once the end of the session is reached. No matter if win or loss. This is just to prevent holding positions over night.
Session Border This setting is to select the border color in which the session box will be plotted.
Opening Range Box This setting is to select the fill color of the opening range box.
Opening Range Border This setting is to select the border color of the session box.
Trade Timeframe This setting determines on which timeframe candle has to close outside the opening range box in order to take a trade. It's set to 15min by default because this is what worked by far the best in backtests and live trading.
Stop Loss Buffer in Points: This is simply the buffer in points that is added to the SL for safety reasons. If you have it on 0, the SL will be at the exact price of the opposite side of the range. By default it's set to 0 pips because this is what delivered the best results in backtests.
Profit Target Factor: This is simply the total SL size in points multiplied by x.
Example: If you put 2, you get a 1:2 Risk to Reward Ratio. By Default it's set to 4 because this gave the best results in backtests, because trades always get closed either by trailing SL or because the end of the session is reached.
Use Trailing Stop Loss: This setting is to enable/ disable the trailing stop loss. It's enabled by default because this is a fundamental part of the strategy.
Trailing Stop Buffer: This setting determines after how many points in profit the trailing SL will be activated.
Risk Type: You can chose either between Fixed USD Amount, Risk per Trade in % or Fixed Contract Size. By default it's set to fixed contract size.
Risk Amount (USD or Contracts): This setting is to set how many USD or how many contracts you want to risk per trade. Make sure to check which risk type you have selected before you chose the risk amount.
Use Limit Orders If enabled, the strategy will place a pending order x points from the current price, instead of a market order. Limit orders are enabled by default for a better performance. Important: It doesn't actually place a limit order. The strategy will just wait for a pullback and then enter with a market order. It's more like a hidden limit order.
Limit Order Distance (points): If you have limit orders enabled, this setting determines how many points from the current price the limit order will be placed.
Trading Days: These checkboxes are to select on which week days the strategy has to trade. Thursday is disabled by default because backtests have shown that Thursday is the least profitable day
Backtest Settings:
For the backtest the commissions ere set to 0.35 USD per mini contract which is the highest amount Tradeovate charges. Margin was not accounted for because typically on Apex accounts you can use way more contracts than you need for the extremely low max drawdown. Margin would be important on personal accounts but even there typically it's not an issue at all especially because this strategy runs on the 15min timeframe so it won't use a lot of contracts anyways.
What makes it unique:
This script is unique because it's designed to be used on Apex and Top Step accounts with extremely strict drawdown rules.
The strategy is optimised to be traded with a fixed contract size instead of using % risk. The reason for that is that the drawdown rules of these Futures Prop Accounts are very strict and the fact that the smallest trade-able contract size is 1.
Why the source code is hidden:
The source code is hidden because I invested a lot of time and money into developing this strategy and optimising it with paid 3rd party software. Also since I use it myself on my Apex accounts and prop firms don't allow copy trading I don't want it to be used by too many traders.
DCA Strategy with Mean Reversion and Bollinger BandDCA Strategy with Mean Reversion and Bollinger Band
The Dollar-Cost Averaging (DCA) Strategy with Mean Reversion and Bollinger Bands is a sophisticated trading strategy that combines the principles of DCA, mean reversion, and technical analysis using Bollinger Bands. This strategy aims to capitalize on market corrections by systematically entering positions during periods of price pullbacks and reversion to the mean.
Key Concepts and Principles
1. Dollar-Cost Averaging (DCA)
DCA is an investment strategy that involves regularly purchasing a fixed dollar amount of an asset, regardless of its price. The idea behind DCA is that by spreading out investments over time, the impact of market volatility is reduced, and investors can avoid making large investments at inopportune times. The strategy reduces the risk of buying all at once during a market high and can smooth out the cost of purchasing assets over time.
In the context of this strategy, the Investment Amount (USD) is set by the user and represents the amount of capital to be invested in each buy order. The strategy executes buy orders whenever the price crosses below the lower Bollinger Band, which suggests a potential market correction or pullback. This is an effective way to average the entry price and avoid the emotional pitfalls of trying to time the market perfectly.
2. Mean Reversion
Mean reversion is a concept that suggests prices will tend to return to their historical average or mean over time. In this strategy, mean reversion is implemented using the Bollinger Bands, which are based on a moving average and standard deviation. The lower band is considered a potential buy signal when the price crosses below it, indicating that the asset has become oversold or underpriced relative to its historical average. This triggers the DCA buy order.
Mean reversion strategies are popular because they exploit the natural tendency of prices to revert to their mean after experiencing extreme deviations, such as during market corrections or panic selling.
3. Bollinger Bands
Bollinger Bands are a technical analysis tool that consists of three lines:
Middle Band: The moving average, usually a 200-period Exponential Moving Average (EMA) in this strategy. This serves as the "mean" or baseline.
Upper Band: The middle band plus a certain number of standard deviations (multiplier). The upper band is used to identify overbought conditions.
Lower Band: The middle band minus a certain number of standard deviations (multiplier). The lower band is used to identify oversold conditions.
In this strategy, the Bollinger Bands are used to identify potential entry points for DCA trades. When the price crosses below the lower band, this is seen as a potential opportunity for mean reversion, suggesting that the asset may be oversold and could reverse back toward the middle band (the EMA). Conversely, when the price crosses above the upper band, it indicates overbought conditions and signals potential market exhaustion.
4. Time-Based Entry and Exit
The strategy has specific entry and exit points defined by time parameters:
Open Date: The date when the strategy begins opening positions.
Close Date: The date when all positions are closed.
This time-bound approach ensures that the strategy is active only during a specified window, which can be useful for testing specific market conditions or focusing on a particular time frame.
5. Position Sizing
Position sizing is determined by the Investment Amount (USD), which is the fixed amount to be invested in each buy order. The quantity of the asset to be purchased is calculated by dividing the investment amount by the current price of the asset (investment_amount / close). This ensures that the amount invested remains constant despite fluctuations in the asset's price.
6. Closing All Positions
The strategy includes an exit rule that closes all positions once the specified close date is reached. This allows for controlled exits and limits the exposure to market fluctuations beyond the strategy's timeframe.
7. Background Color Based on Price Relative to Bollinger Bands
The script uses the background color of the chart to provide visual feedback about the price's relationship with the Bollinger Bands:
Red background indicates the price is above the upper band, signaling overbought conditions.
Green background indicates the price is below the lower band, signaling oversold conditions.
This provides an easy-to-interpret visual cue for traders to assess the current market environment.
Postscript: Configuring Initial Capital for Backtesting
To ensure the backtest results align with the actual investment scenario, users must adjust the Initial Capital in the TradingView strategy properties. This is done by calculating the Initial Capital as the product of the Total Closed Trades and the Investment Amount (USD). For instance:
If the user is investing 100 USD per trade and has 10 closed trades, the Initial Capital should be set to 1,000 USD.
Similarly, if the user is investing 200 USD per trade and has 24 closed trades, the Initial Capital should be set to 4,800 USD.
This adjustment ensures that the backtesting results reflect the actual capital deployed in the strategy and provides an accurate representation of potential gains and losses.
Conclusion
The DCA strategy with Mean Reversion and Bollinger Bands is a systematic approach to investing that leverages the power of regular investments and technical analysis to reduce market timing risks. By combining DCA with the insights offered by Bollinger Bands and mean reversion, this strategy offers a structured way to navigate volatile markets while targeting favorable entry points. The clear entry and exit rules, coupled with time-based constraints, make it a robust and disciplined approach to long-term investing.
linreg-gridbotLinreg-GridBot
>release note version 1<
Introduction
This script is a powerful trading strategy tool designed to help users identify market reversal points and make smarter trading decisions using grid thinking.
Background
Traditional grid/martingale strategies have several drawbacks: inefficient use of capital, premature grid boundaries, and trading at fixed intervals, all of which significantly reduce profitability. Since, there is not a gridbot can trail-stop at each level, stay close with the trend, and do better capital usage, tradalive has created this advanced gridbot to address these issues, and enhance the profitability.
How does it work?
Imagine plotting closes on a graph, where the x-axis represents the time-intervals and the y-axis represents the price. Linear regression would fit a straight line through these points that best represents the trend of the data.
In this script utilize the built-in to find consecutive slopes at each moment, and combine them to a smooth trend line. When turning point censored, an entry is placed right after the next bar. Then the gridbot starts working, the upper limit and lower limit is calculated by built-in , for example 3 ATRs above and under the entry price.
There is a 0.2 trailing stop for each step level. Also, when built-in VWMA is rising, this script uses built-in ROC to find the average change of lookback length, then move the grid upwards accordingly.
Size trading is crucial, in gridbot all-in when beginning the trade is risky, because turning point does not guarantee a reversal market upcoming. As a grid trader, we believe the price is relatively cheap near the lower limit, and the price is relatively expensive near the upper limit. Properly sized orders help prevent overexposure and reduce the potential for significant losses.
Features
Trend Detection: Utilizes linear regression to differentiate between upward and downward trends, displaying them as (orange) trend lines on the chart.
Signal Generation: Provides buy or sell signals at reversal points, helping users trade at optimal times.
Adjustable Parameters: Allows users to customize different indicator parameters to fit various trading strategies.
Backtested Device Parameters (see appendix)
Grid Parameters
🔃: Cyclic Trading
💰: Capital Turnover Ratio (Grid capital difference per level: 0.5 to 2)
⬆️ / ⬇️ Expected Number of Upward and Downward Grids.
The minimum number of grids is three: one level above and below the current price.
The maximum number of grids is seven: three levels above and below the current price.
🧭: Trade Signal: Controls the trading direction, long or short;
📏: Linear regression length value.
⏳⌛Backtest Period: Set the time range for users to analyze the performance of the strategy over different periods.
Analytic Toolbox (upper right corner) :
Usage Instructions
Add this script to your TradingView account.
Apply the script to your chart.
Adjust the parameters to fit your trading needs.
Make trading decisions based on the buy and sell signals.
Manually place orders on your trading platform using the parameters provided.
Enter grid parameters according to the highest and lowest prices.
Fill in the number of grid levels (the number of grids equals the number of upward grids plus the number of downward grids plus one).
Set stop-loss and take-profit values.
Alternatively, use a webhook to connect to your trading platform for automated trading.
Important Notes
This script currently only supports 4-hour and daily charts!
This script relies on historical data for calculations and may not be suitable for all market conditions.
Trading carries risks, so please use this script cautiously for trading decisions.
User has to update the backtest period, or else the strategy might not be seen.
Demostration
Phase one, the orange line is about to turn up.
Phase two, the reversal point is located, and right after the next bar start an entry of gridbot.
Phase Three, the gridbot operates, once level touches, then a 0.2ATR trailing stop is applied on each step.
Phase four, when vwma rises, the grid window follows it by the rate of change of lookback price. If vwma does not move up, then the grid boundaries remain.
Phase five, either side when the current price breaks through the white limits, the gridbot stops. And the trading strategy is done for this round.
Precision Trading Strategy: Golden EdgeThe PTS: Golden Edge strategy is designed for scalping Gold (XAU/USD) on lower timeframes, such as the 1-minute chart. It captures high-probability trade setups by aligning with strong trends and momentum, while filtering out low-quality trades during consolidation or low-volatility periods.
The strategy uses a combination of technical indicators to identify optimal entry points:
1. Exponential Moving Averages (EMAs): A fast EMA (3-period) and a slow EMA (33-period) are used to detect short-term trend reversals via crossover signals.
2. Hull Moving Average (HMA): A 66-period HMA acts as a higher-timeframe trend filter to ensure trades align with the overall market direction.
3. Relative Strength Index (RSI): A 12-period RSI identifies momentum. The strategy requires RSI > 55 for long trades and RSI < 45 for short trades, ensuring entries are backed by strong buying or selling pressure.
4. Average True Range (ATR): A 14-period ATR ensures trades occur only during volatile conditions, avoiding choppy or low-movement markets.
By combining these tools, the PTS: Golden Edge strategy creates a precise framework for scalping and offers a systematic approach to capitalize on Gold’s price movements efficiently.
MultiLayer Acceleration/Deceleration Strategy [Skyrexio]Overview
MultiLayer Acceleration/Deceleration Strategy leverages the combination of Acceleration/Deceleration Indicator(AC), 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. Acceleration/Deceleration Indicator 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. Acceleration/Deceleration shall create one of two types of long signals (all details in "Justification of Methodology" paragraph). Buy stop order is placed one tick above the candle's high of last created long 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 long 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 explore the key concepts of this strategy and understand how they work together. We'll begin with the simplest: the EMA.
The Exponential Moving Average (EMA) is a type of moving average that assigns greater weight to recent price data, making it more responsive to current market changes compared to the Simple Moving Average (SMA). This tool is widely used in technical analysis to identify trends and generate buy or sell signals. The EMA is calculated as follows:
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, the EMA acts as a long-term trend filter. For instance, long trades are considered only when the price closes above the EMA (default: 100-period). This increases the likelihood of entering trades aligned with the prevailing trend.
Next, let’s discuss the short-term trend filter, which combines the Williams Alligator and Williams Fractals. Williams Alligator
Developed by Bill Williams, the Alligator is a technical indicator that identifies trends and potential market reversals. It consists of three smoothed moving averages:
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 the lines diverge and align in order, the "Alligator" is "awake," signaling a strong trend. When the lines overlap or intertwine, the "Alligator" is "asleep," indicating a range-bound or sideways market. This indicator helps traders determine when to enter or avoid trades.
Fractals, another tool by Bill Williams, help identify potential reversal points on a price chart. A fractal forms over at least five consecutive bars, with the middle bar showing either:
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 use fractals alongside other indicators to confirm trends or reversals, enhancing decision-making accuracy.
How do these tools work together in this strategy? Let’s consider an example of an uptrend.
When the price breaks above an up fractal, it signals a potential bullish trend. This occurs because the up fractal represents a shift in market behavior, where a temporary high was formed due to selling pressure. If the price revisits this level and breaks through, it suggests the market sentiment has turned bullish.
The breakout must occur above the Alligator’s teeth line to confirm the trend. A breakout below the teeth is considered invalid, and the downtrend might still persist. Conversely, in a downtrend, the same logic applies with down fractals.
In this strategy if the most recent up fractal breakout occurs above the Alligator's teeth and follows the last down fractal breakout below the teeth, the algorithm identifies an uptrend. Long trades can be opened during this phase if a signal aligns. If the price breaks a down fractal below the teeth line during an uptrend, the strategy assumes the uptrend has ended and closes all open long trades.
By combining the EMA as a long-term trend filter with the Alligator and fractals as short-term filters, this approach increases the likelihood of opening profitable trades while staying aligned with market dynamics.
Now let's talk about Acceleration/Deceleration signals. AC indicator is calculated using the Awesome Oscillator, so let's first of all briefly explain what is Awesome Oscillator and how it can be calculated. The Awesome Oscillator (AO), developed by Bill Williams, is a momentum indicator designed to measure market momentum by contrasting recent price movements with a longer-term historical perspective. It helps traders detect potential trend reversals and assess the strength of ongoing trends.
The formula for AO is as follows:
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
The Acceleration/Deceleration (AC) Indicator, introduced by Bill Williams, measures the rate of change in market momentum. It highlights shifts in the driving force of price movements and helps traders spot early signs of trend changes. The AC Indicator is particularly useful for identifying whether the current momentum is accelerating or decelerating, which can indicate potential reversals or continuations. For AC calculation we shall use the AO calculated above is the following formula:
AC = AO − SMA5(AO), where SMA5(AO)is the 5-period Simple Moving Average of the Awesome Oscillator
When the AC is above the zero line and rising, it suggests accelerating upward momentum.
When the AC is below the zero line and falling, it indicates accelerating downward momentum.
When the AC is below zero line and rising it suggests the decelerating the downtrend momentum. When AC is above the zero line and falling, it suggests the decelerating the uptrend momentum.
Now we can explain which AC signal types are used in this strategy. The first type of long signal is when AC value is below zero line. In this cases we need to see three rising bars on the histogram in a row after the falling one. The second type of signals occurs above the zero line. There we need only two rising AC bars in a row after the falling one to create the signal. The signal bar is the last green bar in this sequence. The strategy places the buy stop order one tick above the candle's high, which corresponds to the signal bar on AC indicator.
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 high. If current AC 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 AC bar become decreasing. In the second case buy order cancelled and strategy wait for the next AC signal.
If long trades are initiated, the strategy continues utilizing subsequent signals until the total number of trades reaches a maximum of 5. All open trades are closed when the trend shifts to a downtrend, as determined by the combination of the Alligator and Fractals described earlier.
Why we use AC signals? If currently strategy algorithm considers the high probability of the short-term uptrend with the Alligator and Fractals combination pointed out above and the long-term trend is also suggested by the EMA filter as bullish. Rising AC bars after period of falling AC bars indicates the high probability of local pull back end and there is a high chance to open long trade in the direction of the most likely main uptrend. The numbers of rising bars are different for the different AC values (below or above zero line). This is needed because if AC below zero line the local downtrend is likely to be stronger and needs more rising bars to confirm that it has been changed than if AC is above zero.
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 AC 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.01. 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.15%
Maximum Single Profit: +24.57%
Net Profit: +2108.85 USDT (+21.09%)
Total Trades: 111 (36.94% win rate)
Profit Factor: 2.391
Maximum Accumulated Loss: 367.61 USDT (-2.97%)
Average Profit per Trade: 19.00 USDT (+1.78%)
Average Trade Duration: 75 hours
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
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
Volume-Weighted Delta Strategy[Kopottaja]Volume-Weighted Delta Strategy
The Volume-Weighted Delta Strategy combines price movement and trading volume to identify potential bullish and bearish market conditions. The strategy calculates a delta value that measures the difference between the close and open prices, weighted by volume over a specified period. This delta is compared against its moving average (SMA) to determine potential trend changes. Key features include:
Volume-Weighted Delta Calculation:
The delta is calculated by summing up the volume-weighted differences between close and open prices over the defined length (Delta Length).
Trend Identification:
If the delta value crosses above its SMA, the strategy interprets this as a bullish condition.
If the delta value crosses below its SMA, the strategy interprets this as a bearish condition.
EMA Integration:
A 20-period EMA is included as an additional trend indicator. The EMA line changes color based on whether the delta value is above or below its SMA:
Green: Bullish (delta > SMA)
Red: Bearish (delta < SMA)
Volume Filter:
A volume threshold can be applied to ensure trades are only executed when significant volume is present, helping to avoid false signals in low-volume conditions.
Entry Conditions:
Buy: When the delta crosses below its SMA (bearish signal).
Sell: When the delta crosses above its SMA (bullish signal).
Customizable Inputs:
Length for delta calculation (Delta Length)
Length for moving average (MA Length)
Volume threshold for trade activation
Optimal Timeframes:
This strategy works best on the 4-hour and 1-day timeframes, where volume and price trends are more stable, reducing noise from smaller timeframes.
How It Works:
This strategy is ideal for traders leveraging the relationship between price movement, volume, and trend indicators. Focusing on volume-weighted price action aims to provide a clearer picture of market sentiment, improving the accuracy of entry and exit signals.
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.
Nifty Options Trendy Markets with TSLNifty options strategy that works on volume, technical analysis etc
Ichimoku by FarmerBTCLegal Disclaimer
This strategy, "Ichimoku by FarmerBTC," is provided for educational and informational purposes only. It does not constitute financial advice and should not be relied upon as such. Trading and investing involve substantial risk, including the potential for losing more than your initial investment. Past performance is not indicative of future results. Always consult with a qualified financial advisor before making trading or investment decisions. The author of this strategy is not responsible for any financial losses incurred through its use.
Overview
The "Ichimoku by FarmerBTC" strategy is a trend-following system built on the Ichimoku Cloud indicator, enhanced with volume analysis and a high-timeframe Simple Moving Average (HTF SMA) condition. It is designed to identify long-only trade opportunities and performs optimally on higher timeframes, such as the daily chart or above.
Core Components
1. Ichimoku Cloud
The Ichimoku Cloud is a comprehensive trend-following indicator that helps identify the overall market direction and momentum. It consists of:
Conversion Line (Tenkan-Sen): Measures short-term momentum.
Base Line (Kijun-Sen): Filters medium-term trends.
Leading Span A: The average of the Conversion and Base Lines, forming one cloud boundary.
Leading Span B: The midpoint of the highest high and lowest low over a longer period, forming the other cloud boundary.
Key Ichimoku Rules Applied:
The strategy identifies bullish trends when:
The price is above the cloud.
The cloud is bullish (Leading Span A > Leading Span B).
2. High-Timeframe Simple Moving Average (HTF SMA)
This condition ensures alignment with the broader trend:
Default SMA Length: 13 periods.
Default Timeframe: 1 day.
HTF SMA Rule:
Trades are allowed only when the price is above the HTF SMA, ensuring alignment with the larger trend.
3. Volume Analysis
The strategy uses volume to validate trade setups:
Volume MA: A 20-period moving average of volume is calculated.
Trades are allowed only when the current volume is at least 1.5x the Volume MA, indicating strong market participation.
Entry and Exit Rules
Entry Condition (Long Only):
Price above the Ichimoku Cloud: Confirms a bullish trend.
Bullish Cloud: Leading Span A > Leading Span B indicates upward momentum.
Price above the HTF SMA: Ensures alignment with the broader trend.
Volume exceeds threshold: Confirms strong market participation.
Exit Condition:
The strategy exits the position when the price moves below the Ichimoku Cloud, signaling a potential trend reversal.
Best Timeframes
This strategy is optimized for daily (1D) or higher timeframes (e.g., weekly 1W). Using it on lower timeframes may produce false signals due to increased noise in price and volume data.
Default Settings
Ichimoku Settings:
Conversion Line Period: 10
Base Line Period: 30
Lagging Span Period: 53
Displacement: 26
HTF SMA Settings:
SMA Length: 13
Timeframe: 1 Day
Volume Settings:
Volume MA Length: 20
Volume Multiplier: 1.5x
Visualization
Ichimoku Cloud:
Dynamic cloud coloring (green for bullish, red for bearish) helps identify the current trend.
HTF SMA:
A purple line overlays the chart, providing a clear representation of the high-timeframe trend.
Volume Panel:
An optional panel displays volume (blue histogram) and the Volume Moving Average (orange line) to analyze market participation.
Advantages of This Strategy
High Accuracy on Higher Timeframes:
Filtering trades using the Ichimoku Cloud, HTF SMA, and volume ensures robust trend alignment, reducing false signals.
Volume Confirmation:
Incorporates volume as a validation metric to enter trades only during strong market participation.
Easy Customization:
Parameters like Ichimoku periods, SMA length, timeframe, and volume thresholds can be adjusted to suit different assets or trading styles.
Limitations
Not Suitable for Low Timeframes:
Lower timeframes can produce excessive noise, leading to false signals.
Long-Only:
The strategy is designed only for bullish markets and does not support short trades.
Lagging Nature of Indicators:
Both the Ichimoku Cloud and SMA are lagging indicators, meaning they react to past price movements.
Conclusion
The "Ichimoku by FarmerBTC" strategy is an excellent tool for trend-following on daily or higher timeframes. Its combination of Ichimoku Cloud, high-timeframe SMA, and volume ensures a robust framework for identifying high-probability long trades in trending markets. However, users are advised to test the strategy thoroughly and manage their risk appropriately. Always consult with a financial professional before making trading decisions.
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).