ironcondor

RP analysis updated 06302015

4
RP analysis updated 06302015
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?
study("RP analysis", overlay=true)
bars = input(type=integer, defval=500)

topen = security(tickerid, 'D', open)
thigh = security(tickerid, 'D', high)
tlow = security(tickerid, 'D', low)
tclose = security(tickerid, 'D', close)
yopen = security(tickerid, 'D', open[1])
yhigh = security(tickerid, 'D', high[1])
ylow = security(tickerid, 'D', low[1])
yclose = security(tickerid, 'D', close[1])

avgbody = security(tickerid, 'D', sum(open-close>0?open-close:close-open, bars)/bars)  
avgtopwick = security(tickerid, 'D',  sum(open>close?high-open:high-close, bars)/bars )  
avgbottomwick = security(tickerid, 'D',  sum(open>close?close-low:open-low, bars)/bars )  

avgoverema = security(tickerid, 'D', sum(high>ema(close, 13)?high-ema(close, 13):nz(na), bars)/bars)
avgunderema = security(tickerid, 'D', sum(ema(close, 13)>low?ema(close, 13)-low:nz(na), bars)/bars)
highestema = highest(security(tickerid, 'D', high-ema(close, 13)>0?high-ema(close, 13):nz(na)), bars)
lowestema = highest(security(tickerid, 'D', ema(close, 13)-low>0?ema(close, 13)-low:nz(na)), bars)

todayema = security(tickerid, 'D', ema(close, 13))
vwap1 = plot(vwap, title="vwap",style=line, color=blue, linewidth=4)


////// PLOTS
plotopen = plot(topen, title="Open",style=line, color=green, linewidth=4)
sma100 = plot(sma(close, 100), title="SMA100",style=line, color=red, linewidth=4)
sma500 = plot(sma(close, 500), title="SMA 500",style=line, color=gray, linewidth=4)

plotema = plot(todayema, title="EMA",style=line, color=red, linewidth=4)
topema = plot(todayema+avgoverema, title="EMA Top",style=line, color=aqua, linewidth=4)
bottomema = plot(todayema-avgunderema, title="EMA Bottom",style=line, color=aqua, linewidth=4)
plothighestema = plot(todayema+highestema, title="EMA Highest",style=line, color=aqua, linewidth=4)
plotlowestema = plot(todayema-lowestema, title="EMA Lowest",style=line, color=aqua, linewidth=4)

wickzonetop = plot(topen+avgtopwick, title="Top Wickzone",style=line, color=blue, linewidth=4)
wickzonebottom = plot(topen-avgbottomwick, title="Bottom Wickzone",style=line, color=blue, linewidth=4)
fill(plotopen, wickzonetop, color=silver, transp=75)
fill(plotopen, wickzonebottom, color=silver, transp=75)


plotbodytop = plot(topen+avgbody, title="Top Close",style=line, color=black, linewidth=4)
plottopwick = plot(topen+avgbody+avgtopwick, title="Top Limit",style=line, color=purple, linewidth=4)
fill(wickzonetop, plotbodytop, color=black, transp=75)
fill(plotbodytop, plottopwick, color=red, transp=75)

plotbodybottom = plot(topen-avgbody, title="Bottom Close",style=line, color=black, linewidth=4)
plotbottomwick = plot(topen-avgbody-avgbottomwick, title="Bottom Limit",style=line, color=purple, linewidth=4)
fill(wickzonebottom, plotbodybottom, color=black, transp=75)
fill(plotbodybottom, plotbottomwick, color=red, transp=75)