커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1337
글번호 230811
답변완료
문의 드립니다
1.
Inputs: VtyPercent(0.10),ATRperiod(10);
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
If MarketPosition() <> 1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
---------------------------------------------------
2.
Inputs: VtyPercent(0.10),ATRperiod(10);
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
If MarketPosition() <> -1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
시장가로 주문 설정을 하였는데 시세급변으로 주문거부가 나서 체결이 안될 경우
설정창에서 자동정정주문을 설정하면 기존 주문은 취소가 되고 해당되는 초 후에
당시의 상대호가 설정한 호가에 주문이 다시 나가는 지 궁금합니다.
그리고 위 수식어 2개의 수정을 바랍니다.
손절 -100틱 추가 및 손절 체결전 호가주문창에 보이도록
할수있는지 문의 드립니다.
2025-02-13
493
글번호 188102
답변완료
박스 수식 부탁드립니다
아래 추세선 수식의 변곡점을 박스 수식으로 부탁드립니다
================================================================================
input : Period(35),선두께(2);
Var:상승색(Turquoise), 하락색(Turquoise);
Var:j(0),T(0);
Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0),
date21(0),date22(0),time21(0),time22(0),
date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0);
Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0);
Array:r[7](0),fr[7](0),TL2[7](0),TL3[7](0),TX2[7](0),TX3[7](0);
Plot1(0);
For j = 0 To 19
{
HiBar[j] = HiBar[j] + 1;
LoBar[j] = LoBar[j] + 1;
}
if weekhigh(0)[1] < weekhigh(0) Then
T = 1;
if weekLow(0)[1] > weekLow(0) Then
T = -1;
If T == -1 Then
{
If T[1] != -1 Then
{
For j = 18 DownTo 0
{
LoVal[j+1] = LoVal[j];
LoBar[j+1] = LoBar[j];
}
LoVal[0] = L;
LoBar[0] = 0;
date11 = date[HiBar[0]];
time11 = stime[HiBar[0]];
Value11 = HiVal[0];
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
TL1 = TL_New(date11,time11,Value11,date12,time12,Value12);
TL_SetColor(TL1,하락색);
date21 = date[HiBar[0]];
time21 = stime[HiBar[0]];
date22 = date[0];
time22 = stime[0];
for j = 0 to 6
{
fr[j] = LoVal[1] + ((HiVal[0] - LoVal[1]) * r[j]);
}
}
If LoVal[0] > L Then
{
LoVal[0] = L;
LoBar[0] = 0;
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
TL_SetEnd(TL1, date12,time12,Value12);
date22 = date[0];
time22 = stime[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
}
}
If T == 1 Then
{
If T[1] != 1 Then
{
For j = 18 DownTo 0
{
HiVal[j+1] = HiVal[j];
HiBar[j+1] = HiBar[j];
}
HiVal[0] = H;
HiBar[0] = 0;
date11 = date[LoBar[0]];
time11 = stime[LoBar[0]];
Value11 = LoVal[0];
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
TL1 = TL_New(date11,time11,Value11,date12,time12,Value12);
TL_SetColor(TL1,상승색);
date31 = date[LoBar[0]];
time31 = stime[LoBar[0]];
date32 = date[0];
time32 = stime[0];
for j = 0 to 5
{
fr[j] = LoVal[0] + ((HiVal[1] - LoVal[0]) * r[j]);
}
}
If HiVal[0] < H Then
{
HiVal[0] = H;
HiBar[0] = 0;
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
TL_SetEnd(TL1, date12,time12,Value12);
date32 = date[0];
time32 = stime[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
}
}
TL_SetSize(TL1,선두께);
TL_SetDrawMode(TL1,0);
2025-02-13
533
글번호 188101
답변완료
수식 문의드립니다
보유중인 주식들을,
30분봉 차트에서
매일 매일 장 시작할때마다
'전일 종가'로 50만원씩 매도 주문 내는 식을 만들고자 합니다(매일 반복)
이것저것 해봐도 잘 안되서 ㅠㅠ 도움 부탁 드리겠습니다~ㅠ
2025-02-13
423
글번호 188100
답변완료
KOSPI200 옵션 특정 현재가 조건의 행사가 추출
Kospi200 옵션 시세에서, 콜옵션/풋옵션
특정 현재가(프리미엄) 이상의 첫번째 행사가를 추출하여,
실시간 차트로 표현할 수 있는 수식 문의드립니다.
첨부 파일에 좀 더 자세한 내용 작성하였으니
참조 부탁드립니다.
감사합니다.
2025-02-12
422
글번호 188099
답변완료
수식 문의드립니다.
주가이평돌파[주봉]1봉전 (종가 5)이평 (종가 60)이평 골드크로스
52주 최고가대비 -80% 이하
수식으로 알려주세요~
2025-02-12
483
글번호 188098
답변완료
수식 부탁합니다.
마이크로 나스닥 종목 한정으로 진입 제한 수식을 알고 싶습니다.
부탁합니다.
2025-02-12
443
글번호 188097
답변완료
수식 부탁합니다.
진입수량을 4개이하로 제한하는 수식 부탁합니다.
예를들어서 1개, 2개, 3개, 4개까지는 가능하고
5개부터는 진입불가한 수식을 부탁합니다.
2025-02-12
442
글번호 188096
답변완료
시스템 오류
당일청산으로는 신호가 안나옵니다.
input : P(9);
var : RSIV(0),T(0),TL1(0),TL2(0);
var : HIV(0),HIV1(0),HPV(0),HPV1(0);
var : LIV(0),LIV1(0),LPV(0),LPV1(0);
RSIv = RSI(P);
if RSIV > RSIV[1] Then
T = 1;
if rSIV < RSIV[1] Then
T = -1;
if T == 1 and T != T[1] Then
{
HIV = RSIv;
HIV1 = HIV[1];
HPV = H;
HPV1 = HPV[1];
if LIV > LIV1 and LPV < LPV1 and LPV1 > 0 Then
{
TL1 = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL2 = TL_New_Self(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL1,RED);
TL_SetColor(TL2,RED);
TL_SetDrawMode(TL1,0);
TL_SetDrawMode(TL2,0);
}
}
if T == -1 and T != T[1] Then
{
LIV = RSIv;
LIV1 = LIV[1];
LPV = L;
LPV1 = LPV[1];
if HIV < HIV1 and HPV > HPV1 and HPV1 > 0 Then
{
TL1 = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL2 = TL_New_Self(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL1,BLUE);
TL_SetColor(TL2,BLUE);
TL_SetDrawMode(TL1,0);
TL_SetDrawMode(TL2,0);
}
}
#RSI 상승구간 RSI최고와 가격최고 계산
if T == 1 Then
{
if RSIv > HIV Then
{
HIV = RSIv;
}
if H > HPV Then
{
RSIv = H;
}
}
#RSI 하락구간 RSI최저와 가격최저 계산
if T == -1 Then
{
if RSIv < LIV Then
{
LIV = RSIv;
}
if L < LPV Then
{
LPV = L;
}
}
if CrossDown(RSIV,70) Then
Sell();
if Crossup(RSIV,30) Then
Buy();
2025-02-13
499
글번호 188095
답변완료
문의 드립니다.
안녕하세요~아래의 트레이딩뷰 수식이 예스트레이더 수식으로 바꿔질까요?
항상 감사드립니다.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © HeWhoMustNotBeNamed
//@version=4
study("ATR Percentage")
useAtrAsPercent = input(true)
ATRPeriods = input(22, step=5)
showBollingerBands = input(true)
BBPeriods = input(20, step=10)
StdDev = input(2, step=0.5)
atr = atr(ATRPeriods)
atrPercent = (atr/close) * 100
[middle, top, bottom] = bb(useAtrAsPercent? atrPercent:atr,BBPeriods,StdDev)
plot(useAtrAsPercent? atrPercent:atr, title="ATR/Percent", color=color.blue, linewidth=2)
BBup = plot(showBollingerBands ? top: na, title="Top", color=color.red, linewidth=1, transp=50, style=plot.style_linebr)
BBdown = plot(showBollingerBands ? bottom: na, title="Bottom", color=color.green, linewidth=1, transp=50, style=plot.style_linebr)
BBmid = plot(showBollingerBands ? middle: na, title="Middle", color=color.purple, linewidth=1, transp=50, style=plot.style_linebr)
fill(BBup, BBmid, title="High Volatility Zone", color=color.red, transp=90)
fill(BBdown, BBmid, title="Low Volatility Zone", color=color.green, transp=90)
2025-02-12
594
글번호 188089