https://tr.tradingview.com/script/hc...ank-Histogram/ kriptolar için tasarlanmış....
kısaca....50 üstü pozitif trend var...altı negatif trend varmış...anlamında....
https://www.tradingview.com/x/vLyCxV1F/ örnek görüntü....
kod hali...
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © VanHe1sing
//@version=5
indicator("Percent Rank", shorttitle = "PR% ▲▼",overlay = false, max_lines_count = 72, max_labels_count = 15)
int length = input.int(60, title='Percent Rank Length', tooltip = "Percent rank is the percents of how many
previous values was less than or equal to the current value of given series."
, group = "Percent Rank")
columns_width = 30-input.int(15, "Columns Width", minval = 10, maxval = 20)
// Symbol's //
symbol1 = input.symbol("BISTMIXED:XU030D1!", "Ticker 1", group = "Ticker")
symbol2 = input.symbol("BISTMIXED:XU100", "Ticker 2", group = "Ticker")
symbol3 = input.symbol("BISTMIXED:GARAN", "Ticker 3", group = "Ticker")
symbol4 = input.symbol("BISTMIXED:BINHO", "Ticker 4", group = "Ticker")
symbol5 = input.symbol("BISTMIXED:THYAO", "Ticker 5", group = "Ticker")
symbol6 = input.symbol("BISTMIXED:KCHOL", "Ticker 6", group = "Ticker")
symbol7 = input.symbol("BISTMIXED:EREGL", "Ticker 7", group = "Ticker")
symbol8 = input.symbol("BISTMIXED:BIMAS","Ticker 8", group = "Ticker")
symbol9 = input.symbol("BISTMIXED:EKGYO","Ticker 9", group = "Ticker")
symbol10= input.symbol("BISTMIXED:TUPRS","Ticker 10",group = "Ticker")
// Request source with percentrank and colors//
request(symbol)=>
p = request.security(symbol, "", ta.percentrank(close, length))
c = color.from_gradient(p, 0, 100, color.rgb(255, 82, 82, 56), color.rgb(76, 175, 79, 55))
[p, c]
// Draw Columns //
column(index, width, src, color)=>
_1_ = chart.point.from_index(bar_index-index, math.round(src))
_2_ = chart.point.from_index(bar_index-index, 0)
for i = 2 to 8
line.new(_1_, _2_, width = width*i, color = color.new(color, columns_width*i))
// Draw desk and Scales //
d_s()=>
// Desk and Scale Chart Points
bar_back = 265
_1_1 = chart.point.from_index(bar_index, -2)
_1_2 = chart.point.from_index(bar_index-bar_back, -2)
_2_1 = chart.point.from_index(bar_index-6, 2)
_2_2 = chart.point.from_index(bar_index-bar_back-6, 2)
_3_1 = chart.point.from_index(bar_index-bar_back, -2)
_3_2 = chart.point.from_index(bar_index-bar_back-6, 2)
_4_1 = chart.point.from_index(bar_index, -2)
_4_2 = chart.point.from_index(bar_index-6, 2)
// Desk
d_color = color.white
//l1 = line.new(_1_1, _1_2, width = 3, color = color.gray)
//l2 = line.new(_2_1, _2_2, width = 1, color = d_color)
//line.new(_3_1, _3_2, width = 3, color = color.gray)
//line.new(_4_1, _4_2, width = 1, color = d_color)
//linefill.new(l1, l2, d_color)
// Scale Lines
mid_1 = chart.point.from_index(bar_index-6, 100)
mid_2 = chart.point.from_index(bar_index-bar_back-6, 100)
hi_1 = chart.point.from_index(bar_index-6, 100)
hi_2 = chart.point.from_index(bar_index-bar_back-6, 100)
//lm1 = line.new(mid_1, mid_2, width = 1, color = color.gray)
//lh1 = line.new(hi_1, hi_2, width = 1, color = color.white)
//linefill.new(lm1, lh1, #23432423)
//linefill.new(lm1, l2, #43232323)
// Draw label //
lbl(index, symbol, pr)=>
sym = str.split(symbol, ":")
label.new(bar_index-index, 0, sym.get(1),
style = label.style_label_upper_left, textcolor = color.white, color = color.rgb(72, 74, 82))
p_r = ta.change(pr, length>=50 ? 50 : length) >= 0 ?
str.tostring(math.round(pr))+"% â–²"
: str.tostring(math.round(pr))+"% â–¼"
color = pr > 50 ? color.rgb(172, 247, 174, 64) : color.rgb(243, 174, 174,64)
label.new(bar_index-index, pr, p_r, style = label.style_none, textcolor = color)
// Request Tickers and Colors //
[pr_1, color1] = request(symbol1)
[pr_2, color2] = request(symbol2)
[pr_3, color3] = request(symbol3)
[pr_4, color4] = request(symbol4)
[pr_5, color5] = request(symbol5)
[pr_6, color6] = request(symbol6)
[pr_7, color7] = request(symbol7)
[pr_8, color8] = request(symbol8)
[pr_9, color9] = request(symbol9)
[pr_10,color10] = request(symbol10)
// Plot //
if barstate.islast
d_s()
index = 25
column(index, 10,pr_1, color1)
column(index*2, 8,pr_2, color2)
column(index*3, 8,pr_3, color3)
column(index*4, 8,pr_4, color4)
column(index*5, 8,pr_5, color5)
column(index*6, 8,pr_6, color6)
column(index*7, 8,pr_7, color7)
column(index*8, 8,pr_8, color8)
column(index*9, 8,pr_9, color9)
column(index*10,8,pr_10,color10)
// Labels
lbl(index, symbol1, pr_1)
lbl(index*2, symbol2, pr_2)
lbl(index*3, symbol3, pr_3)
lbl(index*4, symbol4, pr_4)
lbl(index*5, symbol5, pr_5)
lbl(index*6, symbol6, pr_6)
lbl(index*7, symbol7, pr_7)
lbl(index*8, symbol8, pr_8)
lbl(index*9, symbol9, pr_9)
lbl(index*10,symbol10,pr_10)
// ▼▲ //
16.07.2024 - 10.12.2024
https://tr.tradingview.com/script/zW...Signals-by-Ak/
atr hesaplamalı...
16.07.2024 - 10.12.2024
https://www.tradingview.com/x/JODng0DZ/
https://tr.tradingview.com/script/WE5MATeB/
PHP Code:
//@version=5
indicator(title='.', overlay=true)
// Inputs
a = input(2, title='Key Vaule. \'This changes the sensitivity\'')
c = input(10, title='ATR Period')
h = input(true, title='Signals from Heikin Ashi Candles')
xATR = ta.atr(c)
nLoss = a * xATR
src = h ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close, lookahead=barmerge.lookahead_off) : close
xATRTrailingStop = 0.0
iff_1 = src > nz(xATRTrailingStop[1], 0) ? src - nLoss : src + nLoss
iff_2 = src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0) ? math.min(nz(xATRTrailingStop[1]), src + nLoss) : iff_1
xATRTrailingStop := src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0) ? math.max(nz(xATRTrailingStop[1]), src - nLoss) : iff_2
pos = 0
iff_3 = src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0) ? -1 : nz(pos[1], 0)
pos := src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0) ? 1 : iff_3
xcolor = pos == -1 ? color.red : pos == 1 ? color.green : color.blue
ema = ta.ema(src, 1)
above = ta.crossover(ema, xATRTrailingStop)
below = ta.crossover(xATRTrailingStop, ema)
buy = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below
barbuy = src > xATRTrailingStop
barsell = src < xATRTrailingStop
plotshape(buy, title='Buy', text='L', style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.white, 0), size=size.tiny)
plotshape(sell, title='Sell', text='S', style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.white, 0), size=size.tiny)
barcolor(barbuy ? color.green : na)
barcolor(barsell ? color.red : na)
alertcondition(buy, 'UT Long', 'UT Long')
alertcondition(sell, 'UT Short', 'UT Short')
////////
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Seckin42
//@version=5
source = close
windowsize = input(title="Window Size", defval=25)
offset = input.float(title="Offset", defval=0.85)
sigma = input.float(title="Sigma", defval=6)
plot(ta.alma(source, windowsize, offset, sigma))
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
[supertrend, direction] = ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, "Body Middle",display = display.none)
fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps = false)
alertcondition(direction[1] > direction, title='Downtrend to Uptrend', message='The Supertrend value switched from Downtrend to Uptrend ')
alertcondition(direction[1] < direction, title='Uptrend to Downtrend', message='The Supertrend value switched from Uptrend to Downtrend')
alertcondition(direction[1] != direction, title='Trend Change', message='The Supertrend value switched from Uptrend to Downtrend or vice versa')
///////
16.07.2024 - 10.12.2024
https://tr.tradingview.com/script/TW...lden-Strategy/
https://www.tradingview.com/x/IhUcT7yn/
kod sade hali...
PHP Code:
//@version=5
// Dr. Abhiram's Golden Strategy //@version=5
// srflip2011
indicator(title='DRABHIRAM\'s GOLDEN Strategy', overlay=true)
// --- inputs
source = close
TITLE = input(false, title='Turn on Alerts & Enable Background Color options are based on EMA1 & EMA2 Crossovers, (This button does nothing)')
turnon2 = input(true, title='Turn on Alerts?')
colorbars = input(true, title = "Color Bars?")
colorbars2 = input(true,title = "Color Bar when price closes under / above Ema 1 & 2?" , inline = "1")
barc1 = input (color.rgb(0, 38, 255), "+", inline = "1")
barc2 = input(color.orange, "-", inline ="1")
turnon = input(true, title='Turn on Ema 1 & 2?')
//backgroundcolor = input(false, title='Enable Background Color?')
//Ema 1 & 2
len1 = input.int(10, minval=1, title='EMA1')
len2 = input.int(21, minval=1, title='EMA2')
ema1 = ta.ema(source, len1)
ema2 = ta.ema(source, len2)
//---
cond1 = ta.crossover(close,ema1) and ta.crossover(close,ema2)
cond2 = ta.crossunder(close,ema1) and ta.crossunder(close,ema2)
barcolor(cond1 ? color.rgb(0, 38, 255) : cond2 ? color.orange: na)
//-- Candle Color
colbar = ema1 > ema2 ? color.rgb(15, 250, 23) : color.rgb(255, 0, 0)
barcolor(colorbars ? colbar :na)
// Ema Cross
mylong = ta.crossover(ema1, ema2)
myshort = ta.crossunder(ema1, ema2)
first = ta.ema(close, len1)
sec = ta.ema(close, len2)
// Calculations
last_long = float(na)
last_short = float(na)
last_long := mylong ? time : nz(last_long[1])
last_short := myshort ? time : nz(last_short[1])
in_long = last_long > last_short ? 2 : 0
in_short = last_short > last_long ? 2 : 0
condlongx = in_long
condlong = ta.crossover(condlongx, 1.9)
condlongclose = ta.crossunder(condlongx, 1.9)
condshortx = in_short
condshort = ta.crossover(condshortx, 1.9)
condshortclose = ta.crossover(condshortx, 1.9)
// Color Fill
fcolor = first > sec ? #0aff68 : first < sec ? #ff0a5a : #cccccc
// Plots
plotshape(turnon2 ? condlong : na, title='Breakout', color=color.new(#112f16, 0), location=location.belowbar, style=shape.labelup, text='L', textcolor=color.new(color.white, 0), size=size.small, offset=1)
plotshape(turnon2 ? condshort : na, title='Breakdown', color=color.new(#9d0d0d, 0), style=shape.labeldown, text='S', textcolor=color.new(color.white, 0), size=size.small, offset=1)
öncekiler ile birleşmiş hali....
PHP Code:
//@version=5
indicator(title='.', overlay=true)
// Inputs
a = input(2, title='Key Vaule. \'This changes the sensitivity\'')
c = input(10, title='ATR Period')
h = input(true, title='Signals from Heikin Ashi Candles')
xATR = ta.atr(c)
nLoss = a * xATR
src = h ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close, lookahead=barmerge.lookahead_off) : close
xATRTrailingStop = 0.0
iff_1 = src > nz(xATRTrailingStop[1], 0) ? src - nLoss : src + nLoss
iff_2 = src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0) ? math.min(nz(xATRTrailingStop[1]), src + nLoss) : iff_1
xATRTrailingStop := src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0) ? math.max(nz(xATRTrailingStop[1]), src - nLoss) : iff_2
pos = 0
iff_3 = src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0) ? -1 : nz(pos[1], 0)
pos := src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0) ? 1 : iff_3
xcolor = pos == -1 ? color.red : pos == 1 ? color.green : color.blue
ema = ta.ema(src, 1)
above = ta.crossover(ema, xATRTrailingStop)
below = ta.crossover(xATRTrailingStop, ema)
buy = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below
barbuy = src > xATRTrailingStop
barsell = src < xATRTrailingStop
plotshape(buy, title='Buy', text='L', style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.white, 0), size=size.tiny)
plotshape(sell, title='Sell', text='S', style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.white, 0), size=size.tiny)
barcolor(barbuy ? color.green : na)
barcolor(barsell ? color.red : na)
////////
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Seckin42
//@version=5
source = close
windowsize = input(title="Window Size", defval=25)
offset = input.float(title="Offset", defval=0.85)
sigma = input.float(title="Sigma", defval=6)
plot(ta.alma(source, windowsize, offset, sigma))
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
[supertrend, direction] = ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, "Body Middle",display = display.none)
//////
//@version=5
// Dr. Abhiram's Golden Strategy //@version=5
// srflip2011
// --- inputs
source55 = close
TITLE = input(false, title='Turn on Alerts & Enable Background Color options are based on EMA1 & EMA2 Crossovers, (This button does nothing)')
turnon2 = input(true, title='Turn on Alerts?')
colorbars = input(true, title = "Color Bars?")
colorbars2 = input(true,title = "Color Bar when price closes under / above Ema 1 & 2?" , inline = "1")
barc1 = input (color.rgb(0, 38, 255), "+", inline = "1")
barc2 = input(color.orange, "-", inline ="1")
turnon = input(true, title='Turn on Ema 1 & 2?')
//backgroundcolor = input(false, title='Enable Background Color?')
//Ema 1 & 2
len1 = input.int(10, minval=1, title='EMA1')
len2 = input.int(21, minval=1, title='EMA2')
ema1 = ta.ema(source55, len1)
ema2 = ta.ema(source55, len2)
//---
cond1 = ta.crossover(close,ema1) and ta.crossover(close,ema2)
cond2 = ta.crossunder(close,ema1) and ta.crossunder(close,ema2)
barcolor(cond1 ? color.rgb(0, 38, 255) : cond2 ? color.orange: na)
//-- Candle Color
colbar = ema1 > ema2 ? color.rgb(15, 250, 23) : color.rgb(255, 0, 0)
barcolor(colorbars ? colbar :na)
// Ema Cross
mylong = ta.crossover(ema1, ema2)
myshort = ta.crossunder(ema1, ema2)
first = ta.ema(close, len1)
sec = ta.ema(close, len2)
// Calculations
last_long = float(na)
last_short = float(na)
last_long := mylong ? time : nz(last_long[1])
last_short := myshort ? time : nz(last_short[1])
in_long = last_long > last_short ? 2 : 0
in_short = last_short > last_long ? 2 : 0
condlongx = in_long
condlong = ta.crossover(condlongx, 1.9)
condlongclose = ta.crossunder(condlongx, 1.9)
condshortx = in_short
condshort = ta.crossover(condshortx, 1.9)
condshortclose = ta.crossover(condshortx, 1.9)
// Color Fill
fcolor = first > sec ? #0aff68 : first < sec ? #ff0a5a : #cccccc
// Plots
plotshape(turnon2 ? condlong : na, title='Breakout', color=color.new(#112f16, 0), location=location.belowbar, style=shape.labelup, text='L', textcolor=color.new(color.white, 0), size=size.small, offset=1)
plotshape(turnon2 ? condshort : na, title='Breakdown', color=color.new(#9d0d0d, 0), style=shape.labeldown, text='S', textcolor=color.new(color.white, 0), size=size.small, offset=1)
/////
16.07.2024 - 10.12.2024
https://tr.tradingview.com/script/Ze6GlKJO/
https://tr.tradingview.com/script/LG...es-ChartPrime/ bu da ....olasılık ihtimali...rastlantısal yürüyüş kodu...
bunu inceleyip...sadeleyip....üste yazılan koda ilave etsek ne olacak bakalım...
16.07.2024 - 10.12.2024
Yer İmleri