发布于: 雪球转发:1回复:4喜欢:6

雷公trading view公式:
應廣大網友的要求,本貼分享兩組我平時交易常用的指標。
主圖指標:雙均綫+抵扣價。主圖為雙均綫系統,使用三組MA和EMA均綫,分別取值20、60、120;圖中小黃點為抵扣價,從右至左分別爲20、60、120抵扣價。將下列語句複製到TradingView Pine Editor公式編輯器中,替代包含study之後的語句即可。
study("MA+EMA",overlay=true)
e1=ema(close,20)
c1=sma(close,20)
e2=ema(close,60)
c2=sma(close,60)
e3=ema(close,120)
c3=sma(close,120)
plot(e1,"ema20",color=color.gray)
plot(c1,"ma20",color=#D3D3D3)
plot(e2,"ema60",color=color.red)
plot(c2,"ma60",color=#FDBCB4)
plot(e3,"ema120",color=color.blue)
plot(c3,"ma120",color=#ADD8E6)
cond=barstate.islast
bl=low
moveBar = input(0)
x20=input(20)+moveBar
x60=input(60)+moveBar
x120=input(120)+moveBar
plot(cond?bl【20】:na,color=#FFC40C,linewidth=5,offset=-x20,style=plot.style_circles,transp=0)
plot(cond?bl【60】:na,color=#FFC40C,linewidth=5,offset=-x60,style=plot.style_circles,transp=0)
plot(cond?bl【120】:na,color=#FFC40C,linewidth=5,offset=-x120,style=plot.style_circles,transp=0)

全部讨论

2021-07-08 01:56

你好,请问怎样才可以加上5日均线呢?我试了几次,可每次都显示出错,可以帮忙把5日均线也加上吗?谢谢!

2021-01-24 09:20

抵扣价呢?

2021-01-20 22:39

把【】替换为[  ]

2020-11-11 01:12

脚本打开错误