커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1363
글번호 230811
답변완료
문의드립니다.
안녕하세요
질문1.
'일봉' 전체기간의 종가 최고점을 알고 싶습니다.
highest(C,1000);
이렇게 하면 상장이 1000일이 미만 종목에서는 제대로 안나타나고
전체기간을 넣으면 거래정지나, 기타 사유 등으로 가격이 변하면 제대로 표현이 안되던데 방법이 있을까요??
질문2.
이평5일선이 20선을 돌파했을때 부터 현재까지 몇일(몇개봉)이 지났는지 계산하는 방법이 궁금합니다.
2024-11-03
664
글번호 184910
답변완료
종목검색식 부탁드립니다.
종목검색식 부탁드립니다.
감사합니다...^^
M1 = ma(C, 기간1, 가중);
M2 = ma(C, 기간2, 가중);
M3 = ma(C, 기간3, 단순);
저점 = M1 > M1(1) && M1(1) < M1(2);
고점 = Highestsince(1, 저점, H);
첫바닥1 = Valuewhen(1, 저점, M1(1));
첫바닥2 = Valuewhen(1, 저점, M2(1));
쌍바닥1 = Valuewhen(2, 저점, M1(1));
쌍바닥2 = Valuewhen(2, 저점, M2(1));
전고점 = Valuewhen(1, 저점, 고점(1));
첫바닥1 < 첫바닥2 &&
쌍바닥1 < 쌍바닥2 &&
M2 < M1 &&
CrossUp(H, 전고점) &&
C > M3 &&
C > O
2024-11-02
835
글번호 184909
답변완료
종목검색식 부탁드립니다.
종목검색식 부탁드립니다.
감사합니다...^^
오분선 = (PredayHigh() + PredayLow() + PredayClose())/3 + PredayHigh()-PredayLow();
첫봉신호 =
V >= 수량 &&
C > O * 상승률 &&
C > PredayHigh() &&
Rsi(14) >= 기준선 &&
CrossUp(C, 오분선);
cnt = Countsince(date! = date(1), 첫봉신호);
cnt == 1 && cnt(1) == 0
(지표변수) 수량: 50000 / 상승률: 1.01 / 기준선: 70
2024-11-02
769
글번호 184908
답변완료
예스트레이딩 수식으로 부탁드립니다.
종목검색식 부탁드립니다..
A1 = ma(C, 기간1);
A2 = ma(C, 기간2);
이격도 = C <= O * 이격률1 && C >= O*이격률2;
A3 = A1 > A2 && A1 > H && 이격도 &&
(O-C) > (H-O) && (O-C) > (C-L);
중심 = Valuewhen(1, A3, C);
A3 && 중심(1) > C
(지표변수) 기간1: 20 / 기간2: 60 / 이격률1: 0.95 / 이격률2: 0.89
2024-11-02
713
글번호 184907
답변완료
종목 검색 부탁드립니다.
1. 0봉전 ~ 30봉전 까지에서, 0봉전 종가가 제일 큰 종목 검색식 부탁드려요(일봉)
<예시> 일수는 변수로 부탁드려요
0봉전 종가 : 종가기준 종가가격이 제일 큼.// 0봉전 종목 검색
1봉전 종가
2봉전 종가
.
.
.
30봉전 종가
2024-11-02
721
글번호 184906
답변완료
Envelope 터치시 검색식
항상 감사합니다.
Envelope 하단선 아래로 캔들(일봉)의 저가가 같거나 내려가면 실시간으로 종목검색 하는 식은 어떻게 하면 될지요..
2024-11-02
858
글번호 184905
답변완료
문의
항상 감사드립니다~~
아래 지표도 장 시작 후 N분 간격으로 초기화되게 수정 부탁 드립니다,
var : V1(0,Data1),V2(0,Data1);
if Data1(Bdate != Bdate[1]) Then
{
V1 = 0;
V2 = 0;
}
if V1 == 0 and CrossDown(Data1(L),Data2(H)) Then
V1 = (data1(L)+data2(H))/2;
if V1 == 0 and CrossUp(Data1(H),Data2(L)) Then
V1 = (data1(H)+data2(L))/2;
if V2 == 0 and CrossDown(Data1(L),Data3(H)) Then
V2 = (data1(L)+data3(H))/2;
if V2 == 0 and CrossUp(Data1(H),Data3(L)) Then
V2 = (data1(H)+data3(L))/2;
if V1 > 0 Then
Plot1(V1);
Else
NoPlot(1);
if V2 > 0 Then
Plot2(V2);
Else
NoPlot(2);
2024-11-01
613
글번호 184904
답변완료
수정부탁드립니다.
변곡점 수직선 적색 청색 변경부탁드립니다。
Input:Cnt(60),선TL선(4),사각박스굵기(1);
Var:nj(0),turnPntBit(""),TdL1(0),color(0),vtx(0),box1(0),box2(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
// 봉이 새로 생겼으므로 봉개수 관리하는 변수들의 봉개수 값 1씩 증가
For nj = 0 To 9
{
barArr[nj] = barArr[nj] + 1;
}
// 고점조건 = 5-1-5에서 가운데 고가가 좌측 5봉과 우측 5봉 고가보다 높다
// 저점조건 = 5-1-5에서 가운데 저가가 좌측 5봉과 우측 5봉 저가보다 낮다
Condition1 = Highest(H,Cnt)[Cnt+1] <= H[Cnt] and H[Cnt] > Highest(H,Cnt);
Condition2 = Lowest(L,Cnt)[Cnt+1] >= L[Cnt] and L[Cnt] < Lowest(L,Cnt);
// 전환점구분 null값으로 초기화;
// if 고점조건, 저점조건 동시 만족시 then
// if 이전 고점,저점 범위를 모두 벗어났을 때
// 전환점구분 = 고저점;
// else if 이전 고점을 갱신했다면 전환점구분 = 고점;
// else if 이전 저점을 갱신했다면 전환점구분 = 저점;
// else if 전환점배열의 현재(배열상 1번째)값이 고점이면 전환점구분 = 저점;
// else if 전환점배열의 현재 값이 저점이면 전환점구분 = 고점;
// else if 고점조건 만족하면 전환점구분 = 고점;
// else if 저점조건 만족하면 전환전구분 = 저점;
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H[Cnt] and Min(valArr[1],valArr[2]) > L[Cnt] Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H[Cnt] Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L[Cnt] Then turnPntBit = "Lo";
Else If turnPntArr[1] == "Hi" Then turnPntBit = "Lo";
Else If turnPntArr[1] == "Lo" Then turnPntBit = "Hi";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
// if 전환점구분에 값이 있을 때만 아래 실행, 없으면 통과
If turnPntBit <> "" Then
{
// if 전환점구분이 고저점이면 then
// 이전 파동은 연장시키고 아래에서 새로이 파동선을 추가토록 한다.
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H[Cnt],L[Cnt]);
barArr[1] = Cnt;
TL_SetEnd(TdL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
// if 신규 전환점구분이 현재(전환점배열 1번째)와 다르면 then
// 배열값들을 이전값으로 Move;
If turnPntBit <> turnPntArr[1] Then
{
for nj = 8 downto 1
{
valArr[nj+1] = valArr[nj];
barArr[nj+1] = barArr[nj];
turnPntArr[nj+1] = turnPntArr[nj];
}
}
// if 전환점구분이 바뀌었거나 또는
// (전환점구분은 안바뀌었는데
// (이전 고점보다 높은 고점이 발생했거나 또는
// 이전 저점보다 낮은 저점이 발생했으면)) then
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H[Cnt]) or
(turnPntBit == "Lo" and valArr[1] > L[Cnt]))) Then
{
// 값 배열에는 고점 또는 저점을 대입;
// 봉개수 배열에는 입력변수의 봉개수 대입;
// 전환점 배열에 전환점구분값을 대입;
valArr[1] = IFF(turnPntBit == "Hi",H[Cnt],L[Cnt]);
barArr[1] = Cnt;
turnPntArr[1] = turnPntBit;
// if 이전봉대비 전환점구분이 바뀌었다면 추세선 새로 그리고;
// else 전환점구분이 안바뀌었으면 값만 바뀐거므로 추세선 연장;
If turnPntArr[1][1] <> turnPntArr[1][0] Then
{
TdL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
// vtx = text_new(sDate[barArr[1]],sTime[barArr[1]],valArr[1],NumToStr(valArr[1],2));
if turnPntArr[1][1] > turnPntArr[1][0] then
{
color = red;
Text_SetStyle(vtx,2,1);
}
Else
{
color = blue;
Text_SetStyle(vtx,2,0);
}
box1 = box_new(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Box_SetColor(box1,color);
Box_SetFill(box1,true);
box2 = box_new(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Box_SetColor(box2,color);
Box_SetSize(box2,사각박스굵기);
}
Else
{
TL_SetEnd(TdL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Box_SetEnd(box1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Box_SetEnd(box2,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
}
TL_SetSize(TdL1,선TL선);
TL_Setcolor(TdL1,color);
2024-11-01
756
글번호 184903
답변완료
문의 드립니다
안녕하세요
다음 트레이딩 코딩을 시스템 신호로 전환 부탁드립니다
// Inputs
a = input(1, title = "Key Vaule. 'This changes the sensitivity'")
c = input(10, title = "ATR Period")
h = input(false, title = "Signals from Heikin Ashi Candles")
xATR = atr(c)
nLoss = a * xATR
src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close
xATRTrailingStop = 0.0
xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss),
iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss),
iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss)))
pos = 0
pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1,
iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))
xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue
ema = ema(src,1)
above = crossover(ema, xATRTrailingStop)
below = crossover(xATRTrailingStop, ema)
buy = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below
barbuy = src > xATRTrailingStop
barsell = src < xATRTrailingStop
plotshape(buy, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny)
plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.tiny)
barcolor(barbuy ? color.green : na)
barcolor(barsell ? color.red : na)
alertcondition(buy, "UT Long", "UT Long")
alertcondition(sell, "UT Short", "UT Short")
감사합니다
2024-11-01
627
글번호 184901