Type/to search

Sentiment Based XBT Futures Trading Strategy

Common strategy
Created: 2023-12-22 14:48:44
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy adopts the approach of multi-cycle sentiment analysis to go long or short XBTUSD futures contract. It comprehensively considers the price fluctuation range and highest and lowest prices across different cycles, and calculates the overall market sentiment through a series of weight adjustments. Buy and sell signals are generated based on the changing patterns of the sentiment value.

Strategy Logic

  1. Calculate the highest price, lowest price, average price, price fluctuation range and other indicators across cycles from a to j (1 to 89 bars).

  2. Define the standardized position of the closing price within the price range (place variable). Combine it with price fluctuation range of each cycle to get sentiment value for different cycles.

  3. The sentiment values go through a series of weight (w variable) adjustments to get the overall sentiment value (sentiment). The sentiment reflects current overall market mood.

  4. Analyze the fluctuation of sentiment value. A sell signal is generated when sentiment turns from positive to negative. A buy signal is generated when sentiment turns from negative to positive.

  5. Determine entry momentum and set take profit and stop loss conditions based on the absolute value of sentiment fluctuation (delta variable).

Advantages

  1. Consider sentiment across different cycles for a more comprehensive market trend judgment.

  2. The weight adjustment mechanism makes the strategy more stable.

  3. More precise entry timing by combining sentiment value and its fluctuation.

  4. Manage risks with highest price, lowest price, take profit and stop loss.

Risks

  1. Improper parameter settings may cause too frequent trading or missing opportunities.

  2. Black swan events may invalidate the strategy logic.

  3. Contract adjustments and rule changes may impact strategy performance.

  4. Sentiment calculation relies on historical data. Reassessment is needed when market regime changes.

Risks can be managed by adjusting weights, trading cycles, take profit ratios etc to fit changing market conditions. Meanwhile optimize capital management by strictly controlling position sizing and overall exposure.

Optimization Directions

  1. Expand analysis cycles to build richer basis for sentiment judgment.

  2. Incorporate more technical indicators for a combined approach.

  3. Extract sentiment features with machine learning methods.

  4. Dynamically adjust weight settings.

  5. Optimize take profit and stop loss strategies.

Conclusion

This strategy is based on the trading philosophy of sentiment analysis. It determines current overall market mood by considering multiple cycles. The continuous sentiment changes serve as the basis for generating trading signals, assisted by price fluctuation for timing entry. This unique approach of judging market trends works well in ranging cycles. Further expanding analysis periods, adding more indicators and optimizing can make the sentiment trading strategy more mature and stable for adapting more complex market environments.

Source
Pine
/*backtest
start: 2022-12-15 00:00:00
end: 2023-12-21 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Jomy

//@version=4
Strategy parameters
Strategy parameters
leverage
take profit %
stoploss %
level to initiate trade
level to close trade
level to initiate trade
level to close trade
weight a
weight b
weight c
weight d
weight e
weight f
weight g
weight h
weight i
weight j
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)