bar tanımlama kodu..
PHP Code:
 //@version=5
indicator(title="T3MA Ribbon R4.2 + SAR + 200 EMA"shorttitle="."overlay=truemax_bars_back 4max_labels_count 1)

is_outside_bar() => high[1] < high and low[1] > low
is_inside_bar
() => high[1] > high and low[1] < low
is_buy_pin_bar
() => (not is_inside_bar()) and (high math.max(openclose)) * math.min(open,close) - low and (math.max(open,close) - math.min(open,close)) * <  math.min(open,close) - low
is_sell_pin_bar
() => (not is_inside_bar()) and (math.min(openclose) - low) * high math.max(open,close) and (math.max(open,close) - math.min(open,close)) * high math.max(open,close)
is_sell_ppr() => open[1] < close[1] and open close and low[1] > close
is_buy_ppr
() => open[1] > close[1] and open close and high[1] < close
is_sell_fakey
() => open[2] > close[2] and open[1] < close[1] and open close and high[2] > high[1] and low[2] < low[1] and high[1] < high and low[1] >= low
is_buy_fakey
() => open[2] < close[2] and open[1] > close[1] and open close and high[2] > high[1] and low[2] < low[1] and low[1] > low and high[1] <= high
draw_buy_text
(message "") => label.new(bar_indexhighmessagestyle=label.style_label_down,textcolor=color.whitetooltip message)
draw_sell_text(message "") => label.new(bar_indexlowmessagestyle=label.style_label_upcolor=color.orangetextcolor color.whitetooltip message)
draw_text(message "") => label.new(bar_indexhighmessagecolor=color.graytextcolor color.whitetooltip message)

if 
is_inside_bar()
    
draw_text("IB")
if 
is_outside_bar()
    
draw_text("OB")
if 
is_sell_fakey()
    
draw_sell_text("FS")
if 
is_buy_fakey()
    
draw_buy_text("FB")
if 
is_buy_ppr()
    
draw_buy_text("B")
if 
is_sell_ppr()
    
draw_sell_text("S")
if 
is_buy_pin_bar() 
    
draw_buy_text("PB")
if 
is_sell_pin_bar()
    
draw_sell_text("PS")
///////