COINBASE:ETCUSD   古典以太坊
//Indicator for trend identification (based on position of moving averages)
//Editor - balance.
//21/05/2017


count1 = 0
count2=0
upcount=0
downcount=0

lma = Average(close)
sma = Average(close)

increase = sma>lma
decrease=lma>sma

while (increase) do
upcount =upcount +1
count1=count1+1
wend

while (decrease) do
count2 = count2+1
downcount=downcount-1
wend

UPtrend = upcount > unitsforthetrend
DOWNtrend= downcount < -unitsforthetrend

v=0

if (uptrend)then
v=1
elsif (downtrend)then
v=-1
else
v=0
endif

a=0

return v coloured(0,0,0)as "trend line",a coloured(255,0,0)as "zero line"
免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。