Hi I was wondering if anyone can convert the following to thinkorswim or point me to a similar indicator?
https://www.tradingview.com/script/02TLSQgT-PA-Adaptive-Hull-Parabolic-Loxx/
//@version=5
//
indicator('PA-Adaptive Hull Parabolic [Loxx]', overlay=true)
import loxx/loxxpaaspecial/1
greencolor = #2DD204
redcolor = #D2042D
src = input.source(close, "Source", group = "Basic Settings")
Power = input.int(1, "Power", group = "Basic Settings")
fregcycles = input.float(1.0, "Phase Accumulation Cycles", group = "Basic Settings")
fregfilter = input.float(1.0, "Phase Accumulation Power", group = "Basic Settings")
bool colorbars = input.bool(true, "Color bars", group= "UI Options")
bool showSigs = input.bool(true, "Show signals", group= "UI Options")
iLwmp(src, len, pow) =>
sumw = math.pow(len, pow)
sum = sumw * src
for int k = 1 to len - 1
weight = math.pow(len - k, pow)
sumw += weight
sum += weight * nz(src[k])
sum / sumw
HmaLength = math.max(loxxpaaspecial.paa(src, fregcycles, fregfilter), 2)
HalfPeriod = math.floor(HmaLength / 2)
HullPeriod = math.floor(math.sqrt(HmaLength))
hullout = iLwmp(2.0 * iLwmp(src, HalfPeriod, Power) - iLwmp(src, HmaLength, Power), HullPeriod, Power)
sig = hullout[1]
colorout = hullout > sig ? greencolor: redcolor
bool goLong = ta.crossover(hullout, sig)
bool goShort = ta.crossunder(hullout, sig)
barcolor(colorbars ? colorout : na)
plot(hullout, color = colorout, linewidth=3)
plotshape(showSigs and goLong, title = "Long", color = color.yellow, textcolor = color.yellow, text = "L", style = shape.triangleup, location = location.belowbar, size = size.small)
plotshape(showSigs and goShort, title = "Short", color = color.fuchsia, textcolor = color.fuchsia, text = "S", style = shape.triangledown, location = location.abovebar, size = size.small)
alertcondition(goLong, title = "Long", message = "PA-Adaptive Hull Parabolic [Loxx]: Long\nSymbol: {{ticker}}\nPrice: {{close}}")
alertcondition(goShort, title = "Short", message = "PA-Adaptive Hull Parabolic [Loxx]: Short\nSymbol: {{ticker}}\nPrice: {{close}}")
end of code
Thank You