커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1374
글번호 230811
답변완료
문의
30개봉중에서 평균거래량의3배 이상되는 캔들에 그캔들에 색깔을 입혓어면 좋겠습니다.
봉수와 배수는 외부변수가 될수 있어면 해주셧어면 좋겟습니다
2024-09-23
701
글번호 183632
우유 님에 의해서 삭제되었습니다.
2024-09-22
114
글번호 183631
답변완료
문의 드립니다
안녕하세요
다음 트레이딩뷰 코딩을 전환해주세요
//@version=5
indicator("Nadaraya-Watson Envelope [LuxAlgo]", "LuxAlgo - Nadaraya-Watson Envelope", overlay = true, max_lines_count = 500, max_labels_count = 500, max_bars_back=500)
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
h = input.float(8.,'Bandwidth', minval = 0)
mult = input.float(3., minval = 0)
src = input(close, 'Source')
repaint = input(true, 'Repainting Smoothing', tooltip = 'Repainting is an effect where the indicators historical output is subject to change over time. Disabling repainting will cause the indicator to output the endpoints of the calculations')
//Style
upCss = input.color(color.teal, 'Colors', inline = 'inline1', group = 'Style')
dnCss = input.color(color.red, '', inline = 'inline1', group = 'Style')
//-----------------------------------------------------------------------------}
//Functions
//-----------------------------------------------------------------------------{
//Gaussian window
gauss(x, h) => math.exp(-(math.pow(x, 2)/(h * h * 2)))
//-----------------------------------------------------------------------------}
//Append lines
//-----------------------------------------------------------------------------{
n = bar_index
var ln = array.new_line(0)
if barstate.isfirst and repaint
for i = 0 to 499
array.push(ln,line.new(na,na,na,na))
//-----------------------------------------------------------------------------}
//End point method
//-----------------------------------------------------------------------------{
var coefs = array.new_float(0)
var den = 0.
if barstate.isfirst and not repaint
for i = 0 to 499
w = gauss(i, h)
coefs.push(w)
den := coefs.sum()
out = 0.
if not repaint
for i = 0 to 499
out += src[i] * coefs.get(i)
out /= den
mae = ta.sma(math.abs(src - out), 499) * mult
upper = out + mae
lower = out - mae
//-----------------------------------------------------------------------------}
//Compute and display NWE
//-----------------------------------------------------------------------------{
float y2 = na
float y1 = na
nwe = array.new<float>(0)
if barstate.islast and repaint
sae = 0.
//Compute and set NWE point
for i = 0 to math.min(499,n - 1)
sum = 0.
sumw = 0.
//Compute weighted mean
for j = 0 to math.min(499,n - 1)
w = gauss(i - j, h)
sum += src[j] * w
sumw += w
y2 := sum / sumw
sae += math.abs(src[i] - y2)
nwe.push(y2)
sae := sae / math.min(499,n - 1) * mult
for i = 0 to math.min(499,n - 1)
if i%2
line.new(n-i+1, y1 + sae, n-i, nwe.get(i) + sae, color = upCss)
line.new(n-i+1, y1 - sae, n-i, nwe.get(i) - sae, color = dnCss)
if src[i] > nwe.get(i) + sae and src[i+1] < nwe.get(i) + sae
label.new(n-i, src[i], '▼', color = color(na), style = label.style_label_down, textcolor = dnCss, textalign = text.align_center)
if src[i] < nwe.get(i) - sae and src[i+1] > nwe.get(i) - sae
label.new(n-i, src[i], '▲', color = color(na), style = label.style_label_up, textcolor = upCss, textalign = text.align_center)
y1 := nwe.get(i)
//-----------------------------------------------------------------------------}
//Dashboard
//-----------------------------------------------------------------------------{
var tb = table.new(position.top_right, 1, 1
, bgcolor = #1e222d
, border_color = #373a46
, border_width = 1
, frame_color = #373a46
, frame_width = 1)
if repaint
tb.cell(0, 0, 'Repainting Mode Enabled', text_color = color.white, text_size = size.small)
//-----------------------------------------------------------------------------}
//Plot
//-----------------------------------------------------------------------------}
plot(repaint ? na : out + mae, 'Upper', upCss)
plot(repaint ? na : out - mae, 'Lower', dnCss)
//Crossing Arrows
plotshape(ta.crossunder(close, out - mae) ? low : na, "Crossunder", shape.labelup, location.absolute, color(na), 0 , text = '▲', textcolor = upCss, size = size.tiny)
plotshape(ta.crossover(close, out + mae) ? high : na, "Crossover", shape.labeldown, location.absolute, color(na), 0 , text = '▼', textcolor = dnCss, size = size.tiny)
//-----------------------------------------------------------------------------}
감사합니다
2024-09-22
674
글번호 183630
답변완료
간단한 수식확인 부탁드립니다.
초보라 너무 수준낮은 질문 죄송합니다.
input : 체결강도기본값(1000);
if Upvol[0]/DownVol[0]*100 >= 체결강도기본값 Then{
find(1);
}
위와 같이, 작성하면 체결강도의 1000 이상 종목만 걸려야하는데 24.09.22 기준 디지아이(043360)같은 종목이 검색됩니다. 확인해보니 디지아이는 마지막영업일기준(24.09.20) 체결강도가 21.26인데 말이죠.. 어째서 이런건지 설명좀 부탁드립니다. ㅠㅠ
2024-09-22
467
글번호 183629
답변완료
이동평균선 기울기가 바뀔 때 색깔 달라지게
안녕하세요.. 이동평균선 5,20,60,120,240 에서 기울기가 바뀔때 색깔이 변화도록 부탁드립니다.. 예를들어 20이평선이 +기울기일 때는 빨강이라면 (-)기울기가 될 때는 푸른색으로 바뀔 수 있도록요....., 즉 각이평선의 색깔도 다르면서 각 이평선의 기울기가 바뀔때 색깔이 바뀔수 있도록 수식부탁드립니다...이평선의 기울기가 바뀌는 시점도 파악하고 싶은데 색깔을 달리하면 쉽게 파악할 수 있을 것 같아서요... 감사합니다.
2024-09-22
870
글번호 183628
답변완료
참조차트에서의 ATR 계산 문의
기본차트에서 다음과 같이 ATR_5와 ATR_20을 계산한 결과와
sum = 0;
for cnt = 1 to P{
If DayClose(cnt+1) > dayhigh(cnt) then
TH = DayClose(cnt+1);
else
TH = dayhigh(cnt);
If DayClose(cnt+1) < DayLow(cnt) then
TL = DayClose(cnt+1);
else
TL = daylow(cnt);
TR = TH-TL;
sum = sum+TR;
//MessageLog("%.2f",TR);
}
ATR_5 = sum/P;
//ATR(20)
sum1 = 0;
for cnt1 = 1 to P1{
If DayClose(cnt1+1) > dayhigh(cnt1) then
TH1 = DayClose(cnt1+1);
else
TH1 = dayhigh(cnt1);
If DayClose(cnt1+1) < DayLow(cnt1) then
TL1 = DayClose(cnt1+1);
else
TL1 = daylow(cnt1);
TR1 = TH1-TL1;
Sum1 = Sum1+TR1;
}
ATR_20 = sum1/P1;
MessageLog("%.2f,%.2f",ATR_5,ATR_20);
같은 종목을 참조차트에 넣고 계산한 결과가 다릅니다. 똑같은 종목이고 이를 참조차트로 넣으면서 다음과 같이 코드를 작성해서 마찬가지로 찍어보니 결과가 다른데 뭐가 잘못된건지 알 수 있을까요?
sum = 0;
for cnt = 1 to P{
If data2(closeD(cnt+1)) > data2(highD(cnt)) then
TH = data2(closeD(cnt+1));
else
TH = data2(highD(cnt));
If data2(closeD(cnt+1)) < data2(lowD(cnt)) then
TL = data2(closeD(cnt+1));
else
TL = data2(lowD(cnt));
TR = TH-TL;
sum = sum+TR;
//MessageLog("%.2f",TR);
}
ATR_5 = sum/P;
//ATR(20)
sum1 = 0;
for cnt1 = 1 to P1{
If data2(closeD(cnt1+1)) > data2(highD(cnt1)) then
TH1 = data2(closeD(cnt1+1));
else
TH1 = data2(highD(cnt1));
If data2(closeD(cnt1+1)) < data2(lowD(cnt1)) then
TL1 = data2(closeD(cnt1+1));
else
TL1 = data2(lowD(cnt1));
TR1 = TH1-TL1;
Sum1 = Sum1+TR1;
}
ATR_20 = sum1/P1;
MessageLog("%.2f,%.2f",ATR_5, ATR_20);
코드가 바뀐부분이라곤 dayhigh함수 같은것을 highD함수로 바꾼거 밖에 없는데 도무지 모르겠네요.
2024-09-22
514
글번호 183627
답변완료
종목검색식수식변환부탁드립니다.
LT=LOWEST(L,P2);
HT=HIGHEST(H,P2);
NewH=VALUEWHEN(1,H>HT(1),H);
BOX1=HIGHEST(H,P2-2)<HIGHEST(H,P2-1);
TOP=VALUEWHEN(1,BarsSince(H>HT(1))==(P2-2) AND BOX1,NewH);
BTM=VALUEWHEN(1,BarsSince(H>HT(1))==(P2-2) AND BOX1,LT);
ap = (HIGH+LOW+CLOSE)/3;
esa = eavg(ap, 기간1);
d = eavg(abs(ap - esa), 기간1);
ci = (ap - esa) / (0.015 * d);
wt1 = eavg(ci,기간2);
조건=(C(1)<BTM(1) OR C<BTM) && (WT1(1)<-53 OR WT1<-53) &&
C>O && WT1(1)<WT1;
조건 && !조건(1)
--------------
지표변수
기간1: 10
기간2: 21
P2: 20
--------------
디박스
예스트레이더종목검색식부탁드립니다! 늘건강하세요!
2024-09-24
554
글번호 183626
답변완료
문의
분봉에서 거래할때
일봉에서의 lrl(n)+lrs(n)의 값을 호출하는
사용자 함수를 만들고 싶습니다.
부탁드려요 ^^
2024-09-22
432
글번호 183625
답변완료
수식요청
주식의 체결강도 5분MA가 20분MA를 상향돌파하는 종목을
실시간으로 검색하는 식 작성이 가능할까요?
2024-09-22
486
글번호 183624