커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7530
글번호 230811
답변완료
수식 문의
다음을 어떻게 표현하나요?
1. 만기주이면 : if ~~ ?
2. 만기 전주이면: if ~~ ?
3. 만기 전전주:
4. 만기 전전전주:
5. 만기 전전전전주:
6. 만기주의 다음주(즉, 월물의 첫 월요일~):
7. 만기일이면: if ~~ ?
8. 만기전날이면: if ~~ ?
9. 만기 전전날이면: if ~~ ?
10. 만기 전주 금요일이면: if ~~ ?
감사합니다.
2013-10-23
150
글번호 68768
답변완료
문의 드립니다.
수고 하십니다.
저는 시스템 옵션 할려는 사람입니다.
09시 08분 이후에
당일 코스피종합지수 최고점과 최저점 차이가 10포인트 이상 나고
옵션가격이 최고점을 돌파할때
옵션매수 하는 수식을 만들어 주실 수 있을까요?
감사합니다.
2013-10-23
156
글번호 68767
답변완료
시스템식 부탁 드립니다.
1. if~then 문으로 (dayopen-1.0>C) and (매수조건) = 만족 즉시 매수진입
하려고 하는데 시물레이션을 해보니, 시초가에서 최저가가 1.0 이하까지
내려 갔었는데도 봉의 종가가 시가보다 1.0 이상인 경우(긴꼬리도지) 매수진입이
안 된 것으로 나옵니다.
시물레이션에서만 그렇고 실매매시에는 조건 만족시 진입이 되는지요?
if~then 문장으로 하면 안되고 다른 것으로 하는 방법이 있으면 알려 주십시오.
2013-10-23
158
글번호 68766
답변완료
바쁘신대 수정 부탁드립니다
아래식은 야간장 시가를 기준가로 하는 매매식입니다
이식을 토대로 기준가를 주간장 당일 시가로 변경하고 싶습니다
아래식에서 야간장 시가로 되어 있는 수식은 전부 파악하여 주간장 당일 시가로 빠짐없이 변경 부탁드립니다
바쁘신대 수고가 많으시며 항상 시스템 초보들을 위해 고생 해주시는 부분 정말 감사합니다
input : 매수진입별횟수(2),매도진입별횟수(2),당일최대매수횟수(5),당일최대매도횟수(5);
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);
if stime == 180000 or (stime > 180000 and stime[1] < 180000) Then
기준가 = O;
var1 = 기준가-4.0;
var2 = 기준가-2.0;
var3 = 기준가+2.0;
var4 = 기준가+4.0;
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 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-10-23
179
글번호 68765
답변완료
다우나 나스닥 선물 지수
다우 선물지수나 나스닥 선물 지수를 실시간으로 볼 수 있는 화면이 있나요???
아니면 차트화면에서 볼 수 있는 방법이 있나요???
2013-10-23
175
글번호 68764
답변완료
강조식과 지표식 문의좀 드립니다
6번째 봉의 종가값이 앞의5개 봉의 종가값평균값과
가격이 같거나 0.10 +- 오차라면 회색봉으로 나타내고
가격이 0.10(두틱)이상 높으면 연한 분홍색봉
가격이 0.20이상 높으면 빨간색봉
가격이 0.30이상 높으면 와인색 봉이 나오도록 설정하고 싶습니다.
반대로 6번째 봉의 종가값이 앞의5개 봉의 종가평균값보다
0.10이상 낮으면 연한 하늘색봉
0.20이상 낮으면 파란색봉
0.30 그 이상 낮으면 남색봉으로 설정하구요.
가능할까요?
꼭 좀 부탁드릴께요!
그리구 어제 답변주신
if date != date[1] Then{
var1 = 0;
var2 = 0;
}
var1 = var1+C;
var2 = var2+1;
var3 = var1/var2;
var4 = ma(var3,5);
plot1(var3,"당일종가평균");
plot2(var4,"5이평");
이 지표에서
plot1이 표현하는 선의 아래에 봉이 위치하면 파란색, 위에 봉이 위치하면 빨간색으로
색이 바뀌도록 설정도 가능할까요?
2013-10-23
186
글번호 68761
답변완료
33046 검증이 되지 않습니다 확인 부탁 드립니다
내용무 아래 참조
2013-10-23
172
글번호 68760
답변완료
부탁드립니다.
안녕하세요.
선물 당일평균가격으로 매매식을 작성하고 싶습니다.
현재의 분봉이 당일평균가격을 이탈,돌파시 종가에진입하고
진입후+- 1.2P 이상 수익이면 청산합니다..
다음 진입은 신호발생시 재진입 입니다.
진입후0.5P 이상가격변화가 없으면 포지션을 현수준으로 유지합니다.
진입후 분봉이 (당일을 포함하여 )3일 평균가격과 같거나크면
위에 청산식을 무시하고우선 청산합니다..
진입후 당일평균 가격선이 3일 평균가격선을 돌파하거나 이탈하면
포지션 청산을 금지하고 2.5P 수익발생시 청산합니다
진입후 손절은 0.5P입니다..
늘 감사드립니다..
2013-10-23
144
글번호 68753
답변완료
문의 드립니다
수고 많으십니다
코스피200 지수선물 주간에 사용할것입니다
첫봉의 고점과 저점을 기억하고
첫봉고점보다 3틱 낯으면 매도
첫봉저점보다 3틱 높으면 매수
그리고 첫봉의 고점과 저점
(예:고점 271.00 ~ 저점 269.60 이면 0.4포)이면
첫진입이 269.75 매수라고 가정할때 0.4 씩위에서 계속 매수 신호가
나오고 매도도 역시 첫봉간격만큼 진행될때마다 나오게 해주시고
최고가 나 최저가 대비 0.4 가 차이나면 스탑이 되는 시스템식을 부탁 드립니다
당일청산 입니다
틱,분 어느 차트라도 사용할수있게 부탁드립니다
감사합니다
2013-10-23
169
글번호 68748