VRS (Vegas Reversal Strategy)It is based on the reversal of the price after an accentuated volatility of the previous day. It is tested only on BTC, TF Day, and has an activation value equal to a spike of minimum 2.4% amplitude, a value that I have left in the settings free to be modified if it is found valid for other assets.
In the settings you can change how many of the latest longs or shorts I want to view in the past, colors and various aesthetics.
When the system detects a spike at the end of the day from 2.4% onwards it will signal the direction of Reversal, generating the 3 TP, dotted lines.
Entry into the market must be done at the close of the candle day, unfortunately at night time if you want to enter on the tick.
Stop above/below the spike that generated the condition.
If the Day2 candle closes FULL inside the spike, immediate and early closing of the operation.
There cannot be two consecutive Day events: if you are Long or Short and have taken a stop on the next candle, even if the latter generates another entry, this must not be activated.
TP 1 and 2 are both mandatory at 33% of the position, TP3, based on the current movement, can be considered to be left to run to the bitter end or in any case to structuring confirmations of a slowdown in the price.
Upon reaching TP1 it is mandatory to move the STOP to even.
In the event of the presence of extremely strong directional movements, for example Long direction, an opposite activation, Short, must be done but with reduced capital, on the contrary an activation in the same direction as the trend movement can be done with a surcharge. Always pay attention to Money Management and Risk Management.
Always manage Risk and Money Management in an adequate, technical and sustainable manner in relation to your capital. A fair exposure per transaction is between 1% and 2% of the capital.
Indicators and strategies
Signal Tester (v1.2)This is an automation test Strategy, which helps you to get Strategy Alerts quickly on the 1m chart.
This is useful when you want to start automating Strategies but first you want to see if the connection between TradingView and your automation tool works properly.
This Strategy sends LONG Buy/Sell signals every 1 minute so you don't have to wait for a long time to see if your integration with an automation tool works.
How it works:
It works on the 1m chart
Every 1 minute it will send a BUY or a SELL signal (alternating between them forever)
Trend Signals with TP & SL [UAlgo] StrategyThe "Trend Signals with TP & SL Strategy" is a trading strategy designed to capture trend continuation signals while incorporating sophisticated risk management techniques. This strategy is tailored for traders who wish to capitalize on trending market conditions with precise entry and exit points, automatically calculating Take Profit (TP) and Stop Loss (SL) levels based on either Average True Range (ATR) or percentage values. The strategy aims to enhance trade management by preventing multiple simultaneous positions and dynamically adapting to changing market conditions.
This strategy is highly configurable, allowing traders to adjust sensitivity, the ATR calculation method, and the cloud moving average length. Additionally, the strategy can display buy and sell signals directly on the chart, along with visual representation of entry points, stop losses, and take profits. It also features a cloud-based trend analysis using a MACD-driven color fill that indicates the strength and direction of the trend.
🔶 Key Features
Configurable Trend Continuation Signals:
Source Selection: The strategy uses the midpoint of the high-low range as the default source, but it is adjustable.
Sensitivity: The sensitivity of the trend signals can be adjusted using a multiplier, ranging from 0.5 to 5.
ATR Calculation: The strategy allows users to choose between two ATR calculation methods for better adaptability to different market conditions.
Cloud Moving Average: Traders can adjust the cloud moving average length, which is used in conjunction with MACD to provide a visual trend indication.
Take Profit & Stop Loss Management:
ATR-Based or Percent-Based: The strategy offers flexibility in setting TP and SL levels, allowing traders to choose between ATR-based multipliers or fixed percentage values.
Dynamic Adjustment: TP and SL levels are dynamically adjusted according to the selected method, ensuring trades are managed based on real-time market conditions.
Prevention of Multiple Positions:
Single Position Control: To reduce risk and enhance strategy reliability, the strategy includes an option to prevent multiple positions from being opened simultaneously.
Visual Trade Indicators:
Buy/Sell Signals: Clearly displays buy and sell signals on the chart for easy interpretation.
Entry, SL, and TP Lines: Draws lines for entry price, stop loss, and take profit directly on the chart, helping traders to monitor trades visually.
Trend Cloud: A color-filled cloud based on MACD and the cloud moving average provides a visual cue of the trend’s direction and strength.
Performance Summary Table:
In-Chart Statistics: A table in the top right of the chart displays key performance metrics, including total trades, wins, losses, and win rate percentage, offering a quick overview of the strategy’s effectiveness.
🔶 Interpreting the Indicator
Trend Signals: The strategy identifies trend continuation signals based on price action relative to an ATR-based threshold. A buy signal is generated when the price crosses above a key level, indicating an uptrend. Conversely, a sell signal occurs when the price crosses below a level, signaling a downtrend.
Cloud Visualization: The cloud, derived from MACD and moving averages, changes color to reflect the current trend. A positive cloud in aqua suggests an uptrend, while a red cloud indicates a downtrend. The transparency of the cloud offers further nuance, with more solid colors denoting stronger trends.
Entry and Exit Management: Once a trend signal is generated, the strategy automatically sets TP and SL levels based on your chosen method (ATR or percentage). The stop loss and take profit lines will appear on the chart, showing where the strategy will exit the trade. If the price reaches either the SL or TP, the trade is closed, and the respective line is deleted from the chart.
Performance Metrics: The strategy’s performance is tracked in real-time with an in-chart table. This table provides essential information about the number of trades executed, the win/loss ratio, and the overall win rate. This information helps traders assess the strategy's effectiveness and make necessary adjustments.
This strategy is designed for those who seek to engage with trending markets, offering robust tools for entry, exit, and overall trade management. By understanding and leveraging these features, traders can potentially improve their trading outcomes and risk management.
🔷 Related Script
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
PVT Crossover Strategy**Release Notes**
**Strategy Name**: PVT Crossover Strategy
**Purpose**: This strategy aims to capture entry and exit points in the market using the Price-Volume Trend (PVT) and its Exponential Moving Average (EMA). It specifically uses the crossover of PVT with its EMA as signals to identify changes in market trends.
**Uniqueness and Usefulness**
**Uniqueness**: This strategy is unique in its use of the PVT indicator, which combines price changes with trading volume to track trends. The filtering with EMA reduces noise and provides more accurate signals compared to other indicators.
**Usefulness**: This strategy is effective for traders looking to detect trend changes early. The signals based on PVT and its EMA crossover work particularly well in markets where volume fluctuations are significant.
**Entry Conditions**
**Long Entry**:
- **Condition**: A crossover occurs where PVT crosses above its EMA.
- **Signal**: A buy signal is generated, indicating a potential uptrend.
**Short Entry**:
- **Condition**: A crossunder occurs where PVT crosses below its EMA.
- **Signal**: A sell signal is generated, indicating a potential downtrend.
**Exit Conditions**
**Exit Strategy**:
- The strategy does not explicitly program exit conditions beyond the entry signals, but traders are encouraged to close positions manually based on signals or apply their own risk management strategy.
**Risk Management**
This strategy does not include default risk management rules, so traders should implement their own. Consider using trailing stops or fixed stop losses to manage risk.
**Account Size**: ¥100,000
**Commissions and Slippage**: 94 pips per trade for commissions and 1 pip for slippage
**Risk per Trade**: 10% of account equity
**Configurable Options**
**Configurable Options**:
- **EMA Length**: The length of the EMA used to calculate the EMA of PVT (default is 20).
- **Signal Display Control**: The option to turn the display of signals on or off.
**Adequate Sample Size**
To ensure the robustness and reliability of this strategy, it is recommended to backtest it with a sufficiently long period of historical data, especially across different market conditions.
**Credits**
**Acknowledgments**:
This strategy is based on the concept of the PVT indicator and its application in strategy design, drawing on contributions from technical analysis and the trading community.
**Clean Chart Description**
**Chart Appearance**:
This strategy is designed to maintain a clean and simple chart by turning off the plot of PVT, its EMA, and entry signals. This reduces clutter and allows for more effective trend analysis.
**Addressing the House Rule Violations**
**Omissions and Unrealistic Claims**
**Clarification**:
This strategy does not make unrealistic or unsupported claims about its performance, and all signals are for educational purposes only, not guaranteeing future results. It is important to understand that past performance does not guarantee future outcomes.
GC Strategy with Trend Filter and Sudden Move Profit TakingBYBIT:BTCUSDT.P 15M
Situation Assessment with Three Moving Averages
The strategy uses the crossover of the 5SMA and 25SMA as entry signals.
Additionally, the 75SMA is used as a filter. Long entries are only allowed when the price is above the 75SMA, and short entries are only allowed when the price is below the 75SMA.
ADX Filter
The Average Directional Index (ADX) is used to check the strength of the trend. Entry signals are only activated when the ADX is above 20. This ensures that trades are only executed when the trend is strong.
Sudden Move Detection
The strategy detects sudden price movements. If a sudden move occurs, the position is closed to lock in profits.
Entry
Long Entry: When the 5SMA crosses above the 25SMA, the price is above the 75SMA, and the ADX is above 20.
Short Entry: When the 5SMA crosses below the 25SMA, the price is below the 75SMA, and the ADX is above 20.
Exit
Positions are closed if a sudden move occurs. Positions are also closed if an opposing entry signal is generated.
This strategy aims to confirm the strength of the trend using moving average crossovers and ADX and to lock in profits based on sudden price movements.
3本の移動平均線による状況判断
5SMAと25SMA のクロスオーバーをエントリーシグナルとして使用します。
さらに、75SMAをフィルターとして使用し、価格が75SMAの上にある場合のみロングエントリーを許可し、75SMAの下にある場合のみショートエントリーを許可します。
ADXフィルター
ADX(平均方向性指数)を使ってトレンドの強さを確認します。
ADXが20より大きい場合のみ、エントリーシグナルを有効にします。これにより、トレンドが強い時にのみ取引を行うことができます。
急激な変動検知
価格の急激な変動を検出します。
急激な変動があった場合には、ポジションをクローズして利益を確定します。
エントリー
ロングエントリー
5SMAが25SMAを上にクロスし、価格が75SMAの上にあり、ADXが20を超えているとき。
ショートエントリー
5SMAが25SMAを下にクロスし、価格が75SMAの下にあり、ADXが20を超えているとき。
エグジット
急激な変動があった場合、ポジションをクローズします。
反対のエントリーシグナルが発生した場合にも、ポジションをクローズします。
このストラテジーは、移動平均のクロスオーバーとADXを使ってトレンドの強さを確認し、急激な変動に基づいて利益を確定することを目的としています。
Scalping with Williams %R, MACD, and SMA (1m)Overview:
This trading strategy is designed for scalping in the 1-minute timeframe. It uses a combination of the Williams %R, MACD, and SMA indicators to generate buy and sell signals. It also includes alert functionalities to notify users when trades are executed or closed.
Indicators Used:
Williams %R : A momentum indicator that measures overbought and oversold conditions. The Williams %R values range from -100 to 0.
Length: 140 bars (i.e., 140-period).
MACD (Moving Average Convergence Divergence) : A trend-following momentum indicator that shows the relationship between two moving averages of a security's price.
Fast Length: 24 bars
Slow Length: 52 bars
MACD Length: 9 bars (signal line)
SMA (Simple Moving Average) : A trend-following indicator that smooths out price data to create a trend-following indicator.
Length: 7 bars
Conditions and Logic:
Timeframe Check :
The strategy is designed specifically for the 1-minute timeframe. If the current chart is not on the 1-minute timeframe, a warning label is displayed on the chart instructing the user to switch to the 1-minute timeframe.
Williams %R Conditions :
Buy Condition: The strategy looks for a crossover of Williams %R from below -94 to above -94. This indicates a potential buying opportunity when the market is moving out of an oversold condition.
Sell Condition: The strategy looks for a crossunder of Williams %R from above -6 to below -6. This indicates a potential selling opportunity when the market is moving out of an overbought condition.
Deactivate Buy: If Williams %R crosses above -40, the buy signal is deactivated, suggesting that the buying condition is no longer valid.
Deactivate Sell: If Williams %R crosses below -60, the sell signal is deactivated, suggesting that the selling condition is no longer valid.
MACD Conditions :
MACD Histogram: Used to identify the momentum and the direction of the trend.
Long Entry: The strategy initiates a buy order if the MACD histogram shows a positive bar after a negative bar while a buy condition is active and Williams %R is above -94.
Long Exit: The strategy exits the buy position if the MACD histogram turns negative and is below the previous histogram bar.
Short Entry: The strategy initiates a sell order if the MACD histogram shows a negative bar after a positive bar while a sell condition is active and Williams %R is below -6.
Short Exit: The strategy exits the sell position if the MACD histogram turns positive and is above the previous histogram bar.
Trend Confirmation (Using SMA) :
Bullish Trend: The strategy considers a bullish trend if the current price is above the 7-bar SMA. A buy signal is only considered if this condition is met.
Bearish Trend: The strategy considers a bearish trend if the current price is below the 7-bar SMA. A sell signal is only considered if this condition is met.
Alerts:
Long Entry Alert: An alert is triggered when a buy order is executed.
Long Exit Alert: An alert is triggered when the buy order is closed.
Short Entry Alert: An alert is triggered when a sell order is executed.
Short Exit Alert: An alert is triggered when the sell order is closed.
Summary:
Buy Signal: Activated when Williams %R crosses above -94 and the price is above the 7-bar SMA. A buy order is placed if the MACD histogram shows a positive bar after a negative bar. The buy order is closed when the MACD histogram turns negative and is below the previous histogram bar.
Sell Signal: Activated when Williams %R crosses below -6 and the price is below the 7-bar SMA. A sell order is placed if the MACD histogram shows a negative bar after a positive bar. The sell order is closed when the MACD histogram turns positive and is above the previous histogram bar.
This strategy combines momentum (Williams %R), trend-following (MACD), and trend confirmation (SMA) to identify trading opportunities in the 1-minute timeframe. It is designed for short-term trading or scalping.
Innocent Heikin Ashi Ethereum StrategyHello there, im back!
If you are familiar with my previous scripts, this one will seem like the future's nostalgia!
Functionality:
As you can see, all candles are randomly colored. This has no deeper meaning, it should remind you to switch to Heikin Ashi. The Strategy works on standard candle stick charts, but should be used with Heikin Ashi to see the actual results. (Regular OHLC calculations are included.)
Same as in my previous scripts we import our PVSRA Data from @TradersReality open source Indicator.
With this data and the help of moving averages, we have got an edge in the market.
Signal Logic:
When a "violently green" candle appears (high buy volume + tick speed) above the 50 EMA indicates a change in trend and sudden higher prices. Depending on OHLC of the candle itself and volume, Take Profit and Stop Loss is calculated. (The price margin is the only adjustable setting). Additionally, to make this script as simple and easily useable as possible, all other adjustable variables have been already set to the best suitable value and the chart was kept plain, except for the actual entries and exits.
Basic Settings and Adjustables:
Main Input 1: TP and SL combined price range. (Double, Triple R:R equally.)
Trade Inputs: All standard trade size and contract settings for testing available.
Special Settings:
Checkbox 1: Calculate Signal in Heikin Ashi chart, including regular candle OHLC („Open, High, Low, Close“)
Checkbox 2/3: Calculate by order fill or every tick.
Checkbox 4: Possible to fill orders on bar close.
Timeframe and practical usage:
Made for the 5 Minute to 1 hour timeframe.
Literally ONLY works on Ethereum and more or less on Bitcoin.
EVERY other asset has absolute 0% profitability.
Have fun and share with your friends!
Thanks for using!
Example Chart:
Rsi Long-Term Strategy [15min]Hello, I would like to present to you The "RSI Long-Term Strategy" for 15min tf
The "RSI Long-Term Strategy " is designed for traders who prefer a combination of momentum and trend-following techniques. The strategy focuses on entering long positions during significant market corrections within an overall uptrend, confirmed by both RSI and volume. The use of long-term SMAs ensures that trades are made in line with the broader market trend. The stop-loss feature provides risk management by limiting losses on trades that do not perform as expected. This strategy is particularly well-suited for longer-term traders who monitor 15-minute charts but look for substantial trend reversals or continuations.
Indicators and Parameters:
Relative Strength Index (RSI):
- The RSI is calculated using a 10-period length. It measures the magnitude of recent price changes to evaluate overbought or oversold conditions. The script defines oversold conditions when the RSI is at or below 30 and overbought conditions when the RSI is at or above 70.
Volume Condition:
-The strategy incorporates a volume condition where the current volume must be greater than 2.5 times the 20-period moving average of volume. This is used to confirm the strength of the price movement.
Simple Moving Averages (SMA):
- The strategy uses two SMAs: SMA1 with a length of 250 periods and SMA2 with a length of 500 periods. These SMAs help identify long-term trends and generate signals based on their crossover.
Strategy Logic:
Entry Logic:
A long position is initiated when all the following conditions are met:
The RSI indicates an oversold condition (RSI ≤ 30).
SMA1 is above SMA2, indicating an uptrend.
The volume condition is satisfied, confirming the strength of the signal.
Exit Logic:
The strategy closes the long position when SMA1 crosses under SMA2, signaling a potential end of the uptrend (a "Death Cross").
Stop-Loss:
A stop-loss is set at 5% below the entry price to manage risk and limit potential losses.
Buy and sell signals are highlighted with circles below or above bars:
Green Circle : Buy signal when RSI is oversold, SMA1 > SMA2, and the volume condition is met.
Red Circle : Sell signal when RSI is overbought, SMA1 < SMA2, and the volume condition is met.
Black Cross: "Death Cross" when SMA1 crosses under SMA2, indicating a potential bearish signal.
to determine the level of stop loss and target point I used a piece of code by RafaelZioni, here is the script from which a piece of code was taken
I hope the strategy will be helpful, as always, best regards and safe trades
;)
Economic Policy Uncertainty StrategyThis Pine Script strategy is designed to make trading decisions based on the Economic Policy Uncertainty Index for the United States (USEPUINDXD) using a Simple Moving Average (SMA) and a dynamic threshold. The strategy identifies opportunities by entering long positions when the SMA of the Economic Policy Uncertainty Index crosses above a user-defined threshold. An exit is triggered after a set number of bars have passed since the trade was opened. Additionally, the background is highlighted in green when a position is open to visually indicate active trades.
This strategy is intended to be used in portfolio management and trading systems where economic policy uncertainty plays a critical role in decision-making. The index provides insight into macroeconomic conditions, which can affect asset prices and investment returns.
The Economic Policy Uncertainty (EPU) Index is a significant metric used to gauge uncertainty related to economic policies in the United States. This index reflects the frequency of newspaper articles discussing economic uncertainty, government policies, and their potential impact on the economy. It has become a popular indicator for both academics and practitioners to analyze the effects of policy uncertainty on various economic and financial outcomes.
Importance of the EPU Index for Portfolio Decisions:
Economic Policy Uncertainty and Investment Decisions:
Research by Baker, Bloom, and Davis (2016) introduced the Economic Policy Uncertainty Index and explored how increased uncertainty leads to delays in investment and hiring decisions. Their study shows that heightened uncertainty, as captured by the EPU index, is associated with a contraction in economic activity and lower stock market returns. Investors tend to shift their portfolios towards safer assets during periods of high policy uncertainty .
Impact on Asset Prices:
Gulen and Ion (2016) demonstrated that policy uncertainty adversely affects corporate investment, leading to lower stock market returns. The study emphasized that firms reduce investment during periods of high policy uncertainty, which can significantly impact the pricing of risky assets. Consequently, portfolio managers need to account for policy uncertainty when making asset allocation decisions .
Global Implications:
Policy uncertainty is not only a domestic issue. Brogaard and Detzel (2015) found that U.S. economic policy uncertainty has significant spillover effects on global financial markets, affecting equity returns, bond yields, and foreign exchange rates. This suggests that global investors should incorporate U.S. policy uncertainty into their risk management strategies .
These studies underscore the importance of the Economic Policy Uncertainty Index as a tool for understanding macroeconomic risks and making informed portfolio management decisions. Strategies that incorporate the EPU index, such as the one described above, can help investors navigate periods of uncertainty by adjusting their exposure to different asset classes based on economic conditions.
Proxy Financial Stress Index StrategyThis strategy is based on a Proxy Financial Stress Index constructed using several key financial indicators. The strategy goes long when the financial stress index crosses below a user-defined threshold, signaling a potential reduction in market stress. Once a position is opened, it is held for a predetermined number of bars (periods), after which it is automatically closed.
The financial stress index is composed of several normalized indicators, each representing different market aspects:
VIX - Market volatility.
US 10-Year Treasury Yield - Bond market.
Dollar Index (DXY) - Currency market.
S&P 500 Index - Stock market.
EUR/USD - Currency exchange rate.
High-Yield Corporate Bond ETF (HYG) - Corporate bond market.
Each component is normalized using a Z-score (based on the user-defined moving average and standard deviation lengths) and weighted according to user inputs. The aggregated index reflects overall market stress.
The strategy enters a long position when the stress index crosses below a specified threshold from above, indicating reduced financial stress. The position is held for a defined holding period before being closed automatically.
Scientific References:
The concept of a financial stress index is derived from research that combines multiple financial variables to measure systemic risks in the financial markets. Key research includes:
The Financial Stress Index developed by various Federal Reserve banks, including the Cleveland Financial Stress Index (CFSI)
Bank of America Merrill Lynch Option Volatility Estimate (MOVE) Index as a measure of interest rate volatility, which correlates with financial stress
These indices are widely used in economic research to gauge financial instability and help in policy decisions. They track real-time fluctuations in various markets and are often used to anticipate economic downturns or periods of high financial risk.
Breadth Thrust Strategy with Volatility Stop-LossThe "Breadth Thrust Strategy with Volatility Stop-Loss" is a trading strategy designed to capitalize on market momentum while managing risk through volatility-based stop-losses. Here's a detailed breakdown of the strategy:
Strategy Overview:
Market Breadth Analysis: The strategy uses the "Breadth Thrust Indicator," which evaluates market momentum by calculating the ratio of advancing stocks to the total number of stocks on the New York Stock Exchange (NYSE). This indicator helps identify bullish market conditions. An optional feature allows for the inclusion of volume data in this calculation, enhancing the signal's robustness.
Signal Generation: A long position is triggered when the smoothed breadth ratio (or the combined breadth and volume ratio) crosses above a specified low threshold (e.g., 0.4). This crossover indicates a potential shift towards positive market momentum.
Key Parameters:
Smoothing Length (length): Defines the period over which the breadth or combined ratio is smoothed using a simple moving average (SMA) to reduce noise and highlight the underlying trend.
Low Threshold (threshold_low): The level below which the smoothed ratio must fall before crossing back above to trigger a long signal.
Hold Periods (hold_periods): The minimum number of periods for which the position will be held once entered, ensuring the strategy captures a meaningful move.
Volatility Multiplier (volatility_multiplier): A multiplier applied to the Average True Range (ATR) to determine the distance of the stop-loss from the entry price, which adjusts according to market volatility.
Trade Management:
Entry Signal: The strategy enters a long position when the smoothed combined ratio crosses above the low threshold, signaling a potential bullish reversal.
ATR-Based Stop-Loss: Upon entering a trade, the strategy calculates a stop-loss level based on the ATR, which measures market volatility. The stop-loss is set at a distance from the entry price, determined by multiplying the ATR by the specified volatility multiplier. This adaptive stop-loss mechanism helps protect the position from adverse market moves.
Stop-Loss Adjustment: While the position is open, the stop-loss level is dynamically updated, ensuring it never decreases (trailing stop-loss effect) but can be adjusted upwards to reflect the latest price action relative to volatility.
Position Closure: The position is closed if:
The market price falls to or below the stop-loss level.
The position has been held for the specified number of periods (hold_periods), after which it is automatically closed.
Additional Settings:
Initial Capital: The strategy starts with an initial capital of $10,000.
Commissions and Slippage: Each trade incurs a commission of $5 per order, and slippage is accounted for at $1 per trade.
Background Highlighting: The chart background turns green when a position is open, providing a clear visual indication of the active trade.
This strategy is designed to identify and capitalize on upward momentum in the market while employing a volatility-adjusted stop-loss to manage risk. By combining market breadth analysis with volatility-based stop-losses, the strategy aims to balance profit potential with protection against sudden market reversals.
Multi-Factor StrategyThis trading strategy combines multiple technical indicators to create a systematic approach for entering and exiting trades. The goal is to capture trends by aligning several key indicators to confirm the direction and strength of a potential trade. Below is a detailed description of how the strategy works:
Indicators Used
MACD (Moving Average Convergence Divergence):
MACD Line: The difference between the 12-period and 26-period Exponential Moving Averages (EMAs).
Signal Line: A 9-period EMA of the MACD line.
Usage: The strategy looks for crossovers between the MACD line and the Signal line as entry signals. A bullish crossover (MACD line crossing above the Signal line) indicates a potential upward movement, while a bearish crossover (MACD line crossing below the Signal line) signals a potential downward movement.
RSI (Relative Strength Index):
Usage: RSI is used to gauge the momentum of the price movement. The strategy uses specific thresholds: below 70 for long positions to avoid overbought conditions and above 30 for short positions to avoid oversold conditions.
ATR (Average True Range):
Usage: ATR measures market volatility and is used to set dynamic stop-loss and take-profit levels. A stop loss is set at 2 times the ATR, and a take profit at 3 times the ATR, ensuring that risk is managed relative to market conditions.
Simple Moving Averages (SMA):
50-day SMA: A short-term trend indicator.
200-day SMA: A long-term trend indicator.
Usage: The strategy uses the relationship between the 50-day and 200-day SMAs to determine the overall market trend. Long positions are taken when the price is above the 50-day SMA and the 50-day SMA is above the 200-day SMA, indicating an uptrend. Conversely, short positions are taken when the price is below the 50-day SMA and the 50-day SMA is below the 200-day SMA, indicating a downtrend.
Entry Conditions
Long Position:
-MACD Crossover: The MACD line crosses above the Signal line.
-RSI Confirmation: RSI is below 70, ensuring the asset is not overbought.
-SMA Confirmation: The price is above the 50-day SMA, and the 50-day SMA is above the 200-day SMA, indicating a strong uptrend.
Short Position:
MACD Crossunder: The MACD line crosses below the Signal line.
RSI Confirmation: RSI is above 30, ensuring the asset is not oversold.
SMA Confirmation: The price is below the 50-day SMA, and the 50-day SMA is below the 200-day SMA, indicating a strong downtrend.
Opposite conditions for shorts
Exit Strategy
Stop Loss: Set at 2 times the ATR from the entry price. This dynamically adjusts to market volatility, allowing for wider stops in volatile markets and tighter stops in calmer markets.
Take Profit: Set at 3 times the ATR from the entry price. This ensures a favorable risk-reward ratio of 1:1.5, aiming for higher rewards on successful trades.
Visualization
SMAs: The 50-day and 200-day SMAs are plotted on the chart to visualize the trend direction.
MACD Crossovers: Bullish and bearish MACD crossovers are highlighted on the chart to identify potential entry points.
Summary
This strategy is designed to align multiple indicators to increase the probability of successful trades by confirming trends and momentum before entering a position. It systematically manages risk with ATR-based stop loss and take profit levels, ensuring that trades are exited based on market conditions rather than arbitrary points. The combination of trend indicators (SMAs) with momentum and volatility indicators (MACD, RSI, ATR) creates a robust approach to trading in various market environments.
Monthly Purchase Strategy with Dynamic Contract Size This trading strategy is designed to automate monthly purchases of a security, adjusting the size of each purchase based on the percentage of the portfolio's equity. The key features of this strategy include:
Monthly Purchases: The strategy buys the security on a specified day of each month, based on the user's input.
Dynamic Position Sizing: The size of each purchase is calculated as a percentage of the current equity. This allows the position size to adjust dynamically with the portfolio's performance.
Slippage and Commission Considerations: Slippage is simulated by adjusting the entry price by a set number of ticks, while commissions are factored in as fixed costs per trade.
Drawdown Calculation: The strategy tracks the highest equity value and calculates the drawdown, which is the percentage decrease from this peak equity. This helps in assessing the performance and risk of the strategy.
Benefits of the Strategy
Automated Investment: The strategy automates the investment process, reducing the need for manual trading decisions and ensuring consistent execution.
Dynamic Position Sizing: By adjusting the purchase size based on the portfolio’s equity, the strategy helps in managing risk and capitalizing on market movements proportionally to the portfolio’s performance.
Regular Investments: Investing on a regular schedule helps in averaging the purchase price of the security, which can reduce the impact of short-term volatility.
Risk Management: Monitoring drawdown helps in assessing the risk and performance of the strategy, providing insights into potential losses relative to the highest equity value.
Scientific Documentation on ETF Savings Plans
1. Dollar-Cost Averaging and Investment Behavior:
Title: "The Benefits of Dollar-Cost Averaging: A Study of Investment Behavior"
Authors: William F. Sharpe
Journal: Financial Analysts Journal, 1994
Summary: This study discusses the concept of dollar-cost averaging (DCA), which involves investing a fixed amount of money at regular intervals regardless of market conditions. The study highlights that DCA can reduce the impact of market volatility and lower the average cost of investments over time.
Reference: Sharpe, W. F. (1994). The Benefits of Dollar-Cost Averaging: A Study of Investment Behavior. Financial Analysts Journal, 50(4), 27-36.
2. ETFs and Long-Term Investment Strategies:
Title: "Exchange-Traded Funds and Their Role in Long-Term Investment Strategies"
Authors: John C. Bogle
Journal: The Journal of Portfolio Management, 2007
Summary: This paper explores the advantages of using ETFs for long-term investment strategies, emphasizing their low costs, tax efficiency, and diversification benefits. It also discusses how ETFs can be used effectively in automated investment plans like ETF savings plans.
Reference: Bogle, J. C. (2007). Exchange-Traded Funds and Their Role in Long-Term Investment Strategies. The Journal of Portfolio Management, 33(4), 14-25.
3. Risk and Return in ETF Investments:
Title: "Risk and Return Characteristics of Exchange-Traded Funds"
Authors: Eugene F. Fama and Kenneth R. French
Journal: Journal of Financial Economics, 2010
Summary: Fama and French analyze the risk and return characteristics of ETFs compared to traditional mutual funds. The study provides insights into how ETFs can be a viable option for investors seeking diversified exposure while managing risk and optimizing returns.
Reference: Fama, E. F., & French, K. R. (2010). Risk and Return Characteristics of Exchange-Traded Funds. Journal of Financial Economics, 96(2), 257-278.
4. The Impact of Automated Investment Plans:
Title: "The Impact of Automated Investment Plans on Portfolio Performance"
Authors: David G. Blanchflower and Andrew J. Oswald
Journal: Journal of Behavioral Finance, 2012
Summary: This research examines how automated investment plans, including ETF savings plans, affect portfolio performance. It highlights the benefits of automation in reducing behavioral biases and ensuring consistent investment practices.
Reference: Blanchflower, D. G., & Oswald, A. J. (2012). The Impact of Automated Investment Plans on Portfolio Performance. Journal of Behavioral Finance, 13(2), 77-89.
Summary
The "Monthly Purchase Strategy with Dynamic Contract Size and Drawdown" provides a disciplined approach to investing by automating purchases and adjusting position sizes based on portfolio equity. It leverages the benefits of dollar-cost averaging and regular investment, with risk management through drawdown monitoring. Scientific literature supports the effectiveness of ETF savings plans and automated investment strategies in optimizing returns and managing investment risk.
RSI Strategy with Adjustable RSI and Stop-LossThis trading strategy uses the Relative Strength Index (RSI) and a Stop-Loss mechanism to make trading decisions. Here’s a breakdown of how it works:
RSI Calculation:
The RSI is calculated based on the user-defined length (rsi_length). This is a momentum oscillator that measures the speed and change of price movements.
Buy Condition:
The strategy generates a buy signal when the RSI value is below a user-defined threshold (rsi_threshold). This condition indicates that the asset might be oversold and potentially due for a rebound.
Stop-Loss Mechanism:
Upon triggering a buy signal, the strategy calculates the Stop-Loss level. The Stop-Loss level is set to a percentage below the entry price, as specified by the user (stop_loss_percent). This level is used to limit potential losses if the price moves against the trade.
Sell Condition:
A sell signal is generated when the current closing price is higher than the highest high of the previous day. This condition suggests that the price has reached a new high, and the strategy decides to exit the trade.
Plotting:
The RSI values are plotted on the chart for visual reference. A horizontal line is drawn at the RSI threshold level to help visualize the oversold condition.
Summary
Buying Strategy: When RSI is below the specified threshold, indicating potential oversold conditions.
Stop-Loss: Set based on a percentage of the entry price to limit potential losses.
Selling Strategy: When the price surpasses the highest high of the previous day, signaling a potential exit point.
This strategy aims to capture potential rebounds from oversold conditions and manage risk using a Stop-Loss mechanism. As with any trading strategy, it’s essential to test and optimize it under various market conditions to ensure its effectiveness.
Negroni Opening Range StrategyStrategy Summary:
This tool can be used to help identify breakouts from a range during a time-zone of your choosing. It plots a pre-market range, an opening range, it also includes moving average levels that can be used as confluence, as well as plotting previous day SESSION highs and lows.
There are several options on how you wish to close out the trades, all described in more detail below.
Back-testing Inputs:
You define your timezone.
You define how many trades to open on any given day.
You decide to go: long only, short only, or long & short (CAREFUL: "Long & Short" can open trades that effectively closes-out existing ones, for better AND worse!)
You define between which times the strategy will open trades.
You define when it closes any open trades (preventing overnight trades, or leaving trades open into US data times!!).
This hopefully helps make back-testing reflect YOUR trading hours.
NOTE: Renko or Heikin-Ashi charts
For ALL strategies, don’t use Renko or Heikin-Ashi charts unless you know EXACTLY the implications.
Specific to my strategy, using a renko chart can make this 85-90% profitable (I wish it was!!) Although they can be useful, renko charts don’t always capture real wicks, so the renko chart may show your trade up-only but your broker (who is not using renko!!) will have likely stopped you out on a wick somewhere along the line.
NOTE: TradingView ‘Deep backtesting’
For ALL strategies, be cynical of all backtesting (e.g. repainting issues etc) as well as ‘Deep backtesting’ results.
Specific to this strategy, the default settings here SHOULD BE OK, but unfortunately at the time of writing, we can’t see on the chart what exactly ‘deep backtesting’ is calculating. In the past I have noted a number of trades that were not closed at the end of the day, despite my ‘end of day’ trade closing being enabled, so there were big winners and losers that would not have materialized otherwise. As I say, this seems ok at these settings but just always be cynical!!
Opening Range Inputs
You define a pre-market range (example: 08:00 - 09:00).
You define an opening range (example: 09:00 - 09:30).
The strategy will give an update at the close of the opening range to let you know if the opening range has broken out the pre-market range (OR Breakout), or if it has remained inside (OR Inside). The label appears at the end of the opening range NOT at the bar that ‘broke-out’.
This is just a visual cue for you, it has no bearing on what the strategy will do.
The strategy default will trade off the pre-market range, but you can untick this if you prefer to trade off the opening range.
Opening Trades:
Strategy goes long when the bar (CLOSE) crosses-over the ‘pre-market’ high (not the ‘opening range’ high); and the time is within your trading session, and you have not maxed out your number of trades for the day!
Strategy goes short when the bar (CLOSE) crosses-under the ‘pre-market’ low (not the ‘opening range low); and the time is within your trading session, and you have not maxed out your number of trades for the day!
Remember, you can untick this if you prefer to trade off the opening range instead.
NOTES:
Using momentum indicators can help (RSI and MACD): especially to trade range plays in failed breakouts, when momentum shifts… but the strategy won’t do this for you!
Using an anchored vwap at the session open can also provide nice confluence, as well as take-profit levels at the upper/lower of 3x standard deviation.
CLOSING TRADES:
You have 6 take-profit (TP) options:
1) Full TP: uses ATR Multiplier - Full TP at the ATR parameters as defined in inputs.
2) Take Partial profits: ATR Multiplier - Takes partial profits based on parameters as defined in inputs (i.e close 40% of original trade at TP1, close another 40% of original trade at TP2, then the remainder at Full TP as set in option 1.).
3) Full TP: Trailing Stop - Applies a Trailing Stop at the number of points, as defined in inputs.
4) Full TP: MA cross - Takes profit when price crosses ‘Trend MA’ as defined in inputs.
5) Scalp: Points - closes at a set number of points, as defined in inputs.
6) Full TP: PMKT Multiplier - places a SL at opposite pre-market Hi/Low (we go long at a break-out of the pre-market high, 50% would place a SL at the pre-market range mid-point; 100% would place a SL at the pre-market low)'. This takes profit at the input set in option 1).
Double Bottom and Top Hunter### Türkçe Açıklama:
Bu strateji, grafikte ikili dip ve ikili tepe formasyonlarını tespit ederek otomatik alım ve satım işlemleri gerçekleştirir. İkili dip, fiyatın belirli bir dönem içinde iki kez en düşük seviyeye ulaşması ile oluşur ve bu durumda strateji long (alım) işlemi açar. İkili tepe ise fiyatın belirli bir dönem içinde iki kez en yüksek seviyeye ulaşması ile oluşur ve bu durumda strateji short (satış) işlemi açar.
- **Dönem Uzunluğu ve Geriye Dönük Kontrol:** Strateji, varsayılan olarak 100 periyotluk bir zaman dilimini temel alır ve bu süre boyunca en düşük ve en yüksek fiyat seviyelerini belirler. Geriye dönük kontrol süresi de 100 periyot olarak ayarlanmıştır.
- **İşlem Açma Koşulları:** İkili dip tespit edildiğinde long pozisyon, ikili tepe tespit edildiğinde short pozisyon açılır.
- **İşlem Kapatma Koşulları:** İkili dipte, en yüksek seviyeye (HH) ulaşıldıktan sonra fiyatın daha düşük bir seviye (LL) yapması durumunda pozisyon kapanır. İkili tepede ise tam tersi bir durumda, pozisyon kapanır.
- **Zigzag Çizimi:** İkili dip ve tepe formasyonları, grafik üzerinde yeşil (dipler) ve kırmızı (tepeler) zigzag çizgileri ile gösterilir.
Bu strateji, özellikle 1, 3 ve 5 dakikalık kısa zaman dilimlerinde yüksek başarı oranına sahiptir ve piyasadaki kısa vadeli trend dönüşlerini yakalamada etkili bir araçtır.
### English Explanation:
This strategy automatically executes buy and sell orders by detecting double bottom and double top formations on the chart. A double bottom occurs when the price reaches a low level twice within a specific period, prompting the strategy to open a long (buy) position. Conversely, a double top forms when the price reaches a high level twice, leading the strategy to open a short (sell) position.
- **Period Length and Lookback Control:** By default, the strategy is based on a 100-period length, during which it identifies the lowest and highest price levels. The lookback control period is also set to 100 periods.
- **Entry Conditions:** A long position is opened when a double bottom is detected, while a short position is opened when a double top is identified.
- **Exit Conditions:** In the case of a double bottom, the position is closed after the price reaches a higher high (HH) and then makes a lower low (LL). For a double top, the opposite occurs before closing the position.
- **Zigzag Plotting:** The double bottom and top formations are visually represented on the chart with green (bottoms) and red (tops) zigzag lines.
This strategy is particularly successful in short timeframes such as 1, 3, and 5 minutes and is an effective tool for capturing short-term trend reversals in the market.
Multi-Step FlexiSuperTrend - Strategy [presentTrading]At the heart of this endeavor is a passion for continuous improvement in the art of trading
█ Introduction and How it is Different
The "Multi-Step FlexiSuperTrend - Strategy " is an advanced trading strategy that integrates the well-known SuperTrend indicator with a nuanced and dynamic approach to market trend analysis. Unlike conventional SuperTrend strategies that rely on static thresholds and fixed parameters, this strategy introduces multi-step take profit mechanisms that allow traders to capitalize on varying market conditions in a more controlled and systematic manner.
What sets this strategy apart is its ability to dynamically adjust to market volatility through the use of an incremental factor applied to the SuperTrend calculation. This adjustment ensures that the strategy remains responsive to both minor and major market shifts, providing a more accurate signal for entries and exits. Additionally, the integration of multi-step take profit levels offers traders the flexibility to scale out of positions, locking in profits progressively as the market moves in their favor.
BTC 6hr Long/Short Performance
█ Strategy, How it Works: Detailed Explanation
The Multi-Step FlexiSuperTrend strategy operates on the foundation of the SuperTrend indicator, but with several enhancements that make it more adaptable to varying market conditions. The key components of this strategy include the SuperTrend Polyfactor Oscillator, a dynamic normalization process, and multi-step take profit levels.
🔶 SuperTrend Polyfactor Oscillator
The SuperTrend Polyfactor Oscillator is the heart of this strategy. It is calculated by applying a series of SuperTrend calculations with varying factors, starting from a defined "Starting Factor" and incrementing by a specified "Increment Factor." The indicator length and the chosen price source (e.g., HLC3, HL2) are inputs to the oscillator.
The SuperTrend formula typically calculates an upper and lower band based on the average true range (ATR) and a multiplier (the factor). These bands determine the trend direction. In the FlexiSuperTrend strategy, the oscillator is enhanced by iteratively applying the SuperTrend calculation across different factors. The iterative process allows the strategy to capture both minor and significant trend changes.
For each iteration (indexed by `i`), the following calculations are performed:
1. ATR Calculation: The Average True Range (ATR) is calculated over the specified `indicatorLength`:
ATR_i = ATR(indicatorLength)
2. Upper and Lower Bands Calculation: The upper and lower bands are calculated using the ATR and the current factor:
Upper Band_i = hl2 + (ATR_i * Factor_i)
Lower Band_i = hl2 - (ATR_i * Factor_i)
Here, `Factor_i` starts from `startingFactor` and is incremented by `incrementFactor` in each iteration.
3. Trend Determination: The trend is determined by comparing the indicator source with the upper and lower bands:
Trend_i = 1 (uptrend) if IndicatorSource > Upper Band_i
Trend_i = 0 (downtrend) if IndicatorSource < Lower Band_i
Otherwise, the trend remains unchanged from the previous value.
4. Output Calculation: The output of each iteration is determined based on the trend:
Output_i = Lower Band_i if Trend_i = 1
Output_i = Upper Band_i if Trend_i = 0
This process is repeated for each iteration (from 0 to 19), creating a series of outputs that reflect different levels of trend sensitivity.
Local
🔶 Normalization Process
To make the oscillator values comparable across different market conditions, the deviations between the indicator source and the SuperTrend outputs are normalized. The normalization method can be one of the following:
1. Max-Min Normalization: The deviations are normalized based on the range of the deviations:
Normalized Value_i = (Deviation_i - Min Deviation) / (Max Deviation - Min Deviation)
2. Absolute Sum Normalization: The deviations are normalized based on the sum of absolute deviations:
Normalized Value_i = Deviation_i / Sum of Absolute Deviations
This normalization ensures that the oscillator values are within a consistent range, facilitating more reliable trend analysis.
For more details:
🔶 Multi-Step Take Profit Mechanism
One of the unique features of this strategy is the multi-step take profit mechanism. This allows traders to lock in profits at multiple levels as the market moves in their favor. The strategy uses three take profit levels, each defined as a percentage increase (for long trades) or decrease (for short trades) from the entry price.
1. First Take Profit Level: Calculated as a percentage increase/decrease from the entry price:
TP_Level1 = Entry Price * (1 + tp_level1 / 100) for long trades
TP_Level1 = Entry Price * (1 - tp_level1 / 100) for short trades
The strategy exits a portion of the position (defined by `tp_percent1`) when this level is reached.
2. Second Take Profit Level: Similar to the first level, but with a higher percentage:
TP_Level2 = Entry Price * (1 + tp_level2 / 100) for long trades
TP_Level2 = Entry Price * (1 - tp_level2 / 100) for short trades
The strategy exits another portion of the position (`tp_percent2`) at this level.
3. Third Take Profit Level: The final take profit level:
TP_Level3 = Entry Price * (1 + tp_level3 / 100) for long trades
TP_Level3 = Entry Price * (1 - tp_level3 / 100) for short trades
The remaining portion of the position (`tp_percent3`) is exited at this level.
This multi-step approach provides a balance between securing profits and allowing the remaining position to benefit from continued favorable market movement.
█ Trade Direction
The strategy allows traders to specify the trade direction through the `tradeDirection` input. The options are:
1. Both: The strategy will take both long and short positions based on the entry signals.
2. Long: The strategy will only take long positions.
3. Short: The strategy will only take short positions.
This flexibility enables traders to tailor the strategy to their market outlook or current trend analysis.
█ Usage
To use the Multi-Step FlexiSuperTrend strategy, traders need to set the input parameters according to their trading style and market conditions. The strategy is designed for versatility, allowing for various market environments, including trending and ranging markets.
Traders can also adjust the multi-step take profit levels and percentages to match their risk management and profit-taking preferences. For example, in highly volatile markets, traders might set wider take profit levels with smaller percentages at each level to capture larger price movements.
The normalization method and the incremental factor can be fine-tuned to adjust the sensitivity of the SuperTrend Polyfactor Oscillator, making the strategy more responsive to minor market shifts or more focused on significant trends.
█ Default Settings
The default settings of the strategy are carefully chosen to provide a balanced approach between risk management and profit potential. Here is a breakdown of the default settings and their effects on performance:
1. Indicator Length (10): This parameter controls the lookback period for the ATR calculation. A shorter length makes the strategy more sensitive to recent price movements, potentially generating more signals. A longer length smooths out the ATR, reducing sensitivity but filtering out noise.
2. Starting Factor (0.618): This is the initial multiplier used in the SuperTrend calculation. A lower starting factor makes the SuperTrend bands closer to the price, generating more frequent trend changes. A higher starting factor places the bands further away, filtering out minor fluctuations.
3. Increment Factor (0.382): This parameter controls how much the factor increases with each iteration of the SuperTrend calculation. A smaller increment factor results in more gradual changes in sensitivity, while a larger increment factor creates a wider range of sensitivity across the iterations.
4. Normalization Method (None): The default is no normalization, meaning the raw deviations are used. Normalization methods like Max-Min or Absolute Sum can make the deviations more consistent across different market conditions, improving the reliability of the oscillator.
5. Take Profit Levels (2%, 8%, 18%): These levels define the thresholds for exiting portions of the position. Lower levels (e.g., 2%) capture smaller profits quickly, while higher levels (e.g., 18%) allow positions to run longer for more significant gains.
6. Take Profit Percentages (30%, 20%, 15%): These percentages determine how much of the position is exited at each take profit level. A higher percentage at the first level locks in more profit early, reducing exposure to market reversals. Lower percentages at higher levels allow for a portion of the position to benefit from extended trends.
Fibonacci-Only StrategyFibonacci-Only Strategy
This script is a custom trading strategy designed for traders who leverage Fibonacci retracement levels to identify potential trade entries and exits. The strategy is versatile, allowing users to trade across multiple timeframes, with built-in options for dynamic stop loss, trailing stops, and take profit levels.
Key Features:
Custom Fibonacci Levels:
This strategy calculates three specific Fibonacci retracement levels: 19%, 82.56%, and the reverse 19% level. These levels are used to identify potential areas of support and resistance where price reversals or breaks might occur.
The Fibonacci levels are calculated based on the highest and lowest prices within a 100-bar period, making them dynamic and responsive to recent market conditions.
Dynamic Entry Conditions:
Touch Entry: The script enters long or short positions when the price touches specific Fibonacci levels and confirms the move with a bullish (for long) or bearish (for short) candle.
Break Entry (Optional): If the "Use Break Strategy" option is enabled, the script can also enter positions when the price breaks through Fibonacci levels, providing more aggressive entry opportunities.
Stop Loss Management:
The script offers flexible stop loss settings. Users can choose between a fixed percentage stop loss or an ATR-based stop loss, which adjusts based on market volatility.
The ATR (Average True Range) stop loss is multiplied by a user-defined factor, allowing for tailored risk management based on market conditions.
Trailing Stop Mechanism:
The script includes an optional trailing stop feature, which adjusts the stop loss level as the market moves in favor of the trade. This helps lock in profits while allowing the trade to run if the trend continues.
The trailing stop is calculated as a percentage of the difference between the entry price and the current market price.
Multiple Take Profit Levels:
The strategy calculates seven take profit levels, each at incremental percentages above (for long trades) or below (for short trades) the entry price. This allows for gradual profit-taking as the market moves in the trade's favor.
Each take profit level can be customized in terms of the percentage of the position to be closed, providing precise control over exit strategies.
Strategy Backtesting and Results:
Realistic Backtesting:
The script has been backtested with realistic account sizes, commission rates, and slippage settings to ensure that the results are applicable to actual trading scenarios.
The backtesting covers various timeframes and markets to ensure the strategy's robustness across different trading environments.
Default Settings:
The script is published with default settings that have been optimized for general use. These settings include a 15-minute timeframe, a 1.0% stop loss, a 2.0 ATR multiplier for stop loss, and a 1.5% trailing stop.
Users can adjust these settings to better fit their specific trading style or the market they are trading.
How It Works:
Long Entry Conditions:
The strategy enters a long position when the price touches the 19% Fibonacci level (from high to low) or the reverse 19% level (from low to high) and confirms the move with a bullish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a long position when the price breaks below the 19% Fibonacci level and then moves back up, confirming the break with a bullish candle.
Short Entry Conditions:
The strategy enters a short position when the price touches the 82.56% Fibonacci level and confirms the move with a bearish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a short position when the price breaks above the 82.56% Fibonacci level and then moves back down, confirming the break with a bearish candle.
Stop Loss and Take Profit Logic:
The stop loss for each trade is calculated based on the selected method (fixed percentage or ATR-based). The strategy then manages the trade by either trailing the stop or taking profit at predefined levels.
The take profit levels are set at increments of 0.5% above or below the entry price, depending on whether the position is long or short. The script gradually exits the trade as these levels are hit, securing profits while minimizing risk.
Usage:
For Fibonacci Traders:
This script is ideal for traders who rely on Fibonacci retracement levels to find potential trade entries and exits. The script automates the process, allowing traders to focus on market analysis and decision-making.
For Trend and Swing Traders:
The strategy's flexibility in handling both touch and break entries makes it suitable for trend-following and swing trading strategies. The multiple take profit levels allow traders to capture profits in trending markets while managing risk.
Important Notes:
Originality: This script uniquely combines Fibonacci retracement levels with dynamic stop loss management and multiple take profit levels. It is not just a combination of existing indicators but a thoughtful integration designed to enhance trading performance.
Disclaimer: Trading involves risk, and it is crucial to test this script in a demo account or through backtesting before applying it to live trading. Users should ensure that the settings align with their individual risk tolerance and trading strategy.
Monthly Day Long Strategy with VIX and Risk ManagementThis trading strategy is designed to open long positions on a specific day of the month, with the conditions for entry and exit based on the VIX index and additional risk management techniques. The strategy includes stop-loss and take-profit features to manage risk and lock in profits.
Inputs:
Entry Day of the Month (entry_day): Specifies which day of the month to consider for initiating a trade. The default value is the 27th.
Hold Duration (Days) (hold_duration_days): Defines how many days to hold the position after opening. The default value is 4 days.
VIX Threshold (vix_threshold): Sets the maximum acceptable value for the VIX index to consider an entry. If the VIX is below this threshold, it signals a potential trade. The default value is 20.0.
Stop Loss (%) (stop_loss_percentage): Determines the percentage below the entry price where the stop-loss will be triggered. The default value is 2.0%.
Take Profit (%) (take_profit_percentage): Sets the percentage above the entry price where the take-profit will be triggered. The default value is 5.0%.
Functions:
next_weekday(date): Adjusts the entry date to the next Monday if it falls on a weekend (Saturday or Sunday). This ensures trades do not occur on non-trading days.
Logic:
Entry Conditions:
Date Check: Opens a long position if the current date matches the adjusted entry date (the 27th or the next Monday if the 27th falls on a weekend).
VIX Filter: The VIX index value must be below the specified threshold (e.g., 20.0) to consider an entry.
Exit Conditions:
Time-Based Exit: Closes the position after the hold duration of 4 days.
Stop-Loss: Automatically closes the position if the price drops to a level that is a specified percentage below the entry price (e.g., 2.0%).
Take-Profit: Closes the position if the price rises to a level that is a specified percentage above the entry price (e.g., 5.0%).
Plots:
VIX Plot: Displays the VIX index on the chart for visual reference.
VIX Threshold Line: A horizontal line representing the VIX threshold value.
Summary:
The strategy aims to take advantage of specific entry days while filtering trades based on VIX levels to ensure market conditions are favorable. Risk management is enhanced through stop-loss and take-profit settings, which help in controlling potential losses and securing profits. The strategy ensures trades are only made on trading days and not on weekends, adjusting automatically to the next Monday if needed.
ChatGPT kann Fehler machen. Überprüfe wichtige Informationen.
Friday Bond Short StrategyStrategy: Friday Bond Short Strategy (1H Timeframe)
Objective:
This strategy aims to open short positions on a specified day and hour (Eastern Time) and close those positions on another specified day and hour. The background color of the chart will turn green when a position is active, providing a visual cue of an open trade.
Parameters:
1. Entry Day:
• Defines the day of the week on which the short position will be opened.
• Value: 6 for Friday (Pine Script’s weekday numbering: Monday = 2, Friday = 6).
2. Entry Hour:
• Specifies the hour (Eastern Time) when the short position will be opened.
• Value: 13 for 13:00 ET (1:00 PM).
3. Exit Day:
• Defines the day of the week on which the short position will be closed.
• Value: 2 for Monday.
4. Exit Hour:
• Specifies the hour (Eastern Time) when the position will be closed.
• Value: 13 for 13:00 ET (1:00 PM).
How It Works:
1. Time Adjustment to Eastern Time:
• The script converts all time references to Eastern Time (America/New_York) to ensure the strategy operates according to the desired time zone.
2. Entry Conditions:
• The strategy checks if the current day of the week matches the specified entry_day and if the current hour matches the specified entry_hour.
• If both conditions are met, a short position is opened (strategy.entry("Short", strategy.short)).
3. Exit Conditions:
• Similarly, the strategy checks if the current day of the week matches the specified exit_day and if the current hour matches the specified exit_hour.
• If both conditions are met, the open short position is closed (strategy.close("Short")).
4. Background Color:
• The background color of the chart is adjusted based on whether there is an open position:
• Green Background: If the strategy has an open position (strategy.position_size > 0), the background is set to light green.
• No Background Color: If there is no open position, the background color is not set (na).
Summary:
The Friday Bond Short Strategy is designed to enter short positions on Fridays at 1:00 PM ET and close them on Mondays at 1:00 PM ET. The chart background color turns green when a short position is active, providing a clear visual indication of when the strategy is engaged in a trade.
Gann + Laplace Smoothed Hybrid Volume Spread AnalysisThe Gann + Laplace Smoothed Hybrid Volume Spread Analysis ( GannLSHVSA ) Strategy/Indicator is an trading tool designed to fuse volume analysis with trend detection, offering traders a view of market dynamics.
This Strategy/Indicator stands apart by integrating the principles of the upgraded Discrete Fourier Transform (DFT), the Laplace Stieltjes Transform and volume spread analysis, enhanced with a layer of Fourier smoothing to distill market noise and highlight trend directions with unprecedented clarity.
The length of EMA and Strategy Entries are modified with the Gann swings .
This smoothing process allows traders to discern the true underlying patterns in volume and price action, stripped of the distractions of short-term fluctuations and noise.
The core functionality of the GannLSHVSA revolves around the innovative combination of volume change analysis, spread determination (calculated from the open and close price difference), and the strategic use of the EMA (default 10) to fine-tune the analysis of spread by incorporating volume changes.
Trend direction is validated through a moving average (MA) of the histogram, which acts analogously to the Volume MA found in traditional volume indicators. This MA serves as a pivotal reference point, enabling traders to confidently engage with the market when the histogram's movement concurs with the trend direction, particularly when it crosses the Trend MA line, signalling optimal entry points.
It returns 0 when MA of the histogram and EMA of the Price Spread are not align.
WHAT IS GannLSHVSA INDICATOR:
The GannLSHVSA plots a positive trend when a positive Volume smoothed Spread and EMA of Volume smoothed price is above 0, and a negative when negative Volume smoothed Spread and EMA of Volume smoothed price is below 0. When this conditions are not met it plots 0.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
ORIGINALITY & USEFULNESS:
The GannLSHVSA Strategy is unique because it applies upgraded DFT, the Laplace Stieltjes Transform for data smoothing, effectively filtering out the minor fluctuations and leaving traders with a clear picture of the market's true movements. The DFT's ability to break down market signals into constituent frequencies offers a granular view of market dynamics, highlighting the amplitude and phase of each frequency component. This, combined with the strategic application of Ehler's Universal Oscillator principles via a histogram, furnishes traders with a nuanced understanding of market volatility and noise levels, thereby facilitating more informed trading decisions. The Gann swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is the meaning of price spread?
In finance, a spread refers to the difference between two prices, rates, or yields. One of the most common types is the bid-ask spread, which refers to the gap between the bid (from buyers) and the ask (from sellers) prices of a security or asset.
We are going to use Open-Close spread.
What is Volume spread analysis?
Volume spread analysis (VSA) is a method of technical analysis that compares the volume per candle, range spread, and closing price to determine price direction.
What does this mean?
We need to have a positive Volume Price Spread and a positive Moving average of Volume price spread for a positive trend. OR via versa a negative Volume Price Spread and a negative Moving average of Volume price spread for a negative trend.
What if we have a positive Volume Price Spread and a negative Moving average of Volume Price Spread?
It results in a neutral, not trending price action.
Thus the Indicator/Strategy returns 0 and Closes all long and short positions.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Fine-tune Inputs: Gann + Laplace Smooth Volume Zone OscillatorUse this Strategy to Fine-tune inputs for the GannLSVZ0 Indicator.
Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame.
MEANINGFUL DESCRIPTION:
The Volume Zone oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
The Gann Laplace Smoothed Volume Zone Oscillator GannLSVZO is a refined version of the Volume Zone Oscillator, enhanced by the implementation of the upgraded Discrete Fourier Transform, the Laplace Stieltjes Transform. Its primary function is to streamline price data and diminish market noise, thus offering a clearer and more precise reflection of price trends.
By combining the Laplace with Gann Swing Entries and with Ehler's white noise histogram, users gain a comprehensive perspective on volume-related market conditions.
HOW TO USE THE INDICATOR:
The default period is 2 but can be adjusted after backtesting. (I suggest 5 VZO length and NoiceR max length 8 as-well)
The VZO points to a positive trend when it is rising above the 0% level, and a negative trend when it is falling below the 0% level. 0% level can be adjusted in setting by adjusting VzoDifference. Oscillations rising below 0% level or falling above 0% level result in a natural trend.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
When Indicator/Strategy returns 0 or natural trend, Strategy Closes All it's positions.
ORIGINALITY & USFULLNESS:
Personal combination of Gann swings and Laplace Stieltjes Transform of a price which results in less noise Volume Zone Oscillator.
The Laplace Stieltjes Transform is a mathematical technique that transforms discrete data from the time domain into its corresponding representation in the frequency domain. This process involves breaking down a signal into its individual frequency components, thereby exposing the amplitude and phase characteristics inherent in each frequency element.
This indicator utilizes the concept of Ehler's Universal Oscillator and displays a histogram, offering critical insights into the prevailing levels of market noise. The Ehler's Universal Oscillator is grounded in a statistical model that captures the erratic and unpredictable nature of market movements. Through the application of this principle, the histogram aids traders in pinpointing times when market volatility is either rising or subsiding.
The Gann swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is oscillator?
Oscillators are chart indicators that can assist a trader in determining overbought or oversold conditions in ranging (non-trending) markets.
What is volume zone oscillator?
Price Zone Oscillator measures if the most recent closing price is above or below the preceding closing price.
Volume Zone Oscillator is Volume multiplied by the 1 or -1 depending on the difference of the preceding 2 close prices and smoothed with Exponential moving Average.
What does this mean?
If the VZO is above 0 and VZO is rising. We have a bullish trend. Most likely.
If the VZO is below 0 and VZO is falling. We have a bearish trend. Most likely.
Rising means that VZO on close is higher than the previous day.
Falling means that VZO on close is lower than the previous day.
What if VZO is falling above 0 line?
It means we have a high probability of a bearish trend.
Thus the indicator returns 0 and Strategy closes all it's positions when falling above 0 (or rising bellow 0) and we combine higher and lower timeframes to gauge the trend.
What is approximation and smoothing?
They are mathematical concepts for making a discrete set of numbers a
continuous curved line.
Laplace Stieltjes Transform approximation of a close price are taken from aprox library.
Key Features:
You can tailor the Indicator/Strategy to your preferences with adjustable parameters such as VZO length, noise reduction settings, and smoothing length.
Volume Zone Oscillator (VZO) shows market sentiment with the VZO, enhanced with Exponential Moving Average (EMA) smoothing for clearer trend identification.
Noise Reduction leverages Euler's White noise capabilities for effective noise reduction in the VZO, providing a cleaner and more accurate representation of market dynamics.
Choose between the traditional Fast Laplace Stieltjes Transform (FLT) and the innovative Double Discrete Fourier Transform (DTF32) soothed price series to suit your analytical needs.
Use dynamic calculation of Laplace coefficient or the static one. You may modify those inputs and Strategy entries with Gann swings.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
MACD with 1D Stochastic Confirmation Reversal StrategyOverview
The MACD with 1D Stochastic Confirmation Reversal Strategy utilizes MACD indicator in conjunction with 1 day timeframe Stochastic indicators to obtain the high probability short-term trend reversal signals. The main idea is to wait until MACD line crosses up it’s signal line, at the same time Stochastic indicator on 1D time frame shall show the uptrend (will be discussed in methodology) and not to be in the oversold territory. Strategy works on time frames from 30 min to 4 hours and opens only long trades.
Unique Features
Dynamic stop-loss system: Instead of fixed stop-loss level strategy utilizes average true range (ATR) multiplied by user given number subtracted from the position entry price as a dynamic stop loss level.
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Higher time frame confirmation: Strategy utilizes 1D Stochastic to establish the major trend and confirm the local reversals with the higher probability.
Trailing take profit level: After reaching the trailing profit activation level scrip activate the trailing of long trade using EMA. More information in methodology.
Methodology
The strategy opens long trade when the following price met the conditions:
MACD line of MACD indicator shall cross over the signal line of MACD indicator.
1D time frame Stochastic’s K line shall be above the D line.
1D time frame Stochastic’s K line value shall be below 80 (not overbought)
When long trade is executed, strategy set the stop-loss level at the price ATR multiplied by user-given value below the entry price. This level is recalculated on every next candle close, adjusting to the current market volatility.
At the same time strategy set up the trailing stop validation level. When the price crosses the level equals entry price plus ATR multiplied by user-given value script starts to trail the price with EMA. If price closes below EMA long trade is closed. When the trailing starts, script prints the label “Trailing Activated”.
Strategy settings
In the inputs window user can setup the following strategy settings:
ATR Stop Loss (by default = 3.25, value multiplied by ATR to be subtracted from position entry price to setup stop loss)
ATR Trailing Profit Activation Level (by default = 4.25, value multiplied by ATR to be added to position entry price to setup trailing profit activation level)
Trailing EMA Length (by default = 20, period for EMA, when price reached trailing profit activation level EMA will stop out of position if price closes below it)
User can choose the optimal parameters during backtesting on certain price chart, in our example we use default settings.
Justification of Methodology
This strategy leverages 2 time frames analysis to have the high probability reversal setups on lower time frame in the direction of the 1D time frame trend. That’s why it’s recommended to use this strategy on 30 min – 4 hours time frames.
To have an approximation of 1D time frame trend strategy utilizes classical Stochastic indicator. The Stochastic Indicator is a momentum oscillator that compares a security's closing price to its price range over a specific period. It's used to identify overbought and oversold conditions. The indicator ranges from 0 to 100, with readings above 80 indicating overbought conditions and readings below 20 indicating oversold conditions.
It consists of two lines:
%K: The main line, calculated using the formula (CurrentClose−LowestLow)/(HighestHigh−LowestLow)×100 . Highest and lowest price taken for 14 periods.
%D: A smoothed moving average of %K, often used as a signal line.
Strategy logic assumes that on 1D time frame it’s uptrend in %K line is above the %D line. Moreover, we can consider long trade only in %K line is below 80. It means that in overbought state the long trade will not be opened due to higher probability of pullback or even major trend reversal. If these conditions are met we are going to our working (lower) time frame.
On the chosen time frame, we remind you that for correct work of this strategy you shall use 30min – 4h time frames, MACD line shall cross over it’s signal line. The MACD (Moving Average Convergence Divergence) is a popular momentum and trend-following indicator used in technical analysis. It helps traders identify changes in the strength, direction, momentum, and duration of a trend in a stock's price.
The MACD consists of three components:
MACD Line: This is the difference between a short-term Exponential Moving Average (EMA) and a long-term EMA, typically calculated as: MACD Line=12-period EMA−26-period
Signal Line: This is a 9-period EMA of the MACD Line, which helps to identify buy or sell signals. When the MACD Line crosses above the Signal Line, it can be a bullish signal (suggesting a buy); when it crosses below, it can be a bearish signal (suggesting a sell).
Histogram: The histogram shows the difference between the MACD Line and the Signal Line, visually representing the momentum of the trend. Positive histogram values indicate increasing bullish momentum, while negative values indicate increasing bearish momentum.
In our script we are interested in only MACD and signal lines. When MACD line crosses signal line there is a high chance that short-term trend reversed to the upside. We use this strategy on 45 min time frame.
ATR is used to adjust the strategy risk management to the current market volatility. If volatility is low, we don’t need the large stop loss to understand the there is a high probability that we made a mistake opening the trade. User can setup the settings ATR Stop Loss and ATR Trailing Profit Activation Level to realize his own risk to reward preferences, but the unique feature of a strategy is that after reaching trailing profit activation level strategy is trying to follow the trend until it is likely to be finished instead of using fixed risk management settings. It allows sometimes to be involved in the large movements.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.08.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: 30%
Maximum Single Position Loss: -4.79%
Maximum Single Profit: +20.14%
Net Profit: +2361.33 USDT (+44.72%)
Total Trades: 123 (44.72% win rate)
Profit Factor: 1.623
Maximum Accumulated Loss: 695.80 USDT (-5.48%)
Average Profit per Trade: 19.20 USDT (+0.59%)
Average Trade Duration: 30 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 between 30 min and 4 hours and chart (optimal performance observed on 45 min 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