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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials