New Percent Swing Highs/Lows

The Percent Swing Overlay tool can be used to show when a stock has moved X% from a high or low, making it easy to see turns in the market. Using the PERCENTSWING() function we can create a scan to show when the current swing crosses above (or below) the previous swing value, ie making a new high or a lower low.

This example is based on 10% swings:

// Set the swing criteria;
PC1 = PERCENTSWING(PERCENT=10.0);
// Get the swingstart and swingend values;
S1 = SWINGSTART(PC1);
S2 = SWINGEND(PC1);
// Get the current direction of the swing (1 = up, 0 = down);
D1 = SWINGUP(PC1);
// Get the previous swing values depending on current swing direction;
R1=IF(D1==1,S1[1],S1);
R2=IF(D1==0,S1[1],S1);
// Did the current high/low cross the previous swing value?
(HIGH() CrossesAbove R1 and HIGH()>=S2) or 
(LOW() CrossesBelow R2 and LOW()<=S2)

When this scan was run there were 14 new swing highs and only one new swing low (click here to see how to automatically update watchlists with scan results). ALK crossed above the previous swing high of $68.99, with a new swing high value of $72.62, up from $68.88 the day before:

Capture

 

This formula identifies when the percent swing changes direction (as see here: https://twitter.com/Optuma/status/1442816609656127493?s=20).

//Define percent swing range; 
PC1 = PERCENTSWING(PERCENT=10.0); 
//Signal when condtion changes to true; 
SWINGDOWN(PC1) ChangeTo 1 or 
SWINGUP(PC1) ChangeTo 1

Link the scan results to a watchlist (see this video) and add these for the columns:

Swing direction:

SWINGUP(PERCENTSWING(PERCENT=10.0))

Swing Trend direction:

SWINGTRENDUP(PERCENTSWING(PERCENT=10.0))

Once added the columns need formatting to display the labels and colours:

Capture