OPEN-SOURCE SCRIPT

Volume ValueWhen Velocity

Title: Volume ValueWhen Velocity Trading Strategy

▶ Introduction:

The "Volume ValueWhen Velocity" trading strategy is designed to generate long position signals based on various technical conditions, including volume thresholds, RSI (Relative Strength Index), and price action relative to the Simple Moving Average (SMA). The strategy aims to identify potential buy opportunities when specific criteria are met, helping traders capitalize on potential bullish movements.

▶ How to use and conditions

  • ★ Important : Only on Spot BinanceBTCUSDT
  • Name: Volume ValueWhen Velocity

  • Operating mode: Long on Spot BINANCE BTCUSDT
  • Timeframe: Only one hour

  • Market: Crypto

  • currency: Bitcoin only

  • Signal type: Medium or short term

  • Entry: All sections in the Technical Indicators and Conditions section must be saved to enter(This is explained below)
  • Exit: Based on loss limit and profit limit It is removed in the settings section

Backtesting:
⁃ Exchange: BINANCE BTCUSDT
⁃ Pair: BTCUSDT
⁃ Timeframe:1h
⁃ Fee: 0.1%
- Initial Capital: 1,000 USDT
- Position sizing: 500 usdt
-Trading Range: 2022-07-01 11:30 ___ 2023-07-21 14:30

▶ Strategy Settings and Parameters:

1. `strategy(title='Volume ValueWhen Velocity', ...`: Sets the strategy title, initial capital, default quantity type, default quantity value, commission value, and trading currency.

↬ Stop-Loss and Take-Profit Settings:

1. long_stoploss_value and long_stoploss_percentage: Define the stop-loss percentage for long positions.
2. long_takeprofit_value and long_takeprofit_percentage: Define the take-profit percentage for long positions.

↬ ValueWhen Occurrence Parameters:

1. occurrence_ValueWhen_1 and occurrence_ValueWhen_2: Control the occurrences of value events.
2. `distance_value`: Specifies the minimum distance between occurrences of ValueWhen 1 and ValueWhen 2.

↬ RSI Settings:

1. rsi_over_sold and rsi_length: Define the oversold level and RSI length for RSI calculations.

↬ Volume Thresholds:

1. volume_threshold1, volume_threshold2, and volume_threshold3: Set the volume thresholds for multiple volume conditions.

↬ ATR (Average True Range) Settings:

1. atr_small and atr_big: Specify the periods used to calculate the Average True Range.

▶ Date Range for Back-Testing:

1. start_date, end_date, start_month, end_month, start_year, and end_year : Define the date range for back-testing the strategy.

▶ Technical Indicators and Conditions:

1. rsi: Calculates the Relative Strength Index (RSI) based on the defined RSI length and the closing prices.
2. was_over_sold: Checks if the RSI was oversold in the last 10 bars.
3. getVolume and getVolume2 : Custom functions to retrieve volume data for specific bars.
4. firstCandleColor : Evaluates the color of the first candle based on different timeframes.
5. sma : Calculates the Simple Moving Average (SMA) of the closing price over 13 periods.
6. numCandles : Counts the number of candles since the close price crossed above the SMA.
7. atr1 : Checks if the ATR_small is less than ATR_big for the specified security and timeframe.
8. prevClose, prevCloseBarsAgo, and prevCloseChange : ValueWhen functions to calculate the change in the close price between specific occurrences.
9. atrval: A condition based on the ATR_value3.

▶ Buy Signal Condition:

Condition: A combination of multiple volume conditions.
buy_signal: The final buy signal condition that considers various technical conditions and their interactions.

▶ Long Strategy Execution:

1. The strategy will enter a long position (buy) when the buy_signal condition is met and within the specified date range.
2. A stop-loss and take-profit will be set for the long position to manage risk and potential profits.

▶ Conclusion:

The "Volume ValueWhen Velocity" trading strategy is designed to identify long position opportunities based on a combination of volume conditions, RSI, and price action. The strategy aims to capitalize on potential bullish movements and utilizes a stop-loss and take-profit mechanism to manage risk and optimize potential returns. Traders can use this strategy as a starting point for their own trading systems or further customize it to suit their preferences and risk appetite. It is crucial to thoroughly back-test and validate any trading strategy before deploying it in live markets.

↯ Disclaimer:
Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.

How you or we can improve? Source code is open so share your ideas!
Leave a comment and smash the boost button!
Moving AveragesmultitimeframeVolume

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明