커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8210
글번호 230811
답변완료
문의드립니다.
선물지수 9시부터 10 시사이의 고점을 변수로 하나 넣고 싶습니다.
예를들어 현재봉이 9시부터 10시사이의 고점을 돌파시에는 매수.
이러한 수식좀 알려주시면 감사하겠습니다.
한가지 더 질문을 올리겠습니다.
첨부파일을 보시면 혹시 저런상황에서의 쌍바닥을 수식으로 표현도 가능한지요..
쌍바닥에서의 반등이 0.5피 이상이 나올경우 매수라는 조건식도 가능한가요?
2013-11-08
194
글번호 69334
답변완료
수식 요청
선물 틱차트에서...
첨부된 수식의 1분봉 값을 만들고 싶습니다..
수식 부탁합니다...
2013-11-08
194
글번호 69333
답변완료
문의 (Py)
1. 피라미딩 허용후 A, B, C가 매수 진입되었다고 가정할때, 현재는 아래와 같이 청산식을 적용하여 일괄로 청산됩니다.
if 청산조건A then
ExitLong("EL#1]", ONCLOSE, DEF);
제가 원하고자 하는것은 A, B, C가 청산조건A가 만족하면 1분 간격 또는 10봉 후에 차례대로 청산을 하고자 합니다. A청산되고 1분후 또는 10봉후 B청산, B청산후 1분후 또는 10봉후에 청산...
감사합니다.
2013-11-08
236
글번호 69332
2wnwn 님에 의해서 삭제되었습니다.
2013-11-08
5
글번호 69331
답변완료
수식 작성 문의 드립니다.
지표를 하나 만들고 싶은데요
1분당 형성되는 틱봉의 수 (예를 들면 10틱)를 측정하는 지표를 만들고 싶은데요
초보자라 어떻게 해야 할지를 모르겟습니다.
2013-11-08
200
글번호 69330
답변완료
문의드립니다
안녕하세요
- 엔벨로프 의 하단밴드가 if crossup 이 매수신호 발생시 (일봉에서 당일 헛매수됨)
buy ("b01",atlimit,dayhigh,*0.98 ); 로 실제 매수로 연동 할수 있는지요
2013-11-08
196
글번호 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
199
글번호 69328
답변완료
문의드립니다.
어떤조건의 매도전략이 있을때 단기 중기 장기이평 이렇게 3개의 이평을 놓고 정배열인구간이고 3개의 이평모두 우상향이 3회이상 진행중일시 시가가 형성될때는 매도진입을 하지 못하게 하고 싶습니다.
아직 초보라 공부하는 단계라서 귀찮게 해드리는거 아닌가 모르겠네요.
2013-11-08
180
글번호 69327
답변완료
문의드립니다.
예를들어
매수호가가 매도호가 잔량보다 많으면 매수.
매도호가가 매수호가 잔량보다 많으면 매도.
이조건이 있을때 호가끼리 공방이 치열할때는 매매가 너무 빈번히 이루어집니다.
따라서 처음에 진입된 매수포지션 뒤에 스위칭으로 매도신호가 발생이 되어 매도포지션이
보유중이고 다시 스위칭 되는 조건은 매수호가가 매도호가보다 2천개이상 많을시에만 진입이
되게 해보고 싶습니다.
그렇지 않으면...
매수호가 잔량이 매도호가 잔량보다 많으면 매수. --- 이 조건식은 하루에 한번만 발생이
될수 있게 가능한가요? 그게 가능하다면 매수호가 잔량이 매도호가 잔량보다 2천개이상 많
을시에 매수2 라는 조건을 새로 넣으면 가능할텐데말이죠.
2013-11-08
192
글번호 69326