Download: altswing.ela
File Includes: ShowMe - Alternating Swings
Category: ShowMe > Alternating Swings
Description:
This ShowMe, the idea for which was inspired by user C.Vanhaesendonck, uses the built-in functions, SwingHighBar
and SwingLowBar, to plot alternating swing points, i.e. swing high then next swing low then next swing high then
next swing low ect... Please see Easy Language Manual, SuperCharts User's Maual or the Online Help to see more
detailed information on the inputs used by these functions.
Inputs:
Occur: Which occurance of swing to searched for (i.e. 1 = most recent, 2 = 2nd most recent, ect...)
Price1 : Specifies which price is to be used for the 1st swing point (i.e. H or High)
Price2 : Specifies which price is to be used for the next swing point (i.e. L or Low)
Strength : Specifies required # of bars whose highs are to be less than the swing high found
or whose lows are to be greater than the swing low found)
Length : Specifies # of trailing bars to consider in search for swing high/low.
EasyLanguage Code:
INPUTS : OCCUR(1), PRICE1(H), PRICE2(L), STRENGTH(3), LENGTH(5);
VARS : PLOTHI(FALSE), PLOTLO(FALSE);
VALUE1 = SWINGHIGHBAR(OCCUR,PRICE1,STRENGTH,LENGTH);
VALUE2 = SWINGLOWBAR(OCCUR,PRICE2,STRENGTH,LENGTH);
IF VALUE1 > VALUE2 AND PLOTHI = FALSE THEN BEGIN
PLOT1[VALUE1](PRICE1[VALUE1],"");
PLOTHI = TRUE;
PLOTLO = FALSE;
END
ELSE IF VALUE1 < VALUE2 AND PLOTLO = FALSE THEN BEGIN
PLOT2[VALUE2](PRICE2[VALUE2],"");
PLOTLO = TRUE;
PLOTHI = FALSE;
END;
IF CHECKALERT THEN
IF PLOTLO AND PLOTLO <> PLOTLO[1] OR PLOTHI AND PLOTHI <> PLOTHI[1] THEN ALERT = TRUE;