Lux Smart Trail Replica
Lux Smart Trail Replica
Lux Smart Trail Replica
// inputs //
//{
trailType = input("modified", "Trailtype", options = ["modified",
"unmodified"])
ATRPeriod = input(10, "ATR Period")
ATRFactor = input(4, "ATR Factor")
smoothing = input(8, 'Smoothing')
trueRange =
trailType == "modified" ? max(HiLo, HRef, LRef) :
max(norm_h - norm_l, abs(norm_h - norm_c[1]), abs(norm_l - norm_c[1]))
//}
Up = norm_c - loss
Dn = norm_c + loss
TrendUp = Up
TrendDown = Dn
Trend = 1
ex = 0.0
ex :=
crossover(Trend, 0) ? norm_h :
crossunder(Trend, 0) ? norm_l :
Trend == 1 ? max(ex[1], norm_h) :
Trend == -1 ? min(ex[1], norm_l) : ex[1]
//}
fib1Level = 61.8
fib2Level = 78.6
fib3Level = 88.6