Navigation: Study Formulas > Swings

Swings

Top  Previous  Next

The study formulas included in the Swings section are:

 

 

retrace()

 

This function calculates the current retracement of the most recently completed swing. The size of a swing is governed by the strength input parameter, which must be at least 1. The retracement calculated coming off a swing low is (currentPrice-SwingLow)/(SwingHigh-SwingLow) and is returned as a positive number. The retracement calculated coming off of a swing high is (SwingHigh-currentPrice)/(SwingHigh-SwingLow) and is returned as a negative number.

 

Parameters

 

strength

the minimum swing size

inv

select the bar interval on which this study should be calculated or leave blank to calculate on the default bar interval