olmodelcaz

Koncorde PRUEBA OLMO

88 0 5
Koncorde PRUEBA OLMO
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
strategy("Koncorde", overlay=true)
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"

if (crossover(media, marron))
    strategy.entry("COMPRA", strategy.long, comment="COMPRA")

if (crossunder(media, marron))
    strategy.entry("VENTA", strategy.short, comment="VENTA")

//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)

////////////////// FIN CODIGO ////////////////////
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out