-
bar tanımlama kodu..
PHP Code:
//@version=5
indicator(title="T3MA Ribbon R4.2 + SAR + 200 EMA", shorttitle=".", overlay=true, max_bars_back = 4, max_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(open, close)) * 2 < math.min(open,close) - low and (math.max(open,close) - math.min(open,close)) * 2 < math.min(open,close) - low
is_sell_pin_bar() => (not is_inside_bar()) and (math.min(open, close) - low) * 2 < high - math.max(open,close) and (math.max(open,close) - math.min(open,close)) * 2 < 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_index, high, message, style=label.style_label_down,textcolor=color.white, tooltip = message)
draw_sell_text(message = "") => label.new(bar_index, low, message, style=label.style_label_up, color=color.orange, textcolor = color.white, tooltip = message)
draw_text(message = "") => label.new(bar_index, high, message, color=color.gray, textcolor = color.white, tooltip = 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")
///////
-
kombin....
PHP Code:
//@version=5
indicator('kombin', shorttitle='.', overlay=true, max_polylines_count = 100, max_lines_count = 100, max_labels_count = 100, precision=2)
length = input.int(19, "TTM Squeeze Length")
//BOLLINGER BANDS
BB_mult = input.float(2.0, "Bollinger Band STD Multiplier")
BB_basis = ta.sma(close, length)
dev = BB_mult * ta.stdev(close, length)
BB_upper = BB_basis + dev
BB_lower = BB_basis - dev
atr = ta.atr(14)
//KELTNER CHANNELS
KC_mult_high = input.float(1.0, "Keltner Channel #1")
KC_mult_mid = input.float(1.5, "Keltner Channel #2")
KC_mult_low = input.float(2.0, "Keltner Channel #3")
KC_basis = ta.sma(close, length)
devKC = ta.sma(ta.tr, length)
KC_upper_high = KC_basis + devKC * KC_mult_high
KC_lower_high = KC_basis - devKC * KC_mult_high
KC_upper_mid = KC_basis + devKC * KC_mult_mid
KC_lower_mid = KC_basis - devKC * KC_mult_mid
KC_upper_low = KC_basis + devKC * KC_mult_low
KC_lower_low = KC_basis - devKC * KC_mult_low
//SQUEEZE CONDITIONS
NoSqz = BB_lower < KC_lower_low or BB_upper > KC_upper_low //NO SQUEEZE: GREEN
LowSqz = BB_lower >= KC_lower_low or BB_upper <= KC_upper_low //LOW COMPRESSION: BLACK
MidSqz = BB_lower >= KC_lower_mid or BB_upper <= KC_upper_mid //MID COMPRESSION: RED
HighSqz = BB_lower >= KC_lower_high or BB_upper <= KC_upper_high //HIGH COMPRESSION: ORANGE
//MOMENTUM OSCILLATOR
mom = ta.linreg(close - math.avg(math.avg(ta.highest(high, length), ta.lowest(low, length)), ta.sma(close, length)), length, 0)
//MOMENTUM HISTOGRAM COLOR
iff_1 = mom > nz(mom[1]) ? color.new(color.aqua, 0) : color.new(#2962ff, 0)
iff_2 = mom < nz(mom[1]) ? color.new(color.red, 0) : color.new(color.yellow, 0)
mom_color = mom > 0 ? iff_1 : iff_2
// Bullsqueeze and Bearsqueeze Conditions
bullsqueeze = ((NoSqz and mom_color == color.new(color.aqua, 0)) or (mom_color == color.new(color.aqua, 0) and mom_color[1] == color.new(color.red, 0)))
bearsqueeze = ((NoSqz and mom_color == color.new(color.red, 0)) or (mom_color == color.new(color.red, 0) and mom_color[1] == color.new(color.aqua, 0)))
// BULL AND BEAR WATCH OUT Conditions
buyConf = (mom_color == color.new(color.aqua, 0) and mom_color[1] == color.new(color.yellow, 0)) and not bullsqueeze
sellConf = (mom_color == color.new(color.red, 0) and mom_color[1] == color.new(#2962ff, 0)) and not bearsqueeze
// User inputs for colors and widths related to the BAND
userColorBullish = input.color(color.white, "Bullish Band Color", group= "Customize BAND")
userColorBearish = input.color(color.red, "Bearish Band Color",group= "Customize BAND")
bandWidthMultiplier = input.float(2.0, "Band Width Multiplier", minval=1.0,group= "Customize BAND")
userWidth = input.int(2, "Band Width", minval=1,group= "Customize BAND")
// Adjusted band calculations
upperBand = high + (atr * bandWidthMultiplier)
lowerBand = low - (atr * bandWidthMultiplier)
// Initialize a color variable for the band
var color bandColor = na
// Initialize a variable to store the previous band color
var color prevBandColor = na
// Update the previous band color for the next bar
prevBandColor := bandColor[1]
// Create variables to store the previous squeeze state
var bool prevBullSqueeze = false
var bool prevBearSqueeze = false
// Update the previous squeeze state at the beginning of each new bar
if (barstate.isnew)
prevBullSqueeze := bandColor == color.new(userColorBullish, 0)
prevBearSqueeze := bandColor == color.new(userColorBearish, 00)
// Determine the band color based on custom conditions
if (bullsqueeze)
bandColor := color.new(userColorBullish, 0)
else if (bearsqueeze)
bandColor := color.new(userColorBearish, 00)
else if (sellConf and prevBullSqueeze)
bandColor := color.new(userColorBullish, 50)
else if (sellConf)
bandColor := color.new(userColorBearish, 00)
else if (buyConf and prevBearSqueeze)
bandColor := color.new(userColorBearish, 00)
else if (buyConf)
bandColor := color.new(userColorBullish, 50)
// Plot the bands and store the plot references
upperBandPlot = plot(upperBand, "H", color=bandColor, linewidth=userWidth)
lowerBandPlot = plot(lowerBand, "L", color=bandColor, linewidth=userWidth)
///////////////////////////////
//@version=5
dual_color=false
var bar_value= 1 //(1-16)
currentHigh = high
previousHigh = high[1]
currentClose = close
previousClose = close[1]
currentLow = low
previousLow = low[1]
//
condition1 = currentHigh > previousHigh and currentClose > previousClose and currentLow > previousLow
condition2 = currentHigh < previousHigh and currentClose > previousClose and currentLow > previousLow
condition3 = currentHigh > previousHigh and currentClose > previousClose and currentLow < previousLow
condition4 = currentHigh < previousHigh and currentClose > previousClose and currentLow < previousLow
//--------------------------------------------------------
condition5 = currentHigh > previousHigh and currentClose < previousClose and currentLow > previousLow
condition6 = currentHigh < previousHigh and currentClose < previousClose and currentLow > previousLow
condition7 = currentHigh > previousHigh and currentClose < previousClose and currentLow < previousLow
condition8 = currentHigh < previousHigh and currentClose < previousClose and currentLow < previousLow
open_up = close > open[1]
open_down = close < open[1]
switch
condition1 and open_up => bar_value:=16
condition1 and open_down => bar_value:=15
condition2 and open_up => bar_value:=14
condition2 and open_down => bar_value:=13
condition3 and open_up => bar_value:=12
condition3 and open_down => bar_value:=11
condition4 and open_up => bar_value:=10
condition4 and open_down => bar_value:=9
condition5 and open_up => bar_value:=8
condition5 and open_down => bar_value:=7
condition6 and open_up => bar_value:=6
condition6 and open_down => bar_value:=5
condition7 and open_up => bar_value:=4
condition7 and open_down => bar_value:=3
condition8 and open_up => bar_value:=2
condition8 and open_down => bar_value:=1
//plot(bar_value,display = display.none,title="Bar Value")
barcolor(condition1 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L+H+")
//barcolor(condition2 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L+H-")
//barcolor(condition3 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L-H+")
//barcolor(condition4 and not dual_color ? color.rgb(252, 223, 2) : na, title="C+L-H-")
//--------------------------------------------------------------------------
//barcolor(condition5 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L+H+")
//barcolor(condition6 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L+H-")
//barcolor(condition7 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L-H+")
barcolor(condition8 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L-H-")
///////////////////////
//@version=5
type bar
float o = open
float h = high
float l = low
float c = close
int i = bar_index
type trend
float h = na
float l = na
type scythe
polyline a = na
line b = na
type target
float u = na
float l = na
float p = na
int d = 0
bool r = false
line v = na
line h = na
label e = na
type alerts
bool u = na
bool d = na
bool b = na
bool s = na
type prompt
string s = ''
bool c = false
method notify(prompt p) =>
if p.c
alert(p.s, alert.freq_once_per_bar_close)
method any(alerts a) =>
string s = switch
a.s => 'Target Reached '
a.b => 'Target Invalidated'
a.u => 'Breakout '
a.d => 'Breakdown'
=> na
prompt.new(s, not na(s))
method atr(bar b, simple int len = 1) =>
float tr =
na(b.h[1]) ?
b.h - b.l :
math.max(
math.max(
b.h - b.l,
math.abs(b.h - b.c[1])),
math.abs (b.l - b.c[1]))
len == 1 ? tr : ta.rma(tr, len)
method piv(trend t) =>
bool b = switch
na(t.h) and na(t.l) => false
=> true
b
method blade(array<chart.point> a, bool p, simple color u, simple color d) =>
polyline.new(a, false, true, xloc.bar_index, p ? d : u, p ? color.new(d, 100) : color.new(u, 100))
method handle(bar b, trend t, float s) =>
line l = switch
not na(t.l) =>
line.new(b.i, b.h + s, b.i, b.l , xloc.bar_index, extend.none, #fcfaf8, line.style_solid, 3)
not na(t.h) =>
line.new(b.i, b.h , b.i, b.l - s, xloc.bar_index, extend.none, #fcfaf8, line.style_solid, 3)
l
method goal(target t, bar b, simple int len) =>
t.v := line .new(b.i, b.c, b.i , t.p, xloc.bar_index, extend.none, chart.fg_color, line.style_dashed)
t.h := line .new(b.i, t.p, b.i + len, t.p, xloc.bar_index, extend.none, chart.fg_color, line.style_dashed)
t.e := label.new(b.i + len, t.p, "YÖRÜK", xloc.bar_index, yloc.price, #f0a71f78, label.style_label_left, chart.fg_color, size.normal)
method cu(target t, bar b) =>
t.l[1] < b.c[1] and t.l > b.c
method co(target t, bar b) =>
t.u[1] > b.c[1] and t.u < b.c
method cr(target t, bar b) =>
((t.d == 1 and b.c > t.p) or
(t.d == -1 and b.c < t.p))
method reached(target t, bar b) =>
t.h.set_xy2(b.i, t.h.get_y2())
t.e.set_xy (b.i, t.h.get_y2())
t.e.set_color(#4caf4f78)
t.e.set_text ('YES' )
method failed(target t, bar b) =>
t.h.set_xy2(b.i, t.h.get_y2())
t.e.set_xy (b.i, t.h.get_y2())
t.e.set_color(#a53a3a78)
t.e.set_text ('NO' )
const string ts = 'Controls how restrained the target calculation is, higher values will result in tighter targets.'
const string tb = 'Adjusts the length of the scythes blade'
const string tp = 'Swing detection length'
const string gs = 'Scythes', const string gt = 'Targets', const string gu = 'UI Options'
len = input.int (20 , "Pivot Length" , 1, 100, 1 , tp, group = gs)
ext = input.int (100 , "Scythe Length" , 1, 200, 1 , tb, group = gs)
sen = input.int (100 , "Sensitivity %", 0 , 100, 10, ts, group = gt)
bts = input.bool (true , "Display" , group = gt)
bbs = input.bool (true , "Breakouts" , group = gu)
colu = input.color(#eee7df, "" , inline = '1', group = gu)
cold = input.color(#c71313, "" , inline = '1', group = gu)
bar b = bar .new( )
float s = b .atr( len) / len
trend t = trend.new(
ta.pivothigh(len, len),
ta.pivotlow (len, len))
var target g = target.new ()
var map<int, float> u = map .new<int, float>()
var map<int, float> l = map .new<int, float>()
if t.piv()
array<chart.point> a = array.new<chart.point>()
bar z = b[len]
bool p = na(t.l)
for i = 0 to ext - 1
float c = s * i + s * math.pow(i, 2) / ext
a.push(chart.point.from_index(z.i + i, (p ? (z.h - c) : (z.l + c))))
a.push(chart.point.from_index(z.i, (p ? (z.h - s * ext / 5) : (z.l + s * ext / 5))))
switch
not na(t.l) =>
l.clear()
for point in a
l.put(point.index, point.price)
not na(t.h) =>
u.clear()
for point in a
u.put(point.index, point.price)
scythe n = scythe.new(a.blade(p, colu, cold), z.handle(t, s * len))
g.u := u.contains(b.i) ? u.get(b.i) : na
g.l := l.contains(b.i) ? l.get(b.i) : na
bool ucon = false
bool dcon = false
bool bcon = false
bool scon = false
if g.cr(b) and not g.r and bts
g.reached(b)
g.r := true
scon := true
if g.co(b) and bts
if not g.r
g.failed(b)
bcon := true
else
ucon := true
g.r := false
g.d := 1
g.p := b.c + s * ext * (2 - sen / 100)
g.goal(b, len)
if g.cu(b) and bts
if not g.r
g.failed(b)
bcon := true
else
dcon := true
g.r := false
g.d := -1
g.p := b.c - s * ext * (2 - sen / 100)
g.goal(b, len)
alerts a = alerts.new(
ucon,
dcon,
bcon,
scon)
plotshape(not na(t.l) ? (b[len]).l + s * len / 5 : na, "ÇIPA", shape.diamond, location.absolute, colu, -len, size = size.normal)
plotshape(not na(t.h) ? (b[len]).h - s * len / 5 : na, "TIRPAN", shape.diamond, location.absolute, cold, -len, size = size.normal)
//plotshape(bbs and a.d, "KIRILIM", shape.labeldown, location.abovebar, color.new(cold, 60), 0, 'AK', chart.fg_color, size = size.normal)
//plotshape(bbs and a.u, "KIRILIM", shape.labelup , location.belowbar, color.new(colu, 60), 0, 'YK', chart.fg_color, size = size.normal)
//alertcondition(a.b, 'Target Reached ', 'Target Reached ')
//alertcondition(a.s, 'Target Invalidated', 'Target Invalidated')
//alertcondition(a.u, 'Breakout ' , 'Breakout ' )
//alertcondition(a.d, 'Breakdown' , 'Breakdown' )
a.any().notify()
///////////////////////////////
//@version=5
import twingall/BasicVisibleChart/1
useBodies =input.bool(true, "use Candle Bodies to anchor range")
showFibBox = input.bool(true, "show Fib Box", group = "OTE box", inline = "2")
boxColor = input.color(color.new(color.yellow, 50), "", group = "OTE box", inline = "2")
showText = input.bool(true, "show Text",group = "Ote box", inline = "2")
showHighLowLines=input.bool(true, "high/low lines", group = "fib retracements",inline = "3")
lineColor = input.color(color.rgb(217, 76, 217), "", group = "fib retracements",inline = "3")
showMidline =input.bool(true, "Midline", group = "fib retracements",inline = "3")
midlineColor = input.color(color.white,"", group = "fib retracements",inline = "3")
show61eight=input.bool(false, "show 61.8 line", group = "fib retracements",inline = "5")
show78six=input.bool(false, "show 78.6 line", group = "fib retracements",inline = "6")
show88six=input.bool(false, "show 88.6 line", group = "fib retracements",inline = "7")
showfibExt1=input.bool(true,"Ext#1", group ="fib extensions",inline="9")
fibExt1Color=input.color(color.lime,"", group ="fib extensions",inline="9")
fibExt1=input.float(1.618, "", group ="fib extensions",inline="9")
showfibExt2=input.bool(true,"Ext#2", group ="fib extensions",inline="9")
fibExt2Color=input.color(color.red,"", group ="fib extensions",inline="9")
fibExt2=input.float(2.0, "", group ="fib extensions",inline="9")
showfibExt3=input.bool(false,"Ext#3", group ="fib extensions",inline="10")
fibExt3Color=input.color(color.red,"", group ="fib extensions",inline="10")
fibExt3=input.float(1.5, "", group ="fib extensions",inline="10")
showfibExt4=input.bool(false,"Ext#4", group ="fib extensions",inline="10")
fibExt4Color=input.color(color.red,"", group ="fib extensions",inline="10")
fibExt4=input.float(2.5, "", group ="fib extensions",inline="10")
showfibExt5=input.bool(false,"Ext#5", group ="fib extensions",inline="11")
fibExt5Color=input.color(color.red,"", group ="fib extensions",inline="11")
fibExt5=input.float(3.0, "", group ="fib extensions",inline="11")
showfibExt6=input.bool(false,"Ext#6", group ="fib extensions",inline="11")
fibExt6Color=input.color(color.red,"", group ="fib extensions",inline="11")
fibExt6=input.float(3.5, "", group ="fib extensions",inline="11")
_88sixColor = input.color(color.green, "", group = "fib retracements",inline = "7")
_61eightColor = input.color(color.green, "", group = "fib retracements",inline = "5")
_78sixColor = input.color(color.green, "", group = "fib retracements",inline = "6")
colorNone = color.new(color.white,100)
showExtLabels=input.bool(true,"Show Labels (Fib extensions)", group ="fib extensions",inline="11")
flipInvertExts=input.bool(false,"flip/invert extensions", group ="fib extensions",inline="12")
showFibLabels = input.bool(true, "Show Labels (Fib retracements)", group="fib retracements", inline="8")
// Calling Library functions to get: high/low, body high / body low, timings, bull/bear
float chartHigh = useBodies? BasicVisibleChart.highestBody():BasicVisibleChart.high()
float chartLow =useBodies?BasicVisibleChart.lowestBody():BasicVisibleChart.low()
int highTime = BasicVisibleChart.highBarTime()
int lowTime = BasicVisibleChart.lowBarTime()
int leftTime = math.min(highTime, lowTime)
int rightTime = math.max(highTime, lowTime)
bool isBull = lowTime < highTime
// Function to manage fib lines. It declares fib lines and label the first time it is called, then sets their properties on subsequent calls.
fibLine(series color fibColor, series float fibLevel, bool _showPriceLabels) =>
float fibRatio = 1-(fibLevel / 100)
float fibPrice = isBull ? chartLow + ((chartHigh - chartLow) * fibRatio) :
chartHigh - ((chartHigh - chartLow) * fibRatio)
float _fibLabel = fibLevel /100
var line fibLine = line.new(na, na, na, na, xloc.bar_time, extend.right, fibColor, line.style_dotted, 2)
line.set_xy1(fibLine, leftTime, fibPrice)
line.set_xy2(fibLine, rightTime, fibPrice)
var label fibLabel = label.new(na, na, "", xloc.bar_time, yloc.price, color(na), label.style_label_up, _showPriceLabels? fibColor:colorNone)
label.set_xy(fibLabel, int(math.avg(leftTime, rightTime)), fibPrice)
label.set_text(fibLabel, str.tostring(fibPrice, format.mintick))
//label.set_text(fibLabel, str.format("{0, number, #.###} ({1})", _fibLabel , str.tostring(fibPrice, format.mintick)))
//Function for Fib Extension lines..
fibExt(series color fibColor, series float fibLevel, bool _showExt) =>
float fibRatio = fibLevel / 100
float fibPrice = isBull ? chartLow - ((chartHigh - chartLow) * fibRatio) :
chartHigh + ((chartHigh - chartLow) * fibRatio)
float fibLabel = not flipInvertExts? -(fibLevel /100) :(fibLevel /100)+1 //getting both normal and inverted ext labels to display as positive numbers
var line fibLine = line.new(na, na, na, na, xloc.bar_time, extend.right, fibColor, line.style_dotted, 2)
line.set_xy1(fibLine, leftTime, fibPrice)
line.set_xy2(fibLine, rightTime, fibPrice)
var label fibExtLabel = label.new(na, na, "", xloc.bar_time, yloc.price, color(na), label.style_label_up, _showExt? fibColor:colorNone)
label.set_xy(fibExtLabel, int(math.avg(leftTime, rightTime)), fibPrice)
label.set_text(fibExtLabel, str.format("{0, number, #.###} ({1})", fibLabel , str.tostring(fibPrice, format.mintick)))
//Fib Box function; similar to the above but highlighting the area between 2 fib levels
fibBox(series color fibColor, series float fibLevel_1, series float fibLevel_2) =>
float fibRatio_1 = 1-(fibLevel_1 / 100)
float fibPrice_1 = isBull ? chartLow + ((chartHigh - chartLow) * fibRatio_1) : chartHigh - ((chartHigh - chartLow) * fibRatio_1)
float fibRatio_2 = 1-(fibLevel_2 / 100)
float fibPrice_2 = isBull ? chartLow + ((chartHigh - chartLow) * fibRatio_2) : chartHigh - ((chartHigh - chartLow) * fibRatio_2)
var b = box.new(na, na, na, na, xloc=xloc.bar_time, border_style=line.style_dashed, extend = extend.right, border_color=colorNone, text_color=color.new(color.white,00), text_halign=text.align_left)
box.set_lefttop(b, leftTime, fibPrice_1)
box.set_rightbottom(b, rightTime,fibPrice_2)
box.set_bgcolor(b, fibColor)
box.set_text(b, text = showText? " Scalping Trade by @yörük@ 2024 ":"")
// Display code that only runs on the last bar but displays visuals on visible bars, wherever they might be in the dataset.
if barstate.islast
//Declare fib lines and fib box
fibLine(lineColor, 100,showFibLabels )
fibLine(showMidline?midlineColor :colorNone, 50,showFibLabels )
fibLine(lineColor, 0,showFibLabels )
fibBox(showFibBox?boxColor:colorNone, 78.6, 61.8)
fibLine(show88six?_88sixColor:colorNone, 88.6,showFibLabels )
fibLine(show61eight?_61eightColor:colorNone, 61.8,showFibLabels )
fibLine(show78six?_78sixColor:colorNone, 78.6,showFibLabels )
//more fib lines
//fibLine(_88sixColor, 11.4)
//fibLine(_61eightColor, 38.2)
//fibLine(_78sixColor, 21.4)
//Declare Fib extensions
if barstate.islast and showfibExt1 and flipInvertExts
fibExt(fibExt1Color, (fibExt1*100)-100, showExtLabels)
if barstate.islast and showfibExt2 and flipInvertExts
fibExt(fibExt2Color, (fibExt2*100)-100, showExtLabels)
if barstate.islast and showfibExt3 and flipInvertExts
fibExt(fibExt3Color, (fibExt3*100)-100, showExtLabels)
if barstate.islast and showfibExt4 and flipInvertExts
fibExt(fibExt4Color, (fibExt4*100)-100, showExtLabels)
if barstate.islast and showfibExt5 and flipInvertExts
fibExt(fibExt5Color, (fibExt5*100)-100, showExtLabels)
if barstate.islast and showfibExt6 and flipInvertExts
fibExt(fibExt6Color, (fibExt6*100)-100, showExtLabels)
if barstate.islast and showfibExt1 and not flipInvertExts
fibExt(fibExt1Color, -(fibExt1*100), showExtLabels)
if barstate.islast and showfibExt2 and not flipInvertExts
fibExt(fibExt2Color, -(fibExt2*100), showExtLabels)
if barstate.islast and showfibExt3 and not flipInvertExts
fibExt(fibExt3Color, -(fibExt3*100), showExtLabels)
if barstate.islast and showfibExt4 and not flipInvertExts
fibExt(fibExt4Color, -(fibExt4*100), showExtLabels)
if barstate.islast and showfibExt5 and not flipInvertExts
fibExt(fibExt5Color, -(fibExt5*100), showExtLabels)
if barstate.islast and showfibExt6 and not flipInvertExts
fibExt(fibExt6Color, -(fibExt6*100), showExtLabels)
//////////////////////////////
-
PHP Code:
//@version=5
indicator('Trend Change Indicator', overlay=true)
ema_fast_input = input(defval = 1, title = "EMA Fast")
ema_slow_input = input(defval = 3, title = "EMA Slow")
atr_length_input = input(defval = 60, title = "ATR Length")
atr_margin_input = input(defval = 0.3, title = "ATR Margin")
ema_fast_4h = request.security(syminfo.tickerid, "15", ta.ema(close, ema_fast_input))
ema_slow_4h = request.security(syminfo.tickerid, "15", ta.ema(close, ema_slow_input))
ema_diff_4h = ema_fast_4h - ema_slow_4h
ema_bull_4h = ema_diff_4h > atr_margin_input * request.security(syminfo.tickerid, "15", ta.atr(atr_length_input))
ema_bear_4h = ema_diff_4h < -atr_margin_input * request.security(syminfo.tickerid, "15", ta.atr(atr_length_input))
ema_over_4h = ema_fast_4h > ema_slow_4h
ema_fast_1d = request.security(syminfo.tickerid, "15", ta.ema(close, ema_fast_input))
ema_slow_1d = request.security(syminfo.tickerid, "15", ta.ema(close, ema_slow_input))
ema_diff_1d = ema_fast_1d - ema_slow_1d
ema_bull_1d = ema_diff_1d > atr_margin_input * request.security(syminfo.tickerid, "15", ta.atr(atr_length_input))
ema_bear_1d = ema_diff_1d < -atr_margin_input * request.security(syminfo.tickerid, "15", ta.atr(atr_length_input))
ema_over_1d = ema_fast_1d > ema_slow_1d
color bull = color.new(color(#00FF00), 0)
color bull_fill = color.new(color(#00FF00), 50)
color bear = color.new(color(#FF0000), 0)
color bear_fill = color.new(color(#FF0000), 50)
color neutral = color.new(color(#FFFFFF), 0)
color neutral_fill = color.new(color(#FFFFFF), 50)
iff_1 = ema_bear_1d ? bear : neutral
//ema_fast_plot = plot(ema_fast_1d, title="EMA Fast", linewidth=2, color=ema_bull_1d ? bull : iff_1)
iff_2 = ema_bear_1d ? bear : neutral
//ema_slow_plot = plot(ema_slow_1d, title="EMA Slow", linewidth=2, color=ema_bull_1d ? bull : iff_2)
iff_3 = ema_bear_1d ? bear_fill : neutral_fill
//fill(ema_fast_plot, ema_slow_plot, color=ema_bull_1d ? bull_fill : iff_3, title="EMA Fill")
var is_long = false
no_trend = not ema_bull_1d and not ema_bear_1d
trend = ema_bull_1d or ema_bear_1d
is_change = not is_long and no_trend
is_no_change = is_long and trend
is_long := is_change ? true : is_no_change ? false : is_long
warning_bull = ema_bull_1d and ema_bear_4h
warning_bear = ema_bear_1d and ema_bull_4h
warning = warning_bull or warning_bear
close_1d = request.security(syminfo.tickerid, "240", close)
sma_input = input(defval = 9, title = "SMA Length")
sma = request.security(syminfo.tickerid, "60", ta.sma(close, sma_input))
//plot(sma, title="SMA 1", color=color.new(color.white, 0), linewidth=2)
sma_forecast_1_1 = request.security(syminfo.tickerid, "5", ((sma * sma_input) + (close_1d - close_1d[sma_input])) / sma_input)
sma_forecast_1_2 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 2) - close_1d[sma_input] - close_1d[sma_input - 1])) / sma_input)
sma_forecast_1_3 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 3) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2])) / sma_input)
sma_forecast_1_4 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 4) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2] - close_1d[sma_input - 3])) / sma_input)
sma_forecast_1_5 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 5) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2] - close_1d[sma_input - 3] - close_1d[sma_input - 4])) / sma_input)
sma_forecast_1_6 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 6) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2] - close_1d[sma_input - 3] - close_1d[sma_input - 4] - close_1d[sma_input - 5])) / sma_input)
sma_forecast_1_7 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 7) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2] - close_1d[sma_input - 3] - close_1d[sma_input - 4] - close_1d[sma_input - 5] - close_1d[sma_input - 6])) / sma_input)
sma_forecast_1_8 = request.security(syminfo.tickerid, "1440", ((sma * sma_input) + ((close_1d * 8) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2] - close_1d[sma_input - 3] - close_1d[sma_input - 4] - close_1d[sma_input - 5] - close_1d[sma_input - 6] - close_1d[sma_input - 7])) / sma_input)
sma_forecast_1_9 = request.security(syminfo.tickerid, "5", ((sma * sma_input) + ((close_1d * 9) - close_1d[sma_input] - close_1d[sma_input - 1] - close_1d[sma_input - 2] - close_1d[sma_input - 3] - close_1d[sma_input - 4] - close_1d[sma_input - 5] - close_1d[sma_input - 6] - close_1d[sma_input - 7] - close_1d[sma_input - 8])) / sma_input)
plot(sma_forecast_1_1, title="1_1", color=color.new(color.white, 0), linewidth=4, style=plot.style_circles, offset=1, show_last=1)
//plot(sma_forecast_1_2, title="SMA 1_2", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=2, show_last=1)
//plot(sma_forecast_1_3, title="SMA 1_3", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=3, show_last=1)
//plot(sma_forecast_1_4, title="SMA 1_4", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=4, show_last=1)
//plot(sma_forecast_1_5, title="SMA 1_5", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=5, show_last=1)
//plot(sma_forecast_1_6, title="SMA 1_6", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=6, show_last=1)
//plot(sma_forecast_1_7, title="SMA 1_7", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=7, show_last=1)
//plot(sma_forecast_1_8, title="SMA 1_8", color=color.new(color.white, 0), linewidth=1, style=plot.style_circles, offset=8, show_last=1)
plot(sma_forecast_1_9, title="1_9", color=color.new(color.white, 0), linewidth=4, style=plot.style_circles, offset=9, show_last=1)
color green = color.new(color.green, 30)
color red = color.new(color.red, 30)
color gray = color.new(color.gray, 30)
var table t = table.new(position.bottom_right, 2, 14, border_width=2)
iff_4 = ema_bull_4h ? green : gray
table.cell(t, 1, 1, text=ema_over_4h ? "BOĞA4H" : "AYI4H", width=12, text_color=color.white, bgcolor=ema_bear_4h ? red : iff_4)
iff_5 = ema_bull_1d ? green : gray
table.cell(t, 1, 2, text=ema_over_1d ? "BOĞAD" : "AYID", width=12, text_color=color.white, bgcolor=ema_bear_1d ? red : iff_5)
table.cell(t, 1, 3, text="", width=14, height=3, bgcolor=color.new(color.white, 100))
-
ema-rsi ilişkilendirmesi....
PHP Code:
//@version=5
indicator("DynamicEMA-RSI Indicator", overlay = true)
// Input para configurar la hora
custom_hour = input.int(1, "Hora Personalizada (UTC+3)", minval=0, maxval=23)
custom_minute = input.int(1, "Minuto Personalizado", minval=0, maxval=59)
// Input para configurar la longitud de la EMA
ema_length = input.int(3, "Longitud de la EMA", minval=1)
// Input para configurar el período del RSI
rsi_length = input.int(5, "Longitud del RSI", minval=1)
// Input para configurar el nivel del RSI
rsi_level = input.int(100, "Nivel del RSI para Bloqueo de Señal", minval=1, maxval=100)
// Definir la EMA personalizada
ema_custom = ta.ema(close, ema_length)
// Función para determinar si es la hora personalizada
isCustomTime() =>
hour == custom_hour and minute == custom_minute
// Plot de la EMA personalizada
plot(ema_custom, title = "RSI", color = color.rgb(5, 138, 247, 100))
// Calcular el RSI personalizado
rsi_custom = ta.rsi(close, rsi_length)
// Condiciones para señal de compra y venta
signalBuy = isCustomTime() and close > ema_custom and rsi_custom >= rsi_level
signalSell = isCustomTime() and close < ema_custom and rsi_custom <= rsi_level
// Marcadores para señales de compra y venta
plotshape(signalBuy, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(signalSell, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
// Alerta para cualquier señal
alertcondition(signalBuy or signalSell, title="Señal de Compra o Venta", message="Señal de Compra o Venta detectada en la hora personalizada.")
-
son on barın saatlik rangeni hesaplayıp.....barları momentuma göre renklendirme.....
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © loxx
//@version=5
indicator("@",
shorttitle='.',
overlay = true,
timeframe="",
timeframe_gaps = true,
max_polylines_count = 100,
max_lines_count = 500,
max_labels_count = 500,
precision=2,
scale = scale.right)
import loxx/loxxdynamiczone/3
import loxx/loxxjuriktools/1
import loxx/loxxexpandedsourcetypes/4
greencolor = #2DD204
redcolor = #D2042D
smthtype = input.string("Kaufman", "Heikin-Ashi Better Caculation Type", options = ["AMA", "T3", "Kaufman"], group = "Basic Settings")
srcin = input.string("Close", "Source", group= "Basic Settings",
options =
["Close", "Open", "High", "Low", "Median", "Typical", "Weighted", "Average", "Average Median Body", "Trend Biased", "Trend Biased (Extreme)",
"HA Close", "HA Open", "HA High", "HA Low", "HA Median", "HA Typical", "HA Weighted", "HA Average", "HA Average Median Body", "HA Trend Biased", "HA Trend Biased (Extreme)",
"HAB Close", "HAB Open", "HAB High", "HAB Low", "HAB Median", "HAB Typical", "HAB Weighted", "HAB Average", "HAB Average Median Body", "HAB Trend Biased", "HAB Trend Biased (Extreme)"])
per = input.int(14, "Period", group = "Basic Settings")
smthper = input.int(5, "Jurik Smoothing Period", group = "Jurik Filter Settings")
phs = input.float(0, "Jurik Phase", group = "Jurik Filter Settings")
dzper = input.int(35, "Dynamic Zone Period", group = "Dynamic Zone Settings")
dzbuyprob = input.float(0.05, "Dynamic Zone Buy Probability", group = "Dynamic Zone Settings")
dzsellprob = input.float(0.05, "Dynamic Zone Buy Probability", group = "Dynamic Zone Settings")
clrup = input.color(greencolor, "Up color", group = "UI Options")
clrdn = input.color(redcolor, "Down color", group = "UI Options")
kfl=input.float(0.666, title="* Kaufman's Adaptive MA (KAMA) Only - Fast End", group = "Moving Average Inputs")
ksl=input.float(0.0645, title="* Kaufman's Adaptive MA (KAMA) Only - Slow End", group = "Moving Average Inputs")
amafl = input.int(2, title="* Adaptive Moving Average (AMA) Only - Fast", group = "Moving Average Inputs")
amasl = input.int(30, title="* Adaptive Moving Average (AMA) Only - Slow", group = "Moving Average Inputs")
haclose = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close)
haopen = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, open)
hahigh = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, high)
halow = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, low)
hamedian = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, hl2)
hatypical = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, hlc3)
haweighted = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, hlcc4)
haaverage = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, ohlc4)
src = switch srcin
"Close" => loxxexpandedsourcetypes.rclose()
"Open" => loxxexpandedsourcetypes.ropen()
"High" => loxxexpandedsourcetypes.rhigh()
"Low" => loxxexpandedsourcetypes.rlow()
"Median" => loxxexpandedsourcetypes.rmedian()
"Typical" => loxxexpandedsourcetypes.rtypical()
"Weighted" => loxxexpandedsourcetypes.rweighted()
"Average" => loxxexpandedsourcetypes.raverage()
"Average Median Body" => loxxexpandedsourcetypes.ravemedbody()
"Trend Biased" => loxxexpandedsourcetypes.rtrendb()
"Trend Biased (Extreme)" => loxxexpandedsourcetypes.rtrendbext()
"HA Close" => loxxexpandedsourcetypes.haclose(haclose)
"HA Open" => loxxexpandedsourcetypes.haopen(haopen)
"HA High" => loxxexpandedsourcetypes.hahigh(hahigh)
"HA Low" => loxxexpandedsourcetypes.halow(halow)
"HA Median" => loxxexpandedsourcetypes.hamedian(hamedian)
"HA Typical" => loxxexpandedsourcetypes.hatypical(hatypical)
"HA Weighted" => loxxexpandedsourcetypes.haweighted(haweighted)
"HA Average" => loxxexpandedsourcetypes.haaverage(haaverage)
"HA Average Median Body" => loxxexpandedsourcetypes.haavemedbody(haclose, haopen)
"HA Trend Biased" => loxxexpandedsourcetypes.hatrendb(haclose, haopen, hahigh, halow)
"HA Trend Biased (Extreme)" => loxxexpandedsourcetypes.hatrendbext(haclose, haopen, hahigh, halow)
"HAB Close" => loxxexpandedsourcetypes.habclose(smthtype, amafl, amasl, kfl, ksl)
"HAB Open" => loxxexpandedsourcetypes.habopen(smthtype, amafl, amasl, kfl, ksl)
"HAB High" => loxxexpandedsourcetypes.habhigh(smthtype, amafl, amasl, kfl, ksl)
"HAB Low" => loxxexpandedsourcetypes.hablow(smthtype, amafl, amasl, kfl, ksl)
"HAB Median" => loxxexpandedsourcetypes.habmedian(smthtype, amafl, amasl, kfl, ksl)
"HAB Typical" => loxxexpandedsourcetypes.habtypical(smthtype, amafl, amasl, kfl, ksl)
"HAB Weighted" => loxxexpandedsourcetypes.habweighted(smthtype, amafl, amasl, kfl, ksl)
"HAB Average" => loxxexpandedsourcetypes.habaverage(smthtype, amafl, amasl, kfl, ksl)
"HAB Average Median Body" => loxxexpandedsourcetypes.habavemedbody(smthtype, amafl, amasl, kfl, ksl)
"HAB Trend Biased" => loxxexpandedsourcetypes.habtrendb(smthtype, amafl, amasl, kfl, ksl)
"HAB Trend Biased (Extreme)" => loxxexpandedsourcetypes.habtrendbext(smthtype, amafl, amasl, kfl, ksl)
=> haclose
sumMom = 0.,sumWgh = 0.
for k = 0 to per - 1
weight = math.sqrt(k+1)
sumMom += (src - nz(src[k+1]))/weight
sumWgh += weight
out = 0.
out := sumWgh != 0 ? loxxjuriktools.jurik_filt(sumMom/sumWgh, smthper, phs) : loxxjuriktools.jurik_filt(0, smthper, phs)
obLine = loxxdynamiczone.dZone("buy", out, dzbuyprob, dzper)
osLine = loxxdynamiczone.dZone("sell", out, dzsellprob, dzper)
ratios = 0.
ratio = math.min(out, osLine)
ratio := math.max(ratio ,obLine)
ratio := (ratio-obLine)/(osLine-obLine)
ratios := ratio
colorout = color.from_gradient(100.0 * ratios, 0, 101, clrdn, clrup)
barcolor(colorout)
///////////////////////
//@version=5
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TraderInsights21
//Average Daily Range Levels - 10 day
OPEN = request.security(syminfo.tickerid, '60', open)
//ADR L
dayrange = high - low
r1 = request.security(syminfo.tickerid, '60', dayrange[1])
r2 = request.security(syminfo.tickerid, '60', dayrange[2])
r3 = request.security(syminfo.tickerid, '60', dayrange[3])
r4 = request.security(syminfo.tickerid, '60', dayrange[4])
r5 = request.security(syminfo.tickerid, '60', dayrange[5])
r6 = request.security(syminfo.tickerid, '60', dayrange[6])
r7 = request.security(syminfo.tickerid, '60', dayrange[7])
r8 = request.security(syminfo.tickerid, '60', dayrange[8])
r9 = request.security(syminfo.tickerid, '60', dayrange[9])
r10 = request.security(syminfo.tickerid, '60', dayrange[10])
adr_10 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10) / 10
adr_9 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9) / 9
adr_8 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8) / 8
adr_7 = (r1 + r2 + r3 + r4 + r5 + r6 + r7) / 7
adr_6 = (r1 + r2 + r3 + r4 + r5 + r6) / 6
adr_5 = (r1 + r2 + r3 + r4 + r5) / 5
adr_4 = (r1 + r2 + r3 + r4) / 4
adr_3 = (r1 + r2 + r3) / 3
adr_2 = (r1 + r2) / 2
adr_1 = r1
//plot
adrhigh10 = plot(OPEN + adr_10 / 2, title='H', style=plot.style_linebr, color=color.new(#15ff00, 0), linewidth=1)
adrlow10 = plot(OPEN - adr_10 / 2, title='L', style=plot.style_linebr, color=color.new(#ff0000, 0), linewidth=1)
////////
-
....son 10 bar....
ilk bar 1 dak...son bara kadar...3-5-15-....240 diye....
açılışıda 15 dakkalıktan....
range belirleme....dinamik...
hesaplama request yaptığı için ....
kasma olabilir....
PHP Code:
//@version=5
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TraderInsights21
//Average Daily Range Levels - 10 day
indicator(title='Dynamic Zone ', shorttitle=' . ', overlay=true)
OPEN = request.security(syminfo.tickerid, '15', open)
//ADR L
dayrange = high - low
r1 = request.security(syminfo.tickerid, '1', dayrange[1])
r2 = request.security(syminfo.tickerid, '3', dayrange[2])
r3 = request.security(syminfo.tickerid, '5', dayrange[3])
r4 = request.security(syminfo.tickerid, '15', dayrange[4])
r5 = request.security(syminfo.tickerid, '30', dayrange[5])
r6 = request.security(syminfo.tickerid, '45', dayrange[6])
r7 = request.security(syminfo.tickerid, '60', dayrange[7])
r8 = request.security(syminfo.tickerid, '120', dayrange[8])
r9 = request.security(syminfo.tickerid, '180', dayrange[9])
r10 = request.security(syminfo.tickerid, '240', dayrange[10])
adr_10 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10) / 10
adr_9 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9) / 9
adr_8 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8) / 8
adr_7 = (r1 + r2 + r3 + r4 + r5 + r6 + r7) / 7
adr_6 = (r1 + r2 + r3 + r4 + r5 + r6) / 6
adr_5 = (r1 + r2 + r3 + r4 + r5) / 5
adr_4 = (r1 + r2 + r3 + r4) / 4
adr_3 = (r1 + r2 + r3) / 3
adr_2 = (r1 + r2) / 2
adr_1 = r1
//plot
adrhigh10 = plot(OPEN + adr_10 / 2, title='H', style=plot.style_linebr, color=color.new(#15ff00, 0), linewidth=1)
adrlow10 = plot(OPEN - adr_10 / 2, title='L', style=plot.style_linebr, color=color.new(#ff0000, 0), linewidth=1)
https://www.tradingview.com/x/4aj2sbyc/
-
rsi ve macd ikilisi.....
aynı grafikte.....birleştirilmiş ....
ve yazan kişi kullanılan değerlere göre....
trade çeşitleri sunmuş.....
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TheRealDrip2Rip
//@version=5
indicator("Dynamic Trend Fusion", shorttitle="DTF", overlay=true, scale = scale.right)
// Define input options
option = input.string("High Sensitivity", title="Select Option", options=["Standard","Short-term Trading","Long-term Trading","Aggressive Short-term","Conservative Long-term","Balanced Approach","High Sensitivity","Low Sensitivity","Day Trading","Swing Trading"])
// Initialize variables for MACD and RSI settings
var fastLength = 12
var slowLength = 26
var signalSmoothing = 9
var rsiLength = 14
// Update variables based on the selected option
if option == "Short-term Trading"
fastLength := 8
slowLength := 17
signalSmoothing := 9
rsiLength := 8
else if option == "Long-term Trading"
fastLength := 19
slowLength := 39
signalSmoothing := 9
rsiLength := 21
else if option == "Aggressive Short-term"
fastLength := 5
slowLength := 13
signalSmoothing := 8
rsiLength := 5
else if option == "Conservative Long-term"
fastLength := 24
slowLength := 52
signalSmoothing := 18
rsiLength := 28
else if option == "Balanced Approach"
fastLength := 10
slowLength := 22
signalSmoothing := 7
rsiLength := 12
else if option == "High Sensitivity"
fastLength := 4
slowLength := 8
signalSmoothing := 5
rsiLength := 3
else if option == "Low Sensitivity"
fastLength := 30
slowLength := 60
signalSmoothing := 12
rsiLength := 50
else if option == "Day Trading"
fastLength := 6
slowLength := 19
signalSmoothing := 9
rsiLength := 6
else if option == "Swing Trading"
fastLength := 12
slowLength := 26
signalSmoothing := 12
rsiLength := 14
// MACD
[macdLine, signalLine, _] = ta.macd(close, fastLength, slowLength, signalSmoothing)
macdHist = macdLine - signalLine
// RSI
rsi = ta.rsi(close, rsiLength)
// Normalizing MACD and RSI to a similar scale
normMacd = (macdHist - ta.lowest(macdHist, 100)) / (ta.highest(macdHist, 100) - ta.lowest(macdHist, 100))
normRsi = (rsi - 30) / 40 // RSI typically moves between 30 and 70
// Combining normalized values
comboValue = (normMacd + normRsi) / 2
// Smoothing the combined value with a moving average
smoothingLength = input(10, title="Smoothing Length")
smoothedComboValue = ta.sma(comboValue, smoothingLength)
// Determine whether the indicator is bullish or bearish
isBullish = smoothedComboValue > 0.5
isBearish = smoothedComboValue < 0.5
// Plotting with color based on bullish or bearish state
plot(smoothedComboValue, title="Custom RSI-MACD Combo", color=isBullish ? color.rgb(76, 175, 79, 50) : color.rgb(255, 82, 82, 50), linewidth = 2)
//hline( 0.5, title="Midline", color=color.gray, linestyle=hline.style_dashed)
// Alert conditions
alertcondition(isBullish, title="Bullish Alert", message="DTF is Bullish")
alertcondition(not isBullish, title="Bearish Alert", message="DTF is Bearish")
-
Garanti 63.50 kapattı.. ( Mutlu musunuz Osman bey:))
Mart vade 66.30 kapattı.. En yüksek 68.13 gördü ve geri geldi.. Hedefim 68.40 idi..
Vade sonu olduğu için arada harcandım sanırım.. Herşey yerli yerine otursun daha net olacak..
Yeni hedefim 68.10 Mart vade de..
Bu rakam görülene kadar spotta Garanti toplucam.. Akşam almadım daha düşer diye.. Yarın sabahtan 63.50 altından alıma geçeceğim inşallah..