Skip to content

SwingTrend functions

By Optuma Team · Updated 2021-04-23

SwingTrend is a colour scheme for swing charts based on WD Gann’s trend rules of higher highs and lows, regardless of the current swing direction. The example below shows the trend colours changing depending on previous swing highs and lows.

SwingTrend1
The swing trend can be easily determined in scripting with the SWINGTRENDUP() and SWINGTRENDDOWN() functions. The functions can be used with Gann, Point, Percent, or Volatility Swings.

This example can be used in a watchlist or scan to determine the trend direction based on 10% swings:

S1 = PERCENTSWING(PERCENT=10.0);
SWINGTRENDUP(S1) == 1

This example shows the Dow30 members and their current swing trend. Note that CRM is showing false because the trend is down, with the current swing in an upwards direction. The swing trend will turn green (ie up) if the previous swing high at 251.23 is taken out:

Capture

This will colour the bars red for negative trend and green for positive based on 3 bar Gann swings:

GS1 = GANNSWING(SWINGCOUNT=3, METHOD=Use Next Bar, USEINSIDE=True);
SWINGTRENDDOWN(GS1)

Capture

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.