Untitled

 avatar
yusufcang
plain_text
2 months ago
23 kB
2
Indexable
Never
//@version=5
indicator(title="5 EMA's + Support Resistance +  Market Structure Break & Order Block + Minervini Trend Template", overlay=true)

// --- Script 1: EMA 9/20/50/90/200 ---
// EMA Length Inputs
ema9Length = input(9, title="EMA 9 Length")
ema20Length = input(20, title="EMA 20 Length")
ema50Length = input(50, title="EMA 50 Length")
ema90Length = input(90, title="EMA 90 Length")
ema200Length = input(200, title="EMA 200 Length")

// Calculate EMAs
shortest = ta.ema(close, ema9Length)
short = ta.ema(close, ema20Length)
longer = ta.ema(close, ema50Length)
stop = ta.ema(close, ema90Length)
longest = ta.ema(close, ema200Length)

// Plot EMAs
plot(shortest, color=color.red, linewidth=3, title="EMA 9")
plot(short, color=color.orange, linewidth=3, title="EMA 20")
plot(longer, color=color.aqua, linewidth=3, title="EMA 50")
plot(stop, color=color.white, linewidth=3, title="EMA 90")
plot(longest, color=color.blue, linewidth=3, title="EMA 200")


// --- Script 2: Support Reistance - Dynamic v2 ---
prd = input.int(defval=10, title='Pivot Period', minval=4, maxval=30, group='Setup')
ppsrc = input.string(defval='High/Low', title='Source', options=['High/Low', 'Close/Open'], group='Setup')
maxnumpp = input.int(defval=20, title=' Maximum Number of Pivot', minval=5, maxval=100, group='Setup')
ChannelW = input.int(defval=10, title='Maximum Channel Width %', minval=1, group='Setup')
maxnumsr = input.int(defval=5, title=' Maximum Number of S/R', minval=1, maxval=10, group='Setup')
min_strength = input.int(defval=2, title=' Minimum Strength', minval=1, maxval=10, group='Setup')
labelloc = input.int(defval=20, title='Label Location', group='Colors', tooltip='Positive numbers reference future bars, negative numbers reference histical bars')
linestyle = input.string(defval='Dashed', title='Line Style', options=['Solid', 'Dotted', 'Dashed'], group='Colors')
linewidth = input.int(defval=2, title='Line Width', minval=1, maxval=4, group='Colors')
resistancecolor = input.color(defval=color.red, title='Resistance Color', group='Colors')
supportcolor = input.color(defval=color.lime, title='Support Color', group='Colors')
showpp = input(false, title='Show Point Points')

float src1 = ppsrc == 'High/Low' ? high : math.max(close, open)
float src2 = ppsrc == 'High/Low' ? low : math.min(close, open)
float ph = ta.pivothigh(src1, prd, prd)
float pl = ta.pivotlow(src2, prd, prd)

plotshape(ph and showpp, text='H', style=shape.labeldown, color=na, textcolor=color.new(color.red, 0), location=location.abovebar, offset=-prd)
plotshape(pl and showpp, text='L', style=shape.labelup, color=na, textcolor=color.new(color.lime, 0), location=location.belowbar, offset=-prd)

Lstyle = linestyle == 'Dashed' ? line.style_dashed : linestyle == 'Solid' ? line.style_solid : line.style_dotted

//calculate maximum S/R channel zone width
prdhighest = ta.highest(300)
prdlowest = ta.lowest(300)
cwidth = (prdhighest - prdlowest) * ChannelW / 100

var pivotvals = array.new_float(0)

if ph or pl
    array.unshift(pivotvals, ph ? ph : pl)
    if array.size(pivotvals) > maxnumpp  // limit the array size
        array.pop(pivotvals)

get_sr_vals(ind) =>
    float lo = array.get(pivotvals, ind)
    float hi = lo
    int numpp = 0
    for y = 0 to array.size(pivotvals) - 1 by 1
        float cpp = array.get(pivotvals, y)
        float wdth = cpp <= lo ? hi - cpp : cpp - lo
        if wdth <= cwidth  // fits the max channel width?
            if cpp <= hi
                lo := math.min(lo, cpp)
            else
                hi := math.max(hi, cpp)

            numpp += 1
            numpp
    [hi, lo, numpp]

var sr_up_level = array.new_float(0)
var sr_dn_level = array.new_float(0)
sr_strength = array.new_float(0)

find_loc(strength) =>
    ret = array.size(sr_strength)
    for i = ret > 0 ? array.size(sr_strength) - 1 : na to 0 by 1
        if strength <= array.get(sr_strength, i)
            break
        ret := i
        ret
    ret

check_sr(hi, lo, strength) =>
    ret = true
    for i = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
        //included?
        if array.get(sr_up_level, i) >= lo and array.get(sr_up_level, i) <= hi or array.get(sr_dn_level, i) >= lo and array.get(sr_dn_level, i) <= hi
            if strength >= array.get(sr_strength, i)
                array.remove(sr_strength, i)
                array.remove(sr_up_level, i)
                array.remove(sr_dn_level, i)
                ret
            else
                ret := false
                ret
            break
    ret

var sr_lines = array.new_line(11, na)
var sr_labels = array.new_label(11, na)

for x = 1 to 10 by 1
    rate = 100 * (label.get_y(array.get(sr_labels, x)) - close) / close
    label.set_text(array.get(sr_labels, x), text=str.tostring(label.get_y(array.get(sr_labels, x))) + '(' + str.tostring(rate, '#.##') + '%)')
    label.set_x(array.get(sr_labels, x), x=bar_index + labelloc)
    label.set_color(array.get(sr_labels, x), color=label.get_y(array.get(sr_labels, x)) >= close ? color.red : color.lime)
    label.set_textcolor(array.get(sr_labels, x), textcolor=label.get_y(array.get(sr_labels, x)) >= close ? color.white : color.black)
    label.set_style(array.get(sr_labels, x), style=label.get_y(array.get(sr_labels, x)) >= close ? label.style_label_down : label.style_label_up)
    line.set_color(array.get(sr_lines, x), color=line.get_y1(array.get(sr_lines, x)) >= close ? resistancecolor : supportcolor)

if ph or pl
    //because of new calculation, remove old S/R levels
    array.clear(sr_up_level)
    array.clear(sr_dn_level)
    array.clear(sr_strength)
    //find S/R zones
    for x = 0 to array.size(pivotvals) - 1 by 1
        [hi, lo, strength] = get_sr_vals(x)
        if check_sr(hi, lo, strength)
            loc = find_loc(strength)
            // if strength is in first maxnumsr sr then insert it to the arrays 
            if loc < maxnumsr and strength >= min_strength
                array.insert(sr_strength, loc, strength)
                array.insert(sr_up_level, loc, hi)
                array.insert(sr_dn_level, loc, lo)
                // keep size of the arrays = 5
                if array.size(sr_strength) > maxnumsr
                    array.pop(sr_strength)
                    array.pop(sr_up_level)
                    array.pop(sr_dn_level)

    for x = 1 to 10 by 1
        line.delete(array.get(sr_lines, x))
        label.delete(array.get(sr_labels, x))

    for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
        float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
        rate = 100 * (mid - close) / close
        array.set(sr_labels, x + 1, label.new(x=bar_index + labelloc, y=mid, text=str.tostring(mid) + '(' + str.tostring(rate, '#.##') + '%)', color=mid >= close ? color.red : color.lime, textcolor=mid >= close ? color.white : color.black, style=mid >= close ? label.style_label_down : label.style_label_up))

        array.set(sr_lines, x + 1, line.new(x1=bar_index, y1=mid, x2=bar_index - 1, y2=mid, extend=extend.both, color=mid >= close ? resistancecolor : supportcolor, style=Lstyle, width=linewidth))

f_crossed_over() =>
    ret = false
    for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
        float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
        if close[1] <= mid and close > mid
            ret := true
            ret
    ret

f_crossed_under() =>
    ret = false
    for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
        float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
        if close[1] >= mid and close < mid
            ret := true
            ret
    ret

alertcondition(f_crossed_over(), title='Resistance Broken', message='Resistance Broken')
alertcondition(f_crossed_under(), title='Support Broken', message='Support Broken')

// --- Script 3: Market Structure Break & Order Block ---
settings = "Settings"
zigzag_len = input.int(9, "ZigZag Length", group=settings)
show_zigzag = input.bool(true, "Show Zigzag", group=settings)
fib_factor = input.float(0.33, "Fib Factor for breakout confirmation", 0, 1, 0.01, group=settings)

text_size = input.string(size.tiny, "Text Size", [size.tiny, size.small, size.normal, size.large, size.huge], group=settings)

delete_boxes = input.bool(true, "Delete Old/Broken Boxes", group=settings)

bu_ob_inline_color = "Bu-OB Colors"
be_ob_inline_color = "Be-OB Colors"
bu_bb_inline_color = "Bu-BB Colors"
be_bb_inline_color = "Be-BB Colors"

bu_ob_display_settings = "Bu-OB Display Settings"
bu_ob_color = input.color(color.new(color.green, 70), "Color", group=bu_ob_display_settings, inline=bu_ob_inline_color)
bu_ob_border_color = input.color(color.green, "Border Color", group=bu_ob_display_settings, inline=bu_ob_inline_color)
bu_ob_text_color = input.color(color.green, "Text Color", group=bu_ob_display_settings, inline=bu_ob_inline_color)

be_ob_display_settings = "Be-OB Display Settings"
be_ob_color = input.color(color.new(color.red, 70), "Color", group=be_ob_display_settings, inline=be_ob_inline_color)
be_ob_border_color = input.color(color.red, "Border Color", group=be_ob_display_settings, inline=be_ob_inline_color)
be_ob_text_color = input.color(color.red, "Text Color", group=be_ob_display_settings, inline=be_ob_inline_color)

bu_bb_display_settings = "Bu-BB & Bu-MB Display Settings"
bu_bb_color = input.color(color.new(color.green, 70), "Color", group=bu_bb_display_settings, inline=bu_bb_inline_color)
bu_bb_border_color = input.color(color.green, "Border Color", group=bu_bb_display_settings, inline=bu_bb_inline_color)
bu_bb_text_color = input.color(color.green, "Text Color", group=bu_bb_display_settings, inline=bu_bb_inline_color)

be_bb_display_settings = "Be-BB & Be-MB Display Settings"
be_bb_color = input.color(color.new(color.red, 70), "Color", group=be_bb_display_settings, inline=be_bb_inline_color)
be_bb_border_color = input.color(color.red, "Border Color", group=be_bb_display_settings, inline=be_bb_inline_color)
be_bb_text_color = input.color(color.red, "Text Color", group=be_bb_display_settings, inline=be_bb_inline_color)


var float[] high_points_arr = array.new_float(5)
var int[] high_index_arr = array.new_int(5)
var float[] low_points_arr = array.new_float(5)
var int[] low_index_arr = array.new_int(5)

var box[] bu_ob_boxes = array.new_box(5)
var box[] be_ob_boxes = array.new_box(5)
var box[] bu_bb_boxes = array.new_box(5)
var box[] be_bb_boxes = array.new_box(5)

to_up = high >= ta.highest(zigzag_len)
to_down = low <= ta.lowest(zigzag_len)

trend = 1
trend := nz(trend[1], 1)
trend := trend == 1 and to_down ? -1 : trend == -1 and to_up ? 1 : trend

last_trend_up_since = ta.barssince(to_up[1])
low_val = ta.lowest(nz(last_trend_up_since > 0 ? last_trend_up_since : 1, 1))
low_index = bar_index - ta.barssince(low_val == low)

last_trend_down_since = ta.barssince(to_down[1])
high_val = ta.highest(nz(last_trend_down_since > 0 ? last_trend_down_since : 1, 1))
high_index = bar_index - ta.barssince(high_val == high)

if ta.change(trend) != 0
    if trend == 1
        array.push(low_points_arr, low_val)
        array.push(low_index_arr, low_index)
    if trend == -1
        array.push(high_points_arr, high_val)
        array.push(high_index_arr, high_index)


f_get_high(ind) =>
    [array.get(high_points_arr, array.size(high_points_arr) - 1 - ind), array.get(high_index_arr, array.size(high_index_arr) - 1 - ind)]


f_get_low(ind) =>
    [array.get(low_points_arr, array.size(low_points_arr) - 1 - ind), array.get(low_index_arr, array.size(low_index_arr) - 1 - ind)]


f_delete_box(box_arr) =>
    if delete_boxes
        box.delete(array.shift(box_arr))
    else
        array.shift(box_arr)
    0


[h0, h0i] = f_get_high(0)
[h1, h1i] = f_get_high(1)

[l0, l0i] = f_get_low(0)
[l1, l1i] = f_get_low(1)

if ta.change(trend) != 0 and show_zigzag
    if trend == 1
        line.new(h0i, h0, l0i, l0)
    if trend == -1
        line.new(l0i, l0, h0i, h0)

market = 1
market := nz(market[1], 1)
// market := market == 1 and close < l0 and low < l0 - math.abs(h0 - l0) * fib_factor ? -1 : market == -1 and close > h0 and high > h0 + math.abs(h0 - l0) * fib_factor ? 1 : market
last_l0 = ta.valuewhen(ta.change(market) != 0, l0, 0)
last_h0 = ta.valuewhen(ta.change(market) != 0, h0, 0)
market := last_l0 == l0 or last_h0 == h0 ? market : market == 1 and l0 < l1 and l0 < l1 - math.abs(h0 - l1) * fib_factor ? -1 : market == -1 and h0 > h1 and h0 > h1 + math.abs(h1 - l0) * fib_factor ? 1 : market

bu_ob_index = bar_index
bu_ob_index := nz(bu_ob_index[1], bar_index)
for i=h1i to l0i[zigzag_len]
    index = bar_index - i 
    if open[index] > close[index]
        bu_ob_index := bar_index[index]

bu_ob_since = bar_index - bu_ob_index

be_ob_index = bar_index
be_ob_index := nz(be_ob_index[1], bar_index)
for i=l1i to h0i[zigzag_len]
    index = bar_index - i 
    if open[index] < close[index]
        be_ob_index := bar_index[index]

be_ob_since = bar_index - be_ob_index

be_bb_index = bar_index
be_bb_index := nz(be_bb_index[1], bar_index)
for i=h1i - zigzag_len to l1i
    index = bar_index - i
    if open[index] > close[index]
        be_bb_index := bar_index[index]

be_bb_since = bar_index - be_bb_index

bu_bb_index = bar_index
bu_bb_index := nz(bu_bb_index[1], bar_index)
for i=l1i - zigzag_len to h1i
    index = bar_index - i
    if open[index] < close[index]
        bu_bb_index := bar_index[index]

bu_bb_since = bar_index - bu_bb_index

if ta.change(market) != 0
    if market == 1
        line.new(h1i, h1, h0i, h1, color=color.green, width=2)
        label.new(int(math.avg(h1i, l0i)), h1, "MSB", color=color.new(color.black, 100), style=label.style_label_down, textcolor=color.green, size=size.small)
        bu_ob = box.new(bu_ob_index, high[bu_ob_since], bar_index + 10, low[bu_ob_since], bgcolor=bu_ob_color, border_color=bu_ob_border_color, text="Bu-OB", text_color=bu_ob_text_color, text_halign=text.align_right, text_size=text_size)
        bu_bb = box.new(bu_bb_index, high[bu_bb_since], bar_index + 10, low[bu_bb_since], bgcolor=bu_bb_color, border_color=bu_bb_border_color, text=l0 < l1 ? "Bu-BB" : "Bu-MB", text_color=bu_bb_text_color, text_halign=text.align_right, text_size=text_size)
        array.push(bu_ob_boxes, bu_ob)
        array.push(bu_bb_boxes, bu_bb)
    if market == -1
        line.new(l1i, l1, l0i, l1, color=color.red, width=2)
        label.new(int(math.avg(l1i, h0i)), l1, "MSB", color=color.new(color.black, 100), style=label.style_label_up, textcolor=color.red, size=size.small)
        be_ob = box.new(be_ob_index, high[be_ob_since], bar_index + 10, low[be_ob_since], bgcolor=be_ob_color, border_color=be_ob_border_color, text="Be-OB", text_color=be_ob_text_color, text_halign=text.align_right, text_size=text_size)
        be_bb = box.new(be_bb_index, high[be_bb_since], bar_index + 10, low[be_bb_since], bgcolor=be_bb_color, border_color=be_bb_border_color, text=h0 > h1 ? "Be-BB" : "Be-MB", text_color=be_bb_text_color, text_halign=text.align_right, text_size=text_size)
        array.push(be_ob_boxes, be_ob)
        array.push(be_bb_boxes, be_bb)

for bull_ob in bu_ob_boxes
    bottom = box.get_bottom(bull_ob)
    top = box.get_top(bull_ob)
    if close < bottom
        f_delete_box(bu_ob_boxes)
    else if close < top
        alert("Price in the BU-OB zone")
    else
        box.set_right(bull_ob, bar_index + 10)
    
for bear_ob in be_ob_boxes
    top = box.get_top(bear_ob)
    bottom = box.get_bottom((bear_ob))
    if close > top
        f_delete_box(be_ob_boxes)
    if close > bottom
        alert("Price in the BE-OB zone")
    else
        box.set_right(bear_ob, bar_index + 10)
        
for bear_bb in be_bb_boxes
    top = box.get_top(bear_bb)
    bottom = box.get_bottom(bear_bb)
    if close > top
        f_delete_box(be_bb_boxes)
    else if close > bottom
        alert("Price in the BE-BB zone")
    else
        box.set_right(bear_bb, bar_index + 10)
        
for bull_bb in bu_bb_boxes
    bottom = box.get_bottom(bull_bb)
    top = box.get_top(bull_bb)
    if close < bottom
        f_delete_box(bu_bb_boxes)
    else if close < top
        alert("Price in the BU-BB zone")
    else
        box.set_right(bull_bb, bar_index + 10)


alertcondition(ta.change(market) != 0, "MSB", "MSB")

// --- Script 4: Minervini Trend Template ---
sma50 = ta.sma(close, 50)
sma150 = ta.sma(close, 150)
sma200 = ta.sma(close, 200)
sma200_22 = sma200[22]

// 1. stock price is above ma 150 and 200
is_price_above_sma_150_and_200 = if (close > sma150) and (close > sma200)
    true 
else 
    false
    
c_1 = is_price_above_sma_150_and_200 ? 1 : 0

// 2. sma 150 is above sma 200
is_sma_150_above_sma_200 = if sma150 > sma200 
    true
else 
    false

c_2 = is_sma_150_above_sma_200 ? 1 : 0
    
// 3. sma 200 is trending at least 1 month(22 days)
is_trending_at_least_1_month = if sma200 > sma200_22
    true
else 
    false
    
c_3 = is_trending_at_least_1_month ? 1 : 0

// 4. sma 50 is above both sma 150 and 200
is_sma_50_above_sma_150_and_200 = if (sma50 > sma150) and (sma50 > sma200)
    true 
else 
    false

c_4 = is_sma_50_above_sma_150_and_200 ? 1 : 0

// 5. current stock price is above sma 50 
is_current_price_above_ma_50 = if (close > sma50)
    true 
else 
    false

c_5 = is_current_price_above_ma_50 ? 1 : 0

// 6. current stock price is 25% above 52 weeks low
// Many of the best are up 100-300% before coming out of consolidation
high_loopback = input(260, "High Lookback Length")
low_loopback = input(260, "Low Lookback Length")

highest_price = ta.highest(high, high_loopback)
lowest_price = ta.lowest(low, low_loopback)

is_price_25_percent_above_52_weeks_low = if ((close/lowest_price)-1) * 100 >= 25
    true
else 
    false
    
c_6 = is_price_25_percent_above_52_weeks_low ? 1 : 0

// Show 52 High / Low Line 
show_52_week_high_low = input.bool(defval = true, title="Show 52 week highest/lowest")
plot(show_52_week_high_low ? highest_price: na, title='52 Week High', trackprice=true, color=color.orange, offset=-9999)
plot(show_52_week_high_low ? lowest_price: na, title='52 Week Low', trackprice=true, color=color.orange, offset=-9999)

// 7. Current Price is within 25% of 52 week high
is_price_within_52_high = if (1-(close/highest_price)) * 100 <= 25
    true
else 
    false
    
c_7 = is_price_within_52_high ? 1 : 0

// 8. RS rating > 70
// relative strength IBD style
three_month_rs  = 0.4*(close/close[13])
six_month_rs    = 0.2*(close/(close[26]*2))
nine_month_rs   = 0.2*(close/(close[39]*3))
twelve_month_rs = 0.2*(close/(close[52]*4))
rs_rating = (three_month_rs + six_month_rs + nine_month_rs + twelve_month_rs) * 100
rs_rating_str = str.tostring(rs_rating, "#.00")
is_rs_rating_more_than_seventy = rs_rating > 70

c_8 = is_rs_rating_more_than_seventy ? 1 : 0

is_meet_all_criteria = is_price_above_sma_150_and_200 and is_sma_150_above_sma_200 and is_trending_at_least_1_month and is_sma_50_above_sma_150_and_200 and is_price_25_percent_above_52_weeks_low and is_price_within_52_high and is_rs_rating_more_than_seventy and is_current_price_above_ma_50
count = c_1 + c_2 + c_3 + c_4 + c_5 + c_6 + c_7 + c_8

// table section

var groupPanel = 'minervini_criteria'
string table_vertical_pos = input.string('bottom', 'Panel position', inline='11', options=['top', 'middle', 'bottom'], group=groupPanel)
string table_horizontal_pos = input.string('left', '', inline='11', options=['left', 'center', 'right'], group=groupPanel)

text_color = color.black

fn_fill_header(_id, _row) => 
    table.cell(table_id=_id, column=0, row=_row, text='Criteria', width=0, height=0, text_color=text_color, text_size=size.tiny, bgcolor=color.aqua)
    table.cell(table_id=_id, column=1, row=_row, text='', width=0, height=0, text_color=text_color, text_size=size.tiny, bgcolor=color.aqua)

fn_fill_value(_id, _row, criteria, value, _color_value) => 
    table.cell(table_id=_id, column=0, row=_row, text=criteria, width=0, height=0, text_color=text_color, text_size=size.tiny, bgcolor=color.white)
    table.cell(table_id=_id, column=1, row=_row, text=value, width=0, height=0, text_color=text_color, text_size=size.tiny, bgcolor=_color_value)

var T = table.new(
     position= table_vertical_pos + "_" + table_horizontal_pos, columns=2, rows=13, bgcolor=color.white, 
     frame_color=color.gray, frame_width=2, border_color=color.gray, border_width=1)

ma233 = ta.sma(close, 233)
is_price_below_ma_233 = close < ma233

rsi_value = ta.rsi(close, 14)
mfi_value = ta.mfi(close, 14)

if barstate.islastconfirmedhistory
    fn_fill_header(T, 0)
    fn_fill_value(T, 1, 'Fiyat, 150 gunluk ve 200 gunluk hareketli ortalamanın uzerinde.', is_price_above_sma_150_and_200 ? 'Evet' : 'Hayir', is_price_above_sma_150_and_200 ? color.aqua: color.red)
    fn_fill_value(T, 2, 'MA 150, MA 200\'un üzerinde.', is_sma_150_above_sma_200 ? 'Evet' : 'Hayır', is_sma_150_above_sma_200 ? color.aqua : color.red)
    fn_fill_value(T, 3, 'MA 200 en az 1 ay (22 gun) boyunca yukseliş eğiliminde.', is_trending_at_least_1_month ? 'Evet' : 'Hayir', is_trending_at_least_1_month ? color.aqua: color.red)
    fn_fill_value(T, 4, 'MA 50, hem MA 150 hem de MA 200\'un üzerinde', is_sma_50_above_sma_150_and_200 ? 'Evet' : 'Hayır', is_sma_50_above_sma_150_and_200 ? color.aqua : color.red)
    fn_fill_value(T, 5, 'Şu anki hisse fiyatı, MA 50\'nin üzerinde işlem görüyor.', is_current_price_above_ma_50 ? 'Evet' : 'Hayır', is_current_price_above_ma_50 ? color.aqua : color.red)
    fn_fill_value(T, 6, 'Mevcut fiyat, 52 haftanın en düşük seviyesinin %25 uzerinde', is_price_25_percent_above_52_weeks_low ? 'Evet' : 'Hayir', is_price_25_percent_above_52_weeks_low ? color.aqua: color.red)
    fn_fill_value(T, 7, 'Mevcut fiyat, son 52 haftanın en yuksek seviyenin %25 uzerinde', is_price_within_52_high ? 'Evet' : 'Hayir', is_price_within_52_high ? color.aqua: color.red)
    fn_fill_value(T, 8, 'RS puanı 70\'ten fazla', is_rs_rating_more_than_seventy ? "Evet (" + rs_rating_str + ")" : "Hayır (" + rs_rating_str + ")", is_rs_rating_more_than_seventy ? color.aqua : color.red)
    fn_fill_value(T, 9, 'MA 233 altında mı?', is_price_below_ma_233 ? 'Evet' : 'Hayır', is_price_below_ma_233 ? color.aqua : color.red)
    fn_fill_value(T, 10, 'RSI', str.tostring(rsi_value), color.white)
    fn_fill_value(T, 11, 'MFI', str.tostring(mfi_value), color.white)    
    fn_fill_value(T, 12, 'Arkadas Kriterleri karşılıyorum mu?', " (" + str.tostring(count, "0") + " of 8)", color.white)


// End of the combined script
Leave a Comment