Based on request.
viewtopic.php?f=27&t=64135peak = ref(C,-2)
if ref(C,-2) = max C during 5 day
trough = ref(c,-2)
if ref(C,-2) = min C during 5 day
n=20
Alert when:
C cross peak and C >= EMA(n)
trough cross C and C <= EMA(n)
Alert when:
C cross peak and C >= EMA
trough cross C and C <= EMA
Effectively Close price breakout.lua with MA Cross Period set to zero.
The indicator was revised and updated