SafeZone Stop - Elder

Category: Indicators By: lolo Created: October 12, 2015, 8:12 PM
October 12, 2015, 8:12 PM
Indicators
0 Comments

From Alexander Elder.

Provides good stop placement by determining the average upside & downside penetration over a specific number of days (lookback period), multiplying this figure by a selected constant (Factor) then either minusing this from todays low (uptrend) or adding onto todays high (downtrend).

Parameters

Factor (f = 2)

Lookback (d = 10)

REM Variable definition
Factor = f
Lookback = d

dnPen = LOW - LOW[1]
upPen = HIGH - HIGH[1]

REM SPalte E und L
IF dnPen > 0 THEN
     dnPenCount = 1
ELSE
     dnPen = 0
     dnPenCount = 0
ENDIF
IF upPen > 0 THEN
     upPenCount =1
ELSE
     upPen = 0
     upPenCount = 0
ENDIF

REM Spalte I und P
dnAvg = Summation[Lookback](dnPen) / SUMMATION[Lookback](dnPenCount)
upAvg = Summation[Lookback](upPen) / SUMMATION[Lookback](upPenCount)

REM SPlate J und Q
bullStop = LOW - (Factor * dnAvg)
bearStop = HIGH + (Factor * upAvg)

REM Spalte K und R
bullzw = MAX(bullStop[1], bullStop[2])
bearzw = MIN(bearStop[1], bearStop[2])
protectedBull = MAX (bullStop, bullzw)
protectedBear = MIN (bearStop, bearzw)

RETURN bullStop AS"Bull STOP", bearStop AS"Bear STOP", protectedBull AS"protected Bull", protectedBear AS"Protected Bear"

Download
Filename: SafeZone-Stop-Elder.itf
Downloads: 223
lolo New
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...