├── ArrayDerslleri ├── ChoppyMarketIndex ├── CokluIndicator.txt ├── Correlations ├── GridSpotTradingSystem ├── HighLow ├── ICH2Sistem ├── KAMA ├── KAMAKanal ├── KAMA_Tarama ├── KeltnerChannelStrategy ├── LogicTrend ├── MG Hisse Tarama V1 ├── MOTTSistem ├── MeanReversalPortfolio ├── Murrey Math Lines ├── PivotBandStrategy ├── SixIndicatorStrategy ├── VWAP Weekly ├── VeriTablosu ├── VeriTablosu2 ├── YKUT ├── YigitBoxPHL2 └── oGun /ArrayDerslleri: -------------------------------------------------------------------------------- 1 | // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | indicator("Array Desrleri", overlay = true) 6 | 7 | // Array tanımı, kappanış değerlerini array'e almak için 8 | var float[] arr = array.new_float() 9 | // Tüm barların 'close' değerlerini diziye alıyoruz 10 | array.push(arr, close) 11 | // label için array tanımlıyoruz 12 | var label[] tablo = array.new_label() 13 | if bar_index > 1 14 | array.push(tablo,label.new(bar_index, high, textalign = text.align_right, text = "prevClose: " + str.tostring(array.get(arr, bar_index - 1), format.mintick) + "\n" + "thisClose: " + str.tostring(array.get(arr, bar_index), format.mintick), size = size.normal,color = array.get(arr, bar_index) > array.get(arr, bar_index - 1) ? color.new(color.green, 0) : color.new(color.red, 0))) 15 | if array.size(tablo) > 1 16 | label.delete(array.shift(tablo)) 17 | 18 | ema1 = ta.ema(array.get(arr, bar_index), 5) 19 | ema2 = ta.ema(array.get(arr, bar_index), 34) 20 | var label[] cross = array.new_label() 21 | if ta.crossover(ema1, ema2) 22 | array.push(cross, label.new(bar_index, low, text = "Al", style = label.style_label_up, size = size.small, color = color.new(color.lime, 50), textcolor = color.new(color.white, 0))) 23 | if ta.crossover(ema2, ema1) 24 | array.push(cross, label.new(bar_index, low, text = "Sat", style = label.style_label_down, size = size.small, color = color.new(color.red, 50), textcolor = color.new(color.white, 0))) 25 | 26 | plot(ema1, color = color.lime) 27 | plot(ema2, color = color.red) 28 | -------------------------------------------------------------------------------- /ChoppyMarketIndex: -------------------------------------------------------------------------------- 1 | // This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=6 5 | strategy("Choppy Market Index [erolmutlu]", overlay = false) 6 | periyot = input.int(60, "Periyot") 7 | maperiyot = input.int(10, "Periyot") 8 | momperiyot = input.int(20, "Periyot") 9 | denom = ta.highest(high, periyot) - ta.lowest(low, periyot) 10 | num = math.abs(close[periyot] - close) 11 | marketIndex = num / denom * 100 12 | sma = ta.sma(marketIndex, maperiyot) 13 | mom = close - close[momperiyot] 14 | plot(marketIndex, style = plot.style_line, color = color.new(color.green, 0)) 15 | plot(ta.sma(marketIndex, 10)) 16 | hline(40) 17 | hline(50) 18 | hline(60) 19 | 20 | if sma > 60 and mom > 0 21 | strategy.entry("A", strategy.long) 22 | if sma < 40 and mom < 0 23 | strategy.entry("S", strategy.short) 24 | -------------------------------------------------------------------------------- /CokluIndicator.txt: -------------------------------------------------------------------------------- 1 | //@version=5 2 | indicator(title="Multi Indicator Stats", shorttitle="MultiStat", timeframe="", timeframe_gaps=true) 3 | //Bollinger Bands 4 | length = input.int(20, minval=1) 5 | src = input(close, title="Source") 6 | mult = input.float(2.0, minval=0.001, maxval=50, title="StdDev") 7 | basis = ta.sma(src, length) 8 | dev = mult * ta.stdev(src, length) 9 | upper = basis + dev 10 | lower = basis - dev 11 | offset = input.int(0, "Offset", minval = -500, maxval = 500) 12 | //plot(basis, "Basis", color=#FF6D00, offset = offset) 13 | //p1 = plot(upper, "Upper", color=#2962FF, offset = offset) 14 | //p2 = plot(lower, "Lower", color=#2962FF, offset = offset) 15 | 16 | //IFTCCV2 17 | ccilength=input(5, "CCI Length") 18 | wmalength=input(9, title="Smoothing length") 19 | v13=0.1*(ta.cci(close, ccilength)/4) 20 | v23=ta.wma(v13, wmalength) 21 | INVCCIV2=(math.exp(2*v23)-1)/(math.exp(2*v23)+1) 22 | //plot(INVCCIV2, color=color.red, linewidth=2, title="CCI") 23 | 24 | //RSI 25 | rsiLengthInput = input.int(14, minval=1, title="RSI Length", group="RSI Settings") 26 | rsiSourceInput = input.source(close, "RSI Source", group="RSI Settings") 27 | up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput) 28 | down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput) 29 | rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down)) 30 | //plot(rsi, "RSI", color=#7E57C2) 31 | 32 | //MACD 33 | fast_length = input(title="Fast Length", defval=12) 34 | slow_length = input(title="Slow Length", defval=26) 35 | macdSourceInput = input(title="MacD Source", defval=close) 36 | signal_length = input.int(title="Signal Smoothing", minval = 1, maxval = 50, defval = 9) 37 | sma_source = input.string(title="Oscillator MA Type", defval="EMA", options=["SMA", "EMA"]) 38 | sma_signal = input.string(title="Signal Line MA Type", defval="EMA", options=["SMA", "EMA"]) 39 | // Calculating 40 | fast_ma = sma_source == "SMA" ? ta.sma(macdSourceInput, fast_length) : ta.ema(macdSourceInput, fast_length) 41 | slow_ma = sma_source == "SMA" ? ta.sma(macdSourceInput, slow_length) : ta.ema(macdSourceInput, slow_length) 42 | macd = fast_ma - slow_ma 43 | signal = sma_signal == "SMA" ? ta.sma(macd, signal_length) : ta.ema(macd, signal_length) 44 | hist = macd - signal 45 | // Plot colors 46 | col_macd = input(#2962FF, "MACD Line  ", group="Color Settings", inline="MACD") 47 | col_signal = input(#FF6D00, "Signal Line  ", group="Color Settings", inline="Signal") 48 | col_grow_above = input(#26A69A, "Above   Grow", group="Histogram", inline="Above") 49 | col_fall_above = input(#B2DFDB, "Fall", group="Histogram", inline="Above") 50 | col_grow_below = input(#FFCDD2, "Below Grow", group="Histogram", inline="Below") 51 | col_fall_below = input(#FF5252, "Fall", group="Histogram", inline="Below") 52 | //hline(0, "Zero Line", color=color.new(#787B86, 50)) 53 | //plot(hist, title="Histogram", style=plot.style_columns, color=(hist>=0 ? (hist[1] < hist ? col_grow_above : col_fall_above) : (hist[1] < hist ? col_grow_below : col_fall_below))) 54 | //plot(macd, title="MACD", color=col_macd) 55 | //plot(signal, title="Signal", color=col_signal) 56 | 57 | //Stoch RSI 58 | smoothK = input.int(3, "K", minval=1) 59 | smoothD = input.int(3, "D", minval=1) 60 | lengthRSI = input.int(14, "RSI Length", minval=1) 61 | lengthStoch = input.int(14, "Stochastic Length", minval=1) 62 | stochSourceInput = input(close, title="RSI Source") 63 | rsi1 = ta.rsi(stochSourceInput, lengthRSI) 64 | k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK) 65 | d = ta.sma(k, smoothD) 66 | //plot(k, "K", color=#2962FF) 67 | //plot(d, "D", color=#FF6D00) 68 | //h0 = hline(80, "Upper Band", color=#787B86) 69 | //hline(50, "Middle Band", color=color.new(#787B86, 50)) 70 | //h1 = hline(20, "Lower Band", color=#787B86) 71 | //fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Background") 72 | 73 | //WaveTrend 74 | n1 = input(10, "Channel Length") 75 | n2 = input(21, "Average Length") 76 | obLevel1 = input(60, "Over Bought Level 1") 77 | obLevel2 = input(53, "Over Bought Level 2") 78 | osLevel1 = input(-60, "Over Sold Level 1") 79 | osLevel2 = input(-53, "Over Sold Level 2") 80 | 81 | ap = hlc3 82 | esa = ta.ema(ap, n1) 83 | d2 = ta.ema(math.abs(ap - esa), n1) 84 | ci = (ap - esa) / (0.015 * d2) 85 | tci = ta.ema(ci, n2) 86 | 87 | wt1 = tci 88 | wt2 = ta.sma(wt1,4) 89 | 90 | //plot(0, color=color.gray) 91 | //plot(obLevel1, color=color.red) 92 | //plot(osLevel1, color=color.green) 93 | //plot(obLevel2, color=color.red) 94 | //plot(osLevel2, color=color.green) 95 | 96 | //plot(wt1, color=color.green) 97 | //plot(wt2, color=color.red) 98 | //plot(wt1-wt2, color=color.blue, style=area, transp=80) 99 | //plot(crossover(wt1, wt2) ? wt2 : na, color = color.black , style = circles, linewidth = 3) 100 | //plot(crossover(wt1, wt2) ? wt2 : na, color = (wt2 - wt1 > 0 ? red : lime) , style = circles, linewidth = 2) 101 | //barcolor(cross(wt1, wt2) ? (wt2 - wt1 > 0 ? aqua : yellow) : na) 102 | 103 | // close < lower and rsi < 20 or rsi < 30 and fast_ma > slow_ma and macd > signal and k > d and wt1 > wt2 104 | bullish = INVCCIV2 > 0.5 105 | plot(10, "BB", color=basis < close ? color.lime: color.red, linewidth = 10) 106 | plot(9, "RSI", color=rsi > 40 ? color.lime: color.red, linewidth = 10) 107 | plot(8, "MACD", color=fast_ma > slow_ma ? color.lime: color.red, linewidth = 10) 108 | plot(7, "StochRSI", color=k > d ? color.lime: color.red, linewidth = 10) 109 | plot(6, "WT", color=wt1 > wt2 ? color.lime: color.red, linewidth = 10) 110 | plot(5, "INVCCIV2", color=INVCCIV2 > 0.5 ? color.lime: color.red, linewidth = 10) -------------------------------------------------------------------------------- /Correlations: -------------------------------------------------------------------------------- 1 | // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=6 5 | indicator("Correlations [erolmutlu]", overlay = false, precision = 2) 6 | Len = input.int(14, "Periyot") 7 | symbol = input.symbol('BINANCE:BTCUSDT', "Corr. Symbol") 8 | Data1 = close 9 | Data2 = request.security(symbol, timeframe.period, close) 10 | var Corr = 0.0 11 | if Len > 0 12 | Var0 = 0.0 13 | for i = 0 to Len - 1 14 | Cond1 = (Data1[i] >= Data1[i + 1] and Data2[i] >= Data2[i + 1]) or (Data1[i] < Data1[i + 1] and Data2[i] < Data2[i + 1]) 15 | if Cond1 == true 16 | Var0 := Var0 + 1 17 | Corr := 2 * Var0 / Len - 1 18 | else 19 | Corr := -2 20 | plot(Corr) 21 | plot(0.7, title = "Pos. Corr." ,color = color.new(color.gray, 0)) 22 | plot(-0.7, title = "Neg. Corr." ,color = color.new(color.gray, 0)) 23 | -------------------------------------------------------------------------------- /GridSpotTradingSystem: -------------------------------------------------------------------------------- 1 | // @erolmutlu Grid Spot 2 | //@version=5 3 | strategy(title = 'Grid Spot Sistemi', 4 | overlay = true, 5 | calc_on_every_tick = true, 6 | initial_capital = 10000, 7 | commission_type = strategy.commission.percent, 8 | commission_value = 0.03, 9 | pyramiding = 100, 10 | default_qty_type = strategy.percent_of_equity, 11 | process_orders_on_close = true, 12 | close_entries_rule = 'ANY') 13 | 14 | //--------------------------------------------------------------- 15 | 16 | startDate = input.int(title="START DAY DATE", 17 | defval=1, minval=1, maxval=31, 18 | group = '1. DATE RANGE: Select the date range for backtesting', 19 | tooltip = "Enter the day of start backtesting.") 20 | startMonth = input.int(title="START MONTH", 21 | defval=1, minval=1, maxval=12, 22 | group = '1. DATE RANGE: Select the date range for backtesting', 23 | tooltip = "Enter the month of start backtesting.") 24 | startYear = input.int(title="START YEAR", 25 | defval=2018, minval=1800, maxval=2100, 26 | group = '1. DATE RANGE: Select the date range for backtesting', 27 | tooltip = "Enter the year of start backtesting.") 28 | 29 | endDate = input.int(title="END DAY DATE", 30 | defval=30, minval=1, maxval=31, 31 | group = '1. DATE RANGE: Select the date range for backtesting', 32 | tooltip = "Enter the day of end backtesting.") 33 | endMonth = input.int(title="END MONTH", 34 | defval=12, minval=1, maxval=12, 35 | group = '1. DATE RANGE: Select the date range for backtesting', 36 | tooltip = "Enter the month of end backtesting.") 37 | endYear = input.int(title="END YEAR", 38 | defval=2022, minval=1800, maxval=2100, 39 | group = '1. DATE RANGE: Select the date range for backtesting', 40 | tooltip = "Enter the year of end backtesting.") 41 | 42 | inDateRange = (time >= timestamp(syminfo.timezone, startYear, 43 | startMonth, startDate, 0, 0)) and 44 | (time < timestamp(syminfo.timezone, endYear, endMonth, endDate, 0, 0)) 45 | 46 | //--------------------------------------------------------------- 47 | 48 | PercentProfit = input.float(defval = 0.50, 49 | title = "GRID PERCENT VALUE", 50 | group = "2. GRID CUSTOM SETTING", 51 | tooltip = "This feature refers to the percentage value of each grid. The value you enter here will allow you to create your custom grid.", 52 | confirm = true) 53 | 54 | UpperLimit = input.price(defval = 0.00, 55 | title = 'TOP GRID POSITION', 56 | group = "2. GRID CUSTOM SETTING", 57 | confirm = true, 58 | tooltip = "This feature allows you to set the initial price level of your grid. Click on a price level to start.") 59 | 60 | feePerTrade = input.float(defval = 0.03, minval = 0.00, maxval = 100, 61 | title = "FEE PER TRADE", 62 | group = "2. GRID CUSTOM SETTING", 63 | tooltip = "Set the commission cost your broker charges you for each trade.", 64 | confirm = true) 65 | 66 | //--------------------------------------------------------------- 67 | 68 | x1 = (100 - (PercentProfit * 1)) / 100 69 | x2 = (100 - (PercentProfit * 2)) / 100 70 | x3 = (100 - (PercentProfit * 3)) / 100 71 | x4 = (100 - (PercentProfit * 4)) / 100 72 | x5 = (100 - (PercentProfit * 5)) / 100 73 | x6 = (100 - (PercentProfit * 6)) / 100 74 | x7 = (100 - (PercentProfit * 7)) / 100 75 | x8 = (100 - (PercentProfit * 8)) / 100 76 | x9 = (100 - (PercentProfit * 9)) / 100 77 | x10 = (100 - (PercentProfit * 10)) / 100 78 | 79 | LowerLimit = UpperLimit * x10 80 | 81 | //--------------------------------------------------------------- 82 | 83 | Linea_A = float(UpperLimit * x1) 84 | Linea_B = float(UpperLimit * x2) 85 | Linea_C = float(UpperLimit * x3) 86 | Linea_D = float(UpperLimit * x4) 87 | Linea_50Percent = float(UpperLimit * x5) 88 | Linea_E = float(UpperLimit * x6) 89 | Linea_F = float(UpperLimit * x7) 90 | Linea_G = float(UpperLimit * x8) 91 | Linea_H = float(UpperLimit * x9) 92 | 93 | //--------------------------------------------------------------- 94 | 95 | Long1 = ta.crossunder(close, Linea_A) and inDateRange 96 | Long2 = ta.crossunder(close, Linea_B) and inDateRange 97 | Long3 = ta.crossunder(close, Linea_C) and inDateRange 98 | Long4 = ta.crossunder(close, Linea_D) and inDateRange 99 | Long5 = ta.crossunder(close, Linea_50Percent) and inDateRange 100 | Long6 = ta.crossunder(close, Linea_E) and inDateRange 101 | Long7 = ta.crossunder(close, Linea_F) and inDateRange 102 | Long8 = ta.crossunder(close, Linea_G) and inDateRange 103 | Long9 = ta.crossunder(close, Linea_H) and inDateRange 104 | Long10 = ta.crossunder(close, LowerLimit) and inDateRange 105 | 106 | //--------------------------------------------------------------- 107 | 108 | isExit1 = ta.crossover(close, UpperLimit) 109 | isExit2 = ta.crossover(close, Linea_A) 110 | isExit3 = ta.crossover(close, Linea_B) 111 | isExit4 = ta.crossover(close, Linea_C) 112 | isExit5 = ta.crossover(close, Linea_D) 113 | isExit6 = ta.crossover(close, Linea_50Percent) 114 | isExit7 = ta.crossover(close, Linea_E) 115 | isExit8 = ta.crossover(close, Linea_F) 116 | isExit9 = ta.crossover(close, Linea_G) 117 | isExit10 = ta.crossover(close, Linea_H) 118 | 119 | //--------------------------------------------------------------- 120 | 121 | plot(LowerLimit, color = color.purple, linewidth = 1) 122 | plot(UpperLimit, color = color.purple, linewidth = 1) 123 | 124 | plot(Linea_A, color = color.blue, linewidth = 1) 125 | plot(Linea_B, color = color.blue, linewidth = 1) 126 | plot(Linea_C, color = color.blue, linewidth = 1) 127 | plot(Linea_D, color = color.blue, linewidth = 1) 128 | plot(Linea_50Percent, color = color.blue, linewidth = 1) 129 | plot(Linea_E, color = color.blue, linewidth = 1) 130 | plot(Linea_F, color = color.blue, linewidth = 1) 131 | plot(Linea_G, color = color.blue, linewidth = 1) 132 | plot(Linea_H, color = color.blue, linewidth = 1) 133 | 134 | //--------------------------------------------------------------- 135 | 136 | fill(plot(UpperLimit), 137 | plot(Linea_A), 138 | color = color.new(color.purple, 90)) 139 | fill(plot(Linea_A), 140 | plot(Linea_B), 141 | color = color.new(color.purple, 85)) 142 | fill(plot(Linea_B), 143 | plot(Linea_C), 144 | color = color.new(color.purple, 80)) 145 | fill(plot(Linea_C), 146 | plot(Linea_D), 147 | color = color.new(color.purple, 70)) 148 | fill(plot(Linea_D), 149 | plot(Linea_50Percent), 150 | color = color.new(color.purple, 60)) 151 | fill(plot(Linea_50Percent), 152 | plot(Linea_E), 153 | color = color.new(color.purple, 60)) 154 | fill(plot(Linea_E), 155 | plot(Linea_F), 156 | color = color.new(color.purple, 70)) 157 | fill(plot(Linea_F), 158 | plot(Linea_G), 159 | color = color.new(color.purple, 80)) 160 | fill(plot(Linea_G), 161 | plot(Linea_H), 162 | color = color.new(color.purple, 85)) 163 | fill(plot(Linea_H), 164 | plot(LowerLimit), 165 | color = color.new(color.purple, 90)) 166 | 167 | //--------------------------------------------------------------- 168 | 169 | if Long1 170 | strategy.entry(id = "LONG1", 171 | direction = strategy.long, 172 | qty = 1) 173 | if isExit1 174 | strategy.exit(id = "EXIT1", 175 | from_entry = "LONG1", 176 | qty = 100, 177 | stop = UpperLimit, 178 | profit = UpperLimit) 179 | 180 | if Long2 181 | strategy.entry(id = "LONG2", 182 | direction = strategy.long, 183 | qty = 1) 184 | if isExit2 185 | strategy.exit(id = "EXIT2", 186 | from_entry = "LONG2", 187 | qty = 100, 188 | stop = Linea_A, 189 | limit = Linea_A) 190 | 191 | if Long3 192 | strategy.entry(id = "LONG3", 193 | direction = strategy.long, 194 | qty = 1) 195 | if isExit3 196 | strategy.exit(id = "EXIT3", 197 | from_entry = "LONG3", 198 | qty = 100, 199 | stop = Linea_B, 200 | limit = Linea_B) 201 | 202 | if Long4 203 | strategy.entry(id = "LONG4", 204 | direction = strategy.long, 205 | qty = 1) 206 | if isExit4 207 | strategy.exit(id = "EXIT4", 208 | from_entry = "LONG4", 209 | qty = 100, 210 | stop = Linea_C, 211 | limit = Linea_C) 212 | 213 | if Long5 214 | strategy.entry(id = "LONG5", 215 | direction = strategy.long, 216 | qty = 1) 217 | if isExit5 218 | strategy.exit(id = "EXIT5", 219 | from_entry = "LONG5", 220 | qty = 100, 221 | stop = Linea_D, 222 | limit = Linea_D) 223 | 224 | if Long6 225 | strategy.entry(id = "LONG6", 226 | direction = strategy.long, 227 | qty = 1) 228 | if isExit6 229 | strategy.exit(id = "EXIT6", 230 | from_entry = "LONG6", 231 | qty = 100, 232 | stop = Linea_50Percent, 233 | limit = Linea_50Percent) 234 | 235 | if Long7 236 | strategy.entry(id = "LONG7", 237 | direction = strategy.long, 238 | qty = 1) 239 | if isExit7 240 | strategy.exit(id = "EXIT7", 241 | from_entry = "LONG7", 242 | qty = 100, 243 | stop = Linea_E, 244 | limit = Linea_E) 245 | 246 | if Long8 247 | strategy.entry(id = "LONG8", 248 | direction = strategy.long, 249 | qty = 1) 250 | if isExit8 251 | strategy.exit(id = "EXIT8", 252 | from_entry = "LONG8", 253 | qty = 100, 254 | stop = Linea_F, 255 | limit = Linea_F) 256 | 257 | if Long9 258 | strategy.entry(id = "LONG9", 259 | direction = strategy.long, 260 | qty = 1) 261 | if isExit9 262 | strategy.exit(id = "EXIT9", 263 | from_entry = "LONG9", 264 | qty = 100, 265 | stop = Linea_G, 266 | limit = Linea_G) 267 | 268 | if Long10 269 | strategy.entry(id = "LONG10", 270 | direction = strategy.long, 271 | qty = 1) 272 | if isExit10 273 | strategy.exit(id = "EXIT10", 274 | from_entry = "LONG10", 275 | qty = 100, 276 | stop = Linea_H, 277 | limit = Linea_H) 278 | 279 | //--------------------------------------------------------------- 280 | 281 | trades = int(strategy.closedtrades) 282 | initialCapital = float(strategy.initial_capital) 283 | grossReturn = trades * PercentProfit 284 | gainCapital = (initialCapital * grossReturn) / 100 285 | totalCapital = initialCapital + gainCapital 286 | feeCost = (totalCapital * feePerTrade) / 100 287 | totalFeeCost = feeCost * trades 288 | netCapital = totalCapital - totalFeeCost - initialCapital 289 | 290 | //--------------------------------------------------------------- 291 | 292 | i_position = input.string(defval = "Bottom Right", 293 | title = "Table Placement", 294 | options = ["Top Right", "Middle Right", "Bottom Right"], 295 | group = "3. Table Characteristics") 296 | 297 | position = i_position == "Top Right" ? position.top_right : i_position == "Middle Right" ? position.middle_right : position.bottom_right 298 | 299 | i_w = input.int(title = "Width", 300 | defval = 6, 301 | group = "3. Table Characteristics") 302 | i_h = input.int(title = "Height", 303 | defval = 2, 304 | group = "3. Table Characteristics") 305 | i_text_size = input(title = "Text Size", 306 | defval = "Small") 307 | 308 | text_size = i_text_size == "Normal" ? size.normal : i_text_size == "Auto" ? size.auto : i_text_size == "Auto" ? size.auto : i_text_size == "Tiny" ? size.tiny 309 | : i_text_size == "Small" ? size.small : i_text_size == "Large" ? size.large : size.huge 310 | 311 | i = input.bool(title = "1. Capital", 312 | defval = true, 313 | group = "4. Enable Rows", 314 | tooltip = "Initial capital of the strategy.") 315 | 316 | i_1 = input.bool(title = "2. Gross Returns", 317 | defval = true, 318 | group = "4. Enable Rows", 319 | tooltip = "Total strategy return. Contains the initial capital plus the sum of the gains.") 320 | 321 | i_2 = input.bool(title = "3. Gain Percent", 322 | defval = true, 323 | group = "4. Enable Rows", 324 | tooltip = "Percentage return of strategy gains.") 325 | 326 | i_3 = input.bool(title = "4. Commission Cost", 327 | defval = true, 328 | group = "4. Enable Rows", 329 | tooltip = "Percentage return of strategy gains.") 330 | 331 | i_4 = input.bool(title = "5. Net Returns", 332 | defval = true, 333 | group = "4. Enable Rows", 334 | tooltip = "Total commission cost.") 335 | 336 | i_5 = input.bool(title = "6. Closed Trades", 337 | defval = true, 338 | group = "4. Enable Rows", 339 | tooltip = "Total trades.") 340 | 341 | 342 | var table perfTable = table.new(position, 2, 11, frame_color = color.purple, frame_width = 1, border_width = 1) 343 | 344 | //--------------------------------------------------------------- 345 | 346 | if i 347 | table.cell(perfTable, 0, 0, "1. GROSS RETURN", 348 | bgcolor = color.new(color.purple, 90), 349 | text_color = color.new(color.white, 0), 350 | width = i_w, 351 | height = i_h, 352 | text_size = text_size, 353 | text_halign = text.align_left) 354 | if i 355 | table.cell(perfTable, 1, 0, 356 | text = str.tostring(totalCapital) + " $", 357 | bgcolor = color.new(color.purple, 90), 358 | text_color = color.new(color.white, 0), 359 | width = i_w, 360 | height = i_h, 361 | text_size = text_size) 362 | 363 | if i_1 364 | table.cell(perfTable, 0, 1, "2. INITIAL CAPITAL", 365 | bgcolor = color.new(color.purple, 90), 366 | text_color = color.new(color.white, 0), 367 | width = i_w, 368 | height = i_h, 369 | text_size = text_size, 370 | text_halign = text.align_left) 371 | if i_1 372 | table.cell(perfTable, 1, 1, text = str.tostring(initialCapital) + " $", 373 | bgcolor = color.new(color.purple, 90), 374 | text_color = color.new(color.white, 0), 375 | width = i_w, 376 | height = i_h, 377 | text_size = text_size) 378 | 379 | if i_2 380 | table.cell(perfTable, 0, 2, "3. GAIN", 381 | bgcolor = color.new(color.purple, 90), 382 | text_color = color.new(color.white, 0), 383 | width = i_w, 384 | height = i_h, 385 | text_size = text_size, 386 | text_halign = text.align_left) 387 | if i_2 388 | table.cell(perfTable, 1, 2, 389 | text = str.tostring(grossReturn) + " %", 390 | bgcolor = color.new(color.purple, 90), 391 | text_color = color.new(color.white, 0), 392 | width = i_w, 393 | height = i_h, 394 | text_size = text_size) 395 | 396 | if i_3 397 | table.cell(perfTable, 0, 3, "4. FEE COST", 398 | bgcolor = color.new(color.purple, 90), 399 | text_color = color.new(color.white, 0), 400 | width = i_w, 401 | height = i_h, 402 | text_size = text_size, 403 | text_halign = text.align_left) 404 | if i_3 405 | table.cell(perfTable, 1, 3, 406 | text = str.tostring(totalFeeCost) + " $", 407 | bgcolor = color.new(color.purple, 90), 408 | text_color = color.new(color.white, 0), 409 | width = i_w, 410 | height = i_h, 411 | text_size = text_size) 412 | 413 | if i_4 414 | table.cell(perfTable, 0, 4, "5. NET RETURN", 415 | bgcolor = color.new(color.purple, 90), 416 | text_color = color.new(color.white, 0), 417 | width = i_w, 418 | height = i_h, 419 | text_size = text_size, 420 | text_halign = text.align_left) 421 | if i_4 422 | table.cell(perfTable, 1, 4, 423 | text = str.tostring(netCapital) + " $", 424 | bgcolor = color.new(color.purple, 90), 425 | text_color = color.new(color.white, 0), 426 | width = i_w, 427 | height = i_h, 428 | text_size = text_size) 429 | 430 | if i_5 431 | table.cell(perfTable, 0, 6, "6. CLOSED TRADES", 432 | bgcolor = color.new(color.purple, 90), 433 | text_color = color.new(color.white, 0), 434 | width = i_w, 435 | height = i_h, 436 | text_size = text_size, 437 | text_halign = text.align_left) 438 | if i_5 439 | table.cell(perfTable, 1, 6, 440 | text = str.tostring(trades), 441 | bgcolor = color.new(color.purple, 90), 442 | text_color = color.new(color.white, 0), 443 | width = i_w, 444 | height = i_h, 445 | text_size = text_size) 446 | 447 | //--------------------------------------------------------------- 448 | -------------------------------------------------------------------------------- /HighLow: -------------------------------------------------------------------------------- 1 | // This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=6 5 | indicator("HighLow [erolmutlu]", overlay = true) 6 | 7 | isHL(mode) => 8 | ret = mode == 1 ? high[4] < high[2] and high[3] <= high[2] and high[2] >= high[1] and high[2] > high[0] : 9 | mode == -1 ? low[4] > low[2] and low[3] >= low[2] and low[2] <= low[1] and low[2] < low[0] : false 10 | 11 | valuewhen_H0 = ta.valuewhen(isHL(1) == true, high[2], 0) 12 | valuewhen_H1 = ta.valuewhen(isHL(1) == true, high[2], 1) 13 | valuewhen_H2 = ta.valuewhen(isHL(1) == true, high[2], 2) 14 | higherhigh = isHL(1) == false ? false : valuewhen_H1 < valuewhen_H0 and valuewhen_H2 < valuewhen_H0 15 | lowerhigh = isHL(1) == false ? false : valuewhen_H1 > valuewhen_H0 and valuewhen_H2 > valuewhen_H0 16 | valuewhen_L0 = ta.valuewhen(isHL(-1) == true, low[2], 0) 17 | valuewhen_L1 = ta.valuewhen(isHL(-1) == true, low[2], 1) 18 | valuewhen_L2 = ta.valuewhen(isHL(-1) == true, low[2], 2) 19 | higherlow = isHL(-1) == false ? false : valuewhen_L1 < valuewhen_L0 and valuewhen_L2 < valuewhen_L0 20 | lowerlow = isHL(-1) == false ? false : valuewhen_L1 > valuewhen_L0 and valuewhen_L2 > valuewhen_L0 21 | 22 | plotshape(higherhigh, title='Higher High', style=shape.square, location=location.abovebar, color=color.red, text="[HH]", textcolor = color.red, offset=-2) 23 | plotshape(lowerhigh, title='Lower High', style=shape.square, location=location.abovebar, color=color.red, text="[LH]", textcolor = color.red, offset=-2) 24 | plotshape(higherlow, title='High Low', style=shape.square, location=location.belowbar, color=color.green, text="[HL]", textcolor = color.green, offset=-2) 25 | plotshape(lowerlow, title='Lower Low', style=shape.square, location=location.belowbar, color=color.green, text="[LL]", textcolor = color.green, offset=-2) 26 | -------------------------------------------------------------------------------- /ICH2Sistem: -------------------------------------------------------------------------------- 1 | // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | strategy("ICH2Sistem", overlay=true, default_qty_value = 1, initial_capital = 0) 6 | 7 | grafik = input(title='Grafik On/Off ?', defval=true, group="Ichimoku Settings") 8 | getirigrafik = input(title='GetiriKZ On/Off ?', defval=true, group="Ichimoku Settings") 9 | conversionPeriods = input.int(9, minval=1, title="Conversion Line Length", group="Ichimoku Settings") 10 | basePeriods = input.int(26, minval=1, title="Base Line Length", group="Ichimoku Settings") 11 | laggingSpan2Periods = input.int(52, minval=1, title="Lagging Span 2 Length", group="Ichimoku Settings") 12 | displacement = input.int(26, minval=1, title="Displacement", group="Ichimoku Settings") 13 | 14 | donchian(len) => math.avg(ta.lowest(len), ta.highest(len)) 15 | 16 | tenkanSen = donchian(conversionPeriods) 17 | kijunSen = donchian(basePeriods) 18 | spanA = math.avg(tenkanSen, kijunSen) 19 | spanB = donchian(laggingSpan2Periods) 20 | 21 | 22 | if (tenkanSen > kijunSen and close > math.max(spanA[displacement], spanB[displacement]) and close > close[2 * displacement] and close > kijunSen) 23 | strategy.entry("Al", strategy.long) 24 | if (tenkanSen < kijunSen) 25 | strategy.close_all("Flat") 26 | if (close < math.min(spanA[displacement], spanB[displacement])) 27 | strategy.close_all("Flat") 28 | 29 | color barrenk = na 30 | if strategy.position_size > 0 31 | barrenk := color.lime 32 | else 33 | barrenk := color.new(color.gray, 50) 34 | 35 | barcolor(barrenk) 36 | plot(grafik ? tenkanSen:na, color=color.aqua, title="Conversion Line") 37 | plot(grafik ? kijunSen:na, color=color.red, title="Base Line") 38 | plot(grafik ? close:na, offset = -displacement, color=#43A047, title="Lagging Span") 39 | p1 = plot(grafik ? spanA:na, offset = displacement, color=#A5D6A7, 40 | title="Leading Span A") 41 | p2 = plot(grafik ? spanB : na, offset = displacement, color=#EF9A9A, 42 | title="Leading Span B") 43 | plot(grafik ? spanA > spanB ? spanA : spanB : na, offset = displacement, title = "Kumo Cloud Upper Line", display = display.none) 44 | plot(grafik ? spanA < spanB ? spanA : spanB : na, offset = displacement, title = "Kumo Cloud Lower Line", display = display.none) 45 | fill(p1, p2, color = spanA > spanB ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90)) 46 | 47 | plot(getirigrafik ? strategy.equity : na) 48 | -------------------------------------------------------------------------------- /KAMA: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | indicator("KAMA [erolmutlu]", overlay = true) 6 | P1 = input.int(21, "P1", step = 1, group = "Kama Settings") 7 | P2 = input.int(2, "P2", step = 1, group = "Kama Settings") 8 | P3 = input.int(30, "P3", step = 1, group = "Kama Settings") 9 | P4 = input.source(close, "Sources") 10 | xPrice = P4 11 | xvnoise = math.abs(xPrice - xPrice[1]) 12 | nAMA = 0.0 13 | nfastend = 2.0 / (P2 + 1.0) 14 | nslowend = 2.0 / (P3 + 1.0) 15 | nsignal = math.abs(xPrice - xPrice[P1]) 16 | nnoise = math.sum(xvnoise, P1) 17 | nefratio = nnoise != 0 ? nsignal / nnoise : 0 18 | nsmooth = math.pow(nefratio * (nfastend - nslowend) + nslowend, 2) 19 | nAMA := nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1])) 20 | plot(nAMA, color = color.aqua, linewidth = 1) 21 | -------------------------------------------------------------------------------- /KAMAKanal: -------------------------------------------------------------------------------- 1 | //@version=5 2 | indicator(title="KamaKanal", shorttitle="KamaKanal", overlay = true) 3 | P1 = input.int(21, minval=1) 4 | P2 = input.int(32, minval=1) 5 | xPrice = close 6 | xvnoise = math.abs(xPrice - xPrice[1]) 7 | nAMA = 0.0 8 | nfastend = 0.666 9 | nslowend = 0.0645 10 | nsignal = math.abs(xPrice - xPrice[P1]) 11 | nnoise = math.sum(xvnoise, P1) 12 | nefratio = nnoise != 0 ? nsignal / nnoise : 0 13 | nsmooth = math.pow(nefratio * (nfastend - nslowend) + nslowend, 2) 14 | nAMA := nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1])) 15 | //Kanal Ayarları 16 | max = ta.highest(nAMA, P2) 17 | min = ta.lowest(nAMA, P2) 18 | //range = max - min 19 | flup = min + (80 * (max-min) / 100.0) 20 | fldn = min + (20 * (max-min) / 100.0) 21 | flmi = min + (50 * (max-min) / 100.0) 22 | clr=(nAMA > flup) ? color.green : (nAMA < fldn) ? color.red : color.gray 23 | plot(nAMA, color=clr, title="KAMA", linewidth=2) 24 | plot(flup, color=color.green, title="flup") 25 | plot(fldn, color=color.red, title="fldn") 26 | plot(flmi, color=color.gray, title="flmi") 27 | -------------------------------------------------------------------------------- /KAMA_Tarama: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // Author: ©eerolmutlu 3 | 4 | //@version=5 5 | indicator("EMTradeVKAMA Tarama [BIST]", overlay=true) 6 | 7 | //************************************************************************************************************ 8 | // Parameter 9 | //************************************************************************************************************ 10 | 11 | screenSet = input.bool(false, "═════════ Tarama Ayarları ════════") 12 | lastBarSet = input.bool(true, "Sinyal Bar Kapanış ile") 13 | tabloaltUst = input.string(title="Tablo Pozisyonu", defval="SagUst", options=["SagAlt", "SagUst", "SolAlt", "SolUst", "OrtaAlt", "OrtaUst"]) 14 | custom_tf = input.timeframe("", title="Tarama için Periyot") 15 | length = input.int(title="Length", defval=21, group = "Kama Ayarları") 16 | fastLength = input.int(title="Fast EMA Length", defval=2, group = "Kama Ayarları") 17 | slowLength = input.int(title="Slow EMA Length", defval=30, group = "Kama Ayarları") 18 | sources = input.source(close, "Sources") 19 | 20 | n1 = input.int(10, "Channel Length", group = "Wavetrend Ayarları") 21 | n2 = input.int(21, "Average Length", group = "Wavetrend Ayarları") 22 | 23 | screenList = input.bool(false, "═════════ Tarama yapılacak enstrumanlar ════════") 24 | asset_01 = input.symbol(title='Asset 01', defval='BIST:XU100') 25 | asset_02 = input.symbol(title='Asset 02', defval='BIST:AKBNK') 26 | asset_03 = input.symbol(title='Asset 03', defval='BIST:ALARK') 27 | asset_04 = input.symbol(title='Asset 04', defval='BIST:ARCLK') 28 | asset_05 = input.symbol(title='Asset 05', defval='BIST:ASELS') 29 | asset_06 = input.symbol(title='Asset 06', defval='BIST:ASTOR') 30 | asset_07 = input.symbol(title='Asset 07', defval='BIST:BIMAS') 31 | asset_08 = input.symbol(title='Asset 08', defval='BIST:EKGYO') 32 | asset_09 = input.symbol(title='Asset 09', defval='BIST:ENKAI') 33 | asset_10 = input.symbol(title='Asset 10', defval='BIST:EREGL') 34 | asset_11 = input.symbol(title='Asset 11', defval='BIST:FROTO') 35 | asset_12 = input.symbol(title='Asset 12', defval='BIST:GARAN') 36 | asset_13 = input.symbol(title='Asset 13', defval='BIST:GUBRF') 37 | asset_14 = input.symbol(title='Asset 14', defval='BIST:HEKTS') 38 | asset_15 = input.symbol(title='Asset 15', defval='BIST:ISCTR') 39 | asset_16 = input.symbol(title='Asset 16', defval='BIST:KCHOL') 40 | asset_17 = input.symbol(title='Asset 17', defval='BIST:KONTR') 41 | asset_18 = input.symbol(title='Asset 18', defval='BIST:KOZAL') 42 | asset_19 = input.symbol(title='Asset 19', defval='BIST:KRDMD') 43 | asset_20 = input.symbol(title='Asset 20', defval='BIST:ODAS') 44 | asset_21 = input.symbol(title='Asset 21', defval='BIST:OYAKC') 45 | asset_22 = input.symbol(title='Asset 22', defval='BIST:PETKM') 46 | asset_23 = input.symbol(title='Asset 23', defval='BIST:PGSUS') 47 | asset_24 = input.symbol(title='Asset 24', defval='BIST:SAHOL') 48 | asset_25 = input.symbol(title='Asset 25', defval='BIST:SASA') 49 | asset_26 = input.symbol(title='Asset 26', defval='BIST:SISE') 50 | asset_27 = input.symbol(title='Asset 27', defval='BIST:TCELL') 51 | asset_28 = input.symbol(title='Asset 28', defval='BIST:THYAO') 52 | asset_29 = input.symbol(title='Asset 29', defval='BIST:TOASO') 53 | asset_30 = input.symbol(title='Asset 30', defval='BIST:TUPRS') 54 | asset_31 = input.symbol(title='Asset 31', defval='BIST:YKBNK') 55 | asset_32 = input.symbol(title='Asset 32', defval='BIST:ALTIN') 56 | asset_33 = input.symbol(title='Asset 33', defval='BIST:GLDTR') 57 | asset_34 = input.symbol(title='Asset 34', defval='') 58 | asset_35 = input.symbol(title='Asset 35', defval='') 59 | asset_36 = input.symbol(title='Asset 36', defval='') 60 | asset_37 = input.symbol(title='Asset 37', defval='') 61 | asset_38 = input.symbol(title='Asset 38', defval='') 62 | asset_39 = input.symbol(title='Asset 39', defval='') 63 | asset_40 = input.symbol(title='Asset 40', defval='') 64 | 65 | //******************************************** 66 | // Indikatör Fonksiyonu 67 | //******************************************** 68 | screen_kama() => 69 | xPrice = sources 70 | xvnoise = math.abs(xPrice - xPrice[1]) 71 | nAMA = 0.0 72 | nfastend = 2.0 / (fastLength + 1.0) 73 | nslowend = 2.0 / (slowLength + 1.0) 74 | nsignal = math.abs(xPrice - xPrice[length]) 75 | nnoise = math.sum(xvnoise, length) 76 | nefratio = nnoise != 0 ? nsignal / nnoise : 0 77 | nsmooth = math.pow(nefratio * (nfastend - nslowend) + nslowend, 2) 78 | nAMA := nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1])) 79 | 80 | ap = hlc3 81 | esa = ta.ema(ap, n1) 82 | d = ta.ema(math.abs(ap - esa), n1) 83 | ci = (ap - esa) / (0.015 * d) 84 | tci = ta.ema(ci, n2) 85 | 86 | wt1 = tci 87 | wt2 = ta.sma(wt1,4) 88 | 89 | int condition = 0 90 | if (lastBarSet ? close[1] > nAMA[1] and ta.cross(wt1[1], wt2[1]) and wt2[1] - wt1[1] < 0 : close > nAMA and ta.cross(wt1, wt2) and wt2 - wt1 < 0) 91 | condition := 1 92 | if (lastBarSet ? close[1] < nAMA[1] and ta.cross(wt1[1], wt2[1]) and wt2[1] - wt1[1] > 0 : close < nAMA and ta.cross(wt1, wt2) and wt2 - wt1 > 0) 93 | condition := 2 94 | condition 95 | //******************************************** 96 | //Mevcut Entruman Indikatör gösterimi 97 | //******************************************** 98 | xPrice = sources 99 | xvnoise = math.abs(xPrice - xPrice[1]) 100 | nAMA = 0.0 101 | nfastend = 2.0 / (fastLength + 1.0) 102 | nslowend = 2.0 / (slowLength + 1.0) 103 | nsignal = math.abs(xPrice - xPrice[length]) 104 | nnoise = math.sum(xvnoise, length) 105 | nefratio = nnoise != 0 ? nsignal / nnoise : 0 106 | nsmooth = math.pow(nefratio * (nfastend - nslowend) + nslowend, 2) 107 | nAMA := nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1])) 108 | plot(nAMA) 109 | ap = hlc3 110 | esa = ta.ema(ap, n1) 111 | d = ta.ema(math.abs(ap - esa), n1) 112 | ci = (ap - esa) / (0.015 * d) 113 | tci = ta.ema(ci, n2) 114 | 115 | wt1 = tci 116 | wt2 = ta.sma(wt1,4) 117 | barcolor( ta.cross(wt1, wt2) ? (wt2 - wt1 > 0 and close < nAMA ? color.aqua : wt2 - wt1 < 0 and close > nAMA ? color.yellow : na) : na) 118 | //******************************************** 119 | //************************************************************************************************************ 120 | // Enstruman durumu { 121 | asset_01_status = asset_01 == '' ? 0 : request.security(asset_01, custom_tf, screen_kama()) 122 | asset_02_status = asset_02 == '' ? 0 : request.security(asset_02, custom_tf, screen_kama()) 123 | asset_03_status = asset_03 == '' ? 0 : request.security(asset_03, custom_tf, screen_kama()) 124 | asset_04_status = asset_04 == '' ? 0 : request.security(asset_04, custom_tf, screen_kama()) 125 | asset_05_status = asset_05 == '' ? 0 : request.security(asset_05, custom_tf, screen_kama()) 126 | asset_06_status = asset_06 == '' ? 0 : request.security(asset_06, custom_tf, screen_kama()) 127 | asset_07_status = asset_07 == '' ? 0 : request.security(asset_07, custom_tf, screen_kama()) 128 | asset_08_status = asset_08 == '' ? 0 : request.security(asset_08, custom_tf, screen_kama()) 129 | asset_09_status = asset_09 == '' ? 0 : request.security(asset_09, custom_tf, screen_kama()) 130 | asset_10_status = asset_10 == '' ? 0 : request.security(asset_10, custom_tf, screen_kama()) 131 | asset_11_status = asset_11 == '' ? 0 : request.security(asset_11, custom_tf, screen_kama()) 132 | asset_12_status = asset_12 == '' ? 0 : request.security(asset_12, custom_tf, screen_kama()) 133 | asset_13_status = asset_13 == '' ? 0 : request.security(asset_13, custom_tf, screen_kama()) 134 | asset_14_status = asset_14 == '' ? 0 : request.security(asset_14, custom_tf, screen_kama()) 135 | asset_15_status = asset_15 == '' ? 0 : request.security(asset_15, custom_tf, screen_kama()) 136 | asset_16_status = asset_16 == '' ? 0 : request.security(asset_16, custom_tf, screen_kama()) 137 | asset_17_status = asset_17 == '' ? 0 : request.security(asset_17, custom_tf, screen_kama()) 138 | asset_18_status = asset_18 == '' ? 0 : request.security(asset_18, custom_tf, screen_kama()) 139 | asset_19_status = asset_19 == '' ? 0 : request.security(asset_19, custom_tf, screen_kama()) 140 | asset_20_status = asset_20 == '' ? 0 : request.security(asset_20, custom_tf, screen_kama()) 141 | asset_21_status = asset_21 == '' ? 0 : request.security(asset_21, custom_tf, screen_kama()) 142 | asset_22_status = asset_22 == '' ? 0 : request.security(asset_22, custom_tf, screen_kama()) 143 | asset_23_status = asset_23 == '' ? 0 : request.security(asset_23, custom_tf, screen_kama()) 144 | asset_24_status = asset_24 == '' ? 0 : request.security(asset_24, custom_tf, screen_kama()) 145 | asset_25_status = asset_25 == '' ? 0 : request.security(asset_25, custom_tf, screen_kama()) 146 | asset_26_status = asset_26 == '' ? 0 : request.security(asset_26, custom_tf, screen_kama()) 147 | asset_27_status = asset_27 == '' ? 0 : request.security(asset_27, custom_tf, screen_kama()) 148 | asset_28_status = asset_28 == '' ? 0 : request.security(asset_28, custom_tf, screen_kama()) 149 | asset_29_status = asset_29 == '' ? 0 : request.security(asset_29, custom_tf, screen_kama()) 150 | asset_30_status = asset_30 == '' ? 0 : request.security(asset_30, custom_tf, screen_kama()) 151 | asset_31_status = asset_31 == '' ? 0 : request.security(asset_31, custom_tf, screen_kama()) 152 | asset_32_status = asset_32 == '' ? 0 : request.security(asset_32, custom_tf, screen_kama()) 153 | asset_33_status = asset_33 == '' ? 0 : request.security(asset_33, custom_tf, screen_kama()) 154 | asset_34_status = asset_34 == '' ? 0 : request.security(asset_34, custom_tf, screen_kama()) 155 | asset_35_status = asset_35 == '' ? 0 : request.security(asset_35, custom_tf, screen_kama()) 156 | asset_36_status = asset_36 == '' ? 0 : request.security(asset_36, custom_tf, screen_kama()) 157 | asset_37_status = asset_37 == '' ? 0 : request.security(asset_37, custom_tf, screen_kama()) 158 | asset_38_status = asset_38 == '' ? 0 : request.security(asset_38, custom_tf, screen_kama()) 159 | asset_39_status = asset_39 == '' ? 0 : request.security(asset_39, custom_tf, screen_kama()) 160 | asset_40_status = asset_40 == '' ? 0 : request.security(asset_40, custom_tf, screen_kama()) 161 | //} son 162 | // Al verenler { 163 | kama_up = "" 164 | kama_up := asset_01 != '' and asset_01_status == 1 ? kama_up + syminfo.ticker(asset_01) + "\n" : kama_up 165 | kama_up := asset_02 != '' and asset_02_status == 1 ? kama_up + syminfo.ticker(asset_02) + "\n" : kama_up 166 | kama_up := asset_03 != '' and asset_03_status == 1 ? kama_up + syminfo.ticker(asset_03) + "\n" : kama_up 167 | kama_up := asset_04 != '' and asset_04_status == 1 ? kama_up + syminfo.ticker(asset_04) + "\n" : kama_up 168 | kama_up := asset_05 != '' and asset_05_status == 1 ? kama_up + syminfo.ticker(asset_05) + "\n" : kama_up 169 | kama_up := asset_06 != '' and asset_06_status == 1 ? kama_up + syminfo.ticker(asset_06) + "\n" : kama_up 170 | kama_up := asset_07 != '' and asset_07_status == 1 ? kama_up + syminfo.ticker(asset_07) + "\n" : kama_up 171 | kama_up := asset_08 != '' and asset_08_status == 1 ? kama_up + syminfo.ticker(asset_08) + "\n" : kama_up 172 | kama_up := asset_09 != '' and asset_09_status == 1 ? kama_up + syminfo.ticker(asset_09) + "\n" : kama_up 173 | kama_up := asset_10 != '' and asset_10_status == 1 ? kama_up + syminfo.ticker(asset_10) + "\n" : kama_up 174 | kama_up := asset_11 != '' and asset_11_status == 1 ? kama_up + syminfo.ticker(asset_11) + "\n" : kama_up 175 | kama_up := asset_12 != '' and asset_12_status == 1 ? kama_up + syminfo.ticker(asset_12) + "\n" : kama_up 176 | kama_up := asset_13 != '' and asset_13_status == 1 ? kama_up + syminfo.ticker(asset_13) + "\n" : kama_up 177 | kama_up := asset_14 != '' and asset_14_status == 1 ? kama_up + syminfo.ticker(asset_14) + "\n" : kama_up 178 | kama_up := asset_15 != '' and asset_15_status == 1 ? kama_up + syminfo.ticker(asset_15) + "\n" : kama_up 179 | kama_up := asset_16 != '' and asset_16_status == 1 ? kama_up + syminfo.ticker(asset_16) + "\n" : kama_up 180 | kama_up := asset_17 != '' and asset_17_status == 1 ? kama_up + syminfo.ticker(asset_17) + "\n" : kama_up 181 | kama_up := asset_18 != '' and asset_18_status == 1 ? kama_up + syminfo.ticker(asset_18) + "\n" : kama_up 182 | kama_up := asset_19 != '' and asset_19_status == 1 ? kama_up + syminfo.ticker(asset_19) + "\n" : kama_up 183 | kama_up := asset_20 != '' and asset_20_status == 1 ? kama_up + syminfo.ticker(asset_20) + "\n" : kama_up 184 | kama_up := asset_21 != '' and asset_21_status == 1 ? kama_up + syminfo.ticker(asset_21) + "\n" : kama_up 185 | kama_up := asset_22 != '' and asset_22_status == 1 ? kama_up + syminfo.ticker(asset_22) + "\n" : kama_up 186 | kama_up := asset_23 != '' and asset_23_status == 1 ? kama_up + syminfo.ticker(asset_23) + "\n" : kama_up 187 | kama_up := asset_24 != '' and asset_24_status == 1 ? kama_up + syminfo.ticker(asset_24) + "\n" : kama_up 188 | kama_up := asset_25 != '' and asset_25_status == 1 ? kama_up + syminfo.ticker(asset_25) + "\n" : kama_up 189 | kama_up := asset_26 != '' and asset_26_status == 1 ? kama_up + syminfo.ticker(asset_26) + "\n" : kama_up 190 | kama_up := asset_27 != '' and asset_27_status == 1 ? kama_up + syminfo.ticker(asset_27) + "\n" : kama_up 191 | kama_up := asset_28 != '' and asset_28_status == 1 ? kama_up + syminfo.ticker(asset_28) + "\n" : kama_up 192 | kama_up := asset_29 != '' and asset_29_status == 1 ? kama_up + syminfo.ticker(asset_29) + "\n" : kama_up 193 | kama_up := asset_30 != '' and asset_30_status == 1 ? kama_up + syminfo.ticker(asset_30) + "\n" : kama_up 194 | kama_up := asset_31 != '' and asset_31_status == 1 ? kama_up + syminfo.ticker(asset_31) + "\n" : kama_up 195 | kama_up := asset_32 != '' and asset_32_status == 1 ? kama_up + syminfo.ticker(asset_32) + "\n" : kama_up 196 | kama_up := asset_33 != '' and asset_33_status == 1 ? kama_up + syminfo.ticker(asset_33) + "\n" : kama_up 197 | kama_up := asset_34 != '' and asset_34_status == 1 ? kama_up + syminfo.ticker(asset_34) + "\n" : kama_up 198 | kama_up := asset_35 != '' and asset_35_status == 1 ? kama_up + syminfo.ticker(asset_35) + "\n" : kama_up 199 | kama_up := asset_36 != '' and asset_36_status == 1 ? kama_up + syminfo.ticker(asset_36) + "\n" : kama_up 200 | kama_up := asset_37 != '' and asset_37_status == 1 ? kama_up + syminfo.ticker(asset_37) + "\n" : kama_up 201 | kama_up := asset_38 != '' and asset_38_status == 1 ? kama_up + syminfo.ticker(asset_38) + "\n" : kama_up 202 | kama_up := asset_39 != '' and asset_39_status == 1 ? kama_up + syminfo.ticker(asset_39) + "\n" : kama_up 203 | kama_up := asset_40 != '' and asset_40_status == 1 ? kama_up + syminfo.ticker(asset_40) + "\n" : kama_up 204 | //} son 205 | // Sat verenler { 206 | kama_dn = "" 207 | kama_dn := asset_01 != '' and asset_01_status == 2 ? kama_dn + syminfo.ticker(asset_01) + "\n" : kama_dn 208 | kama_dn := asset_02 != '' and asset_02_status == 2 ? kama_dn + syminfo.ticker(asset_02) + "\n" : kama_dn 209 | kama_dn := asset_03 != '' and asset_03_status == 2 ? kama_dn + syminfo.ticker(asset_03) + "\n" : kama_dn 210 | kama_dn := asset_04 != '' and asset_04_status == 2 ? kama_dn + syminfo.ticker(asset_04) + "\n" : kama_dn 211 | kama_dn := asset_05 != '' and asset_05_status == 2 ? kama_dn + syminfo.ticker(asset_05) + "\n" : kama_dn 212 | kama_dn := asset_06 != '' and asset_06_status == 2 ? kama_dn + syminfo.ticker(asset_06) + "\n" : kama_dn 213 | kama_dn := asset_07 != '' and asset_07_status == 2 ? kama_dn + syminfo.ticker(asset_07) + "\n" : kama_dn 214 | kama_dn := asset_08 != '' and asset_08_status == 2 ? kama_dn + syminfo.ticker(asset_08) + "\n" : kama_dn 215 | kama_dn := asset_09 != '' and asset_09_status == 2 ? kama_dn + syminfo.ticker(asset_09) + "\n" : kama_dn 216 | kama_dn := asset_10 != '' and asset_10_status == 2 ? kama_dn + syminfo.ticker(asset_10) + "\n" : kama_dn 217 | kama_dn := asset_11 != '' and asset_11_status == 2 ? kama_dn + syminfo.ticker(asset_11) + "\n" : kama_dn 218 | kama_dn := asset_12 != '' and asset_12_status == 2 ? kama_dn + syminfo.ticker(asset_12) + "\n" : kama_dn 219 | kama_dn := asset_13 != '' and asset_13_status == 2 ? kama_dn + syminfo.ticker(asset_13) + "\n" : kama_dn 220 | kama_dn := asset_14 != '' and asset_14_status == 2 ? kama_dn + syminfo.ticker(asset_14) + "\n" : kama_dn 221 | kama_dn := asset_15 != '' and asset_15_status == 2 ? kama_dn + syminfo.ticker(asset_15) + "\n" : kama_dn 222 | kama_dn := asset_16 != '' and asset_16_status == 2 ? kama_dn + syminfo.ticker(asset_16) + "\n" : kama_dn 223 | kama_dn := asset_17 != '' and asset_17_status == 2 ? kama_dn + syminfo.ticker(asset_17) + "\n" : kama_dn 224 | kama_dn := asset_18 != '' and asset_18_status == 2 ? kama_dn + syminfo.ticker(asset_18) + "\n" : kama_dn 225 | kama_dn := asset_19 != '' and asset_19_status == 2 ? kama_dn + syminfo.ticker(asset_19) + "\n" : kama_dn 226 | kama_dn := asset_20 != '' and asset_20_status == 2 ? kama_dn + syminfo.ticker(asset_20) + "\n" : kama_dn 227 | kama_dn := asset_21 != '' and asset_21_status == 2 ? kama_dn + syminfo.ticker(asset_21) + "\n" : kama_dn 228 | kama_dn := asset_22 != '' and asset_22_status == 2 ? kama_dn + syminfo.ticker(asset_22) + "\n" : kama_dn 229 | kama_dn := asset_23 != '' and asset_23_status == 2 ? kama_dn + syminfo.ticker(asset_23) + "\n" : kama_dn 230 | kama_dn := asset_24 != '' and asset_24_status == 2 ? kama_dn + syminfo.ticker(asset_24) + "\n" : kama_dn 231 | kama_dn := asset_25 != '' and asset_25_status == 2 ? kama_dn + syminfo.ticker(asset_25) + "\n" : kama_dn 232 | kama_dn := asset_26 != '' and asset_26_status == 2 ? kama_dn + syminfo.ticker(asset_26) + "\n" : kama_dn 233 | kama_dn := asset_27 != '' and asset_27_status == 2 ? kama_dn + syminfo.ticker(asset_27) + "\n" : kama_dn 234 | kama_dn := asset_28 != '' and asset_28_status == 2 ? kama_dn + syminfo.ticker(asset_28) + "\n" : kama_dn 235 | kama_dn := asset_29 != '' and asset_29_status == 2 ? kama_dn + syminfo.ticker(asset_29) + "\n" : kama_dn 236 | kama_dn := asset_30 != '' and asset_30_status == 2 ? kama_dn + syminfo.ticker(asset_30) + "\n" : kama_dn 237 | kama_dn := asset_31 != '' and asset_31_status == 2 ? kama_dn + syminfo.ticker(asset_31) + "\n" : kama_dn 238 | kama_dn := asset_32 != '' and asset_32_status == 2 ? kama_dn + syminfo.ticker(asset_32) + "\n" : kama_dn 239 | kama_dn := asset_33 != '' and asset_33_status == 2 ? kama_dn + syminfo.ticker(asset_33) + "\n" : kama_dn 240 | kama_dn := asset_34 != '' and asset_34_status == 2 ? kama_dn + syminfo.ticker(asset_34) + "\n" : kama_dn 241 | kama_dn := asset_35 != '' and asset_35_status == 2 ? kama_dn + syminfo.ticker(asset_35) + "\n" : kama_dn 242 | kama_dn := asset_36 != '' and asset_36_status == 2 ? kama_dn + syminfo.ticker(asset_36) + "\n" : kama_dn 243 | kama_dn := asset_37 != '' and asset_37_status == 2 ? kama_dn + syminfo.ticker(asset_37) + "\n" : kama_dn 244 | kama_dn := asset_38 != '' and asset_38_status == 2 ? kama_dn + syminfo.ticker(asset_38) + "\n" : kama_dn 245 | kama_dn := asset_39 != '' and asset_39_status == 2 ? kama_dn + syminfo.ticker(asset_39) + "\n" : kama_dn 246 | kama_dn := asset_40 != '' and asset_40_status == 2 ? kama_dn + syminfo.ticker(asset_40) + "\n" : kama_dn 247 | //} son 248 | //-------------- 249 | // Tabloya yazdirilmesi 250 | //-------------- 251 | var assetcount = asset_01=='' and asset_02=='' and asset_03=='' and asset_04=='' and asset_05=='' and asset_06=='' and asset_07=='' and asset_08=='' and asset_09=='' and asset_10=='' and asset_11=='' and asset_12=='' and asset_13=='' and asset_14=='' and asset_15=='' and asset_16=='' and asset_17=='' and asset_18=='' and asset_19=='' and asset_20=='' and asset_21=='' and asset_22=='' and asset_23=='' and asset_24=='' and asset_25=='' and asset_26=='' and asset_27=='' and asset_28=='' and asset_29=='' and asset_30=='' and asset_31=='' and asset_32=='' and asset_33=='' and asset_34=='' and asset_35=='' and asset_36=='' and asset_37=='' and asset_38=='' and asset_39=='' and asset_40=='' ? 0 : 1 252 | var tf = custom_tf == "" ? timeframe.period : custom_tf 253 | var brl = "\n-----------------------\n" 254 | 255 | title = "EMTradeVKAMA \nPeriyot = "+tf+brl 256 | 257 | checklist = assetcount==0 ? "Enstruman tanımlanmadı\nLütfen enstrüman parametrelerini kontrol et! " : "" 258 | LongList = "" 259 | ShortList = "" 260 | HisseList = "" 261 | 262 | if(assetcount>0) 263 | if(kama_up != "") 264 | LongList := kama_up 265 | 266 | if(kama_dn != "") 267 | ShortList := kama_dn 268 | 269 | 270 | // Tabloyu oluştur 271 | getpos() => 272 | pos = "" 273 | if (tabloaltUst == "SagAlt") 274 | pos := position.bottom_right 275 | pos 276 | if (tabloaltUst == "SagUst") 277 | pos := position.top_right 278 | pos 279 | if (tabloaltUst == "SolAlt") 280 | pos := position.bottom_left 281 | pos 282 | if (tabloaltUst == "SolUst") 283 | pos := position.top_left 284 | pos 285 | if (tabloaltUst == "OrtaAlt") 286 | pos := position.bottom_center 287 | pos 288 | if (tabloaltUst == "OrtaUst") 289 | pos := position.top_center 290 | pos 291 | pos 292 | var table myTable = table.new(getpos(), 12, 2, border_width=2) 293 | 294 | // Tabloyu güncelle 295 | if barstate.islast 296 | txt1 = "EMTradeV\nKAMA\n" + 297 | "\------------\n" + LongList 298 | txt2 = ShortList 299 | 300 | table.cell(myTable, 0, 0, text=txt1, bgcolor=color.black, text_color=color.green, text_halign = text.align_left) 301 | table.cell(myTable, 0, 1, text=txt2, bgcolor=color.black, text_color=color.red, text_halign = text.align_left) 302 | -------------------------------------------------------------------------------- /KeltnerChannelStrategy: -------------------------------------------------------------------------------- 1 | //@version=6 2 | //@erolmutlu 3 | strategy("Keltner Channel Strategy", initial_capital=1000000, overlay=true, pyramiding=0) 4 | 5 | emaLength = input.int(defval = 20, title = "EMA length", group = "Basic settings") 6 | atrBreakoutLength = input.int(defval = 10, title = "ATR breakout multiplier", group = "Basic settings") 7 | multiplierUpper = input.int(defval = 1, title = "Upper", step = 1, group = "Basic settings") 8 | multiplierLower = input.float(defval = 0.5, title = "Lower", step = 1, group = "Basic settings") 9 | riskPercentage = input.float(defval = 1, title = "Risk per trade", group = "Basic settings") 10 | atrMultiplier = input.int(defval = 2, title = "ATR multiplier", group = "Basic settings") 11 | atrLength = input.int(defval = 20, title = "ATR length", group = "Basic settings") 12 | 13 | fromDateTime = input.time(defval = timestamp("2012-01-01T01:01+0000"), title = "From Date and time", group = "Time settings") 14 | toDateTime = input.time(defval = timestamp("9999-01-01T01:01+0000"), title = "To Date and time", group = "Time settings") 15 | 16 | tradeDateIsAllowed() => time >= fromDateTime and time <= toDateTime 17 | 18 | ema = ta.ema(source = close, length = emaLength) 19 | rangema = ta.atr(atrBreakoutLength) 20 | upperChannel = ema + rangema * multiplierUpper 21 | lowerChannel = ema - rangema * multiplierLower 22 | 23 | qty = ((riskPercentage/100)*strategy.equity) / (atrMultiplier * ta.atr(atrLength)) 24 | 25 | buyCondition = ta.crossover(close, upperChannel) and tradeDateIsAllowed() 26 | sellCondition = ta.crossunder(close, lowerChannel) and tradeDateIsAllowed() 27 | 28 | plot(upperChannel, color=color.green, title="Upper Channel") 29 | plot(ema, color=color.gray, title="EMA") 30 | plot(lowerChannel, color=color.red, title="Lower Channel") 31 | 32 | if (buyCondition) 33 | strategy.entry("Long", strategy.long, qty = qty) 34 | if (sellCondition) 35 | strategy.close("Long") 36 | -------------------------------------------------------------------------------- /LogicTrend: -------------------------------------------------------------------------------- 1 | // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | strategy("LogicSistem", overlay=true, initial_capital = 100000, default_qty_value = 100, default_qty_type = strategy.percent_of_equity) 6 | 7 | maxATRLossMult = input.int(3, "maxATRLossMult") 8 | BBLength = input.int(85, "BBLength") 9 | numStdDevs = input.float(1.5, "numStdDevs") 10 | highVolMult = input.int(3, "highVolMult") 11 | Exit = input.int(1, "Exit") 12 | 13 | [BBO, BBU, BBA] = ta.bb(close, BBLength, numStdDevs) 14 | plot(BBO) 15 | plot(BBU) 16 | plot(BBA) 17 | initialRisk = ta.atr(20) 18 | 19 | var slopeUp = false 20 | var slopeDn = false 21 | var largeAtr = 0.0 22 | var tradeRisk = 0.0 23 | var longLoss = 0.0 24 | var shortLoss = 0.0 25 | var IslemFiyat = 0.0 26 | 27 | largeAtr := highVolMult * initialRisk 28 | tradeRisk := BBU - BBO 29 | slopeUp := BBO > BBO[1] and BBO[1] > BBO[2] and BBO[2] > BBO[3] 30 | slopeDn := BBO < BBO[1] and BBO[1] < BBO[2] and BBO[2] < BBO[3] 31 | 32 | //{ Long Entry:} 33 | if (close > BBU and slopeUp and (tradeRisk < initialRisk * maxATRLossMult)) 34 | strategy.entry("Al", strategy.long) 35 | IslemFiyat := close 36 | //{ Short Entry:} 37 | if (close < BBA and slopeDn and (tradeRisk < initialRisk * maxATRLossMult)) 38 | strategy.entry("Sat", strategy.short) 39 | IslemFiyat := close 40 | 41 | //{Long Exits:} 42 | if (strategy.position_size > 0) 43 | longLoss := initialRisk * maxATRLossMult 44 | if (close < BBO) 45 | strategy.close_all("Flat") 46 | if ((Exit == 1 or Exit == 2 or Exit == 3 or Exit == 7) and close < IslemFiyat - longLoss) 47 | strategy.close_all("Flat") 48 | if ((Exit == 2 or Exit == 4 or Exit == 5 or Exit == 7) and BBO < BBO[1] and BBO[1] < BBO[2] and BBO[2] < BBO[3] and close < IslemFiyat) 49 | strategy.close_all("Flat") 50 | if ((Exit == 3 or Exit == 5 or Exit == 6 or Exit == 7) and ta.tr(true) > largeAtr and close < close[1] and close[1] < close[2]) 51 | strategy.close_all("Flat") 52 | //{Short Exit:} 53 | if (strategy.position_size < 0) 54 | shortLoss := initialRisk * maxATRLossMult 55 | if (close > BBO) 56 | strategy.close_all("Flat") 57 | if ((Exit == 1 or Exit == 2 or Exit == 3 or Exit == 7) and close > IslemFiyat + shortLoss) 58 | strategy.close_all("Flat") 59 | if ((Exit == 2 or Exit == 4 or Exit == 5 or Exit == 7) and BBO > BBO[1] and BBO[1] > BBO[2] and BBO[2] > BBO[3] and close > IslemFiyat) 60 | strategy.close_all("Flat") 61 | if ((Exit == 3 or Exit == 5 or Exit == 6 or Exit == 7) and ta.tr(true) > largeAtr and close > close[1] and close[1] > close[2]) 62 | strategy.close_all("Flat") 63 | -------------------------------------------------------------------------------- /MG Hisse Tarama V1: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // Author: ©erolmutlu 3 | 4 | //@version=5 5 | indicator("MG Hisse Tarama V1 [erolmutlu]", overlay=false) 6 | 7 | //************************************************************************************************************ 8 | // Parameter 9 | //************************************************************************************************************ 10 | screenSet = input.bool(false, "═════════ Tarama Ayarlari ════════") 11 | showTable = input.bool(true, 'Tablo1 Goster', group = "Tablo1 Ozellikleri") 12 | i_tableypos = input.string("Top", "Y", options = ["Top", "Middle", "Bottom"], inline = "13", group= "Tablo1 Ozellikleri") 13 | i_tablexpos = input.string("Right", "X", options = ["Right","Center", "Left"], inline = "13", group = "Tablo1 Ozellikleri") 14 | showTable2 = input.bool(true, 'Tablo2 Goster', group = "Tablo2 Ozellikleri") 15 | i_tableypos2 = input.string("Top", "Y", options = ["Top", "Middle", "Bottom"], inline = "13", group= "Tablo2 Ozellikleri") 16 | i_tablexpos2 = input.string("Left", "X", options = ["Right","Center", "Left"], inline = "13", group = "Tablo2 Ozellikleri") 17 | tableTextSize = input.string("Small", "Tablo Boyu", options = ["Auto", "Tiny", "Small","Normal","Large","Huge"], inline = '14', group = "Tablo Ozellikleri") 18 | tableTextColor = input.color(color.white, 'Tablo Text Rengi', inline = '14', group = "Tablo Ozellikleri") 19 | tableHeaderColor = input.color(color.white, 'Başlik Text Rengi', inline = '15', group = "Tablo Ozellikleri") 20 | tableBgColor = input.color(color.rgb(82, 77, 77, 67), 'Tablo Arkaplan Rengi', inline = '15', group = "Tablo Ozellikleri") 21 | bullColor = input.color(color.green, 'Long Rengi', inline = '16', group = "Tablo Ozellikleri") 22 | bearColor = input.color(color.red, 'Short Rengi', inline = '16', group = "Tablo Ozellikleri") 23 | boolMA1 = input.bool(true, 'MA1', inline = '1', group = "Tablo Ozellikleri") 24 | boolMA2 = input.bool(true, 'MA2', inline = '1', group = "Tablo Ozellikleri") 25 | boolMA3 = input.bool(true, 'MA3', inline = '1', group = "Tablo Ozellikleri") 26 | boolMG1 = input.bool(true, 'MG1', inline = '1', group = "Tablo Ozellikleri") 27 | boolMG2 = input.bool(true, 'MG2', inline = '1', group = "Tablo Ozellikleri") 28 | boolMG3 = input.bool(true, 'MG3', inline = '1', group = "Tablo Ozellikleri") 29 | boolMG4 = input.bool(true, 'MG4', inline = '1', group = "Tablo Ozellikleri") 30 | boolRSI = input.bool(true, 'RSI', inline = '1', group = "Tablo Ozellikleri") 31 | boolMACD = input.bool(true, 'MACD', inline = '1', group = "Tablo Ozellikleri") 32 | 33 | screenList = input.bool(false, "═════════ Tarama yapilacak enstrumanlar ════════") 34 | asset_01 = input.symbol(title='Asset 01', defval='BIST:XU100', group = "Tablo1 Listesi") 35 | asset_02 = input.symbol(title='Asset 02', defval='BIST:AKBNK', group = "Tablo1 Listesi") 36 | asset_03 = input.symbol(title='Asset 03', defval='BIST:ALARK', group = "Tablo1 Listesi") 37 | asset_04 = input.symbol(title='Asset 04', defval='BIST:ARCLK', group = "Tablo1 Listesi") 38 | asset_05 = input.symbol(title='Asset 05', defval='BIST:ASELS', group = "Tablo1 Listesi") 39 | asset_06 = input.symbol(title='Asset 06', defval='BIST:ASTOR', group = "Tablo1 Listesi") 40 | asset_07 = input.symbol(title='Asset 07', defval='BIST:BIMAS', group = "Tablo1 Listesi") 41 | asset_08 = input.symbol(title='Asset 08', defval='BIST:EKGYO', group = "Tablo1 Listesi") 42 | asset_09 = input.symbol(title='Asset 09', defval='BIST:ENKAI', group = "Tablo1 Listesi") 43 | asset_10 = input.symbol(title='Asset 10', defval='BIST:EREGL', group = "Tablo1 Listesi") 44 | asset_11 = input.symbol(title='Asset 11', defval='BIST:FROTO', group = "Tablo1 Listesi") 45 | asset_12 = input.symbol(title='Asset 12', defval='BIST:GARAN', group = "Tablo1 Listesi") 46 | asset_13 = input.symbol(title='Asset 13', defval='BIST:GUBRF', group = "Tablo1 Listesi") 47 | asset_14 = input.symbol(title='Asset 14', defval='BIST:HEKTS', group = "Tablo1 Listesi") 48 | asset_15 = input.symbol(title='Asset 15', defval='BIST:ISCTR', group = "Tablo1 Listesi") 49 | asset_16 = input.symbol(title='Asset 16', defval='BIST:KCHOL', group = "Tablo1 Listesi") 50 | asset_17 = input.symbol(title='Asset 17', defval='BIST:KONTR', group = "Tablo1 Listesi") 51 | asset_18 = input.symbol(title='Asset 18', defval='BIST:KOZAL', group = "Tablo1 Listesi") 52 | asset_19 = input.symbol(title='Asset 19', defval='BIST:KRDMD', group = "Tablo1 Listesi") 53 | asset_20 = input.symbol(title='Asset 20', defval='BIST:ODAS', group = "Tablo1 Listesi") 54 | asset_21 = input.symbol(title='Asset 21', defval='BIST:OYAKC', group = "Tablo2 Listesi") 55 | asset_22 = input.symbol(title='Asset 22', defval='BIST:PETKM', group = "Tablo2 Listesi") 56 | asset_23 = input.symbol(title='Asset 23', defval='BIST:PGSUS', group = "Tablo2 Listesi") 57 | asset_24 = input.symbol(title='Asset 24', defval='BIST:SAHOL', group = "Tablo2 Listesi") 58 | asset_25 = input.symbol(title='Asset 25', defval='BIST:SASA', group = "Tablo2 Listesi") 59 | asset_26 = input.symbol(title='Asset 26', defval='BIST:SISE', group = "Tablo2 Listesi") 60 | asset_27 = input.symbol(title='Asset 27', defval='BIST:TCELL', group = "Tablo2 Listesi") 61 | asset_28 = input.symbol(title='Asset 28', defval='BIST:THYAO', group = "Tablo2 Listesi") 62 | asset_29 = input.symbol(title='Asset 29', defval='BIST:TOASO', group = "Tablo2 Listesi") 63 | asset_30 = input.symbol(title='Asset 30', defval='BIST:TUPRS', group = "Tablo2 Listesi") 64 | asset_31 = input.symbol(title='Asset 31', defval='BIST:YKBNK', group = "Tablo2 Listesi") 65 | asset_32 = input.symbol(title='Asset 32', defval='BIST:ALTIN', group = "Tablo2 Listesi") 66 | asset_33 = input.symbol(title='Asset 33', defval='BIST:GLDTR', group = "Tablo2 Listesi") 67 | asset_34 = input.symbol(title='Asset 34', defval='BIST:GLDTR', group = "Tablo2 Listesi") 68 | asset_35 = input.symbol(title='Asset 35', defval='BIST:GLDTR', group = "Tablo2 Listesi") 69 | asset_36 = input.symbol(title='Asset 36', defval='BIST:GLDTR', group = "Tablo2 Listesi") 70 | asset_37 = input.symbol(title='Asset 37', defval='BIST:GLDTR', group = "Tablo2 Listesi") 71 | asset_38 = input.symbol(title='Asset 38', defval='BIST:GLDTR', group = "Tablo2 Listesi") 72 | asset_39 = input.symbol(title='Asset 39', defval='BIST:GLDTR', group = "Tablo2 Listesi") 73 | asset_40 = input.symbol(title='Asset 40', defval='BIST:GLDTR', group = "Tablo2 Listesi") 74 | 75 | //Table 76 | var table screener = table.new(str.lower(i_tableypos) + "_" + str.lower(i_tablexpos), 15, 50, color.new(color.white,100), color.black, 1, color.black, 1) 77 | //Table 78 | var table screener2 = table.new(str.lower(i_tableypos2) + "_" + str.lower(i_tablexpos2), 15, 50, color.new(color.white,100), color.black, 1, color.black, 1) 79 | // methods 80 | method splitter(string sym) => 81 | array.get(str.split(sym, ':'),1) 82 | 83 | method textsize(string this) => 84 | switch this 85 | 'Auto' => size.auto 86 | 'Tiny' => size.tiny 87 | 'Normal' => size.normal 88 | 'Small' => size.small 89 | 'Large' => size.large 90 | 'Huge' => size.huge 91 | 92 | method data(string sym)=> 93 | WMA9 = ta.wma(close, 9) 94 | WMA15 = ta.wma(close, 15) 95 | kijunsen = (ta.highest (high, 20) + ta.lowest (low, 20)) / 2 96 | [macdLine_mtf, signalLine_mtf, histLine] = ta.macd(close, 12, 26, 9) 97 | macd_mtf = macdLine_mtf > signalLine_mtf ? 1 : 0 98 | 99 | rsi = ta.rsi(close, 14) 100 | //rsima = request.security(sym, "W", ta.ema(ta.rsi(close, 14), 14)) 101 | //rsi_mtf = rsi[1] < rsima[1] and rsi > rsima ? 1 : 0 102 | rsi50_mtf = rsi > 50 ? 1 : 0 103 | 104 | T1 = WMA9[1] * 1.15 105 | T2 = WMA9[1] * 1.30 106 | T3 = WMA9[1] * 1.40 107 | T4 = WMA9[1] * 1.50 108 | mgrenk0 = WMA9 > WMA15 and close > WMA9 and close > kijunsen ? color.lime : (close < WMA9 and close > kijunsen) or (close < kijunsen and close > WMA15) or (WMA9 < WMA15 and close > WMA15) or (close < kijunsen and close < WMA15 and WMA9 >= WMA15) ? color.purple : close < kijunsen and WMA9 < WMA15 and close < WMA15 ? color.red : na 109 | price0 = close 110 | MA10 = WMA9[1] 111 | MA20 = WMA15[1] 112 | MA30 = kijunsen 113 | MG10 = T1 114 | MG20 = T2 115 | MG30 = T3 116 | MG40 = T4 117 | RSI0 = rsi50_mtf 118 | MACD0 = macd_mtf 119 | [mgrenk, price, MA1, MA2, MA3, MG1, MG2, MG3, MG4, RSI, MACD] = request.security(sym, "W", [mgrenk0, price0, MA10, MA20, MA30, MG10, MG20, MG30, MG40, RSI0, MACD0], lookahead=barmerge.lookahead_on) 120 | 121 | //get the data for symbols 122 | [mgrenk_1, price_1, MA1_1, MA2_1, MA3_1, MG1_1, MG2_1, MG3_1, MG4_1, RSI_1, MACD_1] = asset_01.data() 123 | [mgrenk_2, price_2, MA1_2, MA2_2, MA3_2, MG1_2, MG2_2, MG3_2, MG4_2, RSI_2, MACD_2] = asset_02.data() 124 | [mgrenk_3, price_3, MA1_3, MA2_3, MA3_3, MG1_3, MG2_3, MG3_3, MG4_3, RSI_3, MACD_3] = asset_03.data() 125 | [mgrenk_4, price_4, MA1_4, MA2_4, MA3_4, MG1_4, MG2_4, MG3_4, MG4_4, RSI_4, MACD_4] = asset_04.data() 126 | [mgrenk_5, price_5, MA1_5, MA2_5, MA3_5, MG1_5, MG2_5, MG3_5, MG4_5, RSI_5, MACD_5] = asset_05.data() 127 | [mgrenk_6, price_6, MA1_6, MA2_6, MA3_6, MG1_6, MG2_6, MG3_6, MG4_6, RSI_6, MACD_6] = asset_06.data() 128 | [mgrenk_7, price_7, MA1_7, MA2_7, MA3_7, MG1_7, MG2_7, MG3_7, MG4_7, RSI_7, MACD_7] = asset_07.data() 129 | [mgrenk_8, price_8, MA1_8, MA2_8, MA3_8, MG1_8, MG2_8, MG3_8, MG4_8, RSI_8, MACD_8] = asset_08.data() 130 | [mgrenk_9, price_9, MA1_9, MA2_9, MA3_9, MG1_9, MG2_9, MG3_9, MG4_9, RSI_9, MACD_9] = asset_09.data() 131 | [mgrenk_10, price_10, MA1_10, MA2_10, MA3_10, MG1_10, MG2_10, MG3_10, MG4_10, RSI_10, MACD_10] = asset_10.data() 132 | [mgrenk_11, price_11, MA1_11, MA2_11, MA3_11, MG1_11, MG2_11, MG3_11, MG4_11, RSI_11, MACD_11] = asset_11.data() 133 | [mgrenk_12, price_12, MA1_12, MA2_12, MA3_12, MG1_12, MG2_12, MG3_12, MG4_12, RSI_12, MACD_12] = asset_12.data() 134 | [mgrenk_13, price_13, MA1_13, MA2_13, MA3_13, MG1_13, MG2_13, MG3_13, MG4_13, RSI_13, MACD_13] = asset_13.data() 135 | [mgrenk_14, price_14, MA1_14, MA2_14, MA3_14, MG1_14, MG2_14, MG3_14, MG4_14, RSI_14, MACD_14] = asset_14.data() 136 | [mgrenk_15, price_15, MA1_15, MA2_15, MA3_15, MG1_15, MG2_15, MG3_15, MG4_15, RSI_15, MACD_15] = asset_15.data() 137 | [mgrenk_16, price_16, MA1_16, MA2_16, MA3_16, MG1_16, MG2_16, MG3_16, MG4_16, RSI_16, MACD_16] = asset_16.data() 138 | [mgrenk_17, price_17, MA1_17, MA2_17, MA3_17, MG1_17, MG2_17, MG3_17, MG4_17, RSI_17, MACD_17] = asset_17.data() 139 | [mgrenk_18, price_18, MA1_18, MA2_18, MA3_18, MG1_18, MG2_18, MG3_18, MG4_18, RSI_18, MACD_18] = asset_18.data() 140 | [mgrenk_19, price_19, MA1_19, MA2_19, MA3_19, MG1_19, MG2_19, MG3_19, MG4_19, RSI_19, MACD_19] = asset_19.data() 141 | [mgrenk_20, price_20, MA1_20, MA2_20, MA3_20, MG1_20, MG2_20, MG3_20, MG4_20, RSI_20, MACD_20] = asset_20.data() 142 | [mgrenk_21, price_21, MA1_21, MA2_21, MA3_21, MG1_21, MG2_21, MG3_21, MG4_21, RSI_21, MACD_21] = asset_21.data() 143 | [mgrenk_22, price_22, MA1_22, MA2_22, MA3_22, MG1_22, MG2_22, MG3_22, MG4_22, RSI_22, MACD_22] = asset_22.data() 144 | [mgrenk_23, price_23, MA1_23, MA2_23, MA3_23, MG1_23, MG2_23, MG3_23, MG4_23, RSI_23, MACD_23] = asset_23.data() 145 | [mgrenk_24, price_24, MA1_24, MA2_24, MA3_24, MG1_24, MG2_24, MG3_24, MG4_24, RSI_24, MACD_24] = asset_24.data() 146 | [mgrenk_25, price_25, MA1_25, MA2_25, MA3_25, MG1_25, MG2_25, MG3_25, MG4_25, RSI_25, MACD_25] = asset_25.data() 147 | [mgrenk_26, price_26, MA1_26, MA2_26, MA3_26, MG1_26, MG2_26, MG3_26, MG4_26, RSI_26, MACD_26] = asset_26.data() 148 | [mgrenk_27, price_27, MA1_27, MA2_27, MA3_27, MG1_27, MG2_27, MG3_27, MG4_27, RSI_27, MACD_27] = asset_27.data() 149 | [mgrenk_28, price_28, MA1_28, MA2_28, MA3_28, MG1_28, MG2_28, MG3_28, MG4_28, RSI_28, MACD_28] = asset_28.data() 150 | [mgrenk_29, price_29, MA1_29, MA2_29, MA3_29, MG1_29, MG2_29, MG3_29, MG4_29, RSI_29, MACD_29] = asset_29.data() 151 | [mgrenk_30, price_30, MA1_30, MA2_30, MA3_30, MG1_30, MG2_30, MG3_30, MG4_30, RSI_30, MACD_30] = asset_30.data() 152 | [mgrenk_31, price_31, MA1_31, MA2_31, MA3_31, MG1_31, MG2_31, MG3_31, MG4_31, RSI_31, MACD_31] = asset_31.data() 153 | [mgrenk_32, price_32, MA1_32, MA2_32, MA3_32, MG1_32, MG2_32, MG3_32, MG4_32, RSI_32, MACD_32] = asset_32.data() 154 | [mgrenk_33, price_33, MA1_33, MA2_33, MA3_33, MG1_33, MG2_33, MG3_33, MG4_33, RSI_33, MACD_33] = asset_33.data() 155 | [mgrenk_34, price_34, MA1_34, MA2_34, MA3_34, MG1_34, MG2_34, MG3_34, MG4_34, RSI_34, MACD_34] = asset_34.data() 156 | [mgrenk_35, price_35, MA1_35, MA2_35, MA3_35, MG1_35, MG2_35, MG3_35, MG4_35, RSI_35, MACD_35] = asset_35.data() 157 | [mgrenk_36, price_36, MA1_36, MA2_36, MA3_36, MG1_36, MG2_36, MG3_36, MG4_36, RSI_36, MACD_36] = asset_36.data() 158 | [mgrenk_37, price_37, MA1_37, MA2_37, MA3_37, MG1_37, MG2_37, MG3_37, MG4_37, RSI_37, MACD_37] = asset_37.data() 159 | [mgrenk_38, price_38, MA1_38, MA2_38, MA3_38, MG1_38, MG2_38, MG3_38, MG4_38, RSI_38, MACD_38] = asset_38.data() 160 | [mgrenk_39, price_39, MA1_39, MA2_39, MA3_39, MG1_39, MG2_39, MG3_39, MG4_39, RSI_39, MACD_39] = asset_39.data() 161 | [mgrenk_40, price_40, MA1_40, MA2_40, MA3_40, MG1_40, MG2_40, MG3_40, MG4_40, RSI_40, MACD_40] = asset_40.data() 162 | 163 | // plot the table 164 | if barstate.islast and showTable 165 | //headers 166 | table.cell(screener, 0, 0, 'Symbol', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 167 | table.cell(screener, 1, 0, 'Price', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 168 | if boolMA1 169 | table.cell(screener, 2, 0, 'MA1', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.lime) 170 | if boolMA2 171 | table.cell(screener, 3, 0, 'MA2', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.orange) 172 | if boolMA3 173 | table.cell(screener, 4, 0, 'MA3', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.red) 174 | if boolMG1 175 | table.cell(screener, 5, 0, 'MG1', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.rgb(102, 98, 98)) 176 | if boolMG2 177 | table.cell(screener, 6, 0, 'MG2', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.red) 178 | if boolMG3 179 | table.cell(screener, 7, 0, 'MG3', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.orange) 180 | if boolMG4 181 | table.cell(screener, 8, 0, 'MG4', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.purple) 182 | if boolRSI 183 | table.cell(screener, 9, 0, 'RSI', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 184 | if boolMACD 185 | table.cell(screener, 10, 0, 'MACD', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 186 | //symbols 187 | table.cell(screener, 0, 1, str.tostring(asset_01.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_1) 188 | table.cell(screener, 0, 2, str.tostring(asset_02.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_2) 189 | table.cell(screener, 0, 3, str.tostring(asset_03.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_3) 190 | table.cell(screener, 0, 4, str.tostring(asset_04.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_4) 191 | table.cell(screener, 0, 5, str.tostring(asset_05.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_5) 192 | table.cell(screener, 0, 6, str.tostring(asset_06.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_6) 193 | table.cell(screener, 0, 7, str.tostring(asset_07.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_7) 194 | table.cell(screener, 0, 8, str.tostring(asset_08.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_8) 195 | table.cell(screener, 0, 9, str.tostring(asset_09.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_9) 196 | table.cell(screener, 0, 10, str.tostring(asset_10.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_10) 197 | table.cell(screener, 0, 11, str.tostring(asset_11.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_11) 198 | table.cell(screener, 0, 12, str.tostring(asset_12.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_12) 199 | table.cell(screener, 0, 13, str.tostring(asset_13.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_13) 200 | table.cell(screener, 0, 14, str.tostring(asset_14.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_14) 201 | table.cell(screener, 0, 15, str.tostring(asset_15.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_15) 202 | table.cell(screener, 0, 16, str.tostring(asset_16.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_16) 203 | table.cell(screener, 0, 17, str.tostring(asset_17.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_17) 204 | table.cell(screener, 0, 18, str.tostring(asset_18.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_18) 205 | table.cell(screener, 0, 19, str.tostring(asset_19.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_19) 206 | table.cell(screener, 0, 20, str.tostring(asset_20.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_20) 207 | //combos 208 | //Prices 209 | table.cell(screener, 1, 1, str.tostring(price_1, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 210 | table.cell(screener, 1, 2, str.tostring(price_2, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 211 | table.cell(screener, 1, 3, str.tostring(price_3, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 212 | table.cell(screener, 1, 4, str.tostring(price_4, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 213 | table.cell(screener, 1, 5, str.tostring(price_5, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 214 | table.cell(screener, 1, 6, str.tostring(price_6, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 215 | table.cell(screener, 1, 7, str.tostring(price_7, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 216 | table.cell(screener, 1, 8, str.tostring(price_8, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 217 | table.cell(screener, 1, 9, str.tostring(price_9, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 218 | table.cell(screener, 1, 10, str.tostring(price_10, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 219 | table.cell(screener, 1, 11, str.tostring(price_11, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 220 | table.cell(screener, 1, 12, str.tostring(price_12, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 221 | table.cell(screener, 1, 13, str.tostring(price_13, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 222 | table.cell(screener, 1, 14, str.tostring(price_14, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 223 | table.cell(screener, 1, 15, str.tostring(price_15, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 224 | table.cell(screener, 1, 16, str.tostring(price_16, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 225 | table.cell(screener, 1, 17, str.tostring(price_17, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 226 | table.cell(screener, 1, 18, str.tostring(price_18, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 227 | table.cell(screener, 1, 19, str.tostring(price_19, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 228 | table.cell(screener, 1, 20, str.tostring(price_20, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 229 | if boolMA1 230 | table.cell(screener, 2, 1, str.tostring(MA1_1, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 231 | table.cell(screener, 2, 2, str.tostring(MA1_2, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 232 | table.cell(screener, 2, 3, str.tostring(MA1_3, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 233 | table.cell(screener, 2, 4, str.tostring(MA1_4, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 234 | table.cell(screener, 2, 5, str.tostring(MA1_5, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 235 | table.cell(screener, 2, 6, str.tostring(MA1_6, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 236 | table.cell(screener, 2, 7, str.tostring(MA1_7, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 237 | table.cell(screener, 2, 8, str.tostring(MA1_8, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 238 | table.cell(screener, 2, 9, str.tostring(MA1_9, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 239 | table.cell(screener, 2, 10, str.tostring(MA1_10, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 240 | table.cell(screener, 2, 11, str.tostring(MA1_11, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 241 | table.cell(screener, 2, 12, str.tostring(MA1_12, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 242 | table.cell(screener, 2, 13, str.tostring(MA1_13, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 243 | table.cell(screener, 2, 14, str.tostring(MA1_14, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 244 | table.cell(screener, 2, 15, str.tostring(MA1_15, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 245 | table.cell(screener, 2, 16, str.tostring(MA1_16, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 246 | table.cell(screener, 2, 17, str.tostring(MA1_17, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 247 | table.cell(screener, 2, 18, str.tostring(MA1_18, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 248 | table.cell(screener, 2, 19, str.tostring(MA1_19, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 249 | table.cell(screener, 2, 20, str.tostring(MA1_20, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 250 | if boolMA2 251 | table.cell(screener, 3, 1, str.tostring(MA2_1, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 252 | table.cell(screener, 3, 2, str.tostring(MA2_2, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 253 | table.cell(screener, 3, 3, str.tostring(MA2_3, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 254 | table.cell(screener, 3, 4, str.tostring(MA2_4, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 255 | table.cell(screener, 3, 5, str.tostring(MA2_5, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 256 | table.cell(screener, 3, 6, str.tostring(MA2_6, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 257 | table.cell(screener, 3, 7, str.tostring(MA2_7, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 258 | table.cell(screener, 3, 8, str.tostring(MA2_8, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 259 | table.cell(screener, 3, 9, str.tostring(MA2_9, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 260 | table.cell(screener, 3, 10, str.tostring(MA2_10, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 261 | table.cell(screener, 3, 11, str.tostring(MA2_11, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 262 | table.cell(screener, 3, 12, str.tostring(MA2_12, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 263 | table.cell(screener, 3, 13, str.tostring(MA2_13, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 264 | table.cell(screener, 3, 14, str.tostring(MA2_14, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 265 | table.cell(screener, 3, 15, str.tostring(MA2_15, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 266 | table.cell(screener, 3, 16, str.tostring(MA2_16, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 267 | table.cell(screener, 3, 17, str.tostring(MA2_17, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 268 | table.cell(screener, 3, 18, str.tostring(MA2_18, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 269 | table.cell(screener, 3, 19, str.tostring(MA2_19, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 270 | table.cell(screener, 3, 20, str.tostring(MA2_20, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 271 | if boolMA3 272 | table.cell(screener, 4, 1, str.tostring(MA3_1, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 273 | table.cell(screener, 4, 2, str.tostring(MA3_2, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 274 | table.cell(screener, 4, 3, str.tostring(MA3_3, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 275 | table.cell(screener, 4, 4, str.tostring(MA3_4, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 276 | table.cell(screener, 4, 5, str.tostring(MA3_5, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 277 | table.cell(screener, 4, 6, str.tostring(MA3_6, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 278 | table.cell(screener, 4, 7, str.tostring(MA3_7, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 279 | table.cell(screener, 4, 8, str.tostring(MA3_8, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 280 | table.cell(screener, 4, 9, str.tostring(MA3_9, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 281 | table.cell(screener, 4, 10, str.tostring(MA3_10, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 282 | table.cell(screener, 4, 11, str.tostring(MA3_11, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 283 | table.cell(screener, 4, 12, str.tostring(MA3_12, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 284 | table.cell(screener, 4, 13, str.tostring(MA3_13, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 285 | table.cell(screener, 4, 14, str.tostring(MA3_14, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 286 | table.cell(screener, 4, 15, str.tostring(MA3_15, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 287 | table.cell(screener, 4, 16, str.tostring(MA3_16, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 288 | table.cell(screener, 4, 17, str.tostring(MA3_17, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 289 | table.cell(screener, 4, 18, str.tostring(MA3_18, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 290 | table.cell(screener, 4, 19, str.tostring(MA3_19, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 291 | table.cell(screener, 4, 20, str.tostring(MA3_20, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 292 | if boolMG1 293 | table.cell(screener, 5, 1, str.tostring(MG1_1, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 294 | table.cell(screener, 5, 2, str.tostring(MG1_2, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 295 | table.cell(screener, 5, 3, str.tostring(MG1_3, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 296 | table.cell(screener, 5, 4, str.tostring(MG1_4, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 297 | table.cell(screener, 5, 5, str.tostring(MG1_5, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 298 | table.cell(screener, 5, 6, str.tostring(MG1_6, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 299 | table.cell(screener, 5, 7, str.tostring(MG1_7, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 300 | table.cell(screener, 5, 8, str.tostring(MG1_8, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 301 | table.cell(screener, 5, 9, str.tostring(MG1_9, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 302 | table.cell(screener, 5, 10, str.tostring(MG1_10, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 303 | table.cell(screener, 5, 11, str.tostring(MG1_11, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 304 | table.cell(screener, 5, 12, str.tostring(MG1_12, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 305 | table.cell(screener, 5, 13, str.tostring(MG1_13, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 306 | table.cell(screener, 5, 14, str.tostring(MG1_14, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 307 | table.cell(screener, 5, 15, str.tostring(MG1_15, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 308 | table.cell(screener, 5, 16, str.tostring(MG1_16, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 309 | table.cell(screener, 5, 17, str.tostring(MG1_17, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 310 | table.cell(screener, 5, 18, str.tostring(MG1_18, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 311 | table.cell(screener, 5, 19, str.tostring(MG1_19, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 312 | table.cell(screener, 5, 20, str.tostring(MG1_20, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 313 | 314 | if boolMG2 315 | table.cell(screener, 6, 1, str.tostring(MG2_1, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 316 | table.cell(screener, 6, 2, str.tostring(MG2_2, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 317 | table.cell(screener, 6, 3, str.tostring(MG2_3, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 318 | table.cell(screener, 6, 4, str.tostring(MG2_4, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 319 | table.cell(screener, 6, 5, str.tostring(MG2_5, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 320 | table.cell(screener, 6, 6, str.tostring(MG2_6, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 321 | table.cell(screener, 6, 7, str.tostring(MG2_7, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 322 | table.cell(screener, 6, 8, str.tostring(MG2_8, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 323 | table.cell(screener, 6, 9, str.tostring(MG2_9, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 324 | table.cell(screener, 6, 10, str.tostring(MG2_10, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 325 | table.cell(screener, 6, 11, str.tostring(MG2_11, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 326 | table.cell(screener, 6, 12, str.tostring(MG2_12, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 327 | table.cell(screener, 6, 13, str.tostring(MG2_13, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 328 | table.cell(screener, 6, 14, str.tostring(MG2_14, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 329 | table.cell(screener, 6, 15, str.tostring(MG2_15, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 330 | table.cell(screener, 6, 16, str.tostring(MG2_16, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 331 | table.cell(screener, 6, 17, str.tostring(MG2_17, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 332 | table.cell(screener, 6, 18, str.tostring(MG2_18, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 333 | table.cell(screener, 6, 19, str.tostring(MG2_19, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 334 | table.cell(screener, 6, 20, str.tostring(MG2_20, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 335 | if boolMG3 336 | table.cell(screener, 7, 1, str.tostring(MG3_1, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 337 | table.cell(screener, 7, 2, str.tostring(MG3_2, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 338 | table.cell(screener, 7, 3, str.tostring(MG3_3, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 339 | table.cell(screener, 7, 4, str.tostring(MG3_4, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 340 | table.cell(screener, 7, 5, str.tostring(MG3_5, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 341 | table.cell(screener, 7, 6, str.tostring(MG3_6, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 342 | table.cell(screener, 7, 7, str.tostring(MG3_7, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 343 | table.cell(screener, 7, 8, str.tostring(MG3_8, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 344 | table.cell(screener, 7, 9, str.tostring(MG3_9, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 345 | table.cell(screener, 7, 10, str.tostring(MG3_10, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 346 | table.cell(screener, 7, 11, str.tostring(MG3_11, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 347 | table.cell(screener, 7, 12, str.tostring(MG3_12, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 348 | table.cell(screener, 7, 13, str.tostring(MG3_13, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 349 | table.cell(screener, 7, 14, str.tostring(MG3_14, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 350 | table.cell(screener, 7, 15, str.tostring(MG3_15, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 351 | table.cell(screener, 7, 16, str.tostring(MG3_16, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 352 | table.cell(screener, 7, 17, str.tostring(MG3_17, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 353 | table.cell(screener, 7, 18, str.tostring(MG3_18, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 354 | table.cell(screener, 7, 19, str.tostring(MG3_19, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 355 | table.cell(screener, 7, 20, str.tostring(MG3_20, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 356 | if boolMG4 357 | table.cell(screener, 8, 1, str.tostring(MG4_1, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 358 | table.cell(screener, 8, 2, str.tostring(MG4_2, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 359 | table.cell(screener, 8, 3, str.tostring(MG4_3, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 360 | table.cell(screener, 8, 4, str.tostring(MG4_4, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 361 | table.cell(screener, 8, 5, str.tostring(MG4_5, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 362 | table.cell(screener, 8, 6, str.tostring(MG4_6, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 363 | table.cell(screener, 8, 7, str.tostring(MG4_7, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 364 | table.cell(screener, 8, 8, str.tostring(MG4_8, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 365 | table.cell(screener, 8, 9, str.tostring(MG4_9, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 366 | table.cell(screener, 8, 10, str.tostring(MG4_10, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 367 | table.cell(screener, 8, 11, str.tostring(MG4_11, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 368 | table.cell(screener, 8, 12, str.tostring(MG4_12, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 369 | table.cell(screener, 8, 13, str.tostring(MG4_13, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 370 | table.cell(screener, 8, 14, str.tostring(MG4_14, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 371 | table.cell(screener, 8, 15, str.tostring(MG4_15, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 372 | table.cell(screener, 8, 16, str.tostring(MG4_16, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 373 | table.cell(screener, 8, 17, str.tostring(MG4_17, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 374 | table.cell(screener, 8, 18, str.tostring(MG4_18, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 375 | table.cell(screener, 8, 19, str.tostring(MG4_19, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 376 | table.cell(screener, 8, 20, str.tostring(MG4_20, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 377 | 378 | if boolRSI 379 | table.cell(screener, 9, 1, str.tostring(RSI_1, format.mintick), bgcolor = RSI_1 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 380 | table.cell(screener, 9, 2, str.tostring(RSI_2, format.mintick), bgcolor = RSI_2 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 381 | table.cell(screener, 9, 3, str.tostring(RSI_3, format.mintick), bgcolor = RSI_3 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 382 | table.cell(screener, 9, 4, str.tostring(RSI_4, format.mintick), bgcolor = RSI_4 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 383 | table.cell(screener, 9, 5, str.tostring(RSI_5, format.mintick), bgcolor = RSI_5 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 384 | table.cell(screener, 9, 6, str.tostring(RSI_6, format.mintick), bgcolor = RSI_6 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 385 | table.cell(screener, 9, 7, str.tostring(RSI_7, format.mintick), bgcolor = RSI_7 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 386 | table.cell(screener, 9, 8, str.tostring(RSI_8, format.mintick), bgcolor = RSI_8 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 387 | table.cell(screener, 9, 9, str.tostring(RSI_9, format.mintick), bgcolor = RSI_9 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 388 | table.cell(screener, 9, 10, str.tostring(RSI_10, format.mintick), bgcolor = RSI_10 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 389 | table.cell(screener, 9, 11, str.tostring(RSI_11, format.mintick), bgcolor = RSI_11 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 390 | table.cell(screener, 9, 12, str.tostring(RSI_12, format.mintick), bgcolor = RSI_12 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 391 | table.cell(screener, 9, 13, str.tostring(RSI_13, format.mintick), bgcolor = RSI_13 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 392 | table.cell(screener, 9, 14, str.tostring(RSI_14, format.mintick), bgcolor = RSI_14 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 393 | table.cell(screener, 9, 15, str.tostring(RSI_15, format.mintick), bgcolor = RSI_15 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 394 | table.cell(screener, 9, 16, str.tostring(RSI_16, format.mintick), bgcolor = RSI_16 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 395 | table.cell(screener, 9, 17, str.tostring(RSI_17, format.mintick), bgcolor = RSI_17 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 396 | table.cell(screener, 9, 18, str.tostring(RSI_18, format.mintick), bgcolor = RSI_18 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 397 | table.cell(screener, 9, 19, str.tostring(RSI_19, format.mintick), bgcolor = RSI_19 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 398 | table.cell(screener, 9, 20, str.tostring(RSI_20, format.mintick), bgcolor = RSI_20 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 399 | 400 | if boolMACD 401 | table.cell(screener, 10, 1, str.tostring(MACD_1, format.mintick), bgcolor = MACD_1 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 402 | table.cell(screener, 10, 2, str.tostring(MACD_2, format.mintick), bgcolor = MACD_2 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 403 | table.cell(screener, 10, 3, str.tostring(MACD_3, format.mintick), bgcolor = MACD_3 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 404 | table.cell(screener, 10, 4, str.tostring(MACD_4, format.mintick), bgcolor = MACD_4 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 405 | table.cell(screener, 10, 5, str.tostring(MACD_5, format.mintick), bgcolor = MACD_5 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 406 | table.cell(screener, 10, 6, str.tostring(MACD_6, format.mintick), bgcolor = MACD_6 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 407 | table.cell(screener, 10, 7, str.tostring(MACD_7, format.mintick), bgcolor = MACD_7 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 408 | table.cell(screener, 10, 8, str.tostring(MACD_8, format.mintick), bgcolor = MACD_8 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 409 | table.cell(screener, 10, 9, str.tostring(MACD_9, format.mintick), bgcolor = MACD_9 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 410 | table.cell(screener, 10, 10, str.tostring(MACD_10, format.mintick), bgcolor = MACD_10 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 411 | table.cell(screener, 10, 11, str.tostring(MACD_11, format.mintick), bgcolor = MACD_11 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 412 | table.cell(screener, 10, 12, str.tostring(MACD_12, format.mintick), bgcolor = MACD_12 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 413 | table.cell(screener, 10, 13, str.tostring(MACD_13, format.mintick), bgcolor = MACD_13 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 414 | table.cell(screener, 10, 14, str.tostring(MACD_14, format.mintick), bgcolor = MACD_14 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 415 | table.cell(screener, 10, 15, str.tostring(MACD_15, format.mintick), bgcolor = MACD_15 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 416 | table.cell(screener, 10, 16, str.tostring(MACD_16, format.mintick), bgcolor = MACD_16 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 417 | table.cell(screener, 10, 17, str.tostring(MACD_17, format.mintick), bgcolor = MACD_17 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 418 | table.cell(screener, 10, 18, str.tostring(MACD_18, format.mintick), bgcolor = MACD_18 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 419 | table.cell(screener, 10, 19, str.tostring(MACD_19, format.mintick), bgcolor = MACD_19 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 420 | table.cell(screener, 10, 20, str.tostring(MACD_20, format.mintick), bgcolor = MACD_20 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 421 | // plot the table 2 422 | if barstate.islast and showTable2 423 | //headers 424 | table.cell(screener2, 0, 0, 'Symbol', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 425 | table.cell(screener2, 1, 0, 'Price', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 426 | if boolMA1 427 | table.cell(screener2, 2, 0, 'MA1', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.lime) 428 | if boolMA2 429 | table.cell(screener2, 3, 0, 'MA2', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.orange) 430 | if boolMA3 431 | table.cell(screener2, 4, 0, 'MA3', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.red) 432 | if boolMG1 433 | table.cell(screener2, 5, 0, 'MG1', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.rgb(102, 98, 98)) 434 | if boolMG2 435 | table.cell(screener2, 6, 0, 'MG2', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.red) 436 | if boolMG3 437 | table.cell(screener2, 7, 0, 'MG3', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.orange) 438 | if boolMG4 439 | table.cell(screener2, 8, 0, 'MG4', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = color.purple) 440 | if boolRSI 441 | table.cell(screener2, 9, 0, 'RSI', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 442 | if boolMACD 443 | table.cell(screener2, 10, 0, 'MACD', text_color = tableHeaderColor, text_size = tableTextSize.textsize(), width = 3, bgcolor = tableBgColor) 444 | // symbols 445 | table.cell(screener2, 0, 1, str.tostring(asset_21.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_21) 446 | table.cell(screener2, 0, 2, str.tostring(asset_22.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_22) 447 | table.cell(screener2, 0, 3, str.tostring(asset_23.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_23) 448 | table.cell(screener2, 0, 4, str.tostring(asset_24.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_24) 449 | table.cell(screener2, 0, 5, str.tostring(asset_25.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_25) 450 | table.cell(screener2, 0, 6, str.tostring(asset_26.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_26) 451 | table.cell(screener2, 0, 7, str.tostring(asset_27.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_27) 452 | table.cell(screener2, 0, 8, str.tostring(asset_28.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_28) 453 | table.cell(screener2, 0, 9, str.tostring(asset_29.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_29) 454 | table.cell(screener2, 0, 10, str.tostring(asset_30.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_30) 455 | table.cell(screener2, 0, 11, str.tostring(asset_31.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_31) 456 | table.cell(screener2, 0, 12, str.tostring(asset_32.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_32) 457 | table.cell(screener2, 0, 13, str.tostring(asset_33.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_33) 458 | table.cell(screener2, 0, 14, str.tostring(asset_34.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_34) 459 | table.cell(screener2, 0, 15, str.tostring(asset_35.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_35) 460 | table.cell(screener2, 0, 16, str.tostring(asset_36.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_36) 461 | table.cell(screener2, 0, 17, str.tostring(asset_37.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_37) 462 | table.cell(screener2, 0, 18, str.tostring(asset_38.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_38) 463 | table.cell(screener2, 0, 19, str.tostring(asset_39.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_39) 464 | table.cell(screener2, 0, 20, str.tostring(asset_40.splitter()), text_color = tableHeaderColor, text_size = tableTextSize.textsize(), bgcolor = mgrenk_40) 465 | //combos 466 | //Prices 467 | table.cell(screener2, 1, 1, str.tostring(price_21, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 468 | table.cell(screener2, 1, 2, str.tostring(price_22, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 469 | table.cell(screener2, 1, 3, str.tostring(price_23, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 470 | table.cell(screener2, 1, 4, str.tostring(price_24, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 471 | table.cell(screener2, 1, 5, str.tostring(price_25, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 472 | table.cell(screener2, 1, 6, str.tostring(price_26, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 473 | table.cell(screener2, 1, 7, str.tostring(price_27, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 474 | table.cell(screener2, 1, 8, str.tostring(price_28, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 475 | table.cell(screener2, 1, 9, str.tostring(price_29, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 476 | table.cell(screener2, 1, 10, str.tostring(price_30, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 477 | table.cell(screener2, 1, 11, str.tostring(price_31, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 478 | table.cell(screener2, 1, 12, str.tostring(price_32, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 479 | table.cell(screener2, 1, 13, str.tostring(price_33, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 480 | table.cell(screener2, 1, 14, str.tostring(price_34, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 481 | table.cell(screener2, 1, 15, str.tostring(price_35, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 482 | table.cell(screener2, 1, 16, str.tostring(price_36, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 483 | table.cell(screener2, 1, 17, str.tostring(price_37, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 484 | table.cell(screener2, 1, 18, str.tostring(price_38, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 485 | table.cell(screener2, 1, 19, str.tostring(price_39, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 486 | table.cell(screener2, 1, 20, str.tostring(price_40, format.mintick), bgcolor = na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 487 | if boolMA1 488 | table.cell(screener2, 2, 1, str.tostring(MA1_21, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 489 | table.cell(screener2, 2, 2, str.tostring(MA1_22, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 490 | table.cell(screener2, 2, 3, str.tostring(MA1_23, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 491 | table.cell(screener2, 2, 4, str.tostring(MA1_24, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 492 | table.cell(screener2, 2, 5, str.tostring(MA1_25, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 493 | table.cell(screener2, 2, 6, str.tostring(MA1_26, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 494 | table.cell(screener2, 2, 7, str.tostring(MA1_27, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 495 | table.cell(screener2, 2, 8, str.tostring(MA1_28, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 496 | table.cell(screener2, 2, 9, str.tostring(MA1_29, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 497 | table.cell(screener2, 2, 10, str.tostring(MA1_30, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 498 | table.cell(screener2, 2, 11, str.tostring(MA1_31, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 499 | table.cell(screener2, 2, 12, str.tostring(MA1_32, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 500 | table.cell(screener2, 2, 13, str.tostring(MA1_33, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 501 | table.cell(screener2, 2, 14, str.tostring(MA1_34, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 502 | table.cell(screener2, 2, 15, str.tostring(MA1_35, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 503 | table.cell(screener2, 2, 16, str.tostring(MA1_36, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 504 | table.cell(screener2, 2, 17, str.tostring(MA1_37, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 505 | table.cell(screener2, 2, 18, str.tostring(MA1_38, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 506 | table.cell(screener2, 2, 19, str.tostring(MA1_39, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 507 | table.cell(screener2, 2, 20, str.tostring(MA1_40, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 508 | if boolMA2 509 | table.cell(screener2, 3, 1, str.tostring(MA2_21, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 510 | table.cell(screener2, 3, 2, str.tostring(MA2_22, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 511 | table.cell(screener2, 3, 3, str.tostring(MA2_23, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 512 | table.cell(screener2, 3, 4, str.tostring(MA2_24, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 513 | table.cell(screener2, 3, 5, str.tostring(MA2_25, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 514 | table.cell(screener2, 3, 6, str.tostring(MA2_26, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 515 | table.cell(screener2, 3, 7, str.tostring(MA2_27, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 516 | table.cell(screener2, 3, 8, str.tostring(MA2_28, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 517 | table.cell(screener2, 3, 9, str.tostring(MA2_29, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 518 | table.cell(screener2, 3, 10, str.tostring(MA2_30, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 519 | table.cell(screener2, 3, 11, str.tostring(MA2_31, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 520 | table.cell(screener2, 3, 12, str.tostring(MA2_32, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 521 | table.cell(screener2, 3, 13, str.tostring(MA2_33, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 522 | table.cell(screener2, 3, 14, str.tostring(MA2_34, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 523 | table.cell(screener2, 3, 15, str.tostring(MA2_35, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 524 | table.cell(screener2, 3, 16, str.tostring(MA2_36, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 525 | table.cell(screener2, 3, 17, str.tostring(MA2_37, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 526 | table.cell(screener2, 3, 18, str.tostring(MA2_38, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 527 | table.cell(screener2, 3, 19, str.tostring(MA2_39, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 528 | table.cell(screener2, 3, 20, str.tostring(MA2_40, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 529 | if boolMA3 530 | table.cell(screener2, 4, 1, str.tostring(MA3_21, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 531 | table.cell(screener2, 4, 2, str.tostring(MA3_22, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 532 | table.cell(screener2, 4, 3, str.tostring(MA3_23, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 533 | table.cell(screener2, 4, 4, str.tostring(MA3_24, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 534 | table.cell(screener2, 4, 5, str.tostring(MA3_25, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 535 | table.cell(screener2, 4, 6, str.tostring(MA3_26, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 536 | table.cell(screener2, 4, 7, str.tostring(MA3_27, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 537 | table.cell(screener2, 4, 8, str.tostring(MA3_28, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 538 | table.cell(screener2, 4, 9, str.tostring(MA3_29, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 539 | table.cell(screener2, 4, 10, str.tostring(MA3_30, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 540 | table.cell(screener2, 4, 11, str.tostring(MA3_31, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 541 | table.cell(screener2, 4, 12, str.tostring(MA3_32, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 542 | table.cell(screener2, 4, 13, str.tostring(MA3_33, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 543 | table.cell(screener2, 4, 14, str.tostring(MA3_34, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 544 | table.cell(screener2, 4, 15, str.tostring(MA3_35, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 545 | table.cell(screener2, 4, 16, str.tostring(MA3_36, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 546 | table.cell(screener2, 4, 17, str.tostring(MA3_37, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 547 | table.cell(screener2, 4, 18, str.tostring(MA3_38, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 548 | table.cell(screener2, 4, 19, str.tostring(MA3_39, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 549 | table.cell(screener2, 4, 20, str.tostring(MA3_40, format.mintick), bgcolor = na , text_color = tableTextColor, text_size = tableTextSize.textsize()) 550 | if boolMG1 551 | table.cell(screener2, 5, 1, str.tostring(MG1_21, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 552 | table.cell(screener2, 5, 2, str.tostring(MG1_22, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 553 | table.cell(screener2, 5, 3, str.tostring(MG1_23, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 554 | table.cell(screener2, 5, 4, str.tostring(MG1_24, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 555 | table.cell(screener2, 5, 5, str.tostring(MG1_25, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 556 | table.cell(screener2, 5, 6, str.tostring(MG1_26, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 557 | table.cell(screener2, 5, 7, str.tostring(MG1_27, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 558 | table.cell(screener2, 5, 8, str.tostring(MG1_28, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 559 | table.cell(screener2, 5, 9, str.tostring(MG1_29, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 560 | table.cell(screener2, 5, 10, str.tostring(MG1_30, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 561 | table.cell(screener2, 5, 11, str.tostring(MG1_31, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 562 | table.cell(screener2, 5, 12, str.tostring(MG1_32, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 563 | table.cell(screener2, 5, 13, str.tostring(MG1_33, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 564 | table.cell(screener2, 5, 14, str.tostring(MG1_34, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 565 | table.cell(screener2, 5, 15, str.tostring(MG1_35, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 566 | table.cell(screener2, 5, 16, str.tostring(MG1_36, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 567 | table.cell(screener2, 5, 17, str.tostring(MG1_37, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 568 | table.cell(screener2, 5, 18, str.tostring(MG1_38, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 569 | table.cell(screener2, 5, 19, str.tostring(MG1_39, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 570 | table.cell(screener2, 5, 20, str.tostring(MG1_40, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 571 | 572 | if boolMG2 573 | table.cell(screener2, 6, 1, str.tostring(MG2_21, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 574 | table.cell(screener2, 6, 2, str.tostring(MG2_22, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 575 | table.cell(screener2, 6, 3, str.tostring(MG2_23, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 576 | table.cell(screener2, 6, 4, str.tostring(MG2_24, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 577 | table.cell(screener2, 6, 5, str.tostring(MG2_25, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 578 | table.cell(screener2, 6, 6, str.tostring(MG2_26, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 579 | table.cell(screener2, 6, 7, str.tostring(MG2_27, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 580 | table.cell(screener2, 6, 8, str.tostring(MG2_28, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 581 | table.cell(screener2, 6, 9, str.tostring(MG2_29, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 582 | table.cell(screener2, 6, 10, str.tostring(MG2_30, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 583 | table.cell(screener2, 6, 11, str.tostring(MG2_31, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 584 | table.cell(screener2, 6, 12, str.tostring(MG2_32, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 585 | table.cell(screener2, 6, 13, str.tostring(MG2_33, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 586 | table.cell(screener2, 6, 14, str.tostring(MG2_34, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 587 | table.cell(screener2, 6, 15, str.tostring(MG2_35, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 588 | table.cell(screener2, 6, 16, str.tostring(MG2_36, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 589 | table.cell(screener2, 6, 17, str.tostring(MG2_37, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 590 | table.cell(screener2, 6, 18, str.tostring(MG2_38, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 591 | table.cell(screener2, 6, 19, str.tostring(MG2_39, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 592 | table.cell(screener2, 6, 20, str.tostring(MG2_40, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 593 | if boolMG3 594 | table.cell(screener2, 7, 1, str.tostring(MG3_21, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 595 | table.cell(screener2, 7, 2, str.tostring(MG3_22, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 596 | table.cell(screener2, 7, 3, str.tostring(MG3_23, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 597 | table.cell(screener2, 7, 4, str.tostring(MG3_24, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 598 | table.cell(screener2, 7, 5, str.tostring(MG3_25, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 599 | table.cell(screener2, 7, 6, str.tostring(MG3_26, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 600 | table.cell(screener2, 7, 7, str.tostring(MG3_27, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 601 | table.cell(screener2, 7, 8, str.tostring(MG3_28, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 602 | table.cell(screener2, 7, 9, str.tostring(MG3_29, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 603 | table.cell(screener2, 7, 10, str.tostring(MG3_30, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 604 | table.cell(screener2, 7, 11, str.tostring(MG3_31, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 605 | table.cell(screener2, 7, 12, str.tostring(MG3_32, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 606 | table.cell(screener2, 7, 13, str.tostring(MG3_33, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 607 | table.cell(screener2, 7, 14, str.tostring(MG3_34, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 608 | table.cell(screener2, 7, 15, str.tostring(MG3_35, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 609 | table.cell(screener2, 7, 16, str.tostring(MG3_36, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 610 | table.cell(screener2, 7, 17, str.tostring(MG3_37, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 611 | table.cell(screener2, 7, 18, str.tostring(MG3_38, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 612 | table.cell(screener2, 7, 19, str.tostring(MG3_39, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 613 | table.cell(screener2, 7, 20, str.tostring(MG3_40, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 614 | if boolMG4 615 | table.cell(screener2, 8, 1, str.tostring(MG4_21, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 616 | table.cell(screener2, 8, 2, str.tostring(MG4_22, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 617 | table.cell(screener2, 8, 3, str.tostring(MG4_23, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 618 | table.cell(screener2, 8, 4, str.tostring(MG4_24, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 619 | table.cell(screener2, 8, 5, str.tostring(MG4_25, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 620 | table.cell(screener2, 8, 6, str.tostring(MG4_26, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 621 | table.cell(screener2, 8, 7, str.tostring(MG4_27, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 622 | table.cell(screener2, 8, 8, str.tostring(MG4_28, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 623 | table.cell(screener2, 8, 9, str.tostring(MG4_29, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 624 | table.cell(screener2, 8, 10, str.tostring(MG4_30, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 625 | table.cell(screener2, 8, 11, str.tostring(MG4_31, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 626 | table.cell(screener2, 8, 12, str.tostring(MG4_32, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 627 | table.cell(screener2, 8, 13, str.tostring(MG4_33, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 628 | table.cell(screener2, 8, 14, str.tostring(MG4_34, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 629 | table.cell(screener2, 8, 15, str.tostring(MG4_35, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 630 | table.cell(screener2, 8, 16, str.tostring(MG4_36, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 631 | table.cell(screener2, 8, 17, str.tostring(MG4_37, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 632 | table.cell(screener2, 8, 18, str.tostring(MG4_38, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 633 | table.cell(screener2, 8, 19, str.tostring(MG4_39, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 634 | table.cell(screener2, 8, 20, str.tostring(MG4_40, format.mintick), na, text_color = tableTextColor, text_size = tableTextSize.textsize()) 635 | 636 | if boolRSI 637 | table.cell(screener2, 9, 1, str.tostring(RSI_21, format.mintick), bgcolor = RSI_21 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 638 | table.cell(screener2, 9, 2, str.tostring(RSI_22, format.mintick), bgcolor = RSI_22 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 639 | table.cell(screener2, 9, 3, str.tostring(RSI_23, format.mintick), bgcolor = RSI_23 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 640 | table.cell(screener2, 9, 4, str.tostring(RSI_24, format.mintick), bgcolor = RSI_24 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 641 | table.cell(screener2, 9, 5, str.tostring(RSI_25, format.mintick), bgcolor = RSI_25 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 642 | table.cell(screener2, 9, 6, str.tostring(RSI_26, format.mintick), bgcolor = RSI_26 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 643 | table.cell(screener2, 9, 7, str.tostring(RSI_27, format.mintick), bgcolor = RSI_27 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 644 | table.cell(screener2, 9, 8, str.tostring(RSI_28, format.mintick), bgcolor = RSI_28 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 645 | table.cell(screener2, 9, 9, str.tostring(RSI_29, format.mintick), bgcolor = RSI_29 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 646 | table.cell(screener2, 9, 10, str.tostring(RSI_30, format.mintick), bgcolor = RSI_30 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 647 | table.cell(screener2, 9, 11, str.tostring(RSI_31, format.mintick), bgcolor = RSI_31 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 648 | table.cell(screener2, 9, 12, str.tostring(RSI_32, format.mintick), bgcolor = RSI_32 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 649 | table.cell(screener2, 9, 13, str.tostring(RSI_33, format.mintick), bgcolor = RSI_33 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 650 | table.cell(screener2, 9, 14, str.tostring(RSI_34, format.mintick), bgcolor = RSI_34 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 651 | table.cell(screener2, 9, 15, str.tostring(RSI_35, format.mintick), bgcolor = RSI_35 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 652 | table.cell(screener2, 9, 16, str.tostring(RSI_36, format.mintick), bgcolor = RSI_36 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 653 | table.cell(screener2, 9, 17, str.tostring(RSI_37, format.mintick), bgcolor = RSI_37 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 654 | table.cell(screener2, 9, 18, str.tostring(RSI_38, format.mintick), bgcolor = RSI_38 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 655 | table.cell(screener2, 9, 19, str.tostring(RSI_39, format.mintick), bgcolor = RSI_39 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 656 | table.cell(screener2, 9, 20, str.tostring(RSI_40, format.mintick), bgcolor = RSI_40 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 657 | 658 | if boolMACD 659 | table.cell(screener2, 10, 1, str.tostring(MACD_21, format.mintick), bgcolor = MACD_21 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 660 | table.cell(screener2, 10, 2, str.tostring(MACD_22, format.mintick), bgcolor = MACD_22 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 661 | table.cell(screener2, 10, 3, str.tostring(MACD_23, format.mintick), bgcolor = MACD_23 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 662 | table.cell(screener2, 10, 4, str.tostring(MACD_24, format.mintick), bgcolor = MACD_24 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 663 | table.cell(screener2, 10, 5, str.tostring(MACD_25, format.mintick), bgcolor = MACD_25 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 664 | table.cell(screener2, 10, 6, str.tostring(MACD_26, format.mintick), bgcolor = MACD_26 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 665 | table.cell(screener2, 10, 7, str.tostring(MACD_27, format.mintick), bgcolor = MACD_27 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 666 | table.cell(screener2, 10, 8, str.tostring(MACD_28, format.mintick), bgcolor = MACD_28 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 667 | table.cell(screener2, 10, 9, str.tostring(MACD_29, format.mintick), bgcolor = MACD_29 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 668 | table.cell(screener2, 10, 10, str.tostring(MACD_30, format.mintick), bgcolor = MACD_30 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 669 | table.cell(screener2, 10, 11, str.tostring(MACD_31, format.mintick), bgcolor = MACD_31 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 670 | table.cell(screener2, 10, 12, str.tostring(MACD_32, format.mintick), bgcolor = MACD_32 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 671 | table.cell(screener2, 10, 13, str.tostring(MACD_33, format.mintick), bgcolor = MACD_33 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 672 | table.cell(screener2, 10, 14, str.tostring(MACD_34, format.mintick), bgcolor = MACD_34 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 673 | table.cell(screener2, 10, 15, str.tostring(MACD_35, format.mintick), bgcolor = MACD_35 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 674 | table.cell(screener2, 10, 16, str.tostring(MACD_36, format.mintick), bgcolor = MACD_36 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 675 | table.cell(screener2, 10, 17, str.tostring(MACD_37, format.mintick), bgcolor = MACD_37 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 676 | table.cell(screener2, 10, 18, str.tostring(MACD_38, format.mintick), bgcolor = MACD_38 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 677 | table.cell(screener2, 10, 19, str.tostring(MACD_39, format.mintick), bgcolor = MACD_39 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 678 | table.cell(screener2, 10, 20, str.tostring(MACD_40, format.mintick), bgcolor = MACD_40 == 1 ? color.lime : color.red, text_color = tableTextColor, text_size = tableTextSize.textsize()) 679 | -------------------------------------------------------------------------------- /MOTTSistem: -------------------------------------------------------------------------------- 1 | //@version=5 2 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 3 | //developer: ANIL ÖZEKŞİ 4 | //code: Erol Mutlu 5 | strategy('Multiple OTT','MOTT', overlay=true, initial_capital = 10000, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, commission_type = strategy.commission.percent, commission_value = 0.01, slippage = 1) 6 | src = input(close, title='Source') 7 | lengthX1 = input.int(2,'High/Low Period', minval=1) 8 | length = input.int(1, 'OTT Period', minval=1) 9 | percent = input.float(2.2, 'OTT Percent', step=0.1, minval=0) 10 | mav = input.string(title='Moving Average Type', defval='VAR', options=['SMA', 'EMA', 'WMA', 'TMA', 'VAR', 'WWMA', 'ZLEMA', 'TSF']) 11 | showsupport = input(title="Show MOVING AVERAGE?", defval=false) 12 | 13 | Var_Func(src, length) => 14 | valpha = 2 / (length + 1) 15 | vud1 = src > src[1] ? src - src[1] : 0 16 | vdd1 = src < src[1] ? src[1] - src : 0 17 | vUD = math.sum(vud1, 9) 18 | vDD = math.sum(vdd1, 9) 19 | vCMO = nz((vUD - vDD) / (vUD + vDD)) 20 | VAR = 0.0 21 | VAR := nz(valpha * math.abs(vCMO) * src) + (1 - valpha * math.abs(vCMO)) * nz(VAR[1]) 22 | VAR 23 | VAR = Var_Func(src, length) 24 | Wwma_Func(src, length) => 25 | wwalpha = 1 / length 26 | WWMA = 0.0 27 | WWMA := wwalpha * src + (1 - wwalpha) * nz(WWMA[1]) 28 | WWMA 29 | WWMA = Wwma_Func(src, length) 30 | Zlema_Func(src, length) => 31 | zxLag = length / 2 == math.round(length / 2) ? length / 2 : (length - 1) / 2 32 | zxEMAData = src + src - src[zxLag] 33 | ZLEMA = ta.ema(zxEMAData, length) 34 | ZLEMA 35 | ZLEMA = Zlema_Func(src, length) 36 | Tsf_Func(src, length) => 37 | lrc = ta.linreg(src, length, 0) 38 | lrc1 = ta.linreg(src, length, 1) 39 | lrs = lrc - lrc1 40 | TSF = ta.linreg(src, length, 0) + lrs 41 | TSF 42 | TSF = Tsf_Func(src, length) 43 | 44 | ma(source, length, _type) => 45 | switch _type 46 | "SMA" => ta.sma(source, length) 47 | "EMA" => ta.ema(source, length) 48 | "WMA" => ta.wma(source, length) 49 | "TMA" => ta.sma(ta.sma(source, math.ceil(length / 2)), math.floor(length / 2) + 1) 50 | "VAR" => Var_Func(source, length) 51 | "VWMA" => ta.vwma(source, length) 52 | "ZLEMA" => Zlema_Func(source, length) 53 | "TSF" => Tsf_Func(source, length) 54 | "SMMA (RMA)" => ta.rma(source, length) 55 | 56 | MAvg = ma(src, length, mav) 57 | 58 | K1 = ta.highest(high,lengthX1) 59 | K2 = ta.lowest(low,lengthX1) 60 | ott(source,length,percent) => 61 | MA = ma(source, length, mav) 62 | fark = MA * percent * 0.01, longStop = MA - fark, shortStop = MA + fark 63 | longStop := longStop > nz(longStop[1]) or MA < nz(longStop[1]) ? longStop : nz(longStop[1]) 64 | shortStop := shortStop < nz(shortStop[1]) or MA > nz(shortStop[1]) ? shortStop : nz(shortStop[1]) 65 | k1 = 0.0, k1 := MA > nz (k1[1]) ? longStop : MA < nz(k1[1]) ? shortStop : nz(k1[1]) 66 | ot1 = 1 + percent * 0.01 / 2 67 | ot2 = 1 - percent * 0.01 / 2 68 | k2 = MA> k1 ? k1 * ot1 : k1 * ot2 69 | OT = nz(k2[2]) 70 | 71 | O1 = ott(K1,length,percent) 72 | O2 = ott(K2,length,percent) 73 | 74 | plot(O1, "OTT", color=color.rgb(33, 170, 243), linewidth=1) 75 | plot(O2, "OTT5", color=color.rgb(199, 56, 224), linewidth=1) 76 | plot(showsupport ? MAvg : na, color=color.new(#051be1, 0), linewidth=2, title="VIDYA") 77 | 78 | var color = 0 79 | if close > math.max(O1, O2) 80 | strategy.entry("Al", strategy.long) 81 | color := 1 82 | if close < math.min(O1, O2) 83 | strategy.close_all("Flat") 84 | color := 0 85 | barcolor(color = color == 1 ? color.green : color.yellow) 86 | -------------------------------------------------------------------------------- /MeanReversalPortfolio: -------------------------------------------------------------------------------- 1 | //@version=6 2 | // Erol Mutlu @eerolmutlu 3 | strategy("MeanReversalPortfolio [eerolmutlu]", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=1) 4 | 5 | enableStrategy1 = input.bool(defval = true, title = "strategy 1", group = "Stratejiler") 6 | enableStrategy2 = input.bool(defval = true, title = "strategy 2", group = "Stratejiler") 7 | enableStrategy3 = input.bool(defval = true, title = "strategy 3", group = "Stratejiler") 8 | enableStrategy4 = input.bool(defval = true, title = "strategy 4", group = "Stratejiler") 9 | enableStrategy5 = input.bool(defval = true, title = "strategy 5", group = "Stratejiler") 10 | 11 | fromDateTime = input.time(defval = timestamp("2012-01-01T01:01+0000"), title = "From Date and time", group = "Time settings") 12 | toDateTime = input.time(defval = timestamp("9999-01-01T01:01+0000"), title = "To Date and time", group = "Time settings") 13 | 14 | 15 | //Fonksiyonlar 16 | tradeDateIsAllowed() => 17 | time >= fromDateTime and time <= toDateTime 18 | 19 | strategy1() => 20 | avgHighLow = ta.sma(high-low, 25) 21 | ibs = (close - low) / (high - low) 22 | lowerBand = ta.highest(10) - avgHighLow * 2.5 23 | enableStrategy1 ? close < lowerBand and ibs < 0.3 : false 24 | 25 | strategy2() => 26 | monday = dayofweek == dayofweek.monday 27 | today_close_lower_than_friday_close = close < close[1] 28 | friday_close_lower_than_thursday_close = close[1] < close[2] 29 | enableStrategy2 ? monday and today_close_lower_than_friday_close and friday_close_lower_than_thursday_close : false 30 | 31 | strategy3() => 32 | lowerChannel = ta.lowest(low[1], 5) 33 | enableStrategy3 ? close <= lowerChannel : false 34 | 35 | strategy4() => 36 | lowestRange = ta.lowest(high - low, 6) 37 | ma200 = ta.sma(close, 200) 38 | enableStrategy4 ? (lowestRange == high - low) and (close > ma200) : false 39 | 40 | strategy5() => 41 | highestHigh = ta.highest(high[1], 10) 42 | ibs = (close - low) / (high - low) 43 | enableStrategy5 ? high >= highestHigh and ibs < 0.15 : false 44 | 45 | buy = (strategy1() or strategy2() or strategy3() or strategy4() or strategy5()) and tradeDateIsAllowed() 46 | sell = close > high[1] 47 | 48 | if (buy) 49 | strategy.entry("Buy", strategy.long) 50 | if (sell) 51 | strategy.close("Buy", "Flat") 52 | -------------------------------------------------------------------------------- /Murrey Math Lines: -------------------------------------------------------------------------------- 1 | //@version=5 2 | indicator("Murrey Math Lines [erolmutlu]", max_bars_back=500, overlay=true) 3 | // Function outputs 1 when it's the first bar of the D/W/M/Y 4 | is_newbar(res) => 5 | ch = 0 6 | if(res == 'Y') 7 | t = year(time('D')) 8 | ch := ta.change(t) != 0 ? 1 : 0 9 | else 10 | t = time(res) 11 | ch := ta.change(t) != 0 ? 1 : 0 12 | ch 13 | 14 | // Rounding levels to min tick 15 | nround(x) => 16 | n = math.round(x / syminfo.mintick) * syminfo.mintick 17 | //-- get inputs 18 | frame = input.int(defval=64, title="Frame Size", minval=8, maxval=256) 19 | mult = input.float(defval=1.5, title="Frame Multiplier", minval=1.0, maxval=2.0, step=0.5) 20 | wicks = input.bool(defval=true, title="Ignore Wicks?") 21 | extendOption = input.string(title="Line Extension", options=["none", "left", "right", "both"], defval="none") 22 | lineExtend = (extendOption == "left") ? extend.left : (extendOption == "right") ? extend.right : (extendOption == "both") ? extend.both : extend.none 23 | //-- defines 24 | logTen = math.log(10) 25 | log8 = math.log(8) 26 | log2 = math.log(2) 27 | lookback = math.round(frame * mult) 28 | 29 | //-- determine price values based on ignore wick selection 30 | uPrice = wicks == true ? math.max(open, close) : high 31 | lPrice = wicks == true ? math.min(open, close) : low 32 | 33 | //-- find highest/lowest price over specified lookback 34 | vLow = ta.lowest(lPrice, lookback) 35 | vHigh = ta.highest(uPrice, lookback) 36 | vDist = vHigh - vLow 37 | //-- if low price is < 0 then adjust accordingly 38 | tmpHigh = vLow < 0 ? 0 - vLow : vHigh 39 | tmpLow = vLow < 0 ? 0 - vLow - vDist : vLow 40 | 41 | //-- determine if price shift is in place 42 | shift = vLow < 0 ? true : false 43 | 44 | //-- calculate scale frame 45 | sfVar = math.log(0.4 * tmpHigh) / logTen - math.floor(math.log(0.4 * tmpHigh) / logTen) 46 | SR = tmpHigh > 25 ? sfVar > 0 ? math.exp(logTen * (math.floor(math.log(0.4 * tmpHigh) / logTen) + 1)) : 47 | math.exp(logTen * math.floor(math.log(0.4 * tmpHigh) / logTen)) : 48 | 100 * math.exp(log8 * math.floor(math.log(0.005 * tmpHigh) / log8)) 49 | nVar1 = math.log(SR / (tmpHigh - tmpLow)) / log8 50 | nVar2 = nVar1 - math.floor(nVar1) 51 | N = nVar1 <= 0 ? 0 : nVar2 == 0 ? math.floor(nVar1) : math.floor(nVar1) + 1 52 | 53 | //-- calculate scale interval and temporary frame top and bottom 54 | SI = SR * math.exp(-N * log8) 55 | M = math.floor(1.0 / log2 * math.log((tmpHigh - tmpLow) / SI) + 0.0000001) 56 | I = math.round((tmpHigh + tmpLow) * 0.5 / (SI * math.exp((M - 1) * log2))) 57 | 58 | Bot = (I - 1) * SI * math.exp((M - 1) * log2) 59 | Top = (I + 1) * SI * math.exp((M - 1) * log2) 60 | 61 | //-- determine if frame shift is required 62 | doShift = tmpHigh - Top > 0.25 * (Top - Bot) or Bot - tmpLow > 0.25 * (Top - Bot) 63 | 64 | ER = doShift == true ? 1 : 0 65 | 66 | MM = ER == 0 ? M : ER == 1 and M < 2 ? M + 1 : 0 67 | NN = ER == 0 ? N : ER == 1 and M < 2 ? N : N - 1 68 | 69 | //-- recalculate scale interval and top and bottom of frame, if necessary 70 | finalSI = ER == 1 ? SR * math.exp(-NN * log8) : SI 71 | finalI = ER == 1 ? math.round((tmpHigh + tmpLow) * 0.5 / (finalSI * math.exp((MM - 1) * log2))) : I 72 | finalBot = ER == 1 ? (finalI - 1) * finalSI * math.exp((MM - 1) * log2) : Bot 73 | finalTop = ER == 1 ? (finalI + 1) * finalSI * math.exp((MM - 1) * log2) : Top 74 | 75 | //-- determine the increment 76 | Increment = (finalTop - finalBot) / 8 77 | 78 | //-- determine the absolute top 79 | absTop = shift == true ? -(finalBot - 3 * Increment) : finalTop + 3 * Increment 80 | 81 | //-- create our Murrey line variables based on absolute top and the increment 82 | Plus38 = absTop 83 | Plus28 = absTop - Increment 84 | Plus18 = absTop - 2 * Increment 85 | EightEight = absTop - 3 * Increment 86 | SevenEight = absTop - 4 * Increment 87 | SixEight = absTop - 5 * Increment 88 | FiveEight = absTop - 6 * Increment 89 | FourEight = absTop - 7 * Increment 90 | ThreeEight = absTop - 8 * Increment 91 | TwoEight = absTop - 9 * Increment 92 | OneEight = absTop - 10 * Increment 93 | ZeroEight = absTop - 11 * Increment 94 | Minus18 = absTop - 12 * Increment 95 | Minus28 = absTop - 13 * Increment 96 | Minus38 = absTop - 14 * Increment 97 | 98 | bars_sinse = 0 99 | bars_sinse := is_newbar('D') ? 0 : bars_sinse[1] + 1 100 | //-- plot the lines and we are done 101 | vsm1_p = line.new(bar_index[math.min(bars_sinse, 300)], Plus38, bar_index, Plus38, color=color.white, style = line.style_solid, extend = extend.none,width = 2) 102 | line.set_extend(id=vsm1_p, extend=lineExtend) 103 | vsm2_p = line.new(bar_index[math.min(bars_sinse, 300)], Plus28, bar_index, Plus28, color=color.red, style = line.style_solid, extend = extend.none,width = 2) 104 | line.set_extend(id=vsm2_p, extend=lineExtend) 105 | vsm3_p = line.new(bar_index[math.min(bars_sinse, 300)], Plus18, bar_index, Plus18, color=color.red, style = line.style_solid, extend = extend.none,width = 2) 106 | line.set_extend(id=vsm3_p, extend=lineExtend) 107 | vsm4_p = line.new(bar_index[math.min(bars_sinse, 300)], EightEight, bar_index, EightEight, color=color.aqua, style = line.style_solid, extend = extend.none,width = 2) 108 | line.set_extend(id=vsm4_p, extend=lineExtend) 109 | vsm5_p = line.new(bar_index[math.min(bars_sinse, 300)], SevenEight, bar_index, SevenEight, color=color.orange, style = line.style_solid, extend = extend.none,width = 2) 110 | line.set_extend(id=vsm5_p, extend=lineExtend) 111 | vsm6_p = line.new(bar_index[math.min(bars_sinse, 300)], SixEight, bar_index, SixEight, color=color.fuchsia, style = line.style_solid, extend = extend.none,width = 2) 112 | line.set_extend(id=vsm6_p, extend=lineExtend) 113 | vsm7_p = line.new(bar_index[math.min(bars_sinse, 300)], FiveEight, bar_index, FiveEight, color=color.green, style = line.style_solid, extend = extend.none,width = 2) 114 | line.set_extend(id=vsm7_p, extend=lineExtend) 115 | vsm8_p = line.new(bar_index[math.min(bars_sinse, 300)], FourEight, bar_index, FourEight, color=color.aqua, style = line.style_solid, extend = extend.none,width = 2) 116 | line.set_extend(id=vsm8_p, extend=lineExtend) 117 | vsm9_p = line.new(bar_index[math.min(bars_sinse, 300)], ThreeEight, bar_index, ThreeEight, color=color.green, style = line.style_solid, extend = extend.none,width = 2) 118 | line.set_extend(id=vsm9_p, extend=lineExtend) 119 | vsm10_p = line.new(bar_index[math.min(bars_sinse, 300)], TwoEight, bar_index, TwoEight, color=color.fuchsia, style = line.style_solid, extend = extend.none,width = 2) 120 | line.set_extend(id=vsm10_p, extend=lineExtend) 121 | vsm11_p = line.new(bar_index[math.min(bars_sinse, 300)], OneEight, bar_index, OneEight, color=color.orange, style = line.style_solid, extend = extend.none,width = 2) 122 | line.set_extend(id=vsm11_p, extend=lineExtend) 123 | vsm12_p = line.new(bar_index[math.min(bars_sinse, 300)], ZeroEight, bar_index, ZeroEight, color=color.aqua, style = line.style_solid, extend = extend.none,width = 2) 124 | line.set_extend(id=vsm12_p, extend=lineExtend) 125 | vsm13_p = line.new(bar_index[math.min(bars_sinse, 300)], Minus18, bar_index, Minus18, color=color.green, style = line.style_solid, extend = extend.none,width = 2) 126 | line.set_extend(id=vsm13_p, extend=lineExtend) 127 | vsm14_p = line.new(bar_index[math.min(bars_sinse, 300)], Minus28, bar_index, Minus28, color=color.green, style = line.style_solid, extend = extend.none,width = 2) 128 | line.set_extend(id=vsm14_p, extend=lineExtend) 129 | vsm15_p = line.new(bar_index[math.min(bars_sinse, 300)], Minus38, bar_index, Minus38, color=color.white, style = line.style_solid, extend = extend.none,width = 2) 130 | line.set_extend(id=vsm15_p, extend=lineExtend) 131 | 132 | //Delete 133 | 134 | if (not is_newbar('D') or not false) 135 | //line.delete(vpp_p[1]) 136 | line.delete(vsm1_p[1]) 137 | line.delete(vsm2_p[1]) 138 | line.delete(vsm3_p[1]) 139 | line.delete(vsm4_p[1]) 140 | line.delete(vsm5_p[1]) 141 | line.delete(vsm6_p[1]) 142 | line.delete(vsm7_p[1]) 143 | line.delete(vsm8_p[1]) 144 | line.delete(vsm9_p[1]) 145 | line.delete(vsm10_p[1]) 146 | line.delete(vsm11_p[1]) 147 | line.delete(vsm12_p[1]) 148 | line.delete(vsm13_p[1]) 149 | line.delete(vsm14_p[1]) 150 | line.delete(vsm15_p[1]) 151 | 152 | //Labelling 153 | label_vsm1 = label.new(bar_index+50, Plus38, text=("+3/8 Imminent Bearish reversal -- " + str.tostring(nround(Plus38))), style= label.style_none, textcolor = color.white) 154 | label_vsm2 = label.new(bar_index+50, Plus28, text=("+2/8 Extreme Overshoot -- " + str.tostring(nround(Plus28))), style= label.style_none, textcolor = color.red) 155 | label_vsm3 = label.new(bar_index+50, Plus18, text=("+1/8 Overshoot -- " + str.tostring(nround(Plus18))), style= label.style_none, textcolor = color.red) 156 | label_vsm4 = label.new(bar_index+50, EightEight, text=("8/8 Ultimate resistance -- " + " " + str.tostring(nround(EightEight))), style= label.style_none, textcolor = color.aqua) 157 | label_vsm5 = label.new(bar_index+50, SevenEight, text=("7/8 Weak, Stop & Reverse -- " + " " + str.tostring(nround(SevenEight))), style= label.style_none, textcolor = color.orange) 158 | label_vsm6 = label.new(bar_index+50, SixEight, text=("6/8 Strong pivot reverse -- " + " " + str.tostring(nround(SixEight))), style= label.style_none, textcolor = color.fuchsia) 159 | label_vsm7 = label.new(bar_index+50, FiveEight, text=("5/8 Top of trading range -- " + " " + str.tostring(nround(FiveEight))), style= label.style_none, textcolor = color.green) 160 | label_vsm8 = label.new(bar_index+50, FourEight, text=("4/8 Major S/R pivot point -- " + " " + str.tostring(nround(FourEight))), style= label.style_none, textcolor = color.aqua) 161 | label_vsm9 = label.new(bar_index+50, ThreeEight, text=("3/8 Bottom of trading range -- " + " " + str.tostring(nround(ThreeEight))), style= label.style_none, textcolor = color.green) 162 | label_vsm10 = label.new(bar_index+50, TwoEight, text=("2/8 Strong, Pivot, reverse -- " + " " + str.tostring(nround(TwoEight))), style= label.style_none, textcolor = color.fuchsia) 163 | label_vsm11 = label.new(bar_index+50, OneEight, text=("1/8 Weak, Stop & Reverse -- " + " " + str.tostring(nround(OneEight))), style= label.style_none, textcolor = color.orange) 164 | label_vsm12 = label.new(bar_index+50, ZeroEight, text=("0/8 Ultimate Support -- " + " " + str.tostring(nround(ZeroEight))), style= label.style_none, textcolor = color.aqua) 165 | label_vsm13 = label.new(bar_index+50, Minus18, text=("-1/8 Oversold -- " + " " + str.tostring(nround(Minus18))), style= label.style_none, textcolor = color.green) 166 | label_vsm14 = label.new(bar_index+50, Minus28, text=("-2/8 Extreme Oversold -- " + " " + str.tostring(nround(Minus28))), style= label.style_none, textcolor = color.green) 167 | label_vsm15 = label.new(bar_index+50, Minus38, text=("-3/8 Imminent Bullish reversal -- " + " " + str.tostring(nround(Minus38))), style= label.style_none, textcolor = color.white) 168 | //Label delete 169 | if (not is_newbar('D') or not false) 170 | label.delete(label_vsm1[1]) 171 | label.delete(label_vsm2[1]) 172 | label.delete(label_vsm3[1]) 173 | label.delete(label_vsm4[1]) 174 | label.delete(label_vsm5[1]) 175 | label.delete(label_vsm6[1]) 176 | label.delete(label_vsm7[1]) 177 | label.delete(label_vsm8[1]) 178 | label.delete(label_vsm9[1]) 179 | label.delete(label_vsm10[1]) 180 | label.delete(label_vsm11[1]) 181 | label.delete(label_vsm12[1]) 182 | label.delete(label_vsm13[1]) 183 | label.delete(label_vsm14[1]) 184 | label.delete(label_vsm15[1]) 185 | 186 | 187 | 188 | //////////// 189 | // ALERTS // 190 | ot = Plus38 > Plus38[1] or Plus38 < Plus38[1] or Plus28 > Plus28[1] or Plus28 < Plus28[1] or Plus18 > Plus18[1] or Plus18 < Plus18[1] or EightEight > EightEight[1] or SevenEight > SevenEight[1] or SevenEight < SevenEight[1] or SixEight > SixEight[1] or SixEight < SixEight[1] or FiveEight > FiveEight[1] or FiveEight < FiveEight[1] or FourEight > FourEight[1] or FourEight < FourEight[1] or ThreeEight > ThreeEight[1] or ThreeEight < ThreeEight[1] or TwoEight > TwoEight[1] or TwoEight < TwoEight[1] or OneEight > OneEight[1] or OneEight < OneEight[1] or ZeroEight > ZeroEight[1] or ZeroEight < ZeroEight[1] or Minus18 > Minus18[1] or Minus18 < Minus18[1] or Minus28 > Minus28[1] or Minus38 > Minus38[1] or Minus38 < Minus38[1] 191 | alertcondition(ot, title="Alert me when Octaves Change!", message="Octaves Change - Alert!") 192 | 193 | 194 | alertcondition(not is_newbar('D') and ta.cross(close, Plus38), "Cross +3/8", "Cross +3/8") 195 | alertcondition(not is_newbar('D') and ta.cross(close, Plus28), "Cross +2/8", "Cross +2/8") 196 | alertcondition(not is_newbar('D') and ta.cross(close, Plus18), "Cross +1/8", "Cross +1/8") 197 | alertcondition(not is_newbar('D') and ta.cross(close, EightEight), "Cross 8/8", "Cross 8/8") 198 | alertcondition(not is_newbar('D') and ta.cross(close, SevenEight), "Cross 7/8", "Cross 7/8") 199 | alertcondition(not is_newbar('D') and ta.cross(close, SixEight), "Cross 6/8", "Cross 6/8") 200 | alertcondition(not is_newbar('D') and ta.cross(close, FiveEight), "Cross 5/8", "Cross 5/8") 201 | alertcondition(not is_newbar('D') and ta.cross(close, FourEight), "Cross 4/8", "Cross 4/8") 202 | alertcondition(not is_newbar('D') and ta.cross(close, ThreeEight), "Cross 3/8", "Cross 3/8") 203 | alertcondition(not is_newbar('D') and ta.cross(close, TwoEight), "Cross 2/8", "Cross 2/8") 204 | alertcondition(not is_newbar('D') and ta.cross(close, OneEight), "Cross 1/8", "Cross 1/8") 205 | alertcondition(not is_newbar('D') and ta.cross(close, ZeroEight), "Cross 0/8", "Cross 0/8") 206 | alertcondition(not is_newbar('D') and ta.cross(close, Minus18), "Cross -1/8", "Cross -1/8") 207 | alertcondition(not is_newbar('D') and ta.cross(close, Minus28), "Cross -2/8", "Cross -2/8") 208 | alertcondition(not is_newbar('D') and ta.cross(close, Minus38), "Cross -3/8", "Cross -3/8") 209 | 210 | alertcondition(not is_newbar('D') and ta.crossover(close, Plus38), "Crossover +3/8", "Crossover +3/8") 211 | alertcondition(not is_newbar('D') and ta.crossover(close, Plus28), "Crossover +2/8", "Crossover +2/8") 212 | alertcondition(not is_newbar('D') and ta.crossover(close, Plus18), "Crossover +1/8", "Crossover +1/8") 213 | alertcondition(not is_newbar('D') and ta.crossover(close, EightEight), "Crossover 8/8", "Crossover 8/8") 214 | alertcondition(not is_newbar('D') and ta.crossover(close, SevenEight), "Crossover 7/8", "Crossover 7/8") 215 | alertcondition(not is_newbar('D') and ta.crossover(close, SixEight), "Crossover 6/8", "Crossover 6/8") 216 | alertcondition(not is_newbar('D') and ta.crossover(close, FiveEight), "Crossover 5/8", "Crossover 5/8") 217 | alertcondition(not is_newbar('D') and ta.crossover(close, FourEight), "Crossover 4/8", "Crossover 4/8") 218 | alertcondition(not is_newbar('D') and ta.crossover(close, ThreeEight), "Crossover 3/8", "Crossover 3/8") 219 | alertcondition(not is_newbar('D') and ta.crossover(close, TwoEight), "Crossover 2/8", "Crossover 2/8") 220 | alertcondition(not is_newbar('D') and ta.crossover(close, OneEight), "Crossover 1/8", "Crossover 1/8") 221 | alertcondition(not is_newbar('D') and ta.crossover(close, ZeroEight), "Crossover 0/8", "Crossover 0/8") 222 | alertcondition(not is_newbar('D') and ta.crossover(close, Minus18), "Crossover -1/8", "Crossover -1/8") 223 | alertcondition(not is_newbar('D') and ta.crossover(close, Minus28), "Crossover -2/8", "Crossover -2/8") 224 | alertcondition(not is_newbar('D') and ta.crossover(close, Minus38), "Crossover -3/8", "Crossover -3/8") 225 | 226 | 227 | alertcondition(not is_newbar('D') and ta.crossunder(close, Plus38), "Crossunder +3/8", "Crossunder +3/8") 228 | alertcondition(not is_newbar('D') and ta.crossunder(close, Plus28), "Crossunder +2/8", "Crossunder +2/8") 229 | alertcondition(not is_newbar('D') and ta.crossunder(close, Plus18), "Crossunder +1/8", "Crossunder +1/8") 230 | alertcondition(not is_newbar('D') and ta.crossunder(close, EightEight), "Crossunder 8/8", "Crossunder 8/8") 231 | alertcondition(not is_newbar('D') and ta.crossunder(close, SevenEight), "Crossunder 7/8", "Crossunder 7/8") 232 | alertcondition(not is_newbar('D') and ta.crossunder(close, SixEight), "Crossunder 6/8", "Crossunder 6/8") 233 | alertcondition(not is_newbar('D') and ta.crossunder(close, FiveEight), "Crossunder 5/8", "Crossunder 5/8") 234 | alertcondition(not is_newbar('D') and ta.crossunder(close, ThreeEight), "Crossunder 4/8", "Crossunder 4/8") 235 | alertcondition(not is_newbar('D') and ta.crossunder(close, FourEight), "Crossunder 3/8", "Crossunder 3/8") 236 | alertcondition(not is_newbar('D') and ta.crossunder(close, TwoEight), "Crossunder 2/8", "Crossunder 2/8") 237 | alertcondition(not is_newbar('D') and ta.crossunder(close, OneEight), "Crossunder 1/8", "Crossunder 1/8") 238 | alertcondition(not is_newbar('D') and ta.crossunder(close, ZeroEight), "Crossunder 0/8", "Crossunder 0/8") 239 | alertcondition(not is_newbar('D') and ta.crossunder(close, Minus18), "Crossunder -1/8", "Crossunder -1/8") 240 | alertcondition(not is_newbar('D') and ta.crossunder(close, Minus28), "Crossunder -2/8", "Crossunder -2/8") 241 | alertcondition(not is_newbar('D') and ta.crossunder(close, Minus38), "Crossunder -3/8", "Crossunder -3/8") 242 | 243 | //plot(Plus38, title="+3/8 Imminent Bearish reversal", style=plot.style_circles, color=Plus38 != Plus38[1] ? na : color.black, linewidth=2) 244 | //plot(Plus28, title="+2/8 Extreme Overshoot conditions, can reverse anytime", style=plot.style_line, color=Plus28 != Plus28[1] ? na : color.black, linewidth=2) 245 | //plot(Plus18, title="+1/8 Overshoot conditions", style=plot.style_line, color=Plus18 != Plus18[1] ? na : color.yellow, linewidth=3) 246 | //plot(EightEight, title="8/8 Ultimate resistance, extremely overbought conditions", style=plot.style_line, color=EightEight != EightEight[1] ? na:color.blue, linewidth=3) 247 | //plot(SevenEight, title="7/8 Weak level, place to stop and reverse", style=plot.style_line, color=EightEight != EightEight[1] ? na: color.yellow, linewidth=1) 248 | //plot(SixEight, title="6/8 Strong pivot reverse", style=plot.style_line, color=SixEight != SixEight[1] ? na:color.red, linewidth=1) 249 | //plot(FiveEight, title="5/8 Top of trading range", style=plot.style_line, color=FiveEight != FiveEight[1] ? na:color.green, linewidth=1) 250 | //plot(FourEight, title="4/8 Major support/resistance pivot point", style=plot.style_line, color=FourEight != FourEight[1] ? na:color.blue, linewidth=1) 251 | //plot(ThreeEight, title="3/8 Bottom of trading range", style=plot.style_line, color=ThreeEight != ThreeEight[1] ? na :color.green, linewidth=1) 252 | //plot(TwoEight, title="2/8 Strong, Pivot, reverse", style=plot.style_line, color=TwoEight != TwoEight[1] ? na : color.red, linewidth=1) 253 | //plot(OneEight, title="1/8 Weak, place to stop and reverse", style=plot.style_line, color=OneEight != OneEight[1] ? na:color.yellow, linewidth=2) 254 | //plot(ZeroEight, title="0/8 Hardest line to fall below, oversold conditions", style=plot.style_line, color=ZeroEight != ZeroEight[1] ? na :color.blue, linewidth=3) 255 | //plot(Minus18, title="-1/8 Oversold conditions", style=plot.style_line, color=Minus18 != Minus18[1] ? na : color.yellow, linewidth=3) 256 | //plot(Minus28, title="-2/8 Extreme oversold conditions, can reverse anytime", style=plot.style_line, color=Minus28 != Minus28[1] ? na :color.black, linewidth=2) 257 | //plot(Minus38, title="-3/8 Imminent bullish reversal ", style=plot.style_circles, color=Minus38 != Minus38[1] ? na : color.black, linewidth=2) 258 | -------------------------------------------------------------------------------- /PivotBandStrategy: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | strategy("Pivot Band Strategy", overlay=true) 6 | 7 | xHigh = request.security(syminfo.tickerid, 'D', high[0]) 8 | xLow = request.security(syminfo.tickerid, 'D', low[0]) 9 | xClose = request.security(syminfo.tickerid, 'D', close[0]) 10 | 11 | EMA = ta.ema(close, 3) 12 | 13 | vPP = (xHigh + xLow + xClose) / 3 14 | vPU = 2 * vPP - xLow 15 | vPA = 2 * vPP - xHigh 16 | plot(vPP, color=color.new(color.green, 0), title='Pivot', style=plot.style_line) 17 | plot(vPU, color=color.new(color.aqua, 0), title='Pivot Üst', style=plot.style_line) 18 | plot(vPA, color=color.new(color.red, 0), title='Pivot Alt', style=plot.style_line) 19 | 20 | plot(EMA, color=color.yellow, title='EMA', style=plot.style_line) 21 | 22 | longCondition = ta.crossover(EMA, vPU) 23 | if (longCondition) 24 | strategy.entry("Al", strategy.long) 25 | shortCondition = false //ta.crossunder(EMA, vPA) //Çift yön içindir. 26 | if (shortCondition) 27 | strategy.entry("Sat", strategy.short) 28 | 29 | if( EMA < vPP and strategy.position_size > 0) 30 | strategy.close_all() 31 | 32 | if( EMA > vPP and strategy.position_size < 0) 33 | strategy.close_all() 34 | -------------------------------------------------------------------------------- /SixIndicatorStrategy: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | strategy("Six Indicator", overlay=false, pyramiding = 1, default_qty_value = 100, default_qty_type = strategy.percent_of_equity, initial_capital=10000) 6 | h = high 7 | l = low 8 | c = close 9 | o = open 10 | int e = 0 11 | int aa = 0 12 | int bb = 0 13 | int cc = 0 14 | int dd = 0 15 | int ee = 0 16 | int ff = 0 17 | int aaa = 0 18 | int bbb = 0 19 | int ccc = 0 20 | int ddd = 0 21 | int eee = 0 22 | if c > o 23 | e:=1 24 | else 25 | e:=0 26 | if c < o 27 | e:=-1 28 | if c[1] < c[2] and c[2] > c[3] and c[3] > c[4] and c[4] > c[5] and c[5] > c[6] 29 | aaa:=1 30 | else 31 | aaa:=0 32 | if c[1] > c[2] and c[2] < c[3] and c[3] < c[4] and c[4] < c[5] and c[5] < c[6] 33 | aaa:=-1 34 | if c[1] < c[2] and c[2] > c[3] and c[3] > c[4] and c[4] > c[5] and c[5] > c[6] and c[6] > c[7] 35 | bbb:=1 36 | else 37 | bbb:=0 38 | if c[1] > c[2] and c[2] < c[3] and c[3] < c[4] and c[4] < c[5] and c[5] < c[6] and c[6] < c[7] 39 | bbb:=-1 40 | if l > l[1] and l[1] < ta.lowest(l,3)[2] and c > c[1] and c[1] < c[2] 41 | ccc:=1 42 | else 43 | ccc:=0 44 | if h < h[1] and h[1] > ta.highest(h,3)[2] and c < c[1] and c[1] > c[2] 45 | ccc:=-1 46 | if ta.highest(l,3)-ta.lowest(l,3) <=.2*(ta.highest(h,3)-ta.lowest(l,3)) 47 | ddd:=1 48 | else 49 | ddd:=0 50 | if ta.highest(h,3)-ta.lowest(h,3) <=.2* (ta.highest(h,3)-ta.lowest(l,3)) 51 | ddd:=-1 52 | if c < o and c[1] < o[1] 53 | eee:=1 54 | else 55 | eee:=0 56 | if c > o and c[1] > o[1] 57 | eee:=-1 58 | if ta.sma(c,2) < ta.sma(c,5) 59 | aa:=1 60 | if ta.sma(c,2) > ta.sma(c,5) 61 | aa:=-1 62 | if c > ta.sma(c,40) 63 | bb:=1 64 | if c < ta.sma(c,40) 65 | bb:=-1 66 | if ta.highestbars(c,50) > ta.lowestbars(c,50) 67 | cc:=1 68 | if ta.highestbars(c,50) < ta.lowestbars(c,50) 69 | cc:=-1 70 | if (high - low < ta.sma(high - low,10)) and c > c[1] or (high - low > ta.sma(high - low,10)) and c < c[1] 71 | dd:=1 72 | if (high - low < ta.sma(high - low,10)) and c < c[1] or (high - low > ta.sma(high - low,10)) and c > c[1] 73 | dd:=-1 74 | if c > (ta.sma(h,15)+ta.sma(l,15))/2 75 | ee:=1 76 | if c < (ta.sma(h,15)+ta.sma(l,15))/2 77 | ee:=-1 78 | if ta.sma(e,3) < 0 79 | ff:=1 80 | if ta.sma(e,3) > 0 81 | ff:=-1 82 | 83 | longCondition = aa+bb+cc+dd+ee+ff > 0 and aaa+bbb+ccc+ddd+eee >=0 84 | if (longCondition) 85 | strategy.entry("My Long Entry Id", strategy.long) 86 | 87 | shortCondition = aa+bb+cc+dd+ee+ff < 0 and aaa+bbb+ccc+ddd+eee <=0 88 | if (shortCondition) 89 | strategy.entry("My Short Entry Id", strategy.short) 90 | plot(strategy.equity, title="equity", color=color.aqua, linewidth=2, style=plot.style_line) 91 | -------------------------------------------------------------------------------- /VWAP Weekly: -------------------------------------------------------------------------------- 1 | // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=6 5 | indicator("VWAP Weekly BB [erolmutlu]", overlay = true) 6 | vVwap(series float src = hlc3, simple float stDev = 2) => 7 | bool startTime = weekofyear(time) != weekofyear(time[1]) 8 | [vwap, upper, lower] = ta.vwap(src, startTime, stDev) 9 | 10 | [vwap, upper, lower] = vVwap() 11 | plot(series = vwap, style = plot.style_circles, linewidth = 2, color = color.new(color.orange, 1)) 12 | plot(series = upper, style = plot.style_circles, linewidth = 2, color = color.new(color.red, 1)) 13 | plot(series = lower, style = plot.style_circles, linewidth = 2, color = color.new(color.green, 1)) 14 | -------------------------------------------------------------------------------- /VeriTablosu: -------------------------------------------------------------------------------- 1 | // @version=5 2 | indicator("Veri Tablosu", overlay=true) 3 | 4 | truncate(_number, _decimalPlaces) => 5 | _factor = math.pow(10, _decimalPlaces) 6 | int(_number * _factor) / _factor 7 | 8 | // Veriler 9 | ema20 = ta.ema(close,20) 10 | ema50 = ta.ema(close,50) 11 | rsi = ta.rsi(close,14) 12 | mktChange = (ta.change(close) / close[1]) * 100 13 | 14 | // Tabloyu oluştur 15 | var table myTable = table.new(position.bottom_right, 5, 2, border_width=1) 16 | 17 | // Tabloyu güncelle 18 | if barstate.islast 19 | txt1 = "Kapanış Fiyatı\n" + str.tostring(close) 20 | txt2 = "Açılış Fiyatı\n" + str.tostring(open) 21 | txt3 = "20-EMA Değeri\n" + str.tostring(truncate(ema20, 2)) 22 | txt4 = "50-EMA Değeri\n" + str.tostring(truncate(ema50, 2)) 23 | txt5 = "RSI Değeri\n" + str.tostring(truncate(rsi,2)) 24 | txt6 = "Yüzde Değişimi\n" + str.tostring(truncate(mktChange,2)) + "%" 25 | table.cell(myTable, 0, 0, text=txt1, bgcolor=color.black, text_color=color.white) 26 | table.cell(myTable, 0, 1, text=txt2, bgcolor=color.black, text_color=color.white) 27 | table.cell(myTable, 1, 0, text=txt3, bgcolor=color.black, text_color=color.white) 28 | table.cell(myTable, 1, 1, text=txt4, bgcolor=color.black, text_color=color.white) 29 | table.cell(myTable, 2, 0, text=txt5, bgcolor=color.black, text_color=color.white) 30 | table.cell(myTable, 2, 1, text=txt6, bgcolor=(mktChange > 0 ? color.green : color.red), text_color=color.white) 31 | -------------------------------------------------------------------------------- /VeriTablosu2: -------------------------------------------------------------------------------- 1 | // @version=5 2 | // twitter: @erol_mutlu 3 | indicator("Veri Tablosu2", overlay=true) 4 | 5 | truncate(_number, _decimalPlaces) => 6 | _factor = math.pow(10, _decimalPlaces) 7 | int(_number * _factor) / _factor 8 | 9 | // Veriler 10 | //Trend 11 | ema55 = ta.ema(close, 55) 12 | ema200 = ta.ema(close, 200) 13 | 14 | sma50 = ta.sma(close, 50) 15 | sma200 = ta.sma(close, 200) 16 | 17 | rsi = ta.rsi(close, 14) 18 | 19 | ma = ta.sma(hlc3, 20) 20 | cci = (hlc3 - ma) / (0.015 * ta.dev(hlc3, 20)) 21 | 22 | k = ta.sma(ta.stoch(rsi, rsi, rsi, 14), 3) 23 | d = ta.sma(k, 3) 24 | 25 | ao = ta.sma(hl2,5) - ta.sma(hl2,34) 26 | 27 | fast_ma = ta.ema(close, 12) 28 | slow_ma = ta.ema(close, 26) 29 | macd = fast_ma - slow_ma 30 | signal = ta.ema(macd, 9) 31 | hist = macd - signal 32 | 33 | mfi = ta.mfi(close, 14) 34 | 35 | basis = ta.sma(close, 20) 36 | dev = 2 * ta.stdev(close, 20) 37 | upper = basis + dev 38 | lower = basis - dev 39 | bbr = (close - lower)/(upper - lower) 40 | 41 | mktChange = (ta.change(close) / close[1]) * 100 42 | 43 | // Tabloyu oluştur 44 | var table myTable = table.new(position.bottom_right, 12, 2, border_width=1) 45 | 46 | // Tabloyu güncelle 47 | if barstate.islast 48 | txt1 = "Kapaniş Fiyati\n" + str.tostring(close) 49 | txt2 = "Yüzde Değişimi\n" + str.tostring(truncate(mktChange,2)) + "%" 50 | txt3 = "Trend Yönü\n" + str.tostring(ema55 > ema200 ? "Long" : "Short") 51 | txt4 = "S200/50 Yönü\n" + str.tostring(close > sma50 and close > sma200 ? "Long" : "Short") 52 | txt5 = "E200/55 Yönü\n" + str.tostring(close > ema55 and close > ema200 ? "Long" : "Short") 53 | txt6 = "RSI Değeri\n" + str.tostring(truncate(rsi,2)) 54 | txt7 = "CCI Değeri\n" + str.tostring(truncate(cci,2)) 55 | txt8 = "SRSI Yönü\n" + str.tostring(k >= 80 and d >= 80 ? "Short" : k <= 20 and d <= 20 ? "Long" : k >= d ? "Güçlü Yukari" : "Güçlü Aşagi") 56 | txt9 = "AO Yönü\n" + str.tostring(ao > 0 ? 'Long' : 'Short') 57 | txt10 = "MACD Yönü\n" + str.tostring(hist > 0 ? 'Long' : 'Short') 58 | txt11 = "MFI Değeri\n" + str.tostring(truncate(mfi,2)) 59 | txt12 = "BB % Değeri\n" + str.tostring(truncate(bbr,2) * 100) + "%" 60 | table.cell(myTable, 0, 0, text=txt1, bgcolor=color.black, text_color=color.white) 61 | table.cell(myTable, 1, 0, text=txt2, bgcolor=(mktChange > 0 ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 62 | table.cell(myTable, 2, 0, text=txt3, bgcolor=(ema55 > ema200 ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 63 | table.cell(myTable, 3, 0, text=txt4, bgcolor=(close > sma50 and close > sma200 ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 64 | table.cell(myTable, 4, 0, text=txt5, bgcolor=(close > ema55 and close > ema200 ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 65 | table.cell(myTable, 5, 0, text=txt6, bgcolor=color.black, text_color=color.white) 66 | table.cell(myTable, 6, 0, text=txt7, bgcolor=color.black, text_color=color.white) 67 | table.cell(myTable, 7, 0, text=txt8, bgcolor=(k <= 20 and d <= 20 or k >= d ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 68 | table.cell(myTable, 8, 0, text=txt9, bgcolor=(ao > 0 ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 69 | table.cell(myTable, 9, 0, text=txt10, bgcolor=(hist > 0 ? color.new(color.green,2) : color.new(color.red,2)), text_color=color.new(color.white,2)) 70 | table.cell(myTable, 10, 0, text=txt11, bgcolor=color.black, text_color=color.white) 71 | table.cell(myTable, 11, 0, text=txt12, bgcolor=color.black, text_color=color.white) 72 | -------------------------------------------------------------------------------- /YKUT: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | strategy("YKUT", overlay = true) 6 | Zlema(src,length)=> 7 | zxLag = length/2==math.round(length/2) ? length/2 : (length - 1) / 2 8 | zxEMA = (src + (src - src[zxLag])) 9 | ZLEMA = ta.ema(zxEMA, length) 10 | 11 | C = close 12 | O = open 13 | H = high 14 | L = low 15 | L1 = 0.0 16 | L2 = 0.0 17 | C:= (O + H + L + Zlema(C, 100)) / 4 18 | O:= (nz(C[1]) + nz(O[1])) / 2 19 | H:= math.max(math.max(H, O), Zlema(H, 100)) 20 | L:= math.min(math.min(L, O), Zlema(L, 100)) 21 | L1:= (O + H + L + Zlema(C, 50)) / 4 22 | L2:= (nz(L1[1]) + nz(L2[1])) / 2 23 | 24 | //strateji iki çizgi üzeri long, iki çizgi altı short 25 | if (close > math.max(L1, L2)) 26 | strategy.entry("Al", strategy.long) 27 | if (close < math.min(L1, L2)) 28 | strategy.entry("Sat", strategy.short) 29 | 30 | plot(L1, color = color.red) 31 | plot(L2, color = color.green) 32 | -------------------------------------------------------------------------------- /YigitBoxPHL2: -------------------------------------------------------------------------------- 1 | // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 2 | // © erolmutlu 3 | 4 | //@version=5 5 | indicator("YigitBoxPHL2", overlay = true) 6 | xHigh = request.security(syminfo.tickerid, 'D', high) 7 | xLow = request.security(syminfo.tickerid, 'D', low) 8 | xClose = request.security(syminfo.tickerid, 'D', close) 9 | 10 | vPP = (xHigh[1] + xLow[1] + xClose[1]) / 3 11 | vPU = 2 * vPP - xLow[1] 12 | vPA = 2 * vPP - xHigh[1] 13 | 14 | vPP2 = xClose[1] 15 | vPU2 = vPP2 + (xHigh[1] - xLow[1]) / 2 16 | vPA2 = vPP2 - (xHigh[1] - xLow[1]) / 2 17 | 18 | H1 = plot(vPP, color=color.new(color.green, 70), title='Pivot', style=plot.style_line) 19 | plot(vPU, color=color.new(color.aqua, 70), title='Pivot Üst', style=plot.style_line) 20 | plot(vPA, color=color.new(color.red, 70), title='Pivot Alt', style=plot.style_line) 21 | 22 | H2 = plot(vPP2, color=color.new(color.green, 70), title='Pivot', style=plot.style_line) 23 | plot(vPU2, color=color.new(color.aqua, 70), title='Pivot Üst', style=plot.style_line) 24 | plot(vPA2, color=color.new(color.red, 70), title='Pivot Alt', style=plot.style_line) 25 | fill(H1, H2, color = vPP < close ? color.new(color.lime, 70) : color.new(color.red, 70)) 26 | barcolor(color = vPP < close ? color.new(color.lime, 0) : color.new(color.red, 0)) 27 | -------------------------------------------------------------------------------- /oGun: -------------------------------------------------------------------------------- 1 | //@version=6 2 | // authow: erolmutlu 3 | strategy("oGun [erolmutlu]", overlay=true) 4 | 5 | yeniGun = ta.change(time("D")) > 0 6 | var float oGun = na 7 | if yeniGun or na(oGun) 8 | oGun := open 9 | 10 | plot(oGun, color=color.red, linewidth=1, style = plot.style_circles) 11 | barcolor(strategy.position_size > 0 ? color.lime : color.gray) 12 | 13 | if (close > oGun[1]) 14 | strategy.entry("A", strategy.long) 15 | if (close < oGun[1]) 16 | strategy.close_all("F") 17 | --------------------------------------------------------------------------------