Intuit

Williams AC/AO Zones

Paints price bars green when AO+AC are both green, paints bars red when both are red, and paints bars grey when both are different. (IGNORE THE CHART DIDNT MEAN TO PUBLISH IT ON THIS CHART.. OPPS)

⚠️LIKE AND FOLLOW⚠️
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//HUGE THANKS TO CHAOSTRADER FOR THE ORIGINAL CODE
//Bill Williams Zone and Squat Bars.  See New Trading Dimensions by Bill Williams, PhD.
//Bars are green (green zone) when the Awesome Oscillator and Accelerater/Decelerator are both positive.
//Bars are red (red zone) when the Awesome Oscillator and Accelerater/Decelerator are both negative.
//Bars are blue when a squat bar is formed, these indicate a battle between bulls and bears and often happen near trend continuation or trend changes.
//Caution: Assumes chart is a bar chart - not a candle chart.
//Caution: Squat bars are accurate only with official exchange volume data - BATS data will give false squat bars.
study(title="AO/AC Zones", overlay = true)
ao = sma(hl2,5) - sma(hl2,34)
ac = ao - sma( ao, 5 )
isGreen() => ao > ao[1] and ac > ac[1]
isRed() => ao < ao[1] and ac < ac[1]
isGrey() => ao > ao[1] and ac < ac[1]
isGray() => ao < ao[1] and ac > ac[1]
barcolor(isGrey() ? gray : isGray() ? gray : isGreen() ? #55AE3A : isRed() ? red : black)