OPEN-SOURCE SCRIPT

Double Vegas SuperTrend Enhanced - Strategy [presentTrading]

已更新


█ Introduction and How It Is Different

The "Double Vegas SuperTrend Enhanced" strategy is a sophisticated trading system that combines two Vegas SuperTrend Enhanced. Very Powerful!
Let's celebrate the joy of Children's Day on June 1st! Enjoyyy!

BTCUSD LS performance
快照

The strategy aims to pinpoint market trends with greater accuracy and generate trades that align with the overall market direction.
This approach differentiates itself by integrating volatility adjustments and leveraging the Vegas Channel's width to refine the SuperTrend calculations, resulting in a dynamic and responsive trading system.
Additionally, the strategy incorporates customizable take-profit and stop-loss levels, providing traders with a robust framework for risk management.

-> check Vegas SuperTrend Enhanced - Strategy [presentTrading]
https://www.tradingview.com/script/ec57c7xL-Vegas-SuperTrend-Enhanced-Strategy-presentTrading/

█ Strategy, How It Works: Detailed Explanation

🔶 Vegas Channel and SuperTrend Calculations

The strategy initiates by calculating the Vegas Channel, which is derived from a simple moving average (SMA) and the standard deviation (STD) of the closing prices over a specified window length. This channel helps in measuring market volatility and forms the basis for adjusting the SuperTrend indicator.

Vegas Channel Calculation:
- vegasMovingAverage = SMA(close, vegasWindow)
- vegasChannelStdDev = STD(close, vegasWindow)
- vegasChannelUpper = vegasMovingAverage + vegasChannelStdDev
- vegasChannelLower = vegasMovingAverage - vegasChannelStdDev

SuperTrend Multiplier Adjustment:
- channelVolatilityWidth = vegasChannelUpper - vegasChannelLower
- adjustedMultiplier = superTrendMultiplierBase + volatilityAdjustmentFactor * (channelVolatilityWidth / vegasMovingAverage)

The adjusted multiplier enhances the SuperTrend's sensitivity to market volatility, making it more adaptable to changing market conditions.

BTCUSD Local picture.
快照

🔶 Average True Range (ATR) and SuperTrend Values

The ATR is computed over a specified period to measure market volatility. Using the ATR and the adjusted multiplier, the SuperTrend upper and lower levels are determined.

ATR Calculation:
- averageTrueRange = ATR(atrPeriod)

**SuperTrend Calculation:**
- superTrendUpper = hlc3 - (adjustedMultiplier * averageTrueRange)
- superTrendLower = hlc3 + (adjustedMultiplier * averageTrueRange)

The SuperTrend levels are continuously updated based on the previous values and the current market trend direction. The market trend is determined by comparing the closing prices with the SuperTrend levels.

Trend Direction:
- If close > superTrendLowerPrev, then marketTrend = 1 (bullish)
- If close < superTrendUpperPrev, then marketTrend = -1 (bearish)

🔶 Trade Entry and Exit Conditions

The strategy generates trade signals based on the alignment of both SuperTrends. Trades are executed only when both SuperTrends indicate the same market direction.

Entry Conditions:
- Long Position: Both SuperTrends must signal a bullish trend.
- Short Position: Both SuperTrends must signal a bearish trend.

Exit Conditions:
- Positions are exited if either SuperTrend reverses its trend direction.
- Additional conditions include holding periods and configurable take-profit and stop-loss levels.

█ Trade Direction

The strategy allows traders to specify the desired trade direction through a customizable input setting. Options include:
- Long: Only enter long positions.
- Short: Only enter short positions.
- Both: Enter both long and short positions based on the market conditions.

█ Usage

To utilize the "Double Vegas SuperTrend Enhanced" strategy, traders need to configure the input settings according to their trading preferences and market conditions. The strategy includes parameters for ATR periods, Vegas Channel window lengths, SuperTrend multipliers, volatility adjustment factors, and risk management settings such as hold days, take-profit, and stop-loss percentages.

█ Default Settings

The strategy comes with default settings that can be adjusted to fit individual trading styles:

- trade Direction: Both (allows trading in both long and short directions for maximum flexibility).
- ATR Periods: 10 for SuperTrend 1 and 5 for SuperTrend 2 (shorter ATR period results in more sensitivity to recent price movements).
- Vegas Window Lengths: 100 for SuperTrend 1 and 200 for SuperTrend 2 (longer window length results in smoother moving averages and less sensitivity to short-term volatility).
- SuperTrend Multipliers: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher multipliers lead to wider SuperTrend channels, reducing the frequency of trades).
- Volatility Adjustment Factors: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher adjustment factors increase the responsiveness to changes in market volatility).
- Hold Days: 5 (defines the minimum duration a position is held, ensuring trades are not exited prematurely).
- Take Profit: 30% (sets the target profit level to lock in gains).
- Stop Loss: 20% (sets the maximum acceptable loss level to mitigate risk).
版本注释
updated the first line.
Bands and ChannelsBollinger Bands (BB)bollingerbandstrategypresenttradingstrategysupertrendTrend Analysisvegasvegassupertrend

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


Watch patiently/ then trade
更多:

免责声明