Stc//@version=3
study("IntelliTrader - STOCH - MTF 1m / 5m / 15m / 1h / 4h / 1d")
//Constants for STOCH
len_k = 14
len_d = 3
smoothK = 3
//STOCH Calculation
stoch_k = sma(stoch(close, high, low, len_k), smoothK)
stoch_d = sma(stoch_k, len_d)
//res_stoch_k = security(tickerid, res, stoch_k) unused in IT atm
//res_stoch_d = security(tickerid, res, stoch_d)
stoch_d_1m = security(tickerid, "1", stoch_d)
stoch_d_5m = security(tickerid, "5", stoch_d)
stoch_d_15m = security(tickerid, "15", stoch_d)
stoch_d_1h = security(tickerid, "60", stoch_d)
stoch_d_4h = security(tickerid, "240", stoch_d)
stoch_d_1d = security(tickerid, "1440", stoch_d)
plot(stoch_d_1m, color=#00FA9A, linewidth = 2, title="1m",transp = 50)
plot(stoch_d_5m, color=#2E8B57, linewidth = 2, title="5m",transp = 50)
plot(stoch_d_15m, color=#87CEFA, linewidth = 2, title="15m",transp = 50)
plot(stoch_d_1h, color=#1E90FF, linewidth = 2, title="1h",transp = 50)
plot(stoch_d_4h, color=#9370DB, linewidth = 2, title="4h",transp = 50)
plot(stoch_d_1d, color=#8B008B, linewidth = 2, title="1d",transp = 50)