Skip to Main Content

JavaScript Indicator Examples and Code | TrendSpider

Adaptive Donchian Channel

Adaptive Donchian Channel

An indicator designed to show how to build adaptive ranges that only adjust width if other conditions are met...
Automatically Anchored Volume-Weighted Average Price (VWAP)

Automatically Anchored Volume-Weighted Average Price (VWAP)

This is a simple example to demonstrate how to generate automatically anchored indicators on a chart based on conditions...
Color Inside Bars Differently

Color Inside Bars Differently

This example demonstrates how to change the colors of candles or price bars based on the properties of the market at ...
Detect Symmetrical Triangles on Charts Automatically

Detect Symmetrical Triangles on Charts Automatically

This demonstrates how to identify chart patterns consisting of two lines in relation to one another. Here we detect ...
Fractal Trendline Detection Indicator

Fractal Trendline Detection Indicator

This indicator example identifies fractal highs and lows, then uses them to attempt to detect trendlines on the chart. ...
Guppy Moving Averages

Guppy Moving Averages

This code shows how to generate multiple related moving averages in a single script to generate a 'guppy' visualization ...
Price Gap Detection Automation

Price Gap Detection Automation

This is a complex example from our internal library that detects gaps in price action and illustrates them on the chart ...
Typical Volume-by-Time Comparison Indicator

Typical Volume-by-Time Comparison Indicator

This is a volume indicator that demonstrates how to compare against the past. It compares the current intraday period's ...