Williams Alligator

The Williams Alligator is a technical analysis tool developed by trader and author Bill Williams. It’s designed to help traders identify trends and potential trading opportunities in the market. The indicator is composed of three smoothed moving averages that are meant to resemble the teeth, lips, and jaws of an alligator, hence the name.

Here’s a breakdown of the components:

  1. Alligator’s Jaw (Blue line): This is a 13-period smoothed moving average that is moved 8 bars into the future.
  2. Alligator’s Teeth (Red line): This is an 8-period smoothed moving average that is moved 5 bars into the future.
  3. Alligator’s Lips (Green line): This is a 5-period smoothed moving average that is moved 3 bars into the future.

When the Alligator indicator is applied to a chart, traders look for the following signals:

  • Trending Upward: When the three lines are intertwined, with the green line (Lips) at the top, the red line (Teeth) in the middle, and the blue line (Jaw) at the bottom, this indicates that the market is in a strong upward trend. Traders might look for buying opportunities.
  • Trending Downward: Conversely, when the three lines are intertwined, but with the green line (Lips) at the bottom, the red line (Teeth) in the middle, and the blue line (Jaw) at the top, this suggests a strong downward trend. Traders might look for selling opportunities.
  • Consolidation/Range-bound: When the Alligator’s lines are close together and intertwined, this suggests the market is ranging or consolidating, and traders might avoid entering new positions until a clear trend emerges.
  • Awake/Asleep: Bill Williams also described the Alligator as “asleep” when the three lines are close together and flat. Conversely, when the Alligator is “awake,” the three lines diverge, indicating an emerging trend.

Customise the indicator

With our API, traders have the flexibility to customize the Williams Alligator indicator according to their preferences and trading strategies using optional parameters. This includes adjusting the length of each of the moving averages (Jaw, Teeth, and Lips) to suit different timeframes and market conditions. For example, traders can experiment with longer or shorter periods for the moving averages based on the volatility of the asset being analyzed. Additionally, traders can modify the offset by specifying how many bars into the future each line is moved. These adjustments are possible using the optional parameters described in the table below.

Get Williams Alligator values via API

We provide API access to the Williams Alligator values for all of the most popular assets like stocks, crypto (try one of the popular exchanges like Binance) and forex, on all commonly used timeframes – from the weekly and daily all the way down to one minute intervals. You can also calculate the values on your own data using our manual method.

Get started with the williamsalligator

Simply make an HTTPS [GET] request or call in your browser:

			[GET] https://api.taapi.io/williamsalligator?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=1h

API response

The williamsalligator endpoint returns a JSON response like this:

	"valueJaws": 68078.54021534462,
	"valueTeeth": 67764.67773254868,
	"valueLips": 66023.99113981522
Example response from TAAPI.IO when querying williamsalligator endpoint.

API parameters

Required String
The secret which is emailed to you when you request an API key.
Required String
The exchange you want to calculate the indicator from: binance, binancefutures or one of our supported exchanges. For other crypto / stock exchanges, please refer to our Client or Manual integration methods.
Required String
Symbol names are always uppercase, with the coin separated by a forward slash and the market: COIN/MARKET. For example: BTC/USDT Bitcoin to Tether, or LTC/BTC Litecoin to Bitcoin...
Required String
Interval or time frame: We support the following time frames: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 12h, 1d, 1w. So if you're interested in values on hourly candles, use interval=1h, for daily values use interval=1d, etc.
Optional Integer
The backtrack parameter removes candles from the data set and calculates the williamsalligator value X amount of candles back. So, if you’re fetching the williamsalligator on the hourly and you want to know what the williamsalligator was 5 hours ago, set backtrack=5. The default is 0 and a maximum is 50.
Optional Integer
The backtracks parameter returns the williamsalligator value calculated on every candle for the past X candles. For example, if you want to know what the williamsalligator was every hour for the past 12 hours, you use backtracks=12. As a result, you will get 12 values back.
Optional String
The chart parameter accepts one of two values: candles or heikinashi. candles is the default, but if you set this to heikinashi, the indicator values will be calculated using Heikin Ashi candles. Note: Pro & Expert Plans only.
Optional Boolean
true or false. Defaults to false. By setting to true the API will return a timestamp with every result (real-time and backtracked) to which candle the value corresponds. This is helpful when requesting multiple backtracks.
New Optional Boolean
true or false. Defaults to true. By setting to false, the API will ensure that there are no candles missing. This often happens on lower timeframes in thin markets. Gaps will be filled by a new candle with 0 volume, and OHLC set the the close price of the latest candle with volume.
New Optional String
number or max. Use this parameter to access historical values on the past X candles until the most recent candle. Use max to return all available historical values. Returns an array with the oldest value on top and most recent value returned the last.
Optional Integer

Default: 13

Optional Integer

Default: 8

Optional Integer

Default: 5

Optional Integer

Default: 8

Optional Integer

Default: 5

Optional Integer

Default: 3

More examples

Let's say you want to know the williamsalligator value on the last closed candle on the 30m timeframe. You are not interest in the real-time value, so you use the backtrack=1 optional parameter to go back 1 candle in history to the last closed candle.

				[GET] https://api.taapi.io/williamsalligator?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=30m&backtrack=1
Get williamsalligator values on each of the past X candles in one call

Let's say you want to know what the williamsalligator daily value was each day for the previous 10 days. You can get this returned by our API easily and efficiently in one call using the backtracks=10 parameter:

				[GET] https://api.taapi.io/williamsalligator?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=1d&backtracks=10

Here's the example response:

		"valueJaws": 66944.75228702348,
		"valueTeeth": 65351.833777647276,
		"valueLips": 64394.19665829465,
		"backtrack": 0
		"valueJaws": 67274.93997760877,
		"valueTeeth": 65755.66646016832,
		"valueLips": 64251.11332286832,
		"backtrack": 1
		"valueJaws": 67500.2903924095,
		"valueTeeth": 66226.44452590664,
		"valueLips": 64250.2579035854,
		"backtrack": 2
		"valueJaws": 67793.06459177696,
		"valueTeeth": 66817.56802960759,
		"valueLips": 64681.57112948175,
		"backtrack": 3
		"valueJaws": 68084.58789109171,
		"valueTeeth": 67365.43489098009,
		"valueLips": 65236.90891185218,
		"backtrack": 4
		"valueJaws": 68078.54021534935,
		"valueTeeth": 67764.67773254868,
		"valueLips": 66023.99113981522,
		"backtrack": 5
		"valueJaws": 67882.03939996178,
		"valueTeeth": 68304.34598005563,
		"valueLips": 66784.36392476903,
		"backtrack": 6
		"valueJaws": 67760.12268329192,
		"valueTeeth": 68877.14040577786,
		"valueLips": 67337.7711559613,
		"backtrack": 7
		"valueJaws": 67574.79165689959,
		"valueTeeth": 68979.9947494604,
		"valueLips": 68175.46394495163,
		"backtrack": 8
		"valueJaws": 67295.97304497455,
		"valueTeeth": 68771.91542795474,
		"valueLips": 69145.63368118953,
		"backtrack": 9

Looking for even more integration examples in different languages like NodeJS, PHP, Python, Curl or Ruby? Continue to [GET] REST - Direct documentation.