커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8142
글번호 230811
조민철 님에 의해서 삭제되었습니다.
2014-11-26
0
글번호 80778
답변완료
시스템 시간설정 조정
항상 감사드립니다
1.국내선물
아래시스템에서 장종료시간을 15:00 로 하고 당일매수청산을 15:00으로 하면 전일발생신호봉에 상관없이 아침 첫신호는 정상적으로 발생합니다
그런데 장종료시간을 12:30 으로 설정하면 12:30이후에도 신호가 발생하고 당일 마지막신호에따라
다음날 첫신호가 반대신호만 나옵니다..
수정부탁드립니다
##################################################
##### 당일 09:00 장시작 / 당일 12:30 장종료 #####
##################################################
input : 시작시간(090000),끝시간(123000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
Idx = 0;
}
Idx = idx+1;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = var11==1 and c>var78 and c>Hma1 ;
Scond = var11==-1 and c<var78 and c<Lma1 ;
Condition1 = ExitDate(1) == sdate and MarketPosition(1) == 1 and
(IsExitName("eB_선행",1) == true or IsExitName("StopLoss",1) == true);
Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and
(IsExitName("eS_선행",1) == true or IsExitName("StopLoss",1) == true);
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
Entrycnt = Entrycnt+1;
if Idx >= 1 and
Start == true and
Bcond == true and
(EntryCnt == 0 or MarketPosition == -1 or (EntryCnt > 0 and MarketPosition == 0 and Condition1 == False )) Then
buy("B1");
if Idx >= 1 and
Start == true and
Scond == true and
(EntryCnt == 0 or MarketPosition == 1 or (EntryCnt > 0 and MarketPosition == 0 and Condition2 == False )) Then
sell("S1");
##########################
##### 매수/매도 청산 #####
##########################
if MarketPosition == 1 and c<Cma1 and c<var48 Then
exitlong("eB_선행");
if MarketPosition == -1 and c>Cma1 and c>var48 Then
ExitShort("eS_선행");
##손절_1_20틱 자동손절##
SetStopLoss(PriceScale*20,PointStop);
###############################
##### 매일 12:30 강제청산 #####
###############################
if stime == 123000 or (stime > 123000 and stime[1] < 123000) Then{
exitlong("당일매수청산");
ExitShort("당일매도청산");
}
2.해외선물
아래시스템식은 첫신호를 발생시키지 않는 시스템식입니다
제가 발생시키고자하는 신호는 B2,S2 인데 S11,B11 신호가 발생합니다
수정부탁드립니다
##################################################
##### 당일 08:00 장시작 / 익일 04:30 장종료 #####
##################################################
input : 시작시간(080000),끝시간(043000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0),Ventry(0),Vposition(0),Vprice(0);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = 0;
Idx = 0;
Ventry = 0;
Vposition = 0;
Vprice = 0;
MessageLog("%.2f",entrycnt);
}
Idx = idx+1;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then{
Entrycnt = entrycnt+1;
MessageLog("%.2f",entrycnt);
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = /*c>var77 and c<var79 and */ c>Hma1 and c>var78 and var58==1 and cma1>var78 ;
Scond = /*c>var77 and c<var79 and */ c<Lma1 and c<var78 and var58==-1 and cma1<var78 ;
Condition1 = ExitDate(1) == true and MarketPosition(1) == 1 and
(IsExitName("eB100",1) == true or IsExitName("StopLoss",1) == true);
Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and
(IsExitName("eS100",1) == true or IsExitName("StopLoss",1) == true);
if Ventry == 0 and
Idx >= 1 and
Start == true and
Bcond == true Then{
Ventry = 1;
Vposition = 1;
VPrice = C;
}
if Ventry == 0 and
Idx >= 1 and
Start == true and
Scond == true Then{
Ventry = 1;
Vposition = -1;
Vprice = C;
}
if Ventry != 0 Then{
if Vposition == 1 and L <= Vprice-PriceScale*30 Then
Ventry = 2;
if Vposition == -1 and H >= Vprice+PriceScale*30 Then
Ventry = 2;
}
if Idx >= 1 and
Start == true and
Bcond == true Then{
if Entrycnt == 0 and Ventry == 1 and Vposition == -1 Then
buy("B11");
if Entrycnt == 0 and Ventry == 2 and Vposition != 1 Then
buy("B12");
if (Entrycnt >= 1 and (MarketPosition == -1 or (MarketPosition == 0 and Condition1 == False ))) Then{
buy("B2");
}
}
if Idx >= 1 and
Start == true and
Scond == true then{
if Entrycnt == 0 and Ventry == 1 and Vposition == 1 Then
sell("S11");
if Entrycnt == 0 and Ventry == 2 and Vposition != -1 Then
sell("S12");
if (Entrycnt >= 1 and (MarketPosition == 1 or (MarketPosition == 0 and Condition2 == False ))) Then{
sell("S2");
}
}
감사합니다
2014-11-26
225
글번호 80777
답변완료
수식 부탁합니다
1. 엔벨 지표식
엔벨 (20.2) 분봉에서 나타낼 수 있도록 지표식 부탁합니다
1분봉 또는 5분봉 등 어느 분봉에서도 나타날 수 있도록 부탁합니다
2. 엔벨 시스템식
분봉에서 저점이 엔벨하단선 이탈시 매수
고점이 엔벨 상단선 돌파시 매도
손절은 3%
매수가 대비 5% 상승시절반 매도
매수가 대비 7% 상승시 절반 매도
2014-11-26
189
글번호 80776
답변완료
수식 부탁합니다
1. 엔벨 지표식
엔벨 (20.2) 분봉에서 나타낼 수 있도록 지표식 부탁합니다
1분봉 또는 5분봉 등 어느 분봉에서도 나타날 수 있도록 부탁합니다
2. 엔벨 시스템식
분봉에서 저점이 엔벨하단선 이탈시 매수
고점이 엔벨 상단선 돌파시 매도
손절은 3%
매수가 대비 5% 상승시절반 매도
매수가 대비 7% 상승시 절반 매도
2014-11-26
175
글번호 80775
답변완료
수식문의드립니다
아래는 욥션등가 교차 지표라인 수식입니다.
if crossup(data2(c),data3(c)) then
var1 = data1(c);
if CrossDown(data2(c),data3(c)) then
var1 = data1(c);
plot1(var1);
[ 1분봉 ]에서 나온 위 옵션 교차 지표라인을,
[틱차트(1000틱)]에 지표라인을 표시하고 싶은데 어찌해야 하나요?
*** 콜 , 풋 참조데이터는 틱챠트에 넣고하는 조건입니다 ***
부탁드립니다.
2014-11-26
173
글번호 80774
답변완료
식 어떻게 작성 ? 표현방법
안녕하세요
if MarketPosition() == 1 Then {
Hvalue = Highest(H,BarsSinceEntry+1);
ExitLong("TrailStop_EL",AtStop, Hvalue - TsValue); 의 경우 0.6포인트 수익이후를
표현하는 방법도 알고 싶네요.
2014-11-26
194
글번호 80773
답변완료
문의드립니다
차트 금액과 숫자에 천단위 콤마를 넣고 싶습니다. 어떻게 하면 될까요?
2014-11-26
164
글번호 80772
답변완료
추가 질문입니다..
2.3번째가 진행중인 종목검색
input : P1(10),P2(5),OverBuy(80),OverSell(20);
var : Count(0),stok(0);
stok = StochasticsK(P1,P2);
if crossup(stok,OverSell) Then
count = count+1;
if CrossDown(stok,OverBuy) Then
count = 0;
if count == 2 and stok < OverSell Then
find(1);
-------------------------------------------------- 이렇게 식 재수정 해주셔서 검색했는데,
이종목도 나와서요. 분홍색 이후에 이종목은 현재 새롭게 하늘색 1번이 생겼고, 2번이 아직 발생치 않은 위치인데, 이종목이 왜 검색이 되어져 나오는지 확인 부탁드립니다.
3번이 발생도 안된종목이 왜 검색이 되어지는것인가요?
-----------------------------------------------------------
2014-11-26
197
글번호 80768
답변완료
사용자 함수 부탁드립니다.
항상 도움주셔서 감사합니다.
아래는 수식지왕님의 변동성 지표에
대한 지표입니다.
이걸 특정기간에 대한 변동성에 대한 사용자 함수로
만들어 주셨으면 감사하겠습니다.
#==========================================#
# 지 표 명 : Volatility Based Envelopes
# 작 성 자 : 수식지왕
# 블 로 그 : http://yahoosir.blog.me
#==========================================#
Var:chng_rt(0),j(0),ma_val(0),std_val(0),dn_rng(0),up_rng(0),rawVBE_up(0),rawVBE_dn(0);
Array:len[6](0),VBE_up[6](0),VBE_dn[6](0),
up_chg[6](0),dn_chg[6](0),up_cor[6](0),dn_cor[6](0),
fcstVBE_up[6](0),fcstVBE_dn[6](0);
len[0] = 21;
len[1] = 17;
len[2] = 13;
len[3] = 9;
len[4] = 5;
len[5] = 2;
chng_rt = (C/C[1]-1); //가격 변동률
ma_val = ma(chng_rt,len[0]); //가격변동률의 평균
std_val = Std(chng_rt,len[0]); //가격변동률의 표준편차
dn_rng = ma_val - (std_val * 2);
up_rng = ma_val + (std_val * 2);
rawVBE_up = C * (1 + up_rng); //원시VBE
rawVBE_dn = C * (1 + dn_rng);
for j = 0 to 5 {
VBE_up[j] = wma(rawVBE_up,len[j]); //원시VBE를 가중이평으로 평활화
VBE_dn[j] = wma(rawVBE_dn,len[j]);
if VBE_up[j][1] > 0 then up_chg[j] = (VBE_up[j]-VBE_up[j][1])/VBE_up[j][1]; //VBE의 변동률
if VBE_dn[j][1] > 0 then dn_chg[j] = (VBE_dn[j]-VBE_dn[j][1])/VBE_dn[j][1];
}
fcstVBE_up[0] = VBE_up[0];
fcstVBE_dn[0] = VBE_dn[0];
for j = 1 to 5 {
up_cor[j] = Correlation(up_chg[0], up_chg[j],63); //21일 VBE변동률과 17,13,9,5,2 변동률간의 상관도
dn_cor[j] = Correlation(dn_chg[0], dn_chg[j],63);
fcstVBE_up[j] = fcstVBE_up[j-1] * (1+(up_chg[j]*up_cor[j])); //이전값에 상관도와 변동률을 곱해서 계산
fcstVBE_dn[j] = fcstVBE_dn[j-1] * (1+(dn_chg[j]*dn_cor[j]));
}
plot1(fcstVBE_up[0],"상-5",RED); //5봉 뒤로 이동
plot2(fcstVBE_dn[0],"하-5",BLUE); //5봉 뒤로 이동
if LastBarOnChart then { //마지막봉에서 아래 5봉만 추가로 출력
plot3(fcstVBE_up[5],"상0",RED);
plot4(fcstVBE_up[4],"상-1",RED); //1봉 뒤로 이동
plot5(fcstVBE_up[3],"상-2",RED); //2봉 뒤로 이동
plot6(fcstVBE_up[2],"상-3",RED); //3봉 뒤로 이동
plot7(fcstVBE_up[1],"상-4",RED); //4봉 뒤로 이동
plot8(fcstVBE_dn[5],"하0",BLUE);
plot9(fcstVBE_dn[4],"하-1",BLUE); //1봉 뒤로 이동
plot10(fcstVBE_dn[3],"하-2",BLUE); //2봉 뒤로 이동
plot11(fcstVBE_dn[2],"하-3",BLUE); //3봉 뒤로 이동
plot12(fcstVBE_dn[1],"하-4",BLUE); //4봉 뒤로 이동
}
2014-11-26
236
글번호 80767