커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3461
글번호 230811
답변완료
검토부탁드립니다
안녕하세요...글번호 70886 데이타2에사진에서 처럼수식을추가햇으나
검증이안되서요.부탁드립니다 1번에서21번까지는 만들어주신 수식이라
문제가 없구요 22번에서40번은 제가한건데안되서요.
22번에서25번은 30분봉 30분전분봉 수식으로요.
plot 22 30분봉양봉종가 고가
plot 23 30분봉음봉종가 저가
plot 24 30분봉 전분봉양봉종가 고가
plot 25 30분봉 전분봉음봉종가 저가
26번에서40번까지는데이타2 60분 수식입니다
plot 26 60분봉 시가
plot 27 60분봉 고가
plot 28 60분봉 저가
plot 29 60분봉 종가
plot 30 60분봉 중심
plot 31 60분봉 전분봉 시가
plot 32 60분봉 전분봉 고가
plot 33 60분봉 전분봉 저가
plot 34 60분봉 전분봉 종가
plot 35 60분봉 전분봉 중심
plot 36 60분봉 전전분봉 종가
plot 37 60분봉 양봉종가 고가
plot 38 60분봉 음봉종가 저가
plot 39 60분봉 전분봉양봉 고가
plot 40 60분봉 전분봉음봉 저가
모든수식은 데이타2 입니다.
장시작 30분봉. 60분봉. 첫봉에 전봉고점 전봉저점 전봉중심
안그려지게요.
수고하세요...꾸벅
2021-03-30
1425
글번호 147535
답변완료
산식검토
if date != date[1] Then
var1 = 0;
var1 = var1+v; //(bids-asks)
bids와 asks의 누적차를 지표로 나타낼려고 하는데
이상하게도 않됩니다
시험삼아 v를 넣었더니 이건또 잘되네요
뭐가 잘못된건가요?
2021-03-30
1062
글번호 147529
답변완료
문의 드립니다.
60분봉이 양봉일 때 1분봉이 음봉에서 양봉 발생 시 매수 진입
음봉 발생 시 매도 청산 완료
60분봉이 음봉일 때 1분봉이 양봉에서 음봉 발생 시 매도 진입
음봉 발생 시 매수 청산 완료
부탁드립니다.
2021-03-30
1054
글번호 147528
답변완료
수식
하기 수식 부탁드립니다.
당일매매 기준입니다.
3번 연속 손실인 경우 당일은 진입 금지입니다. (다음날은 진입 가능)
매수매도 진입에 넣을수 condition 조건으로 부탁드립니다.
감사합니다.
2021-03-30
1264
글번호 147527
답변완료
에스스탁에 적용 할 수있는 지표식을 부탁 드립니다
첨부 된 파일은 파이썬으로 작성 된 수식입니다.
이를 예스스탁에 적용 할수 있는 지표식으로 변경하여 주시면 감사 하겠습니다.
참조 : https://github.com/WegraLee/deep-learning-from-scratch-3/blob/master/steps/step46.py
2021-03-30
1672
글번호 147523
답변완료
부탁 드립니다
max( avg(C,short), avg(C,mid), avg(C,long)) <
min( avg(C,short), avg(C,mid), avg(C,long)) * (1+Percent/100) &&
C > highest(H(1),5)
and
avg(V, 5) >= 5000
and
V > V(1) * Multiple
and
C > (highest(high,midPeriod)+lowest(low,midPeriod))/2
and
C > avg(C,60)
and
CrossUp(C,BBandsUp(20, 2))
and
O*1.025 <= H
지표변수는?
short 5
mid 20
long 60
midperiod 78
Multiple 1.5
percent 3
3분봉에서 이신호(강세) 들어온 종목중에
PredayClose() < C
and
avg(C(1),5) < avg(C(4),5)
and
avg(C(1),5) < avg(C,5)
and
C > avg( C,226)
and
C > avg( C,60)
and
avg(C,60) > avg(C(5),60)
and
C > (highest(high,midPeriod)+lowest(low,midPeriod))/2
지표변수는?
midperiod 52
위에 신호가 잡히는 종목을 찾고 싶습니다.(순간 신호 잡힐 때) 를 보고 싶습니다.
2021-03-30
1561
글번호 147520
답변완료
수식어 부탁 드립니다
Input : Period(14), LPercent(30), SPercent(70);
Var : value(0);
value = RSI(Period);
# 매수/매도청산
If CrossUP(value, LPercent) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value, SPercent) Then
{
Sell();
}
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
-------------------------------------------------------
위 내용은 RSI 기본 수식어 입니다 .
그래프의 노란색은 매수진입신호후 주문을 이격도 60에 기준선 크로스업에 매수
그래프의 파란색은 매도진입신호후 주문을 이격도 60에 기준선 크로스다운에 매도
로 수식어를 변경하고자 합니다.
2021-03-30
1409
글번호 147516
답변완료
문의드립니다..
대댓글로 답변을 적으니. 그냥 넘어가는듯 해서 다시 끌어올려 위에다가 적습니다.
항상 감사합니다.
담당자님 덕분에 항상 배우고 있습니다.
제가 요청한 식에서 gap을 기준으로 나눠주셨자나요
혹시 제가 좀 수정할려고 하는데, 혹시 전일 종가대비 10프로 상승했을때 오른쪽식
전일 종가대비 10프로 상승을 못했을때 왼쪽식으로 적용하기 위해선
어떻게 적용해야할지 궁금합니다.
그냥 드는 생각은 gap 부분을
그냥 RATE = 0;
if O*1.1 < C[1] Then
RATE = 1;
if O*1.1 > C[1] Then
RATE = -1;
이렇게 적용하면 될까 생각이 드는데.. 맞는지 틀린지 궁금합니다.ㅜ.ㅜ
알려주세요...ㅜ.ㅜ
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 시스템식 문의 드립니다.
> 안녕하세요
예스스탁입니다.
var : entry(0),AP(0),Gap(0),TT(0),LL(0),HH(0);
if Bdate != Bdate[1] Then
{
entry = 0;
Gap = 0;
if O > C[1] Then
Gap = 1;
if O < C[1] Then
Gap = -1;
}
HH = DayHigh(0);
LL = min(DayClose(1),DayLow(0));
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if Gap == 1 Then
{
if MarketPosition == 0 Then
{
if entry == 0 or
(entry >= 1 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("LBp1",1) == true) Then
Buy("Lb1",AtLimit,DayOpen*0.97);
}
if (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("Lb1") == true) or
(MarketPosition == 0 and entry >= 1 and IsExitName("LBp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06)) Then
Buy("Lb2",AtLimit,DayOpen*0.94);
if (MarketPosition == 1 and MaxEntries == 2 and IsEntryName("Lb1") == true) or
(MarketPosition == 1 and MaxEntries == 1 and IsEntryName("Lb2") == true) Then
Buy("Lb3",AtLimit,DayOpen*0.91);
if MarketPosition == 1 Then
{
AP = AvgEntryPrice;
if CurrentContracts > CurrentContracts[1] Then
TT = TimeToMinutes(stime);
if MaxEntries == 1 and IsEntryName("Lb1") == true Then
{
ExitLong("Lbp1",AtLimit,AP*1.02);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("Lbx1");
}
if (MaxEntries == 2 and IsEntryName("Lb1") == true) or
(MaxEntries == 1 and IsEntryName("Lb2") == true) Then
{
ExitLong("Lbp2",AtLimit,AP*1.01);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("Lbx2");
}
if (MaxEntries == 3 and IsEntryName("Lb1") == true) or
(MaxEntries == 2 and IsEntryName("Lb2") == true) Then
{
ExitLong("Lbp3",AtLimit,AP*1.005);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("Lbx3");
}
ExitLong("Lbl",AtStop,DayOpen*0.88);
}
}
if Gap == -1 Then
{
if MarketPosition == 0 and HH >= DayClose(1)*1.05 Then
{
if entry == 0 or (entry >= 1 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("Rbp1",1) == true) Then
Buy("Rb1",AtLimit,LL+(HH-LL)*0.618);
}
if (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("Rb1") == true) or
(MarketPosition == 0 and entry >= 1 and IsExitName("RBp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06)) Then
Buy("Rb2",AtLimit,LL+(HH-LL)*0.500);
if (MarketPosition == 1 and MaxEntries == 2 and IsEntryName("Rb1") == true) or
(MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b2") == true) Then
Buy("Rb3",AtLimit,LL+(HH-LL)*0.382);
if MarketPosition == 1 Then
{
AP = AvgEntryPrice;
if CurrentContracts > CurrentContracts[1] Then
TT = TimeToMinutes(stime);
if MaxEntries == 1 and IsEntryName("Rb1") == true Then
{
ExitLong("Rbp1",AtLimit,AP*1.02);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("Rbx1");
}
if (MaxEntries == 2 and IsEntryName("Rb1") == true) or
(MaxEntries == 1 and IsEntryName("Rb2") == true) Then
{
ExitLong("Rbp2",AtLimit,AP*1.01);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("Rbx2");
}
if (MaxEntries == 3 and IsEntryName("Rb1") == true) or
(MaxEntries == 2 and IsEntryName("Rb2") == true) Then
{
ExitLong("Rbp3",AtLimit,AP*1.005);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("Rbx3");
}
if LatestEntryName(0) == "Rb3" Then
ExitLong("Rbl",AtStop,LatestEntryPrice(0)*0.98);
}
}
SetStopEndofday(151800);
즐거운 하루되세요
> 맴맴잉 님이 쓴 글입니다.
> 제목 : 시스템식 문의 드립니다.
> 예전에 문의들였던 시스템식 2가지를 합칠려고 합니다.
위 그림과 같이 당일 매매이고, 전일 종가대비 갭상하였을 경우 왼쪽 시스템식 적용
전일종가대비 갭 하락하였을 경우 오른쪽 시스템식을 적용하려고 합니다.
예전에 문의들였던 시스템식도 같이 송부드리오니. 요청드립니다.
-------------------------------------------------------------------
왼쪽 시스템식
var : entry(0),AP(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 Then
{
if entry == 0 or
(entry >= 1 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("Bp1",1) == true) Then
Buy("b1",AtLimit,DayOpen*0.97);
}
if (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b1") == true) or
(MarketPosition == 0 and entry >= 1 and IsExitName("Bp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06)) Then
Buy("b2",AtLimit,DayOpen*0.94);
if (MarketPosition == 1 and MaxEntries == 2 and IsEntryName("b1") == true) or
(MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b2") == true) Then
Buy("b3",AtLimit,DayOpen*0.91);
if MarketPosition == 1 Then
{
AP = AvgEntryPrice;
if MaxEntries == 1 and IsEntryName("b1") == true Then
{
ExitLong("bp1",AtLimit,AP*1.02);
if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime)+60 Then
ExitLong("bx1");
}
if (MaxEntries == 2 and IsEntryName("b1") == true) or
(MaxEntries == 1 and IsEntryName("b2") == true) Then
{
ExitLong("bp2",AtLimit,AP*1.01);
if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime)+60 Then
ExitLong("bx2");
}
if (MaxEntries == 3 and IsEntryName("b1") == true) or
(MaxEntries == 2 and IsEntryName("b2") == true) Then
{
ExitLong("bp3",AtLimit,AP*1.005);
if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime)+60 Then
ExitLong("bx3");
}
ExitLong("bl",AtStop,DayOpen*0.88);
}
SetStopEndofday(151800);
-------------------------------------------------------------------
오른쪽 시스템식
var : entry(0),AP(0),TT(0),LL(0),HH(0);
if Bdate != Bdate[1] Then
entry = 0;
HH = DayHigh(0);
LL = min(DayClose(1),DayLow(0));
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 and HH >= DayClose(1)*1.05 Then
{
if entry == 0 or (entry >= 1 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("Bp1",1) == true) Then
Buy("b1",AtLimit,LL+(HH-LL)*0.618);
}
if (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b1") == true) or
(MarketPosition == 0 and entry >= 1 and IsExitName("Bp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06)) Then
Buy("b2",AtLimit,LL+(HH-LL)*0.500);
if (MarketPosition == 1 and MaxEntries == 2 and IsEntryName("b1") == true) or
(MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b2") == true) Then
Buy("b3",AtLimit,LL+(HH-LL)*0.382);
if MarketPosition == 1 Then
{
AP = AvgEntryPrice;
if CurrentContracts > CurrentContracts[1] Then
TT = TimeToMinutes(stime);
if MaxEntries == 1 and IsEntryName("b1") == true Then
{
ExitLong("bp1",AtLimit,AP*1.02);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("bx1");
}
if (MaxEntries == 2 and IsEntryName("b1") == true) or
(MaxEntries == 1 and IsEntryName("b2") == true) Then
{
ExitLong("bp2",AtLimit,AP*1.01);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("bx2");
}
if (MaxEntries == 3 and IsEntryName("b1") == true) or
(MaxEntries == 2 and IsEntryName("b2") == true) Then
{
ExitLong("bp3",AtLimit,AP*1.005);
if TimeToMinutes(sTime) >= TT+60 Then
ExitLong("bx3");
}
if LatestEntryName(0) == "b3" Then
ExitLong("bl",AtStop,LatestEntryPrice(0)*0.98);
}
SetStopEndofday(151800);
---------------------------------------------------------------
항상 감사합니다.^^
2021-03-30
1222
글번호 147505
답변완료
수식 의뢰 부탁드립니다.
안녕하세요
현재 해외선물 4시간 봉을 사용하고 있습니다
해외선물은 하루 마지막 봉이 03시에 시작해서 06시에 마감합니다
그리고 1시간 휴장 후 07시에 매매가 재개됩니다
여기서 문제가 발생합니다
1. 마지막봉 종가 기준 매매신호가 발생하면 매매정지시간 때문에 주문이 나가질 않아요
2. 반대로 종가 청산주문 역시 매매정지 시간이라 주문이 나가지 않습니다
제가 원하는 것은
1. 05시 50분 기준 전봉 저가보다 현재가격이 낮으면 매도주문
2. 05시 50분 기준 미체결계약이 있고 이익이 나 있으면 청산
입니다
감사합니다.
2021-03-30
1356
글번호 147502