actualizame este script para la version 6 del editor Pine. @version=5…
- User
actualizame este script para la version 6 del editor Pine. @version=5 indicator("Combined Indicators with Alerts", overlay=true)
// --- CM_Stochastic_MTF --- len = input(14, minval=1, title="Length for Main Stochastic") smoothK = input(3, minval=1, title="SmoothK for Main Stochastic") smoothD = input(3, minval=1, title="SmoothD for Main Stochastic") upLine = input(90, minval=50, maxval=90, title="Upper Line Value?") // Cambiado a 90 lowLine = input(10, minval=10, maxval=50, title="Lower Line Value?") // Cambiado a 10 sml = input(true, title="Show Mid Line?") sbh = input(false, title="Show Back Ground Highlights When Stoch is Above/Below High/Low Lines?") sch = input(true, title="Show Back Ground Highlights When Stoch Cross - Strict Criteria - K Greater/LesThan High/Low Line - Crosses D?") sl = input(true, title="Show 'B' and 'S' Letters When Stoch Crosses High/Low Line & D?") sac = input(false, title="Show Back Ground Highlights When Stoch Cross - Any Cross?") sacl = input(false, title="Show 'B' and 'S' Letters When Stoch Crosses - Any Cross?") useCurrentRes = input(true, title="Use Current Chart Resolution?") resCustom = input.timeframe("60", title="Use Different Timeframe? Uncheck Box Above") ssStoch = input(false, title="Show 2nd Stoch?") resCustom2 = input.timeframe("D", title="Use 2nd Stoch? Check Box Above") len2 = input(14, minval=1, title="2nd Stoch Length") smoothK2 = input(3, minval=1, title="SmoothK for 2nd Stoch") smoothD2 = input(3, minval=1, title="SmoothD for 2nd Stoch")
// Resolution for MTF res = useCurrentRes ? timeframe.period : resCustom k = ta.sma(ta.stoch(close, high, low, len), smoothK) d = ta.sma(k, smoothD) outK = request.security(syminfo.tickerid, res, k) outD = request.security(syminfo.tickerid, res, d)
k2 = ta.sma(ta.stoch(close, high, low, len2), smoothK2) d2 = ta.sma(k2, smoothD2) outK2 = request.security(syminfo.tickerid, resCustom2, k2) outD2 = request.security(syminfo.tickerid, resCustom2, d2)
// Definitions for Cross crossUp = (outK[1] < outD[1]) and (outK > outD and outK > upLine) crossDn = (outK[1] > outD[1]) and (outK < outD and outK < lowLine)
// Plot main Stochastic plot(outK, title="Stoch K", color=color.lime, linewidth=3) plot(outD, title="Stoch D", color=color.red, linewidth=3)
// --- WMAMulti --- tf1 = input("15", title="time frame 1") tf2 = input("30", title="time frame 2") tf3 = input("60", title="time frame 3") length = input(20, title="length")
ma1 = request.security(syminfo.tickerid, tf1, ta.wma(hl2, length)) ma2 = request.security(syminfo.tickerid, tf2, ta.wma(hl2, length)) ma3 = request.security(syminfo.tickerid, tf3, ta.wma(hl2, length))
getcolor(avg, tf) => prev = request.security(syminfo.tickerid, tf, ta.wma(hl2, length)[1]) avg >= prev ? color.green : color.red
// Plot WMA plot(ma1, color=getcolor(ma1, tf1), linewidth=3) plot(ma2, color=getcolor(ma2, tf2), linewidth=3) plot(ma3, color=getcolor(ma3, tf3), linewidth=3)
// Cruces WMA crossWMA_UP = ta.crossover(ma1, ma2) // MA de 15 cruza por encima de MA de 30 crossWMA_DOWN = ta.crossover(ma2, ma1) // MA de 30 cruza por encima de MA de 15
- Assistant