Golden hummer
- Experts
- Version: 9.4
- Activations: 5
Trading robot based on candlestick pattern recognition (Price Action)
Brief Description
This Expert Advisor implements a trading strategy based on the analysis of Japanese candlestick structures. The robot identifies candlesticks with specified body-to-shadow ratios (so-called "hammers" and "inverted hammers" in your interpretation) and opens positions in the direction determined by the signal. The strategy does not use indicators, relying solely on the price structure of the candle.
The EA is designed for the D1 time frame, but can also be applied to other periods with appropriate parameter adjustments.
Type and Classification
Golden Hummer belongs to the category of trend-following experts, but not in the classical sense (moving averages), but in a broader sense – it looks for direction based on candlestick reversal and continuation patterns (Price Action methodology).
The robot is not:
- Martingale (no lot increase after losses)
- Grid (no order grid)
- Arbitrage (does not use multiple instruments/brokers)
- Hedging (does not open opposite positions)
- Scalping (works on daily candles)
- News-based (does not analyze economic calendar)
- Neural network (does not use AI)
- Multi-currency (trades on a single instrument)
Thus, it is a classic representative of trend-following systems based on Price Action, aimed at finding entry points through candlestick patterns.
Key Features
- Pattern recognition – analyzes the closed candle and calculates the percentage ratio of the upper shadow, lower shadow, and body. When falling within the specified ranges, a buy or sell signal is generated.
- Two interpretation modes – you can choose which shadow is considered the signal shadow (upper for BUY and lower for SELL, or inverted mode).
- Flexible range settings – you define the minimum and maximum percentage of the long shadow, maximum body percentage, and maximum opposite shadow percentage. Adaptable to any market conditions.
- 15 special signals – built-in slots for exact patterns (Special Signals). You can set ideal proportions with tolerance. When matched, the trade is opened with priority, bypassing the general ranges.
- Candle size filter – limits the maximum candle length in pips to ignore excessively large (noisy) movements.
- Trailing stop – an automatic mechanism that activates upon reaching a specified profit and moves the stop loss behind the price, locking in accumulated profit.
- Time-based close – allows setting the number of bars after which the position will be closed (if stop loss or trailing stop hasn't triggered).
- Chart visualization – when a trade is opened, an arrow (green for BUY, red for SELL) with a label is drawn on the signal candle, simplifying monitoring.
- Margin control – checks the sufficiency of free funds before opening a trade, preventing critical situations.
- Full logging – all checks and signals are output to the journal, including special signal numbers, facilitating debugging and optimization.
Configuration Parameters
| Group | Parameter | Description |
|---|---|---|
| Basic Settings | ||
| LotSize | Lot size | |
| InitialStopLoss | Initial stop loss (pips), can be disabled | |
| TakeProfit | Fixed take profit (recommended 0 – use trailing) | |
| BarsToHold | Number of bars to hold the position (for D1 – 1–3) | |
| StartHour / EndHour | Trading hours (server time) | |
| TradeSymbol | Trading instrument | |
| SignalMode | 0 – BUY on upper shadow, SELL on lower; 1 – inverted | |
| Common Pattern Ranges | ||
| MinShadowPercent | Minimum long shadow percentage | |
| MaxShadowPercent | Maximum long shadow percentage | |
| MinBodyPercent | Minimum body percentage | |
| MaxBodyPercent | Maximum body percentage | |
| MaxOppositeShadow | Maximum opposite shadow percentage | |
| Special Signals | ||
| UseSpecialSignals | Enable special signals | |
| UseSpecialSignal1..15 | Enable a specific signal | |
| SpecialShadowX, SpecialBodyX, SpecialOppShadowX | Percentages for each signal | |
| SpecialTolerance | Tolerance (in percentage) for special signal matching | |
| Trailing Stop | ||
| UseTrailing | Enable trailing stop | |
| TrailingStart | Profit in pips to activate trailing | |
| TrailingStop | Trailing stop offset from extreme (pips) | |
| Visualization | ||
| ShowSignalOnChart | Show signal arrows on chart | |
| MaxSignalsToShow | Maximum number of displayed arrows | |
| BuySignalColor / SellSignalColor | Arrow colors | |
| Filters and Protection | ||
| MaxCandleSizePoints | Maximum candle length in pips (0 – disabled) | |
| MinBarsBetweenTrades | Minimum bars between trades | |
| MinStopDistance | Minimum SL/TP distance (if broker does not report) | |
All parameters are thoroughly commented in the code and are intuitive.
Who This EA Is For
- Traders who use candlestick analysis and want to automate pattern identification.
- Those who prefer customizable algorithms and want flexible control over candle proportions.
- Users who want the ability to input their own "ideal" patterns through special signals.
Important Notes
- The strategy is based on historical data; past results do not guarantee future profits.
- It is strongly recommended to backtest thoroughly and optimize parameters for the specific instrument and timeframe before using on a live account.
- The EA does not use indicators and does not rely on macroeconomic data – it reacts solely to the price structure of candles.
- For stable operation, it is recommended to run the EA on a VPS (Virtual Private Server) with 24/7 internet access.
- All trading decisions are made automatically; risk management and position sizing remain the user's responsibility.
Requirements
- Platform: MetaTrader 5 (any broker with automated trading allowed).
- Time frame: D1 recommended, but can be used on any timeframe (requires parameter adaptation).
- Instruments: any currency pairs, metals, cryptocurrencies (if available in MT5).
- Deposit: recommended from 1000 USD (or equivalent) for comfortable risk management with a standard lot of 0.01.
The EA is supplied in compiled form ( .ex5 ) with open source code ( .mq5 ) for optional customisation. Documentation with full parameter descriptions and setup examples is included.
Use it wisely, manage risks, and test before applying.
