均线扣抵tradingview

主圖指標:雙均綫+抵扣價。主圖為雙均綫系統,使用三組MA和EMA均綫,分別取值20、60、120;圖中小黃點為抵扣價,從右至左分別爲20、60、120抵扣價。請將下列語句輸入到TradingView Pine Editor公式編輯器中即可。

由於Tradingview對代碼要求很高,簡單複製粘貼經常出錯。因此本文不提供源代碼。請各位在pine editor中輸入如下代碼,請使用英文輸入法。

均线扣抵tradingview
均线扣抵tradingview
Pine編輯器中的顯示效果

附圖指標:乖離率。本指標包含三組乖離率,收盤價與EMA20均缐之間的乖離、EMA20與EMA60以及EAM60與EMA120之間的乖離率。請將下列語句輸入到TradingView Pine Editor公式編輯器中即可。

Tradingview 双均线系统

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © xichengjiang

//@version=4
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)

//DKJ
cond = barstate.islast
moveBar = input(0)
x20 = input(20) + moveBar
x60 = input(60) + moveBar
x120 = input(120) + moveBar

plot(cond?low[20]:na, color = #FFC40C, linewidth = 5, offset = -x20, style = plot.style_circles, transp = 0)
plot(cond?low[60]:na, color = #FFC40C, linewidth = 5, offset = -x60, style = plot.style_circles, transp = 0)
plot(cond?low[120]:na, color = #FFC40C, linewidth = 5, offset = -x120, style = plot.style_circles, transp = 0)


posted @ 2022-03-19 10:42  少元  阅读(134)  评论(0)  编辑  收藏  举报

来源:雪球App,作者: xf3lee,(https://xueqiu.com/9153737516/153786374)

雷公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)