커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7529
글번호 230811
답변완료
수식 작성 문의 드립니다.
지표를 하나 만들고 싶은데요
1분당 형성되는 틱봉의 수 (예를 들면 10틱)를 측정하는 지표를 만들고 싶은데요
초보자라 어떻게 해야 할지를 모르겟습니다.
2013-11-08
163
글번호 69330
답변완료
문의드립니다
안녕하세요
- 엔벨로프 의 하단밴드가 if crossup 이 매수신호 발생시 (일봉에서 당일 헛매수됨)
buy ("b01",atlimit,dayhigh,*0.98 ); 로 실제 매수로 연동 할수 있는지요
2013-11-08
162
글번호 69329
답변완료
수정부탁드립니다
아래식에서 진입시간을 넣고 싶습니다
즉 장시작후 부터 9시 30분까지는 매매를 하지 말고 그 이후부터 매매를 할수 있도록
부탁드립니다
내부안에서 제 마음대로 시간을 설정 할수 있게 부탁드립니다
input : 매수진입별횟수(2),매도진입별횟수(2),당일최대매수횟수(5),당일최대매도횟수(5),당일진입횟수(3);
var : direction(0),HH(0),LL(0),cnt(0),count(0),기준가(0);
var : Bcond1(false),Bcond2(false),Bcond3(false),Bcond4(false),Bcond5(false);
var : Scond1(false),Scond2(false),Scond3(false),Scond4(false),Scond5(false);
var : Bcnt1(0),Bcnt2(0),Bcnt3(0),Bcnt4(0),Bcnt5(0),Didx(0);
var : Scnt1(0),Scnt2(0),Scnt3(0),Scnt4(0),Scnt5(0),Buycnt(0),Sellcnt(0);
var : 당일주간장시가(0),전일주간장시가(0),updown(0);
if stime == 90000 or (stime > 090000 and stime[1] < 090000) Then{
당일주간장시가 = O;
전일주간장시가 = 당일주간장시가[1];
기준가 = 전일주간장시가 ;
Condition1 = false;
}
var1 = 기준가-6.0;
var2 = 기준가-3.0;
var3 = 기준가+3.0;
var4 = 기준가+6.0;
if condition1 == false and ((H >= 기준가 and L >= 기준가) or crossup(c,기준가) or CrossDown(C,기준가)) Then{
Condition1 = true;
updown = 0;
}
if Condition1 == true and (H >= var3 or L <= var2) Then
UPdown = updown+1;
if stime == 90000 or (stime > 090000 and stime[1] < 090000) Then{
direction = 0;
Didx = 0;
}
count = 0;
Bcnt1 = 0;Bcnt2 = 0;Bcnt3 = 0;Bcnt4 = 0;
Scnt1 = 0;Scnt2 = 0;Scnt3 = 0;Scnt4 = 0;
Buycnt = 0;
Sellcnt = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) and EntryTime(cnt) >= 090000 and EntryTime(cnt) <= 151500 Then{
count = count+1;
if IsEntryName("b1",cnt) == true Then Bcnt1 = Bcnt1+1;
if IsEntryName("b2",cnt) == true Then Bcnt2 = Bcnt2+1;
if IsEntryName("b3",cnt) == true Then Bcnt3 = Bcnt3+1;
if IsEntryName("b4",cnt) == true Then Bcnt4 = Bcnt4+1;
if IsEntryName("s1",cnt) == true Then Scnt1 = Scnt1+1;
if IsEntryName("s2",cnt) == true Then Scnt2 = Scnt2+1;
if IsEntryName("s3",cnt) == true Then Scnt3 = Scnt3+1;
if IsEntryName("s4",cnt) == true Then Scnt4 = Scnt4+1;
if MarketPosition(cnt) == 1 then
Buycnt = Buycnt+1;
if MarketPosition(cnt) == -1 then
SEllcnt = Sellcnt+1;
}
}
if stime >= 090000 and stime <= 151500 then{
Didx = Didx+1;
if Didx > 1 Then{
if crossup(C,var1) Then {
direction = 1;
HH = H;
}
if crossup(C,var2) Then {
direction = 2;
HH = H;
}
if crossup(C,var3) Then {
direction = 3;
HH = H;
}
if crossup(C,var4) Then {
direction = 4;
HH = H;
}
if CrossDown(C,var1) Then {
direction = -1;
LL = L;
}
if CrossDown(C,var2) Then {
direction = -2;
LL = L;
}
if CrossDown(C,var3) Then{
direction = -3;
LL = L;
}
if CrossDown(C,var4) Then {
direction = -4;
LL = L;
}
}
if H > HH Then HH = H;
if L < LL Then LL = L;
Bcond1 = (count == 0 and countif(direction == 1 and direction[1] != 1,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == 1 and direction[1] != 1,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == 1 and direction[1] != 1,BarsSinceExit(1)) >= 1);
Bcond2 = (count == 0 and countif(direction == 2 and direction[1] != 2,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == 2 and direction[1] != 2,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == 2 and direction[1] != 2,BarsSinceExit(1)) >= 1);
Bcond3 = (count == 0 and countif(direction == 3 and direction[1] != 3,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == 3 and direction[1] != 3,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == 3 and direction[1] != 3,BarsSinceExit(1)) >= 1);
Bcond4 = (count == 0 and countif(direction == 4 and direction[1] != 4,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == 4 and direction[1] != 4,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == 4 and direction[1] != 4,BarsSinceExit(1)) >= 1);
Scond1 = (count == 0 and countif(direction == -1 and direction[1] != -1,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == -1 and direction[1] != -1,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == -1 and direction[1] != -1,BarsSinceExit(1)) >= 1);
Scond2 = (count == 0 and countif(direction == -2 and direction[1] != -2,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == -2 and direction[1] != -2,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == -2 and direction[1] != -2,BarsSinceExit(1)) >= 1);
Scond3 = (count == 0 and countif(direction == -3 and direction[1] != -3,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == -3 and direction[1] != -3,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == -3 and direction[1] != -3,BarsSinceExit(1)) >= 1);
Scond4 = (count == 0 and countif(direction == -4 and direction[1] != -4,Didx) >= 1) or
(count >= 1 and MarketPosition != 0 and countif(direction == -4 and direction[1] != -4,BarsSinceEntry) >= 1) or
(count >= 1 and MarketPosition == 0 and countif(direction == -4 and direction[1] != -4,BarsSinceExit(1)) >= 1);
if stime > 090000 and stime < 150000 and count < 당일진입횟수 then{
if BuyCnt < 당일최대매수횟수 then{
if direction == 1 and HH >= var1+0.5 and Bcond1 == true and Bcnt1 < 매수진입별횟수 Then buy("b1",AtLimit,HH-0.4);
if direction == 2 and HH >= var2+0.5 and Bcond2 == true and Bcnt2 < 매수진입별횟수 Then buy("b2",AtLimit,HH-0.4);
if direction == 3 and HH >= var3+0.5 and Bcond3 == true and Bcnt3 < 매수진입별횟수 Then buy("b3",AtLimit,HH-0.4);
if direction == 4 and HH >= var4+0.5 and Bcond4 == true and Bcnt4 < 매수진입별횟수 Then buy("b4",AtLimit,HH-0.4);
}
if Sellcnt < 당일최대매도횟수 then{
if direction == -1 and LL <= var1-0.5 and Scond1 == true and Scnt1 < 매도진입별횟수 Then Sell("s1",AtLimit,LL+0.4);
if direction == -2 and LL <= var2-0.5 and Scond2 == true and Scnt2 < 매도진입별횟수 Then Sell("s2",AtLimit,LL+0.4);
if direction == -3 and LL <= var3-0.5 and Scond3 == true and Scnt3 < 매도진입별횟수 Then Sell("s3",AtLimit,LL+0.4);
if direction == -4 and LL <= var4-0.5 and Scond4 == true and Scnt4 < 매도진입별횟수 Then Sell("s4",AtLimit,LL+0.4);
}
}
}
2013-11-08
163
글번호 69328
답변완료
문의드립니다.
어떤조건의 매도전략이 있을때 단기 중기 장기이평 이렇게 3개의 이평을 놓고 정배열인구간이고 3개의 이평모두 우상향이 3회이상 진행중일시 시가가 형성될때는 매도진입을 하지 못하게 하고 싶습니다.
아직 초보라 공부하는 단계라서 귀찮게 해드리는거 아닌가 모르겠네요.
2013-11-08
150
글번호 69327
답변완료
문의드립니다.
예를들어
매수호가가 매도호가 잔량보다 많으면 매수.
매도호가가 매수호가 잔량보다 많으면 매도.
이조건이 있을때 호가끼리 공방이 치열할때는 매매가 너무 빈번히 이루어집니다.
따라서 처음에 진입된 매수포지션 뒤에 스위칭으로 매도신호가 발생이 되어 매도포지션이
보유중이고 다시 스위칭 되는 조건은 매수호가가 매도호가보다 2천개이상 많을시에만 진입이
되게 해보고 싶습니다.
그렇지 않으면...
매수호가 잔량이 매도호가 잔량보다 많으면 매수. --- 이 조건식은 하루에 한번만 발생이
될수 있게 가능한가요? 그게 가능하다면 매수호가 잔량이 매도호가 잔량보다 2천개이상 많
을시에 매수2 라는 조건을 새로 넣으면 가능할텐데말이죠.
2013-11-08
156
글번호 69326
답변완료
시스템 문의드립니다.
안녕하세요. 항상 좋은 답변 감사드립니다.
>질문드리구 싶은 사항은
그림은 이지바이오 11월7일 5분봉입니다.
지금까지는 시스템을 걸어줄때 당일 매매일이 11월7일날짜가 맞고 A지점(4900원정도)에 첨 내려올때 매수하는 시스템으로 매매를 했습니다만..
예)
var:매매일(20131107);
if 매매일 == Date and MarketPosition ==0 and C < 4900 then
buy
이런식으로
A지점(4900원)에서 매수해서 A와 B지점 사이에 4950원에 매도했다고 하고
오후에 다시 같은 가격대인 B지점(4900원정도)에 다시 올때는 오전에 한번 매매가 된 상태라 다시 매매를 할수가 없는데 이럴때는 어떻게 매매시스템을 작성해야 다시 매수를 할수 있는지 궁금합니다. 혹시 매도가 안된 상태라도 오후에 시스템을 걸면 다시 그 가격에 추가 매수가 될수 있는지여?(오전에 시스템을 걸지 않아서 실제로는 매수가 안됬지만 오후에 이지바이오에 시스템을 걸면 시스템상에서는 오전에 매수가 됬다고 오후에 B지점에서 매수시스템이 작동을 안합니다.)
혹시 질문이 설명이 부족하면 다시 부연 설명 드릴께요.
잘 부탁드립니다.
2013-11-07
175
글번호 69324
답변완료
대신증권과의 값이 틀린데 확인 부탁드립니다.
yestrader의 upvol과 downvol의 값이 대신증권의 값과 틀립니다.
예를 들어 오늘 10시 장 시작후 1분간의 upvol과 downvol이
yestrader의 upvol : 1049
downvol : 3277
대신증권(화면번호 9426에서 잔량추의)의 upvol(체결매수) : 2425
downvol(체결매도) : 1901
으로 서로 다릅니다. 그런데 신기한 것은 거래량(upvol+downvol)은 같습니다.
1, 무엇 때문에 그런건지
2, 대신증권의 upvol과 downvol의 값과 같도록 할 수 있는 방법 없는지
질문 드립니다.
2013-11-07
182
글번호 69323
답변완료
유로fx 관련
거래량관련 upvolume/downvolume 지표표기가 되나요?
2013-11-07
170
글번호 69322
답변완료
Plot을 통해 표시된 값에 보조지표를 추가
2개의 데이터사이의 차이값을 표시하시려면
참조데이터 기능을 이용해 차트에 다른 데이터를 추가하신 후에
아래 지표식 적용하시면 됩니다.
plot1(data1(c)-data2(c));
이렇게 전에 말씀해주셨는데...
해당 지표식으로 나온 값들에 보조지표를 추가하려고 합니다.
안되던데 어떻게 해야하나요?
아니면 안되는 건가요?
2013-11-07
162
글번호 69316