커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3387
글번호 230811
답변완료
지표문의
1.아래는 검색하다 상한가 하한가 그리는 지표인데
선물이나 해외선물 적용 할수 있도록 수정 안되나요 수정되면 범용지표로 좀 만들어 주세요
var : 하한가(0), DnLimit(0);
var : dn1(0), dn2(0), dn3(0), dn4(0), dn5(0),dn6(0),dn7(0);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
DnLimit = (BP * 0.12);
Else if date >= 20050328 and date < 20150615 Then
DnLimit = (BP * 0.15);
Else
DnLimit = (BP * 0.30);
if CodeCategory() == 2 then {
if date >= 20030721 then {
dn1 = int(DnLimit/100)*100;
dn2 = int(DnLimit/100)*100;
dn3 = int(DnLimit/100)*100;
dn4 = int(DnLimit/50)*50;
dn5 = int(DnLimit/10)*10;
dn6 = int(DnLimit/5)*5;
dn7 = int(DnLimit/1)*1;
}
else {
dn1 = int(DnLimit/1000)*1000;
dn2 = int(DnLimit/500)*500;
dn3 = int(DnLimit/100)*100;
dn4 = int(DnLimit/50)*50;
dn5 = int(DnLimit/10)*10;
dn6 = int(DnLimit/10)*10;
dn7 = int(DnLimit/1)*1;
}
}
Else {
dn1 = int(DnLimit/1000)*1000;
dn2 = int(DnLimit/500)*500;
dn3 = int(DnLimit/100)*100;
dn4 = int(DnLimit/50)*50;
dn5 = int(DnLimit/10)*10;
dn6 = int(DnLimit/5)*5;
dn7 = int(DnLimit/1)*1;
}
if CodeCategory() == 1 or CodeCategory() == 2 then {
if sdate < 20101004 Then{
If BP >= 500000 Then
하한가 = BP-dn1;
Else If BP >= 100000 Then
하한가 = BP-dn2;
Else If BP >= 50000 Then
하한가 = BP-dn3;
Else If BP >= 10000 Then
하한가 = BP-dn4;
Else If BP >= 5000 Then
하한가 = BP-dn5;
Else If BP >= 1000 Then
하한가 = BP-dn6;
Else
하한가 = BP-dn6;
}
else{
If BP >= 500000 Then
하한가 = BP-dn1;
Else If BP >= 100000 Then
하한가 = BP-dn2;
Else If BP >= 50000 Then
하한가 = BP-dn3;
Else If BP >= 10000 Then
하한가 = BP-dn4;
Else If BP >= 5000 Then
하한가 = BP-dn5;
Else If BP >= 1000 Then
하한가 = BP-dn6;
Else
하한가 = BP-dn7;
}
}
else if CodeCategory() == 8 or CodeCategory() == 9 then {
하한가 = BP-dn6;
}
}
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
if CodeCategory() == 2 then {
if date >= 20030721 then {
up1 = int(UpLimit/100+0.00001)*100;
up2 = int(UpLimit/100+0.00001)*100;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/10+0.00001)*10;
up7 = int(UpLimit/1+0.00001)*1;
}
}
Else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
if CodeCategory() == 1 || CodeCategory() == 2 then {
if sdate < 20101004 Then{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up6);
}
Else{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up7);
}
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
plot1(상한가);
plot2(하한가);
2.그럼 수고하세요
2025-10-15
310
글번호 194642
답변완료
문의드립니다
수정부탁드립니다 그리고 설명도부탁드립니다
Inputs:
N(14), MA_Period(20), Smooth(3),
ThrBuy(70), ThrSell(55), Eps(1e-9),
AllowShort(1),
Qty(1); // 주문 수량
Vars:
ma(0), rsi(0), obv(0),
obvMin(0), obvMax(0), obvZ(0),
maMin(0), maMax(0), maZ(0),
combo(0), comboSm(0),
buySig(false), sellSig(false),
mp(0);
// --- 지표 계산 ---
ma = MA(Close, MA_Period);
rsi = RSI(N);
obv = OBV();
obvMin = Lowest(obv, N); obvMax = Highest(obv, N);
maMin = Lowest(ma, N); maMax = Highest(ma, N);
obvZ = 100 * (obv - obvMin) / Max(Eps, obvMax - obvMin);
maZ = 100 * (ma - maMin) / Max(Eps, maMax - maMin);
combo = (obvZ + rsi + maZ) / 3;
comboSm = MA(combo, Smooth);
// --- 트리거 ---
buySig = CrossUp(comboSm, ThrBuy);
sellSig = CrossDown(comboSm, ThrSell);
// --- 포지션 & 주문 ---
mp = MarketPosition();
If mp == 0 then begin
if buySig then Buy(Qty); // 롱 진입
if (AllowShort == 1) and sellSig then Short(Qty); // 숏 진입
end
else if mp == 1 then begin
if sellSig then Sell(Qty); // 롱 청산
end
else if mp == -1 then begin
if buySig then Cover(Qty); // 숏 청산
end;
2025-10-15
278
글번호 194641
답변완료
부탁드립니다.
1. 종가의 아래꼬리가 최근 30개이내 봉중에 가장 길면 파란색으로, 종가의 위꼬리가 최근 30개이내 봉중에 가장 길면 빨강색으로 구현해 주세요
2. 종가가 최근 20개이내 봉중에 가장 긴 양봉이면 파란색으로, 종가가 최근 20개봉이내 봉중에 가장 긴 음봉이면 빨강색으로 구현해 주세요
고맙습니다.
2025-10-14
158
글번호 194640
답변완료
종목검색식 부탁드립니다
1. 양봉 캔들이
단순이평 60 80 110 이평을 동시돌파한 양봉캔들
종목 검색식 부탁드려요.
2. 양봉 캔들이
단순이평 80 110 이평을 동시돌파한 양봉 캔들
종목 검색식 부탁드려요
2025-10-14
175
글번호 194639
답변완료
신호수식을 종목검색식으로 부탁드립니다
baseDis = (C/ avg(C, Per)) * 100;
rsiUp = avg(max(C -C(1), 0), rsiPer);
rsiDown = avg(max(c(1) - C, O), rsiPer);
rsiVal =100 - (100 / (1 + rsiUp / rsiDown));
rsiWeight = if(rsiVal <= 50,
0.5 + (rsiVal * 0.01),
0.5 + ((rsiVal - 50) * 0.03));
volAvg = avg(V, volPer);
volWeight = if(volAvg != 0, V / volAvg, 1.0);
rsiVolWeight = if(rsiVal < 30 and volWeight > 1.2, 0.8,
if(rsiVal > 70 and volWeight > 1.2, 1.3, 1.0));
weightedDis = baseDis * rsiWeight * volWeight * rsiVolWeight;
smoothedWeightedDis = avg(weightedDis, 3);
A=RSI(14);
조건=(smoothedWeightedDis(1)<=100 or
smoothedWeightedDis <= 100) &&
(a(1) <= 30 or a<= 30);
조건 && a>a(1)
지표변수
per 20
volper 20
rsiper 14
2025-10-14
213
글번호 194638
답변완료
신호수식을 종목검색식으로 부탁드립니다
Hh= Highest(H, 40);
ll= Lowest(L, 40);
변동률조건= HH/LL*100 -100 <5;
H_전고점= Highest(H, 40),10;
라인=Valuewhen(1 ,변동률조건 ,HH);
crossup(c,라인) && 변동률조건(1) &&
라인 < H_전고점
2025-10-14
239
글번호 194637
답변완료
답변 감사합니다. 궁금한게 있습니다.
답변 감사합니다.
근데요. 궁금한게요.
조건 만족 후 진입 체결 못해서 진입 못하면 진입 위해 걸어둔 것을 무효화 하거나 치우는 방법이 있을까요?
미체결으로 계속 남는 것을 봤고요.
청산도 마찬가지 입니다. 이것은 옵션창에서 현재가 +-5 하면 해결 되겠지만요..
진입 못해서 미체결으로 남긴 것을 5분 후에 취소할 수 있는 코드가 뭘까요?
2025-10-14
230
글번호 194632
답변완료
검색식 부탁 드림니다.
안녕하세요. 아래 키움에서 사용하던 신호수식으로 검색식을 만들고 싶어서 문의 드리며 차트에 신호표시(캔들아래 삼각형) 도움도 주시면 감사하겠습니다. 행복한 하루 되세요^^
1. W패턴
M = ma(C,20);
T = LRL(20) + LRS(20);
T저점 = T>T(1) && T(1)<T(2);
저점1_T = ValueWhen(1, T저점, T(1));
저점1_M = ValueWhen(1, T저점, M(1));
저점2_T = ValueWhen(2, T저점, T(1));
저점2_M = ValueWhen(2, T저점, M(1));
고점 = HighestSince(1, T저점, H);
전고점 = ValueWhen(1, T저점, 고점(1));
조건 =
저점1_T<저점1_M &&
저점2_T<저점2_M &&
M>M(1) && T>T(1) && CrossUp(C, 전고점);
cnt = CountSince(T저점, 조건)==1;
cnt && !cnt(1)
2025-10-14
234
글번호 194628
답변완료
아래식을 사용자함수로 부탁드립니다.
함수명 : Up(N)
if(N>N(1),1,0)
2025-10-14
179
글번호 194622