This little handy screener allows you to easily detect “Harami” ( in Japanese), or “inside bar” (in English).
Without going into details , you will agree that it is useful to detect a number of these, particularly on forex where many strategies are working with it.
Here is the code of the screener, to detect them. Remember to select the desired market (eg “Forex”) and timeframe ( for example, ” Daily “).
1 2 3 4 5 6 7 8 9 |
REM inside bar c1= high[0] < high[1] c2= low[0] > low[1] insidebar = c1 and c2 screener[insidebar] |
For the indicator :
1 2 3 4 5 6 7 8 9 |
REM inside bar c1= high[0] < high[1] c2= low[0] > low[1] insidebar = c1 and c2 return insidebar |
Very simple… but useful !
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Beautiful, Doc. Many thanks! For other followers of this great indicator and screener, may I suggest that out of the multiple trading strategies one can follow using this, the continuation strategy has the highest success rate. Just run the indicator over a chart and compare the number of reversals with the number of continuations.
Hello, It’s a nice idea. I also tried a harami strategy with a 50 moving average, works on EUR/USD Daily :
http://www.prorealcode.com/prorealtime-trading-strategies/a-harami-trading-strategy-code-for-daily-eurusd/
Thanks for posting,
Apologies if this is a dumb questions but like Chinese say “If you ask a question you are fool for a day you if you dont ask you are fool for a life” hence
Does this display inside bar in formation or after its formed?
Please can someone experienced shed some light on it
Hi fesxeurex
After the bar has formed because the code / criteria would be checked at the end of the bar … as always in PRT.
Now somebody will say I am wrong and I’ll be the ‘fool for a day‘!
GraHalPS I liked your chinese proverb and cos I ask so many questions I put it on my Profile! 🙂
Hello fesxeurex,
It can display both : when it is in formation, and when it has been formed.
It can disappear if the harm isn’t completed yet and finally isn’t.
Regards,
Bonjour Doc,
Je crois que votre définition du harami est erronée
Critères du Harami
Définition :
-Petit corps compris à l’intérieur d’un corps long (désignation : bébé).
-Couleur opposée entre les deux chandeliers nécessaire.
je mettrai plutôt, open[1] > close [1] and open[0]<close[0] and open[0]close[1] and close[0] close[1]
Great screener…Has anyone got code for trade/backtest the next bar breakout (short or long) ? Many thanks