IgnacioNavarro

Blai5 Koncorde [JFR]

271 0 35
The wonderful Blai5 indicator

http://www.blai5.net/www/index.php/koncorde/koncorde-docs
Remove from Favorite Scripts Add to Favorite Scripts
////////////////// CODIGO ////////////////////

//
// @author JFR
// https://forobits.com/t/indicador-konkorde-para-tradingview/461
//
study(title="Blai5 Koncorde [JFR]", shorttitle="BKON")
calc_pvi() => 
    sval=volume
    pvi=(volume > volume[1]) ? nz(pvi[1]) + ((close - close[1])/close[1]) * (na(pvi[1]) ? pvi[1] : sval) : nz(pvi[1])
    pvi

calc_nvi() => 
    sval=volume
    nvi=(volume < volume[1]) ? nz(nvi[1]) + ((close - close[1])/close[1]) * (na(nvi[1]) ? nvi[1] : sval) : nz(nvi[1])
    nvi

calc_mfi(length) => 
    src=hlc3
    upper = sum(volume * (change(src) <= 0 ? 0 : src), length)
    lower = sum(volume * (change(src) >= 0 ? 0 : src), length)
    rsi(upper, lower)

tprice=ohlc4
lengthEMA = input(255, minval=1)
m=input(15)
pvi = calc_pvi()
pvim = ema(pvi, m)
pvimax = highest(pvim, 90)
pvimin = lowest(pvim, 90)
oscp = (pvi - pvim) * 100/ (pvimax - pvimin)
nvi =calc_nvi()
nvim = ema(nvi, m)
nvimax = highest(nvim, 90)
nvimin = lowest(nvim, 90)
azul = (nvi - nvim) * 100/ (nvimax - nvimin)
xmf = calc_mfi(14)
mult=input(2.0)
basis = sma(tprice, 25)
dev = mult * stdev(tprice, 25)
upper = basis + dev
lower = basis - dev
OB1 = (upper + lower) / 2.0
OB2 = upper - lower
BollOsc = ((tprice - OB1) / OB2 ) * 100
xrsi = rsi(tprice, 14)
calc_stoch(src, length,smoothFastD ) =>
    ll = lowest(low, length)
    hh = highest(high, length)
    k = 100 * (src - ll) / (hh - ll)
    sma(k, smoothFastD)

stoc = calc_stoch(tprice, 21, 3)
marron = (xrsi + xmf + BollOsc + (stoc / 3))/2
verde = marron + oscp
media = ema(marron,m)
bandacero= 0

vl=plot(verde, color=#66FF66, style=area, title="verde")// COLOURED(102,255,102) as "verde" , GREEN
ml=plot(marron, color= #FFCC99, style=area, title="marron", transp=0) // COLOURED(255,204,153) as"marron" , BEIGE 
al=plot(azul, color=#00FFFF, style=area, title="azul") // COLOURED(0,255,255) as "azul" , 
plot(marron, color= #330000, style=line, linewidth=2, title="lmarron") // COLOURED(51,0,0) as "lmarron" , 
plot(verde, color=#006600, style=line, linewidth=2, title="lineav") // COLOURED(0,102,0) as "lineav" , 
plot(azul, color=#000066, style=line, title="lazul", title="lazul") // COLOURED(0,0,102) as "lazul" , 
plot(media, color=red, title="media", style=line, linewidth=2) // COLOURED(255,0,0) as "media" , 
plot(bandacero, color=black, title="cero") // COLOURED(0,0,0) as "cero"

////////////////// FIN CODIGO ////////////////////
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out