Candlestick Pattern Detector
Detects Japanese candlestick patterns and labels them on the chart, with per-pattern switches and alerts
Main chartHas alerts
Semi-automatic EA that places pending orders from the lines and channels you draw on the chart, for breakout patterns
Open source, Apache License 2.0, by EarnForex.com. See licences
First release on this site.
Draw the lines on the chart and name the objects to match UpperBorderLine, UpperEntryLine, UpperTPLine, LowerBorderLine, LowerEntryLine, LowerTPLine (or Border, Entry, TP for channels). Then drag the EA onto the same chart and enable Algo Trading. The chart text lists which lines and price levels the EA found.
Check the entry, stop-loss and take-profit levels in the chart text before letting the EA run. You can stop the EA at any time; pending orders already placed stay until they are deleted or expire. Use DisableBuyOrders or DisableSellOrders to trade one side only. If there is no Border line and CalculatePositionSize is off, the EA places orders without a stop-loss.
| Name | Default | Description |
|---|---|---|
| UpperBorderLine | UpperBorder | Name of the line (horizontal or trendline) used as the upper border of the pattern. It sets the stop-loss for the buy side. |
| UpperEntryLine | UpperEntry | Name of the line used as the buy entry level. |
| UpperTPLine | UpperTP | Name of the line used as the buy take-profit level. |
| LowerBorderLine | LowerBorder | Name of the line used as the lower border of the pattern. It sets the stop-loss for the sell side. |
| LowerEntryLine | LowerEntry | Name of the line used as the sell entry level. |
| LowerTPLine | LowerTP | Name of the line used as the sell take-profit level. |
| BorderChannel | Border | Name of the channel object used as the pattern border, instead of separate lines. |
| EntryChannel | Entry | Name of the channel object used for the entry levels. |
| TPChannel | TP | Name of the channel object used for the take-profit levels. |
| OneCancelsOther | true | Remove the opposite pending order once one side has been opened. |
| UseSpreadAdjustment | false | Add the spread to the buy entry and to the sell SL/TP, to compensate for chart objects being drawn at the Bid price. |
| UseExpiration | true | Set an expiration time on pending orders. The EA turns this off itself if the broker does not support it. |
| DisableBuyOrders | false | Do not place new buy orders and ignore existing ones. |
| DisableSellOrders | false | Do not place new sell orders and ignore existing ones. |
| PostEntrySLAdjustment | false | After the breakout candle closes, adjust the stop-loss to be more precise. This makes the sized risk less exact. |
| UseDistantSL | false | Place the stop-loss at the farthest point of the pattern instead of the border line. |
| OpenOnCloseAboveBelowTrendline | false | Open a market order when a candle closes above or below the trendline, instead of placing a pending order. |
| SLLine | SL | Name of the horizontal line used as the stop-loss in trendline trading. |
| ThresholdSpreads | 10 | Minimum distance, in multiples of the spread, used in trendline mode. |
| CalculatePositionSize | true | Size the lot from the risk setting and the stop-loss distance. If off, FixedPositionSize is used. |
| UpdatePendingVolume | true | Recalculate the lot of pending orders when the lines or the stop-loss change. |
| FixedPositionSize | 0.01 | Fixed lot size, used when CalculatePositionSize is false. |
| Risk | 1 | Risk per order as a percentage of the account. |
| MoneyRisk | 0 | Risk per order as a money amount. Used when UseMoneyInsteadOfPercentage is on. |
| UseMoneyInsteadOfPercentage | false | Use MoneyRisk (money amount) instead of Risk (percentage). |
| UseEquityInsteadOfBalance | false | Use equity instead of balance as the base for the risk calculation. |
| FixedBalance | 0 | If above 0, this value is used as the balance for lot sizing instead of the real balance. |
| Magic | 20200530 | Magic number that separates this EA's orders from other orders. |
| Slippage | 30 | Maximum accepted slippage. |
| Silent | false | If on, no status text is shown on the chart. |
| ErrorLogging | true | Write errors to a log file. |
Defaults are the values shipped with the EA, not a recommendation. Results depend on the market and on each account. Past results do not guarantee future results. Trading carries a high risk of loss.
This EA does not find patterns by itself. You draw lines or channels on the chart and name them as set in the input parameters, for example UpperEntry, UpperTP, LowerBorder, and the EA places and manages orders from those objects. It only handles breakout setups, not pullbacks.
It works in two modes. If price is between the upper and lower entry lines it places one or two stop orders. If price is above the upper entry or below the lower entry it places a single limit order. When you drag a line the EA adjusts the pending order, and if you delete or rename the line the order is cancelled.
By default the lot is sized from a risk percentage and the stop-loss distance, or you can use a fixed lot. The stop-loss comes from the border line, or from the farthest point of the pattern, and the take-profit comes from the TP line.
Banners from the Exness partner programme

FXIDTH is an independent IB partner of Exness. This channel is not owned or operated by Exness.*Spreads may fluctuate and widen due to factors including market volatility, news events, market open/close, and others.*Processing times may vary depending on the chosen payment method.
Detects Japanese candlestick patterns and labels them on the chart, with per-pattern switches and alerts
Main chartHas alerts
Price-action EA for XAUUSD on M5 that builds zones from engulfing candles and enters when price retests the zone
XAUUSD · M5
An indicator that draws boxes on the chart over the price gap across three candles (Fair Value Gap), coloured by direction
Main chart