82瀏覽
1
82 0
study(title="Moving Averages", shorttitle="Washm 2x Dbl", overlay=true)
exponential = input(true, title="Exponential MA")

src = close

ma7 = exponential ? ema ( src , 13) : sma ( src , 13)
ma55 = exponential ? ema ( src , 55) : sma ( src , 55)


plot( ma7, color=orange, style=line, title="MMA7", linewidth=1)
plot( ma55, color=fuchsia, style=line, title="MMA55", linewidth=1)


mysignal = ema (close, 12) - ema (close, 26)
barcolor(mysignal > mysignal ? green : red)
source = close
length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
basis = sma (source, length)
dev = mult * stdev(source, length)
upper = basis + dev
lower = basis - dev
plot(basis, color=red)
p1 = plot(upper, color=blue)
p2 = plot(lower, color=blue)
fill(p1, p2)





Factor=input(3, minval=1,maxval = 100)
Pd=input(7, minval=1,maxval = 100)


Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))


TrendUp=close>TrendUp? max(Up,TrendUp) : Up
TrendDown=close<TrendDown? min(Dn,TrendDown) : Dn

Trend = close > TrendDown ? 1: close< TrendUp? -1: nz (Trend,1)
Tsl = Trend==1? TrendUp: TrendDown

linecolor = Trend == 1 ? green : red

plot( Tsl , color = linecolor , style = line , linewidth = 2,title = "SuperTrend")

plotshape(cross(close, Tsl ) and close>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)
plotshape(cross( Tsl ,close) and close<Tsl , "Down Arrow", shape.triangledown , location.abovebar, red,0,0)
//plot(Trend==1 and Trend==-1,color = linecolor, style = circles, linewidth = 3,title="Trend")

plotarrow(Trend == 1 and Trend == -1 ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=60, minheight=50, transp=0)
plotarrow(Trend == -1 and Trend == 1 ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=60, minheight=50, transp=0)




BBMAMultiply = period == "1" ? 5 : period == "3" ? 5 : period == "5" ? 3 : period == "15" ? 2 : period == "30" ? 2 : period == "60" ? 4 : period == "240" ? 4 : 1

length1 = input(20, minval=1)
BBLength1 = BBMAMultiply * length1
src1 = input(close, title="Source")
mult1 = input(2.0, minval=0.001, maxval=50)
basis1 = sma (src1, BBLength1)
dev1 = mult1 * stdev(src1, BBLength1)
upper1 = basis1 + dev1
lower1 = basis1 - dev1
plot(basis1, color=gray, linewidth=2)
p11 = plot(upper1, color=blue )
p22 = plot(lower1, color=blue)
fill(p11, p22, color=green, transp=95)
out = sma (src1, length1)
plot(out, color=blue, title="MA")


ZH 繁體中文
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
AR العربية
HE עברית
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 網站規則 版主 網站 & 經紀商解決方案 小工具 圖表庫 功能請求 部落格 & 新聞 常見問題 幫助 & 維基 推特
個人資料 個人資料設定 帳戶和帳單 我的客服工單 聯絡客服 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出