C Hammer HangingMan
Definition
The C_Hammer_HangingMan indicator identifies the occurrence of 2 candlestick patterns: Hammer and Hanging Man, and marks the bars with these patterns.
The Hammer pattern forms a hammer-shaped candlestick, in which the lower shadow is at least twice the size of the real body. The trend is decreasing and the candle can be either red, or green, but not a Doji.
The Hanging Man candle is composed of a small real body, a long lower shadow, and little or no upper shadow. The trend is advancing and the candle can be either red, or green, but not a Doji.
Default Inputs
Length sets the number of bars to calculate the average body, 14 by default.
Factor sets a threshold factor for body size in relation to the bar range, 2 by default. This input value means that tail must be 2x larger than body.