Trendoscope

Multi Level Zigzag

Trendoscope Wizard Cập nhật   
At first I thought of doing double zig zag. Once developed I thought it is not much effort to make it multi level zigzag. This script is not same as multi-zigzag indicator (link in the end). In multi zigzag indicator we use zigzag based on different length and each zigzag has no relation to each other. In this script however, each zigzags are related to each other. We cannot just derive Zigzag 4 without deriving Zigzag 3. (Though we can hide each of them individually)

The logic is simple.

Zigzag1: This is the basic zigzag plotted based on given length.
Zigzag2, Zigzag2, Zigzag3 : These are built based on lower level zigzags.

For example, Zigzag2 is built based on Zigzag1 pivots. For calculation, we just use N*2 number of Zigzag1 pivots to derive the next level. Similarly Zigzag2 will become input for Zigzag 3 and Zigzag3 will become input for Zigzag4

Input parameters allow you to chose upto 4 levels of zigzag along with zigzag line color and length. Max array lines also defines how many lines back you want to calculate the zigzag pivots and display then in the stats. Lowering this number will not reduce the number of lines - but, it will limit possibility of calculating higher level zigzags. Stats table just highlight which pivots are applicable for which outer level.

Application: Can be used in pattern recognization scripts to improve accuracy.

Disclaimer: This is not working in intraday charts. Nothing I could do at this point of time. Use it only for daily + timeframes.

Related scripts:




Phát hành các Ghi chú:
  • Added zigzag chain option. If chain is used, zigzags are based on previous levels. If chain is not used. All multi level zigzags are derived based on base level - Level1. But, lengths gets added up on each iteration.
  • Added waitForConfirmation flag for plotting next level pivots
Phát hành các Ghi chú:
There was a small issue in zigzag calculation where single bar presented both pivot high and low. This has been corrected.
Phát hành các Ghi chú:
Remove redundant vars
Phát hành các Ghi chú:
Major changes
  • Added option to use external source or custom source instead of regular high/low for zigzag.
  • Memory optimization by deleting old elements of array.
Phát hành các Ghi chú:
Minor corrections.
Phát hành các Ghi chú:
Convert to pine5

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 đồ?