CHMURY MMD skrypt:
//@version=4 study("CHMURKImmd", overlay=true) //SREDNIE SimpleShort48= input(48, title="short") //dlugosc SimpleMiddle288 = input(288, title="middle") SimpleLong1440 = input(1440, title="long") FastRed12 = input(12,title="faster") SimplePurple3456 = input(3456,title="faster") price =close MAshort=sma(price,SimpleShort48) //funkcja srednich sma MAmiddle=sma(price,SimpleMiddle288) MAlong=sma(price, SimpleLong1440) MAFastRed12= sma(price, FastRed12) MASimplePurple3456= sma(price, SimplePurple3456) EMAshort=ema(price, SimpleShort48) EMAmiddle=ema(price,SimpleMiddle288) EMAlong=ema(price, SimpleLong1440) EMAFastRed12= ema(price, FastRed12) EMASimplePurple3456= ema(price, SimplePurple3456) //POMARANCZOWA p1=plot(MAshort,color=#FF8C00, transp=10) p2=plot(EMAshort, color=#FF8C00, transp =10) fill(p1,p2,color=color.orange, transp=50) //NIEBIESKA p3=plot(MAmiddle, color=#00ffff,transp =10) p4=plot(EMAmiddle, color=#00ffff, transp =10) fill(p3,p4, color = color.blue, transp = 50) //ZIELONA p5=plot(EMAlong, color=#7FFF00, transp =10) p6=plot(MAlong, color=#7FFF00, transp =10) fill(p5,p6, color = color.green, transp = 50) //BIALA p7=plot(MAFastRed12, color=color.white, transp = 10) p8=plot(EMAFastRed12, color=color.white,transp =10) fill(p7,p8, color = color.white, transp = 50) //PURPUROWA p9=plot(MASimplePurple3456, color=color.purple, transp = 10) p10=plot(EMASimplePurple3456, color=color.purple,transp =10) fill(p9,p10, color = color.purple, transp = 50) //STRATEGIA //TREND WZROSTOWY TrendWzrostowy1 = crossover(MAmiddle,MAlong) and MAmiddle > EMAlong and EMAmiddle >EMAlong and EMAmiddle > MAlong TrendWzrostowy2 = crossover(MAmiddle,EMAlong)and MAmiddle > MAlong and EMAmiddle>MAlong and EMAmiddle>EMAlong TrendWzrostowy3 = crossover(EMAmiddle,MAlong) and EMAmiddle >EMAlong and MAmiddle>EMAlong and MAmiddle>MAlong TrendWzrostowy4 = crossover(EMAmiddle,EMAlong)and EMAmiddle > MAlong and MAmiddle>MAlong and MAmiddle>EMAlong TrendWzrostowyTotal = TrendWzrostowy1 or TrendWzrostowy2 or TrendWzrostowy3 or TrendWzrostowy4 plotshape(TrendWzrostowyTotal, "TrendWzrostowy", shape.triangleup, location.abovebar, color.green, 0,0 ,"UP-TREND-start",color.green, true, size.tiny) //TREND SPADKOWY TrendSpadkowy1 = crossunder(MAmiddle,MAlong) and MAmiddle < EMAlong and EMAmiddle <EMAlong and EMAmiddle < MAlong TrendSpadkowy2 = crossunder(MAmiddle,EMAlong)and MAmiddle < MAlong and EMAmiddle <MAlong and EMAmiddle<EMAlong TrendSpadkowy3 = crossunder(EMAmiddle,MAlong) and EMAmiddle <EMAlong and MAmiddle <EMAlong and MAmiddle<MAlong TrendSpadkowy4 = crossunder(EMAmiddle,EMAlong)and EMAmiddle < MAlong and MAmiddle <MAlong and MAmiddle<EMAlong TrendSpadkowyTotal = TrendSpadkowy1 or TrendSpadkowy2 or TrendSpadkowy3 or TrendSpadkowy4 plotshape(TrendSpadkowyTotal, "TrendSpadkowy", shape.triangledown, location.belowbar, color.red, 0,0,"DOWN-TREND-start",color.red, true, size.tiny) //KOREKTA DUŻA W TRNEDZIE SPADKOWYM KorektaDuza1 = crossover(MAshort,MAmiddle) and MAshort> EMAmiddle and EMAshort >MAmiddle and EMAshort >EMAmiddle and MAshort < MAlong and EMAshort <MAlong and MAshort < EMAlong and EMAshort <EMAlong KorektaDuza2 = crossover(MAshort,EMAmiddle)and MAshort > MAmiddle and EMAshort >MAmiddle and EMAshort >EMAmiddle and MAshort < MAlong and EMAshort <MAlong and MAshort < EMAlong and EMAshort <EMAlong KorektaDuza3 = crossover(EMAshort,MAmiddle) and EMAshort> EMAmiddle and MAshort >MAmiddle and MAshort >EMAmiddle and MAshort < MAlong and EMAshort <MAlong and MAshort < EMAlong and EMAshort <EMAlong KorektaDuza4 = crossover(EMAshort,EMAmiddle)and EMAshort> MAmiddle and MAshort >MAmiddle and MAshort >EMAmiddle and MAshort < MAlong and EMAshort <MAlong and MAshort < EMAlong and EMAshort <EMAlong KorektaDuzaS = KorektaDuza1 or KorektaDuza2 or KorektaDuza3 or KorektaDuza4 plotshape(KorektaDuzaS, "KOREKTA_W_SPADKOWYM", shape.diamond, location.abovebar, color.blue, 0,0,"KOREKTA_W_S",color.blue, true, size.tiny) KorektaDuza5 = crossunder(MAshort,MAmiddle) and MAshort< EMAmiddle and EMAshort <MAmiddle and EMAshort <EMAmiddle and MAshort > MAlong and EMAshort >MAlong and MAshort > EMAlong and EMAshort >EMAlong KorektaDuza6 = crossunder(MAshort,EMAmiddle)and MAshort < MAmiddle and EMAshort <MAmiddle and EMAshort <EMAmiddle and MAshort > MAlong and EMAshort >MAlong and MAshort > EMAlong and EMAshort >EMAlong KorektaDuza7 = crossunder(EMAshort,MAmiddle) and EMAshort< EMAmiddle and MAshort <MAmiddle and MAshort <EMAmiddle and MAshort > MAlong and EMAshort >MAlong and MAshort > EMAlong and EMAshort >EMAlong KorektaDuza8 = crossunder(EMAshort,EMAmiddle)and EMAshort < MAmiddle and MAshort <MAmiddle and MAshort <EMAmiddle and MAshort > MAlong and EMAshort >MAlong and MAshort > EMAlong and EMAshort >EMAlong KorektaDuzaW = KorektaDuza5 or KorektaDuza6 or KorektaDuza7 or KorektaDuza8 plotshape(KorektaDuzaW, "KOREKTA_W_WZROSTOWYM", shape.diamond, location.abovebar, color.white, 0,0,"KOREKTA_W_UP",color.white, true, size.tiny) KorektaWzrostowa1 = crossover(MAFastRed12,MAshort) and MAFastRed12> EMAshort and EMAFastRed12 >MAshort and EMAFastRed12 >EMAshort //MAshort < MAlong cross up KorektaWzrostowa2 = crossover(MAFastRed12,EMAshort)and MAFastRed12> MAshort and EMAFastRed12 >MAshort and EMAFastRed12 >EMAshort //MAshort < MAlong KorektaWzrostowa3 = crossover(EMAFastRed12,MAshort) and EMAFastRed12> EMAshort and MAFastRed12 >MAshort and MAFastRed12 >EMAshort //MAshort < MAlong KorektaWzrostowa4 = crossover(EMAFastRed12,EMAshort)and EMAFastRed12> MAshort and MAFastRed12 >MAshort and MAFastRed12 >EMAshort //MAshort < MAlong KorektaWzrostowaFULL= KorektaWzrostowa1 or KorektaWzrostowa2 or KorektaWzrostowa3 plotshape(KorektaWzrostowaFULL, "PRZECIECIE_UP", shape.xcross, location.abovebar, color.yellow, 0,0,"UP-Cross",color.green, true, size.tiny) KoniecKorektaWzrostowa1 = crossunder(MAFastRed12,MAshort) and MAFastRed12 < EMAshort and EMAFastRed12 <MAshort and EMAFastRed12 <EMAshort //and MAshort < MAlong cross down KoniecKorektaWzrostowa2 = crossunder(MAFastRed12,EMAshort)and MAFastRed12 < MAshort and EMAFastRed12 <MAshort and EMAFastRed12 <EMAshort //and MAshort < MAlong cross down KoniecKorektaWzrostowa3 = crossunder(EMAFastRed12,MAshort) and EMAFastRed12< EMAshort and MAFastRed12 <MAshort and MAFastRed12 <EMAshort //and MAshort < MAlong cross dowon KoniecKorektaWzrostowa4 = crossunder(EMAFastRed12,EMAshort)and EMAFastRed12< MAshort and MAFastRed12 <MAshort and MAFastRed12 <EMAshort //and MAshort < MAlong KoniecKorektaWzrostowaFULL= KoniecKorektaWzrostowa1 or KoniecKorektaWzrostowa2 or KoniecKorektaWzrostowa3 or KoniecKorektaWzrostowa4 plotshape(KoniecKorektaWzrostowaFULL, "PRZECIECIE_DOWN", shape.xcross, location.abovebar, color.red, 0,0,"down-Cross",color.green, true, size.tiny) length = input(14, title="l", minval=1) smoothd = input(5, title="D", minval=1) smoothK = input(3, title="k", minval=1) k = sma(stoch(close, high, low, length), smoothK) d = sma(k, smoothd) //plot(k, title="%K", color=color.blue) //plot(d, title="%D", color=color.orange) h0 = 80 h1 = 20 //fill(h0, h1, color=color.purple, transp=75) stochsig1= crossover(k,d) and k<=h1 stochsig2= crossunder(k,d) and k>=h0 plotshape(stochsig1, "STOCH WYKUP", shape.triangleup, location.belowbar, color.white, 0,0,"STOCH",color.white, true, size.tiny) // stoch plotshape(stochsig2, "STOCH WYPRZED", shape.triangledown, location.abovebar, color.white, 0,0,"STOCH",color.white, true, size.tiny) // stoch
Ś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)
Najnowsze komentarze