HPotter

3-Bar-Reversal-Pattern Strategy

This startegy based on 3-day pattern reversal described in "Are Three-Bar
Patterns Reliable For Stocks" article by Thomas Bulkowski, presented in
January,2000 issue of Stocks&Commodities magazine.

That pattern conforms to the following rules:

- It uses daily prices, not intraday or weekly prices;
- The middle day of the three-day pattern has the lowest low of the three days, with no ties allowed;
- The last day must have a close above the prior day's high, with no ties allowed;
- Each day must have a nonzero trading range.

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 24/06/2014
// This startegy based on 3-day pattern reversal described in "Are Three-Bar 
// Patterns Reliable For Stocks" article by Thomas Bulkowski, presented in 
// January,2000 issue of Stocks&Commodities magazine.
// That pattern conforms to the following rules:
// - It uses daily prices, not intraday or weekly prices;
// - The middle day of the three-day pattern has the lowest low of the three days, with no ties allowed;
// - The last day must have a close above the prior day's high, with no ties allowed;
// - Each day must have a nonzero trading range. 
////////////////////////////////////////////////////////////
study(title="3-Bar-Reversal-Pattern Strategy", shorttitle="3-Bar-Reversal-Pattern Strategy", overlay = true)
pos =	iff(open[2] > close[2] and high[1] < high[2] and low[1] < low[2] and low[0] > low[1] and high[0] > high[1], 1,
	    iff(open[2] < close[2] and high[1] > high[2] and low[1] > low[2] and high[0] < high[1] and low[0] < low[1], -1, nz(pos[1], 0))) 
barcolor(pos == -1 ? red: pos == 1 ? green : blue )