Converting Pinescript (TradingView) indicator to thinkscript (ToS) $10-30 USD Publicado hace más de 4 años
$10-30 USD Pagado a la entrega
I'm looking to convert a Pinescript (TradingView) indicator to thinkscript (thinkorswim). My attempt to translate the code failed (pasted below). I'd like for the indicator to show identical values in both Tradingview and ToS. Please test multiple length inputs to confirm successful conversion.
PineScript Indicator:
trendDetectionLength=input(2)
showDistributionBelowZero=input(false, type=bool)
mov = close>close[1] ? 1 : close<close[1] ? -1 : 0
trend= (mov != 0) and (mov != mov[1]) ? mov : nz(trend[1])
isTrending = rising(close, trendDetectionLength) or falling(close, trendDetectionLength) //abs(close-close[1]) >= dif
wave=(trend != nz(wave[1])) and isTrending ? trend : nz(wave[1])
vol=wave==wave[1] ? (nz(vol[1])+volume) : volume
up=wave == 1 ? vol : 0
dn=showDistributionBelowZero ? (wave == 1 ? 0 : wave == -1 ? -vol : vol) : (wave == 1 ? 0 : vol)
plot(up, style=histogram, color=green, linewidth=3)
plot(dn, style=histogram, color=red, linewidth=3)
============================================================================
ThinkScript:
declare lower;
declare zerobase;
input trendDetectionLength = 2;
def mov = If(close > close[1], 1, If(close < close[1], -1, 0));
def trend = If((mov != 0) and (mov != mov[1]), mov, (trend[1])) ;
def isTrending = IsAscending(close, trendDetectionLength) or IsDescending(close, trendDetectionLength);
def wave = If((trend != (wave[1])) and isTrending, trend , (wave[1]) );
def vol = If(wave == wave[1] , ((vol[1]) + volume) , volume ) ;
plot up = If(wave == 1 , vol , 0 );
plot dn = If(wave == 1, 0, If(wave == -1, vol, vol));
[login to view URL]([login to view URL]);
[login to view URL]([login to view URL]);
[login to view URL](3);
[login to view URL](3);
[login to view URL]([login to view URL]);
[login to view URL]([login to view URL]);
ID del proyecto: 22842780
Información sobre el proyecto 4 propuestas
Proyecto remoto
Activo hace 4 años
¿Buscas ganar dinero? Dirección de email Postular a trabajos similares Beneficios de presentar ofertas en Freelancer Fija tu plazo y presupuesto
Es gratis registrarse y presentar ofertas en los trabajos
4 freelancers están ofertando un promedio de $36 USD por este trabajo
hi.........................................................................................................................................................................
$20 USD en 3 días
5,0 (229 comentarios) Hi,
I'm a software developer with focus on metatrader platform.
I've got many years experience both in trading and coding.
Programming languages - MQL4/5, AFL, PineScript.
$70 USD en 3 días
5,0 (57 comentarios) I have now converted this script to thinkorswim on my side and it works well. can deliver shortly after I am selected for task.
$45 USD en 1 día
5,0 (4 comentarios) Hi,
Id like to get this job. Let me try to conver this script.
Thx, Nick
$10 USD en 7 días
0,0 (0 comentarios)