How I can write a code for a "Hammer" candlestick pattern?
I'm trying to make a robot that can recognize when a "Hammer" shows up on the chart.
see this, maybe help to find your way:
https://www.mql5.com/en/forum/13218
- www.mql5.com
Have you had a look through the codebase? There are quite a few candlestick pattern recognition examples in there which might provide some inspiration.
see this, maybe help to find your way:
https://www.mql5.com/en/forum/13218
see this, maybe help to find your way:
The "Pinbar" indicator does exactly what I am looking for. I noticed that you had one for MT5 and MT4 as well. I am currently using MT4. Is there is download file for an MT4 version? I did not see it on any of the links.
I'm trying to make a robot that can recognize when a "Hammer" shows up on the chart.
So far I have a way to command MetaTrader to look for when the last candle's Low[] is lower than the last 3 candles:
if(Low[1] < Low[2]&& Low[1] < Low[3] && Low[1] < Low[4])
I also have a way to tell Metatrader to look for a candle whose body is within range of the previous candle:
if(Open[1] < High[2] && Close[1] > Low[2]);
Question: How can I better describe the exact structure of the Hammer candlestick, such as the body being closer to the top of the candle, and the "tail" being greater than the length of the body?
I am also open to any suggestions on more rules to define this candle and a code to communicate what I can see on the charts to MetaTrader.