ucsgears

TSM Donchian Moving Average System_by_ucsgears

This is just the raw code for the system / strategies.

Will Complete this when I get more time.

Green - Setup Long
Red - Setup Short
Eliminar de Scripts favoritos. Añadir a Scripts favoritos.
study("TSM Donchian Moving Average System", overlay = true)

a = input(20, title = "Long Period")
b = input(5, title = "Short Period")
ca = input(1, title = "Band Factor")

// Moving average
malong = sma(close,a)
mashort = sma(close,b)
range = sma(tr, a)*ca
kclupper = malong + range
kcllower = malong - range

kcsupper = mashort + range
kcslower = mashort - range


// PLOT
plot(malong, offset=1, title = "SMA Long")
plot(mashort, offset=1, title = "SMA Short")
plot(kclupper, offset=1, title = "KC Upper")
plot(kcllower, offset=1, title = "KC Lower")

// SETUP 
// LONG 
setuplong = close > kclupper[1] and close > kcsupper[1] ? green : na
setupshort = close < kcllower[1] and close < kcslower[1] ? red : na

barcolor(setuplong)
barcolor(setupshort)

// EXIT
// LONG
//exitlong = close < kclupper[1] and close < kcsupper[1] ? blue : na
//exitshort = close > kcllower[1] and close > kcslower[1] ? orange : na

//barcolor(exitlong)
//barcolor(exitshort)
How do you activate the Exit Long section? For some reason the short side of the code doesn't work.
Responder
ucsgears mahatango747
@mahatango747, I haven't finished the exit codes. Take a stab at it, if you want to
Responder
@ucsgears, This is the best strategy out there, works quite well. Was wondering if you'll finish the code? Lol
Responder



New and improved update, with better filters.
+1 Responder
P7 ucsgears
Thank you very much for sharing ucsgears, did you use RSI as filter this time by any chance ?
Responder
no. Its just different overlay indicators to serve the same purpose.
Responder
Looks good, this system is a steady performer
Responder
ucsgears TASAVANT
Thanks for Sharing.
Responder
Inicio Analizador de acciones Analizador de Forex Crypto Screener Calendario económico Shows Cómo funciona Funcionalidades del gráfico Precios Normas Moderadores Soluciones broker y sitio web Widgets Soluciones gráficas Biblioteca de gráficos ligeros Centro de ayuda Recomendar a un amigo Solicitud de funcionalidad Blog y Noticias Preguntas frecuentes Wiki Twitter
Perfil Opciones de configuración del perfil Cuenta y facturación Recomendar a un amigo Mis Tickets de Soporte Centro de ayuda Ideas publicadas Seguidores Siguiendo Mensajes privados Chat Cerrar sesión