// SMA rsi_len = input.int( 14, title = "RSI Length", group = "Indicators") rsi_os = input.float(30, title = "RSI Overbought", group = "Indicators") rsi_ob = input.float(70, title = "RSI Oversold", group = "Indicators")
// TSI tsi_long_len = input.int( 25, title = "TSI Long Length", group = "Indicators") tsi_shrt_len = input.int( 13, title = "TSI Short Length", group = "Indicators") tsi_ob = input.float( 30, title = "TSI Overbought", group = 'Indicators') tsi_os = input.float(-30, title = "TSI Oversold", group = 'Indicators')
// ADX Params adx_smooth = input.int( 14, title = "ADX Smoothing", group = 'Indicators') adx_dilen = input.int( 14, title = "ADX DI Length", group = 'Indicators') adx_level = input.float(40, title = "ADX Level", group = 'Indicators')
// SuperTrend sup_atr_len = input.int( 10, "Supertrend ATR Length", group = 'Indicators') sup_factor = input.float(3.0, "Supertrend Factor", group = 'Indicators')
///////////// // SYMBOLS //
u01 = input.bool(true, title = "", group = 'Symbols', inline = 's01') u02 = input.bool(true, title = "", group = 'Symbols', inline = 's02') u03 = input.bool(true, title = "", group = 'Symbols', inline = 's03') u04 = input.bool(true, title = "", group = 'Symbols', inline = 's04') u05 = input.bool(true, title = "", group = 'Symbols', inline = 's05') u06 = input.bool(true, title = "", group = 'Symbols', inline = 's06') u07 = input.bool(true, title = "", group = 'Symbols', inline = 's07') u08 = input.bool(true, title = "", group = 'Symbols', inline = 's08') u09 = input.bool(true, title = "", group = 'Symbols', inline = 's09') u10 = input.bool(true, title = "", group = 'Symbols', inline = 's10') u11 = input.bool(true, title = "", group = 'Symbols', inline = 's11') u12 = input.bool(true, title = "", group = 'Symbols', inline = 's12') u13 = input.bool(true, title = "", group = 'Symbols', inline = 's13') u14 = input.bool(true, title = "", group = 'Symbols', inline = 's14') u15 = input.bool(true, title = "", group = 'Symbols', inline = 's15') u16 = input.bool(true, title = "", group = 'Symbols', inline = 's16') u17 = input.bool(true, title = "", group = 'Symbols', inline = 's17') u18 = input.bool(true, title = "", group = 'Symbols', inline = 's18') u19 = input.bool(true, title = "", group = 'Symbols', inline = 's19') u20 = input.bool(true, title = "", group = 'Symbols', inline = 's20') u21 = input.bool(true, title = "", group = 'Symbols', inline = 's21') u22 = input.bool(true, title = "", group = 'Symbols', inline = 's22') u23 = input.bool(true, title = "", group = 'Symbols', inline = 's23') u24 = input.bool(true, title = "", group = 'Symbols', inline = 's24') u25 = input.bool(true, title = "", group = 'Symbols', inline = 's25') u26 = input.bool(true, title = "", group = 'Symbols', inline = 's26') u27 = input.bool(true, title = "", group = 'Symbols', inline = 's27') u28 = input.bool(true, title = "", group = 'Symbols', inline = 's28') u29 = input.bool(true, title = "", group = 'Symbols', inline = 's29') u30 = input.bool(true, title = "", group = 'Symbols', inline = 's30') u31 = input.bool(true, title = "", group = 'Symbols', inline = 's31') u32 = input.bool(true, title = "", group = 'Symbols', inline = 's32') u33 = input.bool(true, title = "", group = 'Symbols', inline = 's33') u34 = input.bool(true, title = "", group = 'Symbols', inline = 's34') u35 = input.bool(true, title = "", group = 'Symbols', inline = 's35') u36 = input.bool(false, title = "", group = 'Symbols', inline = 's36') u37 = input.bool(false, title = "", group = 'Symbols', inline = 's37') u38 = input.bool(false, title = "", group = 'Symbols', inline = 's38') u39 = input.bool(false, title = "", group = 'Symbols', inline = 's39') u40 = input.bool(false, title = "", group = 'Symbols', inline = 's40')
s01 = input.symbol('SPX500', group = 'Symbols', inline = 's01') s02 = input.symbol('SPX500', group = 'Symbols', inline = 's02') s03 = input.symbol('SPX500', group = 'Symbols', inline = 's03') s04 = input.symbol('SPX500', group = 'Symbols', inline = 's04') s05 = input.symbol('SPX500', group = 'Symbols', inline = 's05') s06 = input.symbol('SPX500', group = 'Symbols', inline = 's06') s07 = input.symbol('SPX500', group = 'Symbols', inline = 's07') s08 = input.symbol('SPX500', group = 'Symbols', inline = 's08') s09 = input.symbol('SPX500', group = 'Symbols', inline = 's09') s10 = input.symbol('SPX500', group = 'Symbols', inline = 's10') s11 = input.symbol('SPX500', group = 'Symbols', inline = 's11') s12 = input.symbol('SPX500', group = 'Symbols', inline = 's12') s13 = input.symbol('SPX500', group = 'Symbols', inline = 's13') s14 = input.symbol('SPX500', group = 'Symbols', inline = 's14') s15 = input.symbol('SPX500', group = 'Symbols', inline = 's15') s16 = input.symbol('SPX500', group = 'Symbols', inline = 's16') s17 = input.symbol('SPX500', group = 'Symbols', inline = 's17') s18 = input.symbol('SPX500', group = 'Symbols', inline = 's18') s19 = input.symbol('SPX500', group = 'Symbols', inline = 's19') s20 = input.symbol('SPX500', group = 'Symbols', inline = 's20') s21 = input.symbol('SPX500', group = 'Symbols', inline = 's21') s22 = input.symbol('SPX500', group = 'Symbols', inline = 's22') s23 = input.symbol('SPX500', group = 'Symbols', inline = 's23') s24 = input.symbol('SPX500', group = 'Symbols', inline = 's24') s25 = input.symbol('SPX500', group = 'Symbols', inline = 's25') s26 = input.symbol('SPX500', group = 'Symbols', inline = 's26') s27 = input.symbol('SPX500', group = 'Symbols', inline = 's27') s28 = input.symbol('SPX500', group = 'Symbols', inline = 's28') s29 = input.symbol('SPX500', group = 'Symbols', inline = 's29') s30 = input.symbol('SPX500', group = 'Symbols', inline = 's30') s31 = input.symbol('SPX500', group = 'Symbols', inline = 's31') s32 = input.symbol('SPX500', group = 'Symbols', inline = 's32') s33 = input.symbol('SPX500', group = 'Symbols', inline = 's33') s34 = input.symbol('SPX500', group = 'Symbols', inline = 's34') s35 = input.symbol('SPX500', group = 'Symbols', inline = 's35') s36 = input.symbol('SPX500', group = 'Symbols', inline = 's36') s37 = input.symbol('SPX500', group = 'Symbols', inline = 's37') s38 = input.symbol('SPX500', group = 'Symbols', inline = 's38') s39 = input.symbol('SPX500', group = 'Symbols', inline = 's39') s40 = input.symbol('SPX500', group = 'Symbols', inline = 's40')
////////////////// // CALCULATIONS //
// Get only symbol only_symbol(s) => array.get(str.split(s, ":"), 1)
// for TSI double_smooth(src, long, short) => fist_smooth = ta.ema(src, long) ta.ema(fist_smooth, short)
// ADX dirmov(len) => up = ta.change(high) down = -ta.change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0) minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
truerange = ta.rma(ta.tr, len)
plus = fixnan(100 * ta.rma(plusDM, len) / truerange) minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
[plus, minus]
adx_func(dilen, adxlen) => [plus, minus] = dirmov(dilen) sum = plus + minus adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.