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.

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
////////////////////////////////////////////////////////////
//  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 )