커뮤니티

문의드립니다

프로필 이미지
cjfdk
2026-03-12 22:57:50
127
글번호 231066
답변완료

//@version=5

indicator("Nasdaq Ultimate Trend", overlay=true)


// EMA

ema9 = ta.ema(close,9)

ema21 = ta.ema(close,21)

ema55 = ta.ema(close,55)

ema200 = ta.ema(close,200)


// ADX

adx = ta.adx(14)


// Supertrend

[st,dir] = ta.supertrend(3,10)


// 볼린저밴드

basis = ta.sma(close,20)

dev = ta.stdev(close,20)*2

upper = basis + dev

lower = basis - dev


// 추세 조건

bull = ema9>ema21 and ema21>ema55 and ema55>ema200 and dir<0 and adx>20

bear = ema9<ema21 and ema21<ema55 and ema55<ema200 and dir>0 and adx>20


// 매수 매도

buy = bull and ta.crossover(close,ema21)

sell = bear and ta.crossunder(close,ema21)


// 표시

plot(ema9,color=color.yellow)

plot(ema21,color=color.orange)

plot(ema55,color=color.red)

plot(ema200,color=color.blue,linewidth=3)


plot(st,color=bull?color.green:color.red,linewidth=3)


// 배경

bgcolor(bull?color.new(color.green,85):bear?color.new(color.red,85):na)


// 신호

plotshape(buy,location=location.belowbar,color=color.green,style=shape.labelup,text="BUY")

plotshape(sell,location=location.abovebar,color=color.red,style=shape.labeldown,text="SELL")

수고 많으십니다

위 수식 예스트레이드 로 전환 부탁드리겠습니다

지표식과 시스템식으로 부탁드립니다

감사합니다

지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-03-16 10:32:56

안녕하세요 예스스탁입니다. 지표 var : Ema9(0),Ema21(0),Ema55(0),Ema200(0),a(0); var : basis(0),dev(0),upper(0),lower(0); var : bull(False),bear(False); ema9 = ema(close,9); ema21 = ema(close,21); ema55 = ema(close,55); ema200 = ema(close,200); a= adx(14); input : multiplier(3),period(10); var : src(0), alpha(0),ATRV(0),upperBand(0),lowerBand(0),dir(0),st(C); if CurrentBar > 1 Then { src = (H+L)/2; alpha = 1 / period ; ATRV = IFf(IsNan(ATRV[1]) == true, ma(TrueRange,period) , alpha * TrueRange + (1 - alpha) * IFf(isnan(ATRV[1])==true,0,ATRV[1])); upperBand = src + multiplier * AtrV; lowerBand = src - multiplier * AtrV; if lowerBand > lowerBand[1] or close[1] < lowerBand[1] Then lowerBand = lowerBand; Else lowerBand = lowerBand[1]; if upperBand < upperBand[1] or close[1] > upperBand[1] Then upperBand = upperBand; Else upperBand = upperBand[1]; if C > UpperBand Then dir = 1; if C < LowerBand Then dir = -1; if dir == 1 Then st = lowerband; Else st = upperband; } basis = ma(close,20); dev = std(close,20)*2; upper = basis + dev; lower = basis - dev; bull = ema9>ema21 and ema21>ema55 and ema55>ema200 and dir<0 and a>20; bear = ema9<ema21 and ema21<ema55 and ema55<ema200 and dir>0 and a>20; plot1(ema9,"지수이평1",yellow); plot2(ema21,"지수이평2",orange); plot3(ema55,"지수이평3",red); plot4(ema200,"지수이평4",blue); plot5(st,"슈퍼트렌드",IFF(bull, green,red)); 2. 시스템 var : Ema9(0),Ema21(0),Ema55(0),Ema200(0),a(0); var : basis(0),dev(0),upper(0),lower(0); var : bull(False),bear(False); ema9 = ema(close,9); ema21 = ema(close,21); ema55 = ema(close,55); ema200 = ema(close,200); a= adx(14); input : multiplier(3),period(10); var : src(0), alpha(0),ATRV(0),upperBand(0),lowerBand(0),dir(0),st(C); if CurrentBar > 1 Then { src = (H+L)/2; alpha = 1 / period ; ATRV = IFf(IsNan(ATRV[1]) == true, ma(TrueRange,period) , alpha * TrueRange + (1 - alpha) * IFf(isnan(ATRV[1])==true,0,ATRV[1])); upperBand = src + multiplier * AtrV; lowerBand = src - multiplier * AtrV; if lowerBand > lowerBand[1] or close[1] < lowerBand[1] Then lowerBand = lowerBand; Else lowerBand = lowerBand[1]; if upperBand < upperBand[1] or close[1] > upperBand[1] Then upperBand = upperBand; Else upperBand = upperBand[1]; if C > UpperBand Then dir = 1; if C < LowerBand Then dir = -1; if dir == 1 Then st = lowerband; Else st = upperband; } basis = ma(close,20); dev = std(close,20)*2; upper = basis + dev; lower = basis - dev; bull = ema9>ema21 and ema21>ema55 and ema55>ema200 and dir<0 and a>20; bear = ema9<ema21 and ema21<ema55 and ema55<ema200 and dir>0 and a>20; if bull and CrossUp(close,ema21) Then Buy("b"); if bear and CrossDown(close,ema21) Then Sell("s"); 즐거운 하루되세요