커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7254
글번호 230811
답변완료
문의드립니다
한국투자증권 언어편집기 신호겁색 rsi
Input : RPeriod(14), SignalPeriod(9);
var : SValue(0), Signal(0), BuyCond(FALSE);
SValue = RSI(RPeriod, Close);
Signal = EMA(SValue,SignalPeriod);
BuyCond = SValue Cross Above Signal;
// 신호검색
IF BuyCond Then
Begin
Find(1);
End;
10봉전 신호 검색은 어떻게 합니까
2018-03-16
263
글번호 117468
답변완료
문의드립니다.
아래 검색식은 장중에는 검색이 안되는건가요??
어제 저녁만해도 검색이 잘 됐는데 장중에는 결과값이 안나옵니다.
input : ntime(93000);
var1 = ma(C,20);
var2 = ma(C,60);
var3 = ma(C,120);
if sdate != sdate[1] Then
Condition1 = false;
if ((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) and
var1 > var2 and var2 > var3 Then
Condition1 = true;
if Condition1 == true then
find(1);
2018-03-16
190
글번호 117457
답변완료
문의
국선 차트에 보조지표 스토케스틱
10,3,3 일때 stok 가 stod 를 상향할때 빨간점
하향할때 파란점 처럼 그려지게 부탁합니다
점이 찍히는 자리를 구해야 된다면 5이평선따라 그릴수있게 부탁합니다.
2018-03-16
251
글번호 117454
답변완료
문의드립니다.
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 코딩 변환 부탁드립니다.
inputs:
Period( 60 ),
OBLevel( 90 ),
OSLevel( 10 ),
NormalLevel( 50 ) ;
variables:
Stoch1( 0 ),
Stoch2( 0 ),
Diff( 0 ),
Range1( 0 ),
Range2( 0 ),
StressValue( 0 ) ;
StressValue = 50 ;
Stoch1 = 50 ;
Stoch2 = 50 ;
{ raw stochastics for price1 and price2 }
Range1 = Highest( High, Period ) - Lowest( Low, Period ) ;
Range2 = Highest( High of Data2, Period)
- Lowest( Low of Data2, Period ) ;
if Range1 <> 0 and Range2 <> 0 then
begin
Stoch1 = ( Close - Lowest( Low, Period ) ) / Range1 ;
Stoch2 = ( Close of Data2
- Lowest( Low of Data2, Period ) ) / Range2 ;
{ difference in stochastics }
Diff = Stoch1 - Stoch2;
{ stress indicator }
Range1 = Highest( Diff, Period ) - Lowest( Diff, Period ) ;
if Range1 <> 0 then
StressValue = 100 * ( Diff - Lowest( Diff, Period ) ) / Range1 ;
end ;
Plot1( StressValue, "Stress" ) ;
Plot2( Stoch1 * 100, "D1 Stoch" ) ;
Plot3( Stoch2 * 100, "D2 Stoch" ) ;
Plot4( OBLevel, "OverBought" ) ;
Plot5( OSLevel, "OverSold" ) ;
Plot6( NormalLevel, "Normal" ) ;
2018-03-16
194
글번호 117451
답변완료
피라미딩 추가
아래 sell 수식에 피라미딩을 추가하고 싶습니다.
* 0.8포인트씩 하락할 때마다 피라미딩
* input
- pyra : 0.80
- 피라미딩누적한도 : 5개
항상 고맙습니다
***********************************
input : b1(9),b2(9),X1(9),X2(9),진입눌림(3),진입돌파(1),청산눌림(3),청산돌파(1),거래횟수(20),시작시간(090000);
var : T1(0),entry(0),HH(0),LL(0),EH(0),EL(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0);
if (sdate != sdate[1] and stime >= 시작시간) or
(sdate == sdate[1] and stime >= 시작시간 and stime[1] < 시작시간) Then{
T1 = TotalTrades;
E1 = 0;
HH = H;
}
if stime >= 시작시간 then{
if H > HH Then
HH = H;
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 Then{
if E1 == 0 and C <= HH-PriceScale*B1 and C[1] < HH-PriceScale*B1 Then{
E1 = 1;
L1 = L;
i1 = index;
V1 = HH; //시작점 종가
}
if E1 == 1 and index > i1 then{
if L < L1 Then
L1 = L;
#고가가 시작봉종가보다 작을 때만 눌림체크
if H <= V1 and H >= L1+PriceScale*진입눌림 Then{
E1 = 2;
i1 = index;
S1 = L1;
}
}
//시작점 종가보다 높은 가격이 발생하면 초기화
if E1 >= 1 and H > V1 Then{
E1 = 0;
HH = H;
}
if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파 Then{
sell("s1");
}
}
if TotalTrades > TotalTrades[1] Then{
E1 = 0;
HH = H;
}
if H > HH Then
HH = H;
if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{
if E1 == 0 and C <= HH-PriceScale*B2 and C[1] < HH-PriceScale*B2 Then{
E1 = 1;
L1 = L;
i1 = index;
}
if E1 == 1 and index > i1 then{
if L < L1 Then
L1 = L;
if H >= L1+PriceScale*진입눌림 Then{
E1 = 2;
i1 = index;
S1 = L1;
}
}
if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파 Then{
sell("s2");
E1 = 0;
}
}
if MarketPosition == -1 Then{
if entry >= 1 then{
if CurrentContracts > CurrentContracts[1] Then{
EL = L;
E1 = 0;
}
if L < EL Then{
EL = L;
E1 = 0;
}
if E1 == 0 and C >= EL+PriceScale*X1 Then{
E1 = 1;
H1 = H;
i1 = index;
}
if E1 == 1 and index > i1 Then{
if H > H1 Then
H1 = H;
if L <= H1-PriceScale*청산눌림 Then{
E1 = 2;
I1 = index;
S1 = H1;
}
}
if E1 == 2 and index > i1 and C >= S1+PriceScale*청산돌파 Then{
ExitShort("sx1");
E1 = 0;
}
}
}
if MarketPosition == -1 Then{
if entry >= 1 then{
if CurrentContracts > CurrentContracts[1] Then{
EL = L;
E1 = 0;
}
if L < EL Then{
EL = L;
E1 = 0;
}
if E1 == 0 and C >= EL+PriceScale*X2 Then{
E1 = 1;
H1 = H;
i1 = index;
}
if E1 == 1 and index > i1 Then{
if H > H1 Then
H1 = H;
if L <= H1-PriceScale*청산눌림 Then{
E1 = 2;
I1 = index;
S1 = H1;
}
}
if E1 == 2 and index > i1 and C >= S1+PriceScale*청산돌파 Then{
ExitShort("sx2");
E1 = 0;
}
}
}
}
2018-03-16
218
글번호 117450
답변완료
점이 찍히지 않는 이유
var1=ma(v,20);
if c>o and v>=2*ma(v,20) then var1=v*1.2;
else var1=0;
if c<=o and v>=2*ma(v,20) then var2=1.2*V;
else var2=0;
var3=v*(2*c-h-l)/(h-l);
var5=v;
if var3==0 then{ var7=0; var8=0; }
else if var3>0 then{ var7=var3; var8=0; }
else{ var8=abs(var3); var7=0; }
#if nextbarsdate!=sdate then{
#if stime>153449 then{
# var1=var1/10;
# var2=var2/10;
# var5=var5/10;
# var7=var7/10;
# var8=var8/10;}
plot1(var1,"양2");
plot2(var2,"음2");
plot3(var5,"v");
plot4(var7,"수");
plot5(var8,"도");
condition1=stime-stime[1]==000500;
condition2=stime-stime[1]==001500;
condition3=stime==090000 and stime[10]-stime[11]==000500;
condition4=stime==090000 and stime[1]-stime==135000;
condition5=stime-stime[1]==000100;
var10=(v+max(var7,var8))/2;
if (condition1==true or condition3==true) and v>=5000 then{
plot6(var10,"의미5");}
#if condition5==true and (v>=2000 or v>=ma(v,21)*2.5) then{
if condition5==true and v>=2000 then{
plot7(var10,"의미1");}
if (condition1==true or condition3==true) then{
plot8(5000,"기준");}
#if (condition2==true or condition4==true) and v>=10000 then{
# var10=(v+max(var7,var8))/2;
# plot7(var10,"의미15");}
위 코드로 작성된 첨부 파일을 보면 녹색 점이 5분봉에서 조건을 만족하면 찍혀야 하는데 찍히는 데가 있고 그렇지 않은 곳이 있습니다. "이 봉에서"라는 봉에서는 거래량이 5000개를 넘어서고 5분봉이라는 조건을 만족하는 데 점이 찍히지 않습니다. 왜 그런지 좀 고쳐 주시기 바랍니다.
2018-03-16
244
글번호 117447
답변완료
수정 요청
첨부파일은 시작시간을 130000로 했는데 09시대에 진입합니다.
살펴주세요
**************
안녕하세요
예스스탁입니다.
input : 틱(7),차수(2),시간(100000);
var : T(0),cnt(0);
if (sdate != sdate[1] and stime >= 시간) or
(sdate == sdate[1] and stime >= 시간 and stime[1] < 시간) Then{
T = 0;
cnt = 0;
}
if T <= 0 and C >= O+PriceScale*틱 Then{
T = 1;
cnt = cnt+1;
if cnt == 차수 Then
buy();
}
if T >= 0 and C <= O+PriceScale*틱 Then{
T = -1;
cnt = cnt+1;
if cnt == 차수 Then
sell();
}
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 시작시간 조절
> 아래수식에 대해
입력시간부터 장시작으로 인식하는 시간조절 input 추가바랍니다.
***************
input : 틱(7),차수(2);
var : T(0),cnt(0);
if Bdate != Bdate[1] Then{
T = 0;
cnt = 0;
}
if T <= 0 and C >= O+PriceScale*틱 Then{
T = 1;
cnt = cnt+1;
if cnt == 차수 Then
buy();
}
if T >= 0 and C <= O+PriceScale*틱 Then{
T = -1;
cnt = cnt+1;
if cnt == 차수 Then
sell();
}
2018-03-16
218
글번호 117441
답변완료
수식
data1(c)와 data2(c)를 합성한 스토캐스틱 수식
즉,{data1(c)+ data2(c)}의 스토캐스틱 수식 좀 부탁 드립니다.
항상 감사 드리며....
2018-03-16
228
글번호 117440
답변완료
수식문의
1,일봉에서 바로전봉의 시가 고가 저가 종가 나타내는 수식부탁합니다
2,그리고 데이타1의 일봉것을 시가 고가 저가 종가 나타내는 수시도 부탁합니다
2018-03-16
207
글번호 117439