Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=5
- indicator(title = "SET13_INDEX", shorttitle="SET13_INDEX")
- rsi_period = input.int(title="RSI Period", defval=14, minval=2, maxval = 500)
- getRSI(t1) =>
- c = request.security(t1, timeframe.period, close)
- tso = request.financial("SET:PTT", "TOTAL_SHARES_OUTSTANDING", "FQ", ignore_invalid_symbol = true)
- rsi = ta.rsi(c,rsi_period)
- ptt_rsi = getRSI("SET:PTT")
- aot_rsi = getRSI("SET:AOT")
- advanc_rsi = getRSI("SET:ADVANC")
- cpall_rsi = getRSI("SET:CPALL")
- gulf_rsi = getRSI("SET:GULF")
- pttep_rsi = getRSI("SET:PTTEP")
- scc_rsi = getRSI("SET:SCC")
- scb_rsi = getRSI("SET:SCB")
- kbank_rsi = getRSI("SET:KBANK")
- bdms_rsi = getRSI("SET:BDMS")
- ea_rsi = getRSI("SET:EA")
- or_rsi = getRSI("SET:OR")
- scgp_rsi = getRSI("SET:SCGP")
- plot((ptt_rsi + aot_rsi + advanc_rsi + cpall_rsi+ gulf_rsi + pttep_rsi + scc_rsi + scb_rsi + kbank_rsi + bdms_rsi+ ea_rsi + or_rsi + scgp_rsi)/13,
- color = color.black )
- plot(70, color=color.gray,style = plot.style_stepline)
- plot(50, color=color.gray,style = plot.style_stepline)
- plot(30, color=color.gray,style = plot.style_stepline)
Advertisement
Add Comment
Please, Sign In to add comment