Buongiorno a Tutti. E’ possibile convertire l’indicatore Leavitt Convolution & Acceleration by Cryptorhythms riportato da Tradingview a questo link:
https://www.tradingview.com/script/4tdsuPkT-Leavitt-Convolution-Acceleration-by-Cryptorhythms/
Questo è il codice:
//@version=4
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © theheirophant 12/3/2018
study(“Leavitt Convolution & Acceleration by Cryptorhythms”)
//settings
yes5 = input(title=”Plot Acceleration?”, type=input.bool, defval=false)
yes1 = input(title=”Enable Bar Color by Trade?”, type=input.bool, defval=true)
plotInput = input(title=”❓ Divergence Display: Histogram or Columns”, defval=”Histogram”, options=[“Histogram”, “Columns”])
length = input(61, “Lookback Length”)
src = input(close, “Source/Series”)
yes0 = input(title=”Enable Overbought / Oversold Zones?”, type=input.bool, defval=true)
overBought = input(20, “Overbought Threshold”)
overSold = input(-20, “Oversold Threshold”)
mlength = input(3, “Acceleration Lookback”)
multiplier = input(2.5, “Overbought/Oversold zone area multiplier”)
//functions
getSlope(series) =>
rad2degree = 180 / 3.14159265359
slopeD = rad2degree * atan((series[0] – nz(series[length])) / length)
slopeD
leavittProjection(src, length) =>
lP = linreg(src, length, -1)
lP
leavittConv(src, length) =>
lenConv = round(sqrt(length))
leavittConv = linreg(leavittProjection(src, length), lenConv, -1)
leavittConv
leavittConvSlope(src, length) =>
lCS = getSlope(leavittConv(src, length))
lCS
LCSlope = leavittConvSlope(src, length)
//plots
plotColor = LCSlope < 0 ? LCSlope[1] 0 ? LCSlope[1] barssince_2 ? #51CFEE : #770043 : na)
Grazie fin d’ora.