OPEN-SOURCE SCRIPT

Volatility Capture RSI-Bollinger - Strategy [presentTrading]

- Introduction and how it is different
The 'Volatility Capture RSI-Bollinger - Strategy [presentTrading]' is a trading strategy that combines the concepts of Bollinger Bands (BB), Relative Strength Index (RSI), and Simple Moving Average (SMA) to generate trading signals. The uniqueness of this strategy is it calculates which is a dynamic level between the upper and lower Bollinger Bands based on the closing price. This unique feature allows the strategy to adapt to market volatility and price movements.

The market in Crypto and Stock are highly volatile, making them suitable for a strategy that uses Bollinger Bands. The RSI can help identify overbought or oversold conditions in this often speculative market.

BTCUSD 4hr chart
ảnh chụp nhanh

[700.HK](700.hk/) 3hr chart
ảnh chụp nhanh

Remember, the effectiveness of a trading strategy also depends on other factors such as the timeframe used, the specific settings of the indicators, and the overall market conditions. It's always recommended to backtest and paper trade a strategy before using it in live trading.

- Strategy, How it Works
Dynamic Bollinger Band: The strategy works by first calculating the upper and lower Bollinger Bands based on the user-defined length and multiplier. It then uses the Bollinger Bands and the closing price to dynamically adjust the presentBollingBand value. In the end, it generates a long signal when the price crosses over the present Bolling Band and a short signal when the price crosses under the present Bolling Band.

RSI: If the user has chosen to use RSI for signals, the strategy also calculates the RSI and its SMA, and uses these to generate additional long and short signals. The RSI-based signals are only used if the 'Use RSI for signals' option is set to true.

The strategy then checks the chosen trading direction and enters a long or short position accordingly. If the trading direction is set to 'Both', the strategy can enter both long and short positions.

Finally, the strategy exits a position when the close price crosses under the present Bolling Band for a long position, or crosses over the present Bolling Band for a short position.

- Trade direction
The strategy also includes a trade direction parameter, allowing the user to choose whether to enter long trades, short trades, or both. This makes the strategy adaptable to different market conditions and trading styles.

- Usage
1. Set the input parameters as per your trading preferences. You can choose the price source, the length of the moving average, the multiplier for the ATR, whether to use RSI for signals, the RSI and SMA periods, the bought and sold range levels, and the trading direction.
2. The strategy will then generate buy and sell signals based on these parameters. You can use these signals to enter and exit trades.

- Default settings
1. Source: hlc3
2. Length: 50
3. Multiplier: 2.7183
4. Use RSI for signals: True
5. RSI Period: 10
6. SMA Period: 5
7. Bought Range Level: 55
8. Sold Range Level: 50
9. Trade Direction: Both

- Strategy's default Properties
1. Default Quantity Type: 'strategy.percent_of_equity'
2. commission_value= 0.1, commission_type=strategy.commission.percent, slippage= 1: These parameters set the commission and slippage for the strategy. The commission is set to 0.1% of the trade value, and the slippage (the difference between the expected price of a trade and the price at which the trade is executed) is set to 1.
3. default_qty_type = strategy.percent_of_equity, default_qty_value = 15: These parameters set the default quantity for trades. The default_qty_type is set to strategy.percent_of_equity, which means that the size of each trade will be a percentage of the account equity. The default_qty_value is set to 15, which means that each trade will be 15% of the account equity.
4. initial_capital= 10000: This parameter sets the initial capital for the strategy to $10,000.
Bollinger Bands (BB)presenttradingRelative Strength Index (RSI)strategyTrend Analysistrendtrading

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Watch patiently/ then trade
Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm