This script adds a Bill Williams Alligator to your charts and the three wisemen:
1. Wiseman 1 - Bullish or bearish divergent bars shown with a circle (be sure to check angulation manually).
2. Wiseman 2 - Super AO - with a square.
3 Wiseman 3 - Fractal with a triangle.
Be sure to wait until the current bar is closed before using these signals.
Reference: TradingChaos Version 2
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 đồ?
//See Bill Williams, Trading Chaos V2 and www.profitunity.com
//Alligator - an excellent trend filter: trade only when the lines are open, not when they wind around each other.
//Note: exponential moving average parameters used here give the same results as with the SMMA.
//Wiseman 1: Bullish and bearish divergent bars - indicated by a circle - be sure to check angulation manually.
//Wiseman 2: The Super AO signal, indicated by a square.
//Wiseman 3: All ten of Bill Williams fractal formation from his book indcated by triangles.
//Note: bar colors were not used so that you can choose candles rather than bars if you wish.
//
study(title="Chaos", shorttitle="Chaos",overlay = true)
jawLength = 25
teethLength = 15
lipsLength = 9
jaw = ema(hl2, jawLength)
teeth = ema(hl2, teethLength)
lips = ema(hl2, lipsLength)
plot(jaw, offset = 8, color=blue)
plot(teeth, offset = 5, color=red)
plot(lips, offset = 3, color=lime)
ao = sma(hl2,5) - sma(hl2,34)
wm1long = close > hl2 and low == lowest(low,2) and ao < 0 and ao < ao[1]
plotshape(wm1long, style=shape.circle, location=location.belowbar,color=black,size=size.tiny)
wm1short = close <= hl2 and high == highest(high,5) and ao > 0 and ao > ao[1]
plotshape(wm1short, style=shape.circle, location=location.abovebar,color=black,size=size.tiny)
wm2long = ao < 0 and ao > ao[1] and ao[1] > ao[2] and ao[2] > ao[3] and ao[3] < ao[4]
plotshape(wm2long, style=shape.square, location=location.belowbar,color=black,transp=0,size=size.tiny)
wm2short = ao > 0 and ao < ao[1] and ao[1] < ao[2] and ao[2] < ao[3] and ao[3] > ao[4]
plotshape(wm2short, style=shape.square, location=location.abovebar,color=black,transp=0,size=size.tiny) 
wm3long = (high < high[2] and high[1] < high[2] and high[3] < high[2] and high[4] < high[2]) or
          (high < high[2] and high[1] < high[2] and high[3] == high[2] and high[4] < high[2] and high[5] < high[2]) or
          (high < high[2] and high[1] < high[2] and high[3] == high[2] and high[4] == high[2] and high[5] < high[2] and high[6] < high[2]) or
          (high < high[2] and high[1] < high[2] and high[3] < high[2] and high[4] == high[2] and high[5] < high[2] and high[6] < high[2])  or
          (high < high[2] and high[1] < high[2] and high[3] < high[2] and high[4] == high[2] and high[5] < high[2] and high[6] == high[2] and high[7] < high[2] and high[8] < high[2])
plotshape(wm3long, style=shape.triangleup, location=location.abovebar,offset=-2,color=green,transp=50,size=size.small) 
wm3short = (low > low[2] and low[1] > low[2] and low[3] > low[2] and low[4] > low[2]) or
           (low > low[2] and low[1] > low[2] and low[3] == low[2] and low[4] > low[2] and low[5] > low[2]) or
           (low > low[2] and low[1] > low[2] and low[3] == low[2] and low[4] == low[2] and low[5] > low[2] and low[6] > low[2]) or
           (low > low[2] and low[1] > low[2] and low[3] > low[2] and low[4] == low[2] and low[5] > low[2] and low[6] > low[2])  or
           (low > low[2] and low[1] > low[2] and low[3] > low[2] and low[4] == low[2] and low[5] > low[2] and low[6] == low[2] and low[7] > low[2] and low[8] > low[2])
plotshape(wm3short, style=shape.triangledown, location=location.belowbar,offset=-2,color=red,transp=50,size=size.small)