커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6549
글번호 230811
답변완료
문의
첨부파일처럼. 신호 발생하고 난후.
0.5포 수익중, 1포 수익중.. 요런 글씨를 표시하게 하려면 어떻게 해야하는지요??
2015-08-06
141
글번호 89252
답변완료
이것도 수식에서 이런에러 나옵니다
김과장님 ---yeslanguage 편집기에 넣어서 검증까지 완료했으나
==>"수식에서 참조할 첫번째 종목데이타가 없습니다"--라고 나옵니다
이것을 해결할려면 어떻게 하면되나요?
=================================================================
1.국내선물자동매매적용시 어떤수식을 추가하면되나요?
2.홍콩항생지수 자동매매적용시~
3.china a50 자동매매적용시~
4.s&p500 자동매매적용시~
5.mini나스닥100 자동매매적용시~
--------------------------------------------------
6.해외선물 오일 자동매매적용시~
7.해외선물 유료 자동매매적용시~
8.해외선물 골드 자동매매적용시~
9.mini s&p500 자동매매적용시~ 어떤수식이 추가되면 가능하나요?
====================================================================
input:b_time1(000001),e_time1(030000),목표청산1(0.3),
stoK_p11(50),stoK_p12(50),stoK_p13(10),
ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250),
ma_p15(20),ma_p16(10),ma_p17(38),
b_time2(030001),e_time2(180000),목표청산2(0.31),
stoK_p21(50),stoK_p22(50),stoK_p23(10),
ma_p21(25),ma_p22(5),ma_p23(15),ma_p24(127),
ma_p25(68),ma_p26(10),ma_p27(15),
b_time3(180001),e_time3(240000),목표청산3(0.43),
stoK_p31(50),stoK_p32(50),stoK_p33(10),
ma_p31(25),ma_p32(5),ma_p33(15),ma_p34(102),
ma_p35(40),ma_p36(10),ma_p37(15);
Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0);
var : StochasticsKS1(0),StochasticsDS1(0),HV1(0),Lv1(0),FK1(0);
var : StochasticsKS2(0),StochasticsDS2(0),HV2(0),Lv2(0),FK2(0);
var : StochasticsKS3(0),StochasticsDS3(0),HV3(0),Lv3(0),FK3(0);
LV1 = Lowest(L, stoK_p11);
HV1 = Highest(H, stoK_p11);
FK1 = (Close - LV1) / (HV1 - LV1) * 100;
StochasticsKS1 = ma(FK1,stoK_p12);
StochasticsDS1 = ma(StochasticsKS1,stoK_p13);
LV2 = Lowest(L, stoK_p21);
HV2 = Highest(H, stoK_p21);
FK2 = (Close - LV2) / (HV2 - LV2) * 100;
StochasticsKS2 = ma(FK2,stoK_p22);
StochasticsDS2 = ma(StochasticsKS2,stoK_p23);
LV3 = Lowest(L, stoK_p31);
HV3 = Highest(H, stoK_p31);
FK3 = (Close - LV3) / (HV3 - LV3) * 100;
StochasticsKS3 = ma(FK3,stoK_p32);
StochasticsDS3 = ma(StochasticsKS3,stoK_p33);
If b_time1 <= Time and Time <= e_time1 Then
{
stoK = StochasticsKS1;
stoD = StochasticsDS1;
If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수1",AtMarket);
}
If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도1",AtMarket);
}
SetStopProfittarget(목표청산1);
}
If b_time2 <= Time and Time <= e_time2 Then
{
stoK = StochasticsKS2;
stoD = StochasticsDS2;
If countif(ma(C,ma_p21)[1] < ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] <= ma(C,ma_p23)[1] and ma(C,ma_p22) > ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] < ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] < ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] < ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] < ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수2",AtMarket);
}
If countif(ma(C,ma_p21)[1] > ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] >= ma(C,ma_p23)[1] and ma(C,ma_p22) < ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] > ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] > ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] > ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] > ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도2",AtMarket);
}
SetStopProfittarget(목표청산2);
}
If b_time3 <= Time and Time <= e_time3 Then
{
stoK = StochasticsKS3;
stoD = StochasticsDS3;
If countif(ma(C,ma_p31)[1] < ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] <= ma(C,ma_p33)[1] and ma(C,ma_p32) > ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] < ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] < ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] < ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] < ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수3",AtMarket);
}
If countif(ma(C,ma_p31)[1] > ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] >= ma(C,ma_p33)[1] and ma(C,ma_p32) < ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] > ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] > ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] > ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] > ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도3",AtMarket);
}
SetStopProfittarget(목표청산3);
}
2015-08-06
311
글번호 89249
답변완료
일봉 당일청산 시뮬레이션
주식 일봉에다가 다음과 같이 당일청산 수식을 넣었더니
SetStopEndofday(1445);
시뮬레이션 상으로는 당일청산이 실행되지 않습니다.
5분봉 시뮬레이션에 넣었더니 잘 됩니다.
실제 장중에는 일봉에서도 당일청산기능이 잘 발휘되는지 궁금합니다.
어제 프로그램사용법 Q&A 게시판 질문의 연장선상에 있습니다.
갭 하락으로 인한 위험감수를 막기위해 소스를 짜고 있습니다.
초보이니 너그러운 답변 부탁드립니다 ^^
2015-08-06
133
글번호 89248
답변완료
수식에서 이런에러나옵니당
김과장님 ---yeslanguage 편집기에 넣어서 검증까지 완료했으나
==>"수식에서 참조할 첫번째 종목데이타가 없습니다"--라고 나옵니다
이것을 해결할려면 어떻게 하면되나요?
=================================================================
1.국내선물자동매매적용시 어떤수식을 추가하면되나요?
2.홍콩항생지수 자동매매적용시~
3.china a50 자동매매적용시~
4.s&p500 자동매매적용시~
5.mini나스닥100 자동매매적용시~
--------------------------------------------------
6.해외선물 오일 자동매매적용시~
7.해외선물 유료 자동매매적용시~
8.해외선물 골드 자동매매적용시~
9.mini s&p500 자동매매적용시~ 어떤수식이 추가되면 가능하나요?
====================================================================
var : _1번대장01분추세매수(false,data2),_1번대장01분추세매도(false,data2),_1번대장방향(0,data2),방향(0,data2);
_1번대장01분추세매수 = data2(ma(C,50)[1]) < data2(ma(C,50)) and
data2(ma(C,100)[1]) < data2(ma(C,100)) and
data2(ma(C,200)[1]) < data2(ma(C,200)) and
data2(ma(C,150)[1]) < data2(ma(C,150)) and
data2(ma(C,175)[1]) < data2(ma(C,175));
_1번대장01분추세매도 =
data2(ma(C,50)[1]) > data2(ma(C,50)) and
data2(ma(C,100)[1]) > data2(ma(C,100)) and
data2(ma(C,200)[1]) > data2(ma(C,200)) and
data2(ma(C,150)[1]) > data2(ma(C,150)) and
data2(ma(C,175)[1]) > data2(ma(C,175));
If _1번대장01분추세매수 Then _1번대장방향 = 1;
If _1번대장01분추세매도 Then _1번대장방향 = -1;
if _1번대장방향 == 1
then
방향 = 1;
if _1번대장방향 == -1
then
방향 = -1;
input : RSIP1(14),RSIsig1(6),RSI_B1(45),RSI_S1(55),
sto11(50),sto21(6),sto31(6),STOK_B1(14),STOK_S1(86),
RSIP2(21),RSIsig2(6),RSI_B2(45),RSI_S2(55),
sto12(25),sto22(6),sto32(6),STOK_B2(8),STOK_S2(92),
RSIP3(14),RSIsig3(6),RSI_B3(45),RSI_S3(55),
sto13(50),sto23(6),sto33(6),STOK_B3(16),STOK_S3(84),
RSIP4(25),RSIsig4(6),RSI_B4(45),RSI_S4(55),
sto14(25),sto24(6),sto34(6),STOK_B4(10),STOK_S4(90),
inTime(240000),exTime(240000);
var:매수조건(false),매도조건(false);
var : StochasticsKS1(0),StochasticsDS1(0),HV1(0),Lv1(0),FK1(0);
var : StochasticsKS2(0),StochasticsDS2(0),HV2(0),Lv2(0),FK2(0);
var : StochasticsKS3(0),StochasticsDS3(0),HV3(0),Lv3(0),FK3(0);
var : StochasticsKS4(0),StochasticsDS4(0),HV4(0),Lv4(0),FK4(0);
LV1 = Lowest(L, sto11);
HV1 = Highest(H, sto11);
FK1 = (Close - LV1) / (HV1 - LV1) * 100;
StochasticsKS1 = ma(FK1,sto21);
StochasticsDS1 = ma(StochasticsKS1,sto31);
LV2 = Lowest(L, sto12);
HV2 = Highest(H, sto12);
FK2 = (Close - LV2) / (HV2 - LV2) * 100;
StochasticsKS2 = ma(FK2,sto22);
StochasticsDS2 = ma(StochasticsKS2,sto32);
LV3 = Lowest(L, sto13);
HV3 = Highest(H, sto13);
FK3 = (Close - LV3) / (HV3 - LV3) * 100;
StochasticsKS3 = ma(FK3,sto23);
StochasticsDS3 = ma(StochasticsKS3,sto33);
LV4 = Lowest(L, sto14);
HV4 = Highest(H, sto14);
FK4 = (Close - LV3) / (HV4 - LV4) * 100;
StochasticsKS4 = ma(FK4,sto24);
StochasticsDS4 = ma(StochasticsKS4,sto34);
Value1 = RSI_Y(RSIP1);
Value2 = StochasticsKS1;
Value3 = RSI_Y(RSIP2);
Value4 = StochasticsKS2;
Value5 = RSI_Y(RSIP3);
Value6 = StochasticsKS3;
Value7 = RSI_Y(RSIP4);
Value8 = StochasticsKS4;
매수조건 = ((time < inTime or inTime == 0) and Value1 <= RSI_B1 and Value2 <= STOK_B1 and Value3 <= RSI_B2 and Value4 <= STOK_B2) or
((time >= inTime or inTime == 0) and Value5 <= RSI_B3 and Value6 <= STOK_B3 and Value7 <= RSI_B4 and Value8 <= STOK_B4);
매도조건 = ((time < inTime or inTime == 0) and Value1 >= RSI_S1 and Value2 >= STOK_S1 and Value3 >= RSI_S2 and Value4 >= STOK_S2) or
((time >= inTime or inTime == 0) and Value5 >= RSI_S3 and Value6 >= STOK_S3 and Value7 >= RSI_S4 and Value8 >= STOK_S4);
if 방향 > 0 then
{
//ExitShort("추세전환(+)",AtMarket);
If 매수조건 and time <= exTime Then
buy("매수",AtMarket);
If 매도조건 Then
ExitLong("매수청산",AtLimit,EntryPrice+PriceScale);
}
if 방향 < 0 then
{
//ExitLong("추세전환(-)",AtMarket);
If 매도조건 and time <= exTime Then
Sell("매도",AtMarket);
If 매수조건 Then
ExitShort("매도청산",AtLimit,EntryPrice-PriceScale);
}
2015-08-06
256
글번호 89247
답변완료
문의 드립니다
수고하십니다
어제의 답변에 따라 아래와 같이 수정하였는데
매수진입한 봉 종가기준으로 로그가 찍히네요
if 매수조건 then
{
Buy("Su", AtLimit, C - 0.05);
if MarketPosition <= 0 Then
var1 = C-0.05;
}
if MarketPosition == 1 and MarketPosition != MarketPosition[1] Then
MessageLog("Su %.2f", var1);
질문 1
6101 차트에서 매수조건을 만족한 다음봉에서
화살표와 동시(봉완성전)에 로그를 출력할 수 없는지요 ?
질문 2
차트의 매수/매도 진입시 화살표와 함께 진입가 또는 청산가를 같이 출력할 수 없는지요?
질문 3
첨부파일 참조 부탁드립니다
사실 이 질문은 질문 1을 해결해보려고 하다 추가로 올립니다
감사합니다
2015-08-06
140
글번호 89240
답변완료
수식문의
안녕하세요.
최근 1년 거래일중 최고 거래량이 발생한 봉의 시가를 현재 봉의 종가가 돌파할때 2시 40분에
매수 하는식 가능할까요?
2015-08-06
116
글번호 89238
답변완료
수식 문의
더운데 고생 많으십니다.
시스템식 부탁드립니다.
감사합니다.
2015-08-06
122
글번호 89237
김꽃두레 님에 의해서 삭제되었습니다.
2015-08-06
28
글번호 89236
sadfkasf 님에 의해서 삭제되었습니다.
2015-08-06
0
글번호 89235