Select Page

# Optuma Swing Charts: Trend vs Direction

Dec 17, 2021

This is the second in a series of articles on using Optuma’s swing charts and overlays – particularly when it comes to creating scripts for scans or testing.

​In the first article we looked at an easy way to identify swing trends using overlay colours and a simple scan formula. In this article we can take it a step further by looking at the swing direction within the current trend, i.e. to see whether the current swing is a dip down in an upward trend, or a bounce in a downward trend.

To scan for when the current swing is down but the overall trend is up we can combine the SWINGDOWN() function for direction, with the SWINGTRENDUP() function (or SWINGUP() and SWINGTRENDDOWN() for the opposite).

Here’s the formula for swings based on 10% price moves:

Now you might be wondering why the CLOSE()>0 condition is required to produce the desired results. This is one of the difficult issues regarding swing charts, in that there is not a swing value for every date, only when the swings occur (this is what we call a swing list). By adding CLOSE()>0 – which will always be true – this converts the swing list into a bar-by-bar list, therefore giving a swing value for every day, allowing the scan to work as expected.

SwingList vs BarList: If I’ve just confused you, click here for Mathew Verdouw’s detailed explanation on swing lists versus bar-by-bar lists

Using the above formula in a scan will return stocks that are currently in an uptrend but the latest direction is down, as per this example of CBA:

Click images to enlarge.

Linking scans to watchlists: See this video to link the scan results to a watchlist in a workbook. Whenever the workbook is opened the list will update with the latest scan results.

### Creating a SwingRank value

Using these functions it is possible to create a ranking value depending on the current swing trend and direction. These are the four scenarios, along with their SwingRank value:

Swing Trend negative and Direction negative: SwingRank = 0
Swing Trend negative and Direction positive = 1
Swing Trend positive and Direction negative = 2
Swing Trend positive and Direction positive = 3

Here’s an example of the Dow 30 stocks in a watchlist, based on a 3 bar Gann swing:

Apple is showing a current value of 3 as both the trend and direction are up, whereas CVX is a 2 and in a possible ‘buy the dip’ situation, with plenty showing 0s or 1s.

Here’s the formula to calculate the SwingRank (remember to change S1 variable to use a different swing type):

Clients can click the button on the right to save and open a sample workbook with separate tabs for Australian and US markets with the SwingRank watchlist column (based on daily 3 bar Gann Swings). For other regions or lists clients can click the Linked to List watchlist property and select an alternative Symbol List to use.

Next time we’ll look at comparing previous swing values which can be used to identify consecutive higher highs or lows, or to calculate retracement levels.

Apple is showing a current value of 3 as both the trend and direction are up, whereas CVX is a 2 and in a possible ‘buy the dip’ situation, with plenty showing 0s or 1s.

Here’s the formula to calculate the SwingRank (remember to change S1 variable to use a different swing type):

#### Darren Hawkins, MSTA

Senior Software Specialist at Optuma

Darren is the senior Software Specialist at Optuma. He joined the company in 2009 after attending an introductory technical analysis course. Darren now instructs users all over the world, from experienced Wall Street traders and professional money managers to individual traders drawing their first trendlines.

Darren grew up in the UK and attended college in the USA where he earned a BA in Economics from St Mary's College of Maryland. He went on to spend a few years working at the Nasdaq Stock Market in Washington DC. Going on to live and work in Australia, the US and currently the UK, Darren has a broad understanding of the individual needs of traders, portfolio managers and investors utilising a wide range of methodologies.

In 2014 Darren passed the UK-based Society of Technical Analysts diploma course, and when not looking at charts he keeps a keen eye on England's cricket team - especially if they are playing against Australia. He lives in the Essex countryside in England, with wife Wendy and their labrador, Gabba.

[optuma-page-stats]