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 “).
REM inside bar
c1= high[0] < high[1]
c2= low[0] > low[1]
insidebar = c1 and c2
screener[insidebar]
For the indicator :
REM inside bar
c1= high[0] < high[1]
c2= low[0] > low[1]
insidebar = c1 and c2
return insidebar
Very simple… but useful !
You must be logged in to post a comment.
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]
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,
Hi
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'!
GraHal
PS I liked your chinese proverb and cos I ask so many questions I put it on my Profile! :)
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
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/
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.
Great screener...Has anyone got code for trade/backtest the next bar breakout (short or long) ? Many thanks