커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8207
글번호 230811
답변완료
누적. 손해. 식요청
안녕하세요
1계약 누적하여. 연속. 10 포인트
손실나면. 2계약. 으로. 연속. 20 포인트. 이익
목표. 까지. 진행하라. 그리고. 다시. 원점. 1계약 시작한다
감사^^
2013-12-23
177
글번호 70739
답변완료
바쁘신데 수고하십니다 수정부탁딉니다
아래식에서 시작시간과 끝시간을 설정하고 있는데 ....문제는 시작시간 이전에 기준가를
업, 다운 한것을 기억하고 있다가 시작시간에 바로 진입신호가 나옵니다
이것을 시작시간 설정할 때 부터 처음으로 인식하여 시작시간이전에 기준가 통과 한것은 인식하지 못하고, 시작시간 셋팅이후부터 기준가를 업, 다운 한 것을 인식하여 시스템이 작동하도록 부탁합니다
그리고 매매 시간을 외부변수로 설정하지 않고 내부변수로 안에서 직접 셋팅할수 있도록 수정 부탁드립니다..
input : 매수진입별횟수(2),매도진입별횟수(2),당일최대매수횟수(5),당일최대매도횟수(5),당일진입횟수(3);
input : 시작시간(93000),끝시간(150000);
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 < 당일진입횟수 and stime >= 시작시간 and stime < 끝시간 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-12-23
185
글번호 70732
답변완료
씨스템 문의 드립니다.
수고 하십니다.
항상 감사드립니다.
문의 드리는 것은 아침 장이 시작되면 캔들을 카운팅하는것입니다.
양봉 음봉 ( 시가 종가 같은 봉은 카운팅에서 제외) 각각 N개째가 발생하면 양봉은 매수화살표 음봉은 매도 화살표 표시하게 하는것입니다.
첫번째 신호로 진입하고요 다음에 반대로 나오면 청산을 하구요.
같은 신호가 연속으로 나오면 2개 까지만 진입하고 반대 신호나오면 모두 청산합니다.
무포지션있을때 나오는 신호에만 진입합니다.
연속된 같은 신호 3개 까지 진입하는 로직하고
연속된같은 신호 2개 까지만 진입하는 로직을 부탁드립니다.
고맙습니다.
꾸벅
2013-12-23
209
글번호 70729
답변완료
지표식 부탁드립니다.
만들어 주신 HPI 헤릭청산지수를 사용자함수로 사용 중입니다.
이 식을 보니
MULT 와 FACT 두 가지 입력값이 있던데
각각 의미가 무엇인가요?
그리고
이걸로 볼린저 밴드를 만들어 주실 수 있나요?
2013-12-23
199
글번호 70726
답변완료
식. 부탁해요.
안녕하세요
매도건수.1001 >. 매수건수. 1
위와같이. 천개차이나고
매도잔량. 11개. >. 매수잔량.1 개 이면
매도.
위내용. 반대면. 매수
감사합니다^^
2013-12-23
179
글번호 70725
답변완료
문의드립니다
안녕하세요 첨부로 문의 드립니다
2013-12-23
200
글번호 70724
답변완료
볼밴/이평 지표식
항상 감사드립니다.
월봉의 80볼밴과 20MA를 주봉에 출력하는 지표식 부탁드립니다.
주봉 표시가 불가능하면 일봉으로 부탁드립니다.
2013-12-23
206
글번호 70719
답변완료
문의드립니다
기본제공 지표인 Detrended Price Osc 를
직전값 대비 +일때 RED
=일때 YELLOW
-일때 BLUE 로 표시되게 해주세요
감사합니다
2013-12-23
174
글번호 70718
답변완료
수식 문의 드립니다.
진입별 청산식을 하려는데 잘 안됩니다.
1. 매수조건이 4가지 인데 청산을 따로 따로 하려 합니다.
매수 조건은
If C>O[0] and (c < value1) and (H[2]<value3) and stime < 150000 Then
Buy("매수1");
if C[1] < O[1] and
(O[1] >value3) and CrossUp(C,value4) and (value2>value3) and (C > O) and stime < 150000 Then
buy("매수2");
If CrossUp(c,dis) and C>O and stime < 150000 Then
buy("매수3");
If CrossUp(value2,value3) and C <= O and stime < 150000 Then
buy("매수4");
일때
매수1은 5틱 상승시 60% 청산 하고 40%는 최대수익대비 하락으로(최대수익7% 대비 하락5%)로 청산. 손절은 4틱
매수2는 10틱 상승시 50% 청산하고 50%는 최대수익대비 하락으로(최대수익10% 대비 하락5%)로 청산. 손절은 5틱
매수3은 10틱 상승시 70% 청산하고 30%는 최대수익대비하락으로 (최대수익15% 대비 하락5%)로 청산. 손절은 5틱
매수4는 5틱 상승시 80% 청산하고 20%는 최대수익대비 하락으로(최대수익7% 대비 하락5%)로 청산. 손절은 4틱
이렇게 부탁 드립니다.
2. 이격도 매수 조건 부탁 드립니다.
예를 들어 20 이격도가 100 이하에 있다가 103을 돌파하는 시점(현재봉)에 매수를 하려는데 이미 100을 돌파한후 횡보하다가 103을 돌파하는 종목도 같이 신호가 나옵니다. 어떤 방법이 있는지 수식 부탁 드립니다.
3.1봉전의 상승폭을 구하는 식인데요 1봉전이 1~1.5% 상승한 양봉을 찾는 식 부탁 드립니다.
수고하세요.
2013-12-23
181
글번호 70717