jorgelg93

Double Bottom and Top Chart Pattern w/ Support and Resistance

-----------------------------------------------------------------
General Description:

This indicator (the one on the top panel) detects double top and double bottom patterns based on the “seasonality” of the classic MACD histogram (panel below) and the behavior of prices during those cycles.

Once a double top or a double bottom is confirmed the indicator draws a couple of parallel horizontal lines from both 1st and 2nd top or bottom, whichever be the case, and extend them horizontally all the way to the right of the chart. The indicator will keep drawing and extending the lines horizontally as many bars as the user indicates, leaving a clear demarcation of a possible support or resistance.

The indicator works on any market, any instrument, any timeframe, and any market condition.


-----------------------------------------------------------------
How it works:

The indicator tracks the values of the MACD histogram and prices. Every time the histogram is under 0 (during a negative cycle), the indicator detects and saves the minimum or more negative value of the price during that time/cycle/season. Every time the histogram is over 0 (positive cycle), the indicator detects and saves the maximum or more positive value of the price during that time/cycle/season.

Every time the histogram crosses over or under the 0 axis (every time a negative or positive cycle/season ends) the indicator makes its analysis.

When the histogram crosses over the 0 axis it means that a negative cycle just ended and the indicator begins to compare the minimum price registered during that negative cycle with the minimum price registered during the cycle before that last one (the last time the histogram was below 0). The indicator treats both minimum prices as “possible double bottoms” as long as they fit with our “deviation criteria”.

If the histogram crosses under the 0 axis it means that a positive cycle just ended and the indicator begins to compare the maximum price registered during that positive cycle with the maximum price registered during the cycle before that last one (the last time the histogram was above 0). The indicator treats both maximum prices as “possible double tops” as long as they fit with our “deviation criteria”.

Our deviation criteria is very simple, based on a relation between the average true range and the highs or lows. The MACD we use for the internal calculations is the standard (12, 26, 9).

After a double top/bottom is confirmed the indicator draws a couple of horizontal parallel lines from both tops/bottoms and extend those lines all the way to the right of the chart as many bars/candles as the user specifies, leaving a clear demarcation of a possible resistance or support.


-----------------------------------------------------------------
Options/adjustments for this indicator:

*Deviation.
Refers to the difference/relation/vertical distance between the PRICE peaks involved in the double top/bottom.

*Double Top/Bottom min width.
Refers to the minimum horizontal distance between the peaks involved in the double Top/bottom.

*Double Top/Bottom max width.
Refers to the maximum horizontal distance between the peaks involved in the double top/bottom.

*Max bars back to extent line.
Maximum amount of bars back that the last double top/bottom peak was seen.

*Plot Double Tops?

*Plot Double Bottoms?

*2nd peak/bottom bigger than the 1st?

*Plot Buy/Sell Confirmed Signals for Doubles?

*Plot Buy/Sell Temporary Signals for Doubles?

*Delete Previous Cancelled Double Tops/Bottoms?

Tập lệnh chỉ hiển thị cho người được mời

Quyền truy cập vào tập lệnh này bị hạn chế đối với người dùng được tác giả ủy quyền và thường yêu cầu thanh toán. Bạn có thể thêm nó vào mục yêu thích của mình, nhưng bạn sẽ chỉ có thể sử dụng nó sau khi yêu cầu sự cho phép từ tác giả. Liên hệ jorgelg93 để thêm thông tin, hoặc làm theo hướng dẫn của tác giả bên dưới.

TradingView không đề xuất trả tiền cho một tập lệnh và sử dụng cho đến khi bạn hoàn toàn tin tưởng tác giả và hiểu cách thức hoạt động của tập lệnh. Trong nhiều trường hợp, bạn có thể tìm thấy một giải pháp thay thế nguồn mở miễn phí trong Thư viện Công cộng của chúng tôi.

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.

Hướng dẫn của tác giả

Tác giả của tập lệnh này không thể cấp quyền truy cập vào nó nữa. Vui lòng không yêu cầu quyền truy cập.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Cảnh báo: vui lòng đọc trước khi yêu cầu quyền truy cập.