커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
5560
글번호 230811
답변완료
수정좀 부탁합니다
var : Tcond(false);
if time == 101600 or
(time > 101600 and time[1] < 101600 and date == date[1]) or
(time >= 101600 and date != date[1]) Then{
Tcond = true;
}
if time == 015000 or (time > 015000 and time[1] < 015000) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitShort();
if MarketPosition == -1 Then
ExitShort();
위의 식좀 수종좀 부탁합니다
당일 10시 16분에 시작해서 다음날 새벽 01시 50분에 끝나게 수정좀 부탁합니다
지금 식으로 하니 잘 되지않는듯 합니다
2019-04-02
168
글번호 127567
답변완료
통신장애 접속단절
안녕하세요?
예스스탁 예스글로발을 24시간 실행시키면 아침날 통신장애 접속 중단 됩니다.
중단된 시간을 알수 있나요?
log 가 있나요?
2019-04-02
188
글번호 127558
답변완료
생각한것처럼 안되네요..ㅠㅠ
아래 수식으로 코스닥 150 레버리지를 돌려보았는데요...
3월 18일 전량 매도 이후에는 신호가 안뜨는데 뭐가 잘못되었느지 잘모르겠네요... (5분봉입니다. )
그리고 매수금액을 10만원으로 하면 7주가 매수가 되어야 하는데 어떤건 2주 어떤건 5주씩 사지기도 하고
매수금액을 100만원으로 올려보았는데 매수 금액이 이상하게 70주가 되지 않네요...
===================================================================================
제가 구현하고 싶은 사항은 다음과 같습니다.
변수 설정
1. 금액(10만원-100만원)
2. 진입횟수(10회 -1000회) --> 각5개 지표의 총합의 진입횟수
3. 분할청산(10회 - 100회 )
4. 각 5개 지표별 저점 가격 (아래 input 참조)
5. 이평 값 2개 (100-300 / 500-1000)
6. DMI고점 매도 변수값 설정 (10-30)
--- > 각각의 신호발생시마다 매수하고 -- 매도 신호시마다 신호시점의 설정된 %로 분할 매도
아래식은 많이 안맞음.. (근데 뭐가 잘못되었는지 모르겠어요~~ㅜㅜ)
input : MFIv(15),RSIv(20),CCIv(-300),sto(5),simridov(10);
input : 분할매도(0.01),DMIv(20);
input : 매수금액(100000),최대진입횟수(100);
input : 이평1(100),이평2(500);
var1 = ma(C,100);
var2 = ma(c,1000);
var3 = MFI(14);
var4 = RSI(14);
var5 = CCI(20);
var6 = StochasticsK(20,5);
var7 = Simrido(14);
var8 = Diplus(DMIv);
var9 = DiMinus(DMIv);
if var1 > var2 then
{
if var3 <= MFIv and MaxEntries < 최대진입횟수 Then
buy("MFI매수",OnClose,def,floor(매수금액/c));
if var4 <= RSIv and MaxEntries < 최대진입횟수 Then
buy("RSI매수",OnClose,def,floor(매수금액/c));
if var5 <= CCIv and MaxEntries < 최대진입횟수 Then
buy("CCI매수",OnClose,def,floor(매수금액/c));
if var6 <= sto and MaxEntries < 최대진입횟수 Then
buy("sto매수",OnClose,def,floor(매수금액/c));
if var7 <= simridov and MaxEntries < 최대진입횟수 Then
buy("simrido매수",OnClose,def,floor(매수금액/c));
}
if MarketPosition == 1 then
{
if CurrentContracts > CurrentContracts[1] Then
{
value1 = 0;
value2 = value2+(CurrentContracts-CurrentContracts[1]);
}
if CurrentContracts < CurrentContracts[1] Then
{
value1 = value1+1;
value2 = value2-(CurrentContracts-CurrentContracts[1]);
}
if var8 >= var9 Then
{
if value1 < 9 Then
ExitLong("bx1",OnClose,def,"",Floor(value2*분할매도),1);
Else
ExitLong("bx2");
}
}
Else
{
value1 = 0;
value2 = 0;
}
2019-04-02
217
글번호 127556
답변완료
지표문의
1.아래는 darvas박스 지표인데요
참조종목(data2)으로 쓸수있게금 지표수정 좀 해주세요.
inputs : ShowAll(true);
var : BoxTop(0), BoxBtm(0), Ctr(0), BBD(0), BBT(0), EBD(0), EBT(0), UpBand(0), DnBand(0), CurrState(1),
TextId(-1), TopId(-1), TopIdP(-1), BtmId(-1), BtmIdP(-1), LSId(-1), LSIdP(-1), RSId(-1), RSIdP(-1),
HiFirst(true), LoFirst(false), State1(false), State2(false), State3(false), State4(false), State5(false),
DrawBox(false), ValidBox(false), HadBreak(false), NewBox(false);
if index == 1 then begin
BoxTop = high;
BoxBtm = low;
State1 = true;
BBD = date;
BBT = time;
end;
if NewBox and high > UpBand then begin
BBD = date;
BBT = time;
TL_SetEnd(TopId, BBD, BBT, UpBand);
TL_SetEnd(BtmId, BBD, BBt, DnBand);
RSIdP = RSId ;
RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand);
if ShowAll == false and RSIdP <> -1 then TL_Delete( RSIdP ) ;
if HiFirst then TL_SetColor(RSId, yellow);
else TL_SetColor(RSId, magenta);
NewBox = false;
State1 = true;
LoFirst = false;
HiFirst = true;
end;
if NewBox and low < DnBand then begin
BBD = date;
BBT = time;
TL_SetEnd(TopId, BBD, BBT, UpBand);
TL_SetEnd(BtmId, BBD, BBt, DnBand);
RSIdP = RSId;
RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand);
if ShowAll == false and RSIdP <> -1 then TL_Delete(RSIdP);
if HiFirst then TL_SetColor(RSId, yellow) ;
else TL_SetColor(RSId, magenta);
NewBox = false;
State1 = true;
HiFirst = false;
LoFirst = true;
end;
if HiFirst then begin
if State4 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
State4 = false;
CurrState = 1;
end
else begin
if low < BoxBtm then begin
State4 = false;
State3 = true;
BoxBtm = low;
CurrState = 3;
end
else begin
State4 = false;
State5 = true;
CurrState = 5;
end;
end;
end;
if State3 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
State3 = false;
CurrState = 1;
end
else begin
if low < BoxBtm then begin
State3 = true;
BoxBtm = low;
CurrState = 3;
end
else begin
State3 = false;
State4 = true;
CurrState = 4;
end;
end;
end;
if State2 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
State2 = false;
CurrState = 1;
end
else begin
State2 = false;
State3 = true;
BoxBtm = low;
CurrState = 3;
end;
end;
if State1 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
CurrState = 1;
end
else begin
State1 = false;
State2 = true;
CurrState = 2;
end;
end;
end
else begin #{ Using LoFirst }
if State4 then begin
if low < BoxBtm then begin
BoxBtm = low;
State1 = true;
State4 = false;
CurrState = 1;
end
else begin
if high > BoxTop then begin
State3 = true;
State4 = false;
BoxTop = high;
CurrState = 3;
end
else begin
State4 = false;
State5 = true;
CurrState = 5;
end;
end;
end;
if State3 then begin
if low < BoxBtm then begin
BoxBtm = low;
State1 = true;
State3 = false;
CurrState = 1;
end
else begin
if high > BoxTop then begin
State3 = true;
BoxTop = high;
CurrState = 3;
end
else begin
State3 = false;
State4 = true;
CurrState = 4;
end;
end;
end;
if State2 then begin
if low < BoxBtm then begin
Boxbtm = low;
State1 = true;
State2 = false;
CurrState = 1;
end
else begin
State2 = false;
State3 = true;
BoxTop = high;
CurrState = 3;
end;
end;
if State1 then begin
if low < BoxBtm then begin
BoxBtm = low;
State1 = true;
CurrState = 1;
end
else begin
State1 = false;
State2 = true;
CurrState = 2;
end;
end;
end; #{ END IF HIFIRST OR LOFIRST }
if State5 then begin
DrawBox = true;
EBD = date;
EBT = time;
end;
if DrawBox then begin
TopIdP = TopId;
BtmIdP = BtmId;
LSIdP = LSId;
TopId = TL_New(BBD, BBT, BoxTop, EBD, EBT, BoxTop);
BtmId = TL_New(BBD, BBT, BoxBtm, EBD, EBT, BoxBtm);
LSId = TL_New(BBD, BBT, BoxBtm, BBD, BBT, BoxTop);
if ShowAll == false then begin
if TopIdP <> -1 then TL_Delete(TopIdP);
if BtmIdP <> -1 then TL_Delete(BtmIdP);
if LSIdP <> -1 then TL_Delete(LSidP);
end;
if HiFirst then begin
TL_SetColor(TopId, yellow);
TL_SetColor(BtmId, yellow);
TL_SetColor(LSId, yellow);
end
else begin
TL_SetColor(TopId, magenta);
TL_SetColor(BtmId, magenta);
TL_SetColor(LSId, magenta);
end;
State1 = false;
State2 = false;
State3 = false;
State4 = false;
State5 = false;
DrawBox = false;
ValidBox = true;
end;
if ValidBox then begin
UpBand = BoxTop;
DnBand = BoxBtm;
ValidBox = false;
NewBox = true;
BoxTop = high;
BoxBtm = low;
end;
2.그럼 수고하세요
2019-04-02
233
글번호 127555
답변완료
하루에 한번만 거래하기~~
아래식에서 하루에 1회만 거래되는 수식을 추가 시켜주시면 감사하겠습니다.
Input : af(0.02), maxAF(0.2);
input : starttime(150000),endtime(0);
input : 장대양봉틱수(30),장대양봉후음봉틱수(5);
input : 즉시수익청산(60),즉시손실청산(60);
input : 봉완성수익청산(40),봉완성손실청산(40);
input : 이평1(10),이평2(100);
var : Tcond(false);
var : cnt(0),mav1(0),mav2(0);
mav1 = ma(C,이평1);
mav2 = ma(C,이평2);
var1 = Sar(af,maxAF);
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
}
if Tcond == true then
{
if c >= O+PriceScale*장대양봉틱수 and mav1 > mav2 and
c> var1 Then
buy("b",atlimit,C-PriceScale*장대양봉후음봉틱수);
}
if MarketPosition == 1 Then
{
ExitLong("즉시수익",atlimit,EntryPrice+PriceScale*즉시수익청산);
ExitLong("즉시손실",AtStop,EntryPrice-PriceScale*즉시손실청산);
if C >= EntryPrice+PriceScale*봉완성수익청산 Then
ExitLong("봉완성수익");
if C <= EntryPrice-PriceScale*봉완성손실청산 Then
ExitLong("봉완성손실");
}
2019-04-02
179
글번호 127554
답변완료
질문드립니다.
해외 선물 백테스팅 해보려구 하는데요. 래리 윌리엄스 전략을 구현해보려고합니다.
개장시간이 09:00~04:45 인데
시가 -> 09:00(T) 가격
range -> 전날 09:00(T-1) ~ 04:45(T) 동안 최고가 - 최저가
1. 현재가가 시가 + range * 0.5 를 돌파할때 매수
2. 현재가가 시가 - range *0.5 를 돌파할때 매도
3. 종가(04:45 시점)청산
* 같은날에 매수/매도가 중복되서 들어가지 않도록 한번만 진입
을 구현하고 싶습니다.
부탁드리겠습니다
2019-04-02
189
글번호 127553
답변완료
질문드립니다
안녕하세요!!!
아래수식은 얼마전에 어느 회원님의 질문에 답해주신 수식인데요
이수식을 분봉챠트에 적용시는 상단그림과 같은 형태의 선이 구현되나
틱챠트에 적용하니 하단그림과 같은 선으로 나타납니다
틱챠트에 적용시에도 분봉챠트에서와 같은 형태의 선이 구현될수있도록 부탁드립니다
항상 수고하심에 감사드립니다!!!
----------------------------------------------------------------------------------
input : N(60),HHMMSS(150000);
var : HH(0),LL(0),cnt(0),HH1(0),LL1(0),OO(0),CC(0),CC1(0);
if dayindex == 0 Then
Var4 = 0;
Else
Var4 = Var4+BarInterval;
var12 = Var4%N;
if dayindex == 0 or (stime <= HHMMSS and var12 == 0) Then
{
HH = H;
LL = L;
OO = O;
HH1 = HH[1];
LL1 = LL[1];
CC1 = CC[1];
}
if H > HH Then
HH = H;
if L < LL Then
LL = L;
CC = c;
plot1(HH1,"고가-1");
plot2(LL1,"저가-1");
plot3(OO,"oo");
plot4(CC1,"종가-1");
2019-04-02
219
글번호 127552
답변완료
부탁 드립니다.
STO1 = 5
STO2 = 3
HP = 75
LP = 25
SC=STOCHASTICSSLOW(STO1,STO2);
A = VALUEWHEN(1,CROSSDOWN(SC,HP),LOW)
B = VALUEWHEN(1,CROSSDOWN(SC,LP),HIGH)
위는 키움 지표 수식입니다.
아래의 조건을 만족하는 종목 검색식을 부탁 합니다.
고맙습니다.
1) A 가 B 보다 크거나 같고, C 가 A를 상승 돌파한 종목
2) A 가 B 보다 크거나 같고, C 가 A보다 큰 종목
2019-04-01
211
글번호 127551
답변완료
수식부탁드립니다
$$$,언제나 신속하고 성실한 답변에 늘 감사드립니다.
ㅡ,5,20,60,120,240 삼각가중이평선 로직부탁입니다.
환절기 건강하십시요.
2019-04-01
193
글번호 127550