How do I create scans or signals to find Candlestick Patterns such as Hammer, Inverse Hammer?

Also See: CPR Tour

Use the built-in Candlestick Pattern Recognition (CPR) indicator. Add this indicator directly to a chart, or you can access it in the RTL language. For instance, your signal that looks for a Hammer would be:

CPR = 1

With CPR setup with "Hammer" being the only element on the right. Recommended settings for CPR are:

Long Shadow = 2
Small Shadow = 0.75
Equal Percent = 0.50


Do the same thing for the "Inverted Hammer" signal.

If that's not sufficient, we could probably work on a signal over which you'd have more control. We'll just need to get a good definition of the characteristics of a hammer (and inverted hammer) and make them into a signal...

Here is a signal you could use that might replicate the Hammer...

((HI - LO) > (0.50 * AVG(HLR, 20))) AND ((SMIN(OP, CL) - LO) >= (2 * ABS(CL - OP))) AND ((HI - SMAX(OP, CL)) (0.10 * (HI - LO)))

But this signal is not as efficient as CPR...so you'll have to evaluate which one works best for you... You could tweak this one if you like. You can read about how we came up with this syntax by reading through this chat log:

 

Below is a chart containing both Hammer signals...

Below is a link to the chart definition (Hammer.txt) of the chart above so you can quickly import it (do "File: Import: Definition File" on this text file)...

Hammer Chart Definition

And here is the "Hammer" marker (hammer.bmp) used in the chart.

You can put this marker into your system by simply placing it into the "markers" folder within the Investor/RT folder. You might want to put that marker in there before importing the chart so it imports right. You have to restart IRT with that marker in the folder for it to take effect. In the screenshot, the blue markers represent the "CPR > 0" signals.