Type/to search

Candlestick Patterns Strategy

Common strategy
Created: 2024-01-18 15:14:13
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy determines buy and sell signals by identifying various price pattern formations on the candlestick chart. The strategy incorporates technical analysis methods such as Chanlun and Dow Theories, utilizing more than a dozen common graphical patterns to capture inflection points in the market.

Strategy Principle

The core of this strategy lies in recognizing different candlestick patterns, including engulfing lines, harami lines, piercing lines, morning stars etc. When a bullish pattern is identified, a buy signal is generated; when a bearish pattern is detected, a sell signal is triggered.

For example, when the Three White Soldiers pattern is recognized, it means that the last three candlesticks are all long green candles, and the closing price of each candle exceeds its opening price, indicating the strong buying is pushing up the price, so a buy signal is generated.

Each pattern has a specific algorithm to identify. The strategy scans through the historical candlesticks, judging if each bar meets the formulation algorithm of a certain pattern, and once it does, plot a graphical marker on that bar marking out that signal.

Advantages

  1. Combining judgments of various patterns improves winning rate
  2. Automatically pattern recognition without manual interference
  3. Visualized markers gives intuitiveness
  4. Controlling risks by integrating stop loss and take profit

Risks and Optimization

  1. Probability of failure still exists for patterns identification
  2. Fine tune the stop loss ratio properly to lower per trade loss
  3. Adding trend judgment to avoid reverse patterns
  4. Optimize session setting to eliminate overnight risks

Optimization Suggestions

  1. Include more auxiliary pattern judgments
  2. Add trend indicator filters for entry signals
  3. Optimize ratios of stop loss and take profit
  4. Try machine learning methods to recognize patterns
  5. Add position sizing control

Summary

This strategy determines future market moves by analyzing graphical patterns formed on the candlesticks bars using technical tools. The strategy is practical to use, but traders still need to take account of the general market environment, avoiding missing major trends because of local shapes. By further optimizations, it is promising to enhance the stability and profitability of the strategy.

Source
Pine
/*backtest
start: 2024-01-10 00:00:00
end: 2024-01-17 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
strategy("Candle Patterns Strategy", shorttitle="CPS", overlay=true)

//--- Patterns Input ---
Strategy parameters
Strategy parameters
Engulfing
Harami
Piercing Line / Dark Cloud Cover
Morning Star / Evening Star
Belt Hold
Three White Soldiers / Three Black Crows
Three Stars in the South
Stick Sandwich
Meeting Line
Kicking
Ladder Bottom
Stop Loss
Take Profit
Trailing Stop
Trading session
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)