// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © ondergecu //@version=4 strategy("DYNAMIC RSI ONDER", overlay=false, max_bars_back=1000, default_qty_type= strategy.cash, calc_on_order_fills=false, calc_on_every_tick=false, pyramiding=0, default_qty_value=100000, initial_capital=100000) strategy.risk.allow_entry_in(strategy.direction.long) choice = input(title="Choice", defval="CROSS", options=["CROSS", "RSI50"]) //TANIMLAR// DZbuy = input(0.1,step=0.01) DZsell = input(0.1,step=0.01) Period = input(14) Lb = input(60) // red=#FF0000 green=#32CD32 // RSILine = rsi(close,Period) jh = highest(RSILine, Lb) jl = lowest(RSILine, Lb) jc = (wma((jh-jl)*0.5,Period) + wma(jl,Period)) Hiline = jh - jc * DZsell Loline = jl + jc * DZbuy R = (4 * RSILine + 3 * RSILine[1] + 2 * RSILine[2] + RSILine[3] ) / 10 // a=plot(R, title='R', color=color.black, linewidth=1, style=plot.style_line, transp=0) b=plot(Hiline, title='Hiline', color=color.black, linewidth=1, style=plot.style_line, transp=0) c=plot(Loline, title='Loline', color=color.black, linewidth=1, style=plot.style_line, transp=0) plot(jc, title='Jc', color=color.purple, linewidth=1, style=plot.style_line, transp=50) // col_1 = R > Hiline ? red:na col_2 = R < Loline ? green:na // fill(a, b, color=col_1,transp=0) fill(a, c, color=col_2,transp=0) // Symbols t01=input(title="Symbol1", type=input.string, defval="ALPACAUSDT") t02=input(title="Symbol2", type=input.string, defval="ALPHAUSDT") t03=input(title="Symbol3", type=input.string, defval="ARUSDT") t04=input(title="Symbol4", type=input.string, defval="BADGERUSDT") t05=input(title="Symbol5", type=input.string, defval="BAKEUSDT") t06=input(title="Symbol6", type=input.string, defval="ETHUSDT") t07=input(title="Symbol7", type=input.string, defval="COTIUSDT") t08=input(title="Symbol8", type=input.string, defval="BONDUSDT") t09=input(title="Symbol9", type=input.string, defval="BTCUSDT") t10=input(title="Symbol10", type=input.string, defval="CELRUSDT") t11=input(title="Symbol11", type=input.string, defval="CELOUSDT") t12=input(title="Symbol12", type=input.string, defval="CVCUSDT") t13=input(title="Symbol13", type=input.string, defval="DENTUSDT") t14=input(title="Symbol14", type=input.string, defval="DUSKUSDT") t15=input(title="Symbol15", type=input.string, defval="FLOWUSDT") t16=input(title="Symbol16", type=input.string, defval="GTOUSDT") t17=input(title="Symbol17", type=input.string, defval="KNCUSDT") t18=input(title="Symbol18", type=input.string, defval="LTCUSDT") t19=input(title="Symbol19", type=input.string, defval="MASKUSDT") t20=input(title="Symbol20", type=input.string, defval="NANOUSDT") t21=input(title="Symbol21", type=input.string, defval="NUUSDT") t22=input(title="Symbol22", type=input.string, defval="DOTUSDT") t23=input(title="Symbol23", type=input.string, defval="ATOMUSDT") t24=input(title="Symbol24", type=input.string, defval="PERLUSDT") t25=input(title="Symbol25", type=input.string, defval="REEFUSDT") t26=input(title="Symbol26", type=input.string, defval="RIFUSDT") t27=input(title="Symbol27", type=input.string, defval="RLCUSDT") t28=input(title="Symbol28", type=input.string, defval="SKLUSDT") t29=input(title="Symbol29", type=input.string, defval="STXUSDT") t30=input(title="Symbol30", type=input.string, defval="TORNUSDT") t31=input(title="Symbol31", type=input.string, defval="TROYUSDT") t32=input(title="Symbol32", type=input.string, defval="UMAUSDT") t33=input(title="Symbol33", type=input.string, defval="FTMUSDT") t34=input(title="Symbol34", type=input.string, defval="HBARUSDT") t35=input(title="Symbol35", type=input.string, defval="YFIUSDT") t36=input(title="Symbol36", type=input.string, defval="ZECUSDT") t37=input(title="Symbol37", type=input.string, defval="ZILUSDT") t38=input(title="Symbol38", type=input.string, defval="ICPUSDT") s01=tickerid(syminfo.prefix,t01) s02=tickerid(syminfo.prefix,t02) s03=tickerid(syminfo.prefix,t03) s04=tickerid(syminfo.prefix,t04) s05=tickerid(syminfo.prefix,t05) s06=tickerid(syminfo.prefix,t06) s07=tickerid(syminfo.prefix,t07) s08=tickerid(syminfo.prefix,t08) s09=tickerid(syminfo.prefix,t09) s10=tickerid(syminfo.prefix,t10) s11=tickerid(syminfo.prefix,t11) s12=tickerid(syminfo.prefix,t12) s13=tickerid(syminfo.prefix,t13) s14=tickerid(syminfo.prefix,t14) s15=tickerid(syminfo.prefix,t15) s16=tickerid(syminfo.prefix,t16) s17=tickerid(syminfo.prefix,t17) s18=tickerid(syminfo.prefix,t18) s19=tickerid(syminfo.prefix,t19) s20=tickerid(syminfo.prefix,t20) s21=tickerid(syminfo.prefix,t21) s22=tickerid(syminfo.prefix,t22) s23=tickerid(syminfo.prefix,t23) s24=tickerid(syminfo.prefix,t24) s25=tickerid(syminfo.prefix,t25) s26=tickerid(syminfo.prefix,t26) s27=tickerid(syminfo.prefix,t27) s28=tickerid(syminfo.prefix,t28) s29=tickerid(syminfo.prefix,t29) s30=tickerid(syminfo.prefix,t30) s31=tickerid(syminfo.prefix,t31) s32=tickerid(syminfo.prefix,t32) s33=tickerid(syminfo.prefix,t33) s34=tickerid(syminfo.prefix,t34) s35=tickerid(syminfo.prefix,t35) s36=tickerid(syminfo.prefix,t36) s37=tickerid(syminfo.prefix,t37) s38=tickerid(syminfo.prefix,t38) /////////////// // FUNCTIONS // // Screener Function screenerFunc() => R = (4 * RSILine + 3 * RSILine[1] + 2 * RSILine[2] + RSILine[3] ) / 10 // Value cond = (crossover(R,Loline) and R[2] < Loline and R[3] < Loline )or crossover(R,jc)or crossover(R,Hiline) // Condition [R, cond] // Rounding Function roundn(x, n) => mult = 1 if n != 0 for i = 1 to abs(n) mult := mult * 10 n >= 0 ? round(x * mult) / mult : round(x / mult) * mult /////////////////////////////////////// // Running Functions for all sybmols // [v01, c01] = security(s01, timeframe.period, screenerFunc()) [v02, c02] = security(s02, timeframe.period, screenerFunc()) [v03, c03] = security(s03, timeframe.period, screenerFunc()) [v04, c04] = security(s04, timeframe.period, screenerFunc()) [v05, c05] = security(s05, timeframe.period, screenerFunc()) [v06, c06] = security(s06, timeframe.period, screenerFunc()) [v07, c07] = security(s07, timeframe.period, screenerFunc()) [v08, c08] = security(s08, timeframe.period, screenerFunc()) [v09, c09] = security(s09, timeframe.period, screenerFunc()) [v10, c10] = security(s10, timeframe.period, screenerFunc()) [v11, c11] = security(s11, timeframe.period, screenerFunc()) [v12, c12] = security(s12, timeframe.period, screenerFunc()) [v13, c13] = security(s13, timeframe.period, screenerFunc()) [v14, c14] = security(s14, timeframe.period, screenerFunc()) [v15, c15] = security(s15, timeframe.period, screenerFunc()) [v16, c16] = security(s16, timeframe.period, screenerFunc()) [v17, c17] = security(s17, timeframe.period, screenerFunc()) [v18, c18] = security(s18, timeframe.period, screenerFunc()) [v19, c19] = security(s19, timeframe.period, screenerFunc()) [v20, c20] = security(s20, timeframe.period, screenerFunc()) [v21, c21] = security(s21, timeframe.period, screenerFunc()) [v22, c22] = security(s22, timeframe.period, screenerFunc()) [v23, c23] = security(s23, timeframe.period, screenerFunc()) [v24, c24] = security(s24, timeframe.period, screenerFunc()) [v25, c25] = security(s25, timeframe.period, screenerFunc()) [v26, c26] = security(s26, timeframe.period, screenerFunc()) [v27, c27] = security(s27, timeframe.period, screenerFunc()) [v28, c28] = security(s28, timeframe.period, screenerFunc()) [v29, c29] = security(s29, timeframe.period, screenerFunc()) [v30, c30] = security(s30, timeframe.period, screenerFunc()) [v31, c31] = security(s31, timeframe.period, screenerFunc()) [v32, c32] = security(s32, timeframe.period, screenerFunc()) [v33, c33] = security(s33, timeframe.period, screenerFunc()) [v34, c34] = security(s34, timeframe.period, screenerFunc()) [v35, c35] = security(s35, timeframe.period, screenerFunc()) [v36, c36] = security(s36, timeframe.period, screenerFunc()) [v37, c37] = security(s37, timeframe.period, screenerFunc()) [v38, c38] = security(s38, timeframe.period, screenerFunc()) //////////////////// // Screener label // scr_label = 'Screener:' scr_label := c01 ? scr_label + s01 + ' ' + tostring(roundn(v01, 3)) + '\n' : scr_label scr_label := c02 ? scr_label + s02 + ' ' + tostring(roundn(v02, 3)) + '\n' : scr_label scr_label := c03 ? scr_label + s03 + ' ' + tostring(roundn(v03, 3)) + '\n' : scr_label scr_label := c04 ? scr_label + s04 + ' ' + tostring(roundn(v04, 3)) + '\n' : scr_label scr_label := c05 ? scr_label + s05 + ' ' + tostring(roundn(v05, 3)) + '\n' : scr_label scr_label := c06 ? scr_label + s06 + ' ' + tostring(roundn(v06, 3)) + '\n' : scr_label scr_label := c07 ? scr_label + s07 + ' ' + tostring(roundn(v07, 3)) + '\n' : scr_label scr_label := c08 ? scr_label + s08 + ' ' + tostring(roundn(v08, 3)) + '\n' : scr_label scr_label := c09 ? scr_label + s09 + ' ' + tostring(roundn(v09, 3)) + '\n' : scr_label scr_label := c10 ? scr_label + s10 + ' ' + tostring(roundn(v10, 3)) + '\n' : scr_label scr_label := c11 ? scr_label + s11 + ' ' + tostring(roundn(v11, 3)) + '\n' : scr_label scr_label := c12 ? scr_label + s12 + ' ' + tostring(roundn(v12, 3)) + '\n' : scr_label scr_label := c13 ? scr_label + s13 + ' ' + tostring(roundn(v13, 3)) + '\n' : scr_label scr_label := c14 ? scr_label + s14 + ' ' + tostring(roundn(v14, 3)) + '\n' : scr_label scr_label := c15 ? scr_label + s15 + ' ' + tostring(roundn(v15, 3)) + '\n' : scr_label scr_label := c16 ? scr_label + s16 + ' ' + tostring(roundn(v16, 3)) + '\n' : scr_label scr_label := c17 ? scr_label + s17 + ' ' + tostring(roundn(v17, 3)) + '\n' : scr_label scr_label := c18 ? scr_label + s18 + ' ' + tostring(roundn(v18, 3)) + '\n' : scr_label scr_label := c19 ? scr_label + s19 + ' ' + tostring(roundn(v19, 3)) + '\n' : scr_label scr_label := c20 ? scr_label + s20 + ' ' + tostring(roundn(v20, 3)) + '\n' : scr_label scr_label := c21 ? scr_label + s21 + ' ' + tostring(roundn(v21, 3)) + '\n' : scr_label scr_label := c22 ? scr_label + s22 + ' ' + tostring(roundn(v22, 3)) + '\n' : scr_label scr_label := c23 ? scr_label + s23 + ' ' + tostring(roundn(v23, 3)) + '\n' : scr_label scr_label := c24 ? scr_label + s24 + ' ' + tostring(roundn(v24, 3)) + '\n' : scr_label scr_label := c25 ? scr_label + s25 + ' ' + tostring(roundn(v25, 3)) + '\n' : scr_label scr_label := c26 ? scr_label + s26 + ' ' + tostring(roundn(v26, 3)) + '\n' : scr_label scr_label := c27 ? scr_label + s27 + ' ' + tostring(roundn(v27, 3)) + '\n' : scr_label scr_label := c28 ? scr_label + s28 + ' ' + tostring(roundn(v28, 3)) + '\n' : scr_label scr_label := c29 ? scr_label + s29 + ' ' + tostring(roundn(v29, 3)) + '\n' : scr_label scr_label := c30 ? scr_label + s30 + ' ' + tostring(roundn(v30, 3)) + '\n' : scr_label scr_label := c31 ? scr_label + s31 + ' ' + tostring(roundn(v31, 3)) + '\n' : scr_label scr_label := c32 ? scr_label + s32 + ' ' + tostring(roundn(v32, 3)) + '\n' : scr_label scr_label := c33 ? scr_label + s33 + ' ' + tostring(roundn(v33, 3)) + '\n' : scr_label scr_label := c34 ? scr_label + s34 + ' ' + tostring(roundn(v34, 3)) + '\n' : scr_label scr_label := c35 ? scr_label + s35 + ' ' + tostring(roundn(v35, 3)) + '\n' : scr_label scr_label := c36 ? scr_label + s36 + ' ' + tostring(roundn(v36, 3)) + '\n' : scr_label scr_label := c37 ? scr_label + s37 + ' ' + tostring(roundn(v37, 3)) + '\n' : scr_label scr_label := c38 ? scr_label + s38 + ' ' + tostring(roundn(v38, 3)) + '\n' : scr_label // Adding #telegram hashtag for alertatron scr_label := scr_label + "\n #buy/sell" // Plot Label showscr = input(true, title="Show Screener Label") posX_scr = input(0, title="Pos. Label x-axis") posY_scr = input(0, title="Pos. Size Label y-axis") colinput = input(title="Label Color", defval="Blue", options=["White", "Black", "Red", "Green", "Yellow", "Blue"]) col = color.gray f_colorscr (_valscr ) => _valscr ? #00000000 : na f_printscr (_txtscr ) => var _lblscr = label(na), label.delete(_lblscr ), _lblscr := label.new( time + (time-time[1])*posX_scr , ohlc4[posY_scr], _txtscr , xloc.bar_time, yloc.price, f_colorscr ( showscr ), textcolor = showscr ? col : na, size = size.huge, style=label.style_label_down ) f_printscr ( scr_label + '\n') //////////////////// // Dummy strategy // longCondition = crossover(R,Loline) //and R[2] < Loline and R[3] < Loline if (longCondition) or crossover(R,jc) or crossover(R,Hiline) strategy.entry("My Long Entry Id", strategy.long) shortCondition = crossunder(R,Hiline)// and R[2] > Hiline and R[3] > Hiline if (shortCondition) or crossunder(R,jc) or crossunder(R,Loline) strategy.entry("My Short Entry Id", strategy.short)