SKRYPTY

ŚREDNIE – FIBONNACI NUMBERS skrypt:

 

//@version=4
study(title=”Moving Average”, shorttitle=”MA”, overlay=true)
len = input(5, minval=1, title=”Length”)
src = input(close, title=”Source”)
out = sma(src, len)
plot(out, color=color.blue, title=”MA”)

len1 = input(13, minval=1, title=”Length”)
src1 = input(close, title=”Source”)
out1 = sma(src1, len1)
plot(out1, color=color.red, title=”MA”)

len2 = input(34, minval=1, title=”Length”)
src2 = input(close, title=”Source”)
out2 = sma(src2, len2)
plot(out2, color=color.green, title=”MA”)

len3 = input(55, minval=1, title=”Length”)
src3 = input(close, title=”Source”)
out3 = sma(src3, len3)
plot(out3, color=color.yellow, title=”MA”)

len4 = input(144, minval=1, title=”Length”)
src4 = input(close, title=”Source”)
out4 = sma(src4, len4)
plot(out4, color=color.white, title=”MA”)

 

RSI + MACD in one indicator skrypt

 

//@version=4

//RSI CODE

study(“RSI + MACD”, shorttitle = “rsimacd”)

source = input(close)
length = input(14, minval=2, maxval =314)

RSI = rsi(source,length)

plot(RSI-120, color=color.yellow, linewidth=1)

LINESIZEUP=input(70)
LINESIZEDOWN=input(30)

UPLINE = hline(LINESIZEUP-120,color=color.white)
DOWNLINE = hline(LINESIZEDOWN-120,color= color.white)

fill(UPLINE, DOWNLINE, color=color.purple, transp = 50)

//MACD

macdbase = input(12, minval=1, maxval=400)
fastbase = input(26, minval=1, maxval=400)
histbase = input(9, minval=1, maxval=400)

[macdLine, signalLine, histLine] = macd(close, macdbase, fastbase, histbase)
plot(macdLine/10, color=color.blue)
plot(signalLine/10, color=color.orange)
plot(histLine/10, color=color.red, style=plot.style_histogram)

 

loading