Type/to search

AlexInc's Bar v1.2 Breakout Accumulation Strategy Based on Meaningful Bar Filtering

Common strategy
Created: 2024-01-03 16:30:16
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy predicts trends by judging the "meaningful bar" of K-lines, and generates trading signals combined with breakout signals. The strategy filters out excessively small K-lines and only analyzes "meaningful bars" to avoid interference from frequent minor fluctuations, making the signals smoother and more reliable.

Strategy Logic

  1. Judge the entity length body of the current K-line. If it is greater than 3 times the average body value of the past 6 K-lines, it is considered a "meaningful bar".

  2. If there are 3 consecutive "meaningful bars" with long bodies, it is judged as a long signal. If 3 consecutive bars with short bodies, it is judged as a short signal.

  3. While judging the signal, if the price breaks through the previous high or low point, additional trading signals will also be generated.

  4. Use SMA as a filter. Open positions only when the price breaks through the SMA.

  5. After taking a position, if the price breaks through the entry point or SMA again, close the position.

Advantage Analysis

  1. Using “meaningful bars” to judge trends can filter out unnecessary interference and make clearer signals.

  2. Combining trend signals and breakout signals improves signal quality and reduces false signals.

  3. SMA filters avoid buying high and selling low. Only buy below Close, sell above Close, thus improving reliability.

  4. Setting profit taking and stop loss conditions facilitates timely risk control.

Risk Analysis

  1. This aggressive strategy judges signals from only 3 bars and may misjudge short-term fluctuations as trend reversals.

  2. Insufficient backtesting data. Results may vary between products and timeframes.

  3. No overnight position control, with overnight holding risk.

Optimization Directions

  1. Further optimize parameters for “meaningful bars”, such as number of bars judged and definition of “meaningful”.

  2. Test impacts of different timeframes to find optimum parameters.

  3. Add ATR based stop loss to control risks.

  4. Consider adding overnight position control.

Summary

This strategy utilizes “meaningful bar” filtering and trend judgment to generate trading signals combined with breakouts. It effectively filters out unnecessary minor fluctuations for clearer and more reliable signals. However, due to short judging cycles, certain misjudgment risks exist. Further improvements can be made through parameter optimization and risk control.

Source
Pine
/*backtest
start: 2023-12-26 00:00:00
end: 2024-01-02 00:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//AlexInc
//2018

// закрытие - вычислить и в течение скольки-то баров его добиваться
Strategy parameters
Strategy parameters
Long
Short
Use Martingale
Number of candles to take profit anyway
Capital, %
Use SMA filter
SMA filter limit
Body Size Multiplier
Meanful Bar size Divider
Show Arrows
From Year
To Year
From Month
To Month
From day
To day
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)