Join our fan page
- Views:
- 8599
- Rating:
- Published:
- 2024.10.31 01:49
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
The Hammer Indicator identifies key candlestick formations, specifically green and red hammers as well as inverted hammers, on a MetaTrader 5 chart. It is designed to highlight potential reversal points in price by analyzing the candlestick structure on each bar. A hammer is generally characterized by a small body and a long lower wick, indicating potential buying pressure after a downtrend. The inverted hammer, in contrast, has a long upper wick and may suggest a possible reversal following an uptrend.
This indicator calculates the size and ratio of candlestick wicks and bodies to detect these patterns, using three main customizable parameters:
- MaxRatioShortWick: Sets the maximum ratio for the short wick relative to the full candlestick, filtering for patterns with minimal top wicks.
- MinRatioLongWick: Defines the minimum ratio for the long wick, ensuring that the detected patterns have significant wick lengths compared to the candlestick body.
- MinCandleSize: Specifies the minimum size of the candlestick required to qualify as a hammer or inverted hammer pattern.
Once a pattern is identified, the indicator will display an arrow in a designated color (green or red) on the chart, placed near the highest or lowest price of the candlestick, depending on the direction of the pattern. The functions within the code handle the creation and positioning of these graphical objects, as well as cleaning up the objects when the indicator is removed from the chart.
This indicator is suitable for traders looking to spot potential reversals, and its parameters can be tailored to suit different timeframes and market conditions. It is a versatile tool that can complement various trading strategies by providing early visual cues for potential price changes.


WeekDays indicator displays Day Of Week, Week Of Year, Day Of Year or Bar Index in the Data Window, and optionally in labels on the chart.

The AutoFibo indicator is an advanced Fibonacci retracement tool that automatically draws Fibonacci levels based on the ZigZag pattern. This indicator is designed to help traders quickly identify potential support and resistance levels in trending markets.

Marking the extreme highs and lows (OHLC) together with the extreme bid and ask prices

This indicator displays current events on the chart and allows you to export the calendar to archives for backtesting, automatically fixing time discrepancies between the history of bars and the history of events. This is an improved version of CalendarMonitorCached indicator from the algotrading book.