커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7065
글번호 230811
답변완료
신호수식을 검색할수잇게 부탁드림니다
A5=disparity(5);
A10=disparity(10);
A15=disparity(15);
A20=disparity(20);
A25=disparity(25);
A30=disparity(30);
A35=disparity(35);
A40=disparity(40);
A45=disparity(45);
A50=disparity(50);
A55=disparity(55);
A60=disparity(60);
A65=disparity(65);
A70=disparity(70);
A75=disparity(75);
A80=disparity(80);
A85=disparity(85);
A90=disparity(90);
A95=disparity(95);
A100=disparity(100);
MAXA=max(A5, A10, A15, A20, A25, A30, A35, A40, A45, A50, A55, A60, A65, A70, A75, A80, A85, A90, A95, A100);
MINA=min(A5, A10, A15, A20, A25, A30, A35, A40, A45, A50, A55, A60, A65, A70, A75, A80, A85, A90, A95, A100);
AA=valuewhen(1, MAXA/MINA*100 <ratio, eavg(C, 50)*MAXA/100);
if(crossup(C, AA) and V>=eavg(V, 20)*Vratio, 1, 0)
수고맣으심니다
위에신호를 검색할수잇게 변환좀부탁드림니다
감사함니다
2021-11-26
1055
글번호 153942
답변완료
문의드립니다.
수고많으십니다.
아래 수식은 검증은 이상없다고 하는데, 데모 데이타가 전혀 안나옵니다.
어떤 문제가 있는 건가요?
input : n1(5), n(10);
input : StartTime(210000),EndTime(053000);
input : 익절틱수(80),손절틱수(0),거래횟수(10);
input : mm(50),m1(10);
var : Tcond(false), T(0), entry(0);
Array : H1[50](0),L1[50](0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (NextBarSdate != sdate and NextBarStime >= EndTime) or
(NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then
Tcond = False;
if (NextBarSdate != sdate and NextBarStime >= StartTime) or
(NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then
{
T = 0;
Tcond = true;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if Tcond == true Then
{
if H > Highest(H,n1)[1] and C > O and entry < 거래횟수 Then
Buy("b");
if L < Lowest(L,N1)[1] and C < O and entry < 거래횟수 Then
Sell("s");
if MarketPosition == 1 Then
ExitLong("bx",AtStop,Lowest(L,n)[BarsSinceEntry]-PriceScale*1);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,Highest(H,n)[BarsSinceEntry]+PriceScale*1);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if MarketPosition == 1 Then
{
if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*mm Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*m1);
}
if MarketPosition == -1 Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*mm Then
ExitShort("str",AtStop,EntryPrice-PriceScale*m1);
}
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
2021-11-25
1125
글번호 153941
답변완료
문의 드립니다.~~~~
감사하게 많이 배우고 있습니다~~
아래식을 실행해보면
ntime(100000)으로 정해진 10시 시간내에서만
진입과 청산이 이루어 집니다.
진입조건이 성립된다면 해외선물 거래 시간인
8시에서 다음날 6시까지 연속해서 거래가
되었으면 합니다.
어떻게 시간 설정을 해야 하나요?
input : ntime(100000),nn(10),mm(20),aa(10),bb(20);
input : 익절틱수(10),손절틱수(10);
var : OO(0),HH(0),LL(0),HL(0),LH(0);
if (sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime) Then
{
OO = O;
HH = H;
HL = HH;
LL = L;
LH = LL;
Condition1 = False;
Condition1 = False;
}
Else
{
#거래횟수 증가(청산이 되서서 거래완료)
if TotalTrades > TotalTrades[1] Then
{
OO = O;
HH = H;
HL = HH;
LL = L;
LH = LL;
Condition1 = False;
Condition1 = False;
}
if HH > 0 and LL > 0 Then
{
if H > HH Then
{
HH = H;
HL = HH;
}
Else
{
if L < HL Then
HL = L;
}
if L < LL Then
{
LL = L;
LH = LL;
}
Else
{
if H > LH Then
LH = H;
}
if HL < HH-PriceScale*nn Then
Condition1 = true;
if LH > LL+PriceScale*aa Then
Condition2 = true;
if Condition1 == False and HH < LL+PriceScale*mm Then
Sell("s",AtLimit,LL+PriceScale*mm);
if Condition2 == False and LL < HH-PriceScale*bb Then
Buy("b",AtLimit,HH-PriceScale*bb);
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2021-11-25
985
글번호 153940
답변완료
수정부탁드립니다
#74801 답변수식 적용해서 기간을 적용하니 16일 미만은 선이 전혀 나타나지 않습니다,점검부탁드립니다.
2021-11-25
877
글번호 153937
답변완료
문의 드립니다.
친절한 도움에 감사드립니다.
수식에 IF Endtime > starttime Then
이 부분에 에러가 난다고 합니다.
다른 부분도 혹시 잘못된 부분 있으면 수정 부탁드립니다.
감사합니다.
input : n1(n),n(n);
input : StartTime(231000),EndTime(053000);
input : 익절틱수1(80),익절틱수2(100),손절틱수(50), 익절횟수(1);
input : mm(50),m1(10);
var : Tcond(false), T(0), Profit(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (NextBarSdate != sdate and NextBarStime >= EndTime) or
(NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then
Tcond = False;
if (NextBarSdate != sdate and NextBarStime >= StartTime) or
(NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then
{
T = 0;
Tcond = true;
Profit = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if TotalTrades > TotalTrades[1] and IsExitName("StopProfitTarget",1) == true Then
Profit = profit+1;
if Tcond == true Then
{
if MarketPosition <= 0 and NextBarOpen <= Highest(H,n1) and Profit < 익절횟수 Then
Buy("b1",AtStop,Highest(H,n1)+PriceScale*1);
if MarketPosition >= 0 and NextBarOpen >= Lowest(L,N1) and Profit < 익절횟수 Then
Sell("s1",AtStop,Lowest(L,N1)-PriceScale*1);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
if MarketPosition == 1 Then
{
ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*익절틱수1,"",max(1,Floor(MaxContracts/2)),1);
ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*익절틱수2);
if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*mm Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*m1);
}
if MarketPosition == -1 Then
{
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절틱수1,"",max(1,Floor(MaxContracts/2)),1);
ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절틱수2);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*mm Then
ExitShort("str",AtStop,EntryPrice-PriceScale*m1);
}
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
2021-11-25
1341
글번호 153933
답변완료
함수요청
안녕하세요?
국내연결선물 일봉상
최근 100개봉사이에서
음봉과 양봉의 갯수를 카운트하고 싶습니다.
직전전봉의 macd 오실레이터와 직전봉의 macd 오실레이터 값을 비교하여
값이 증가할 때 당일 캔들의 양봉과 음봉의 갯수
직전전봉의 macd 오실레이터와 직전봉의 macd 오실레이터 값을 비교하여
값이 감소할 때 당일 캔들의 양봉과 음봉의 갯수
를 각각 카운팅하고 싶습니다.
예스랭귀지로 가능하다면 부탁드립니다.
2021-11-25
957
글번호 153932
답변완료
문의 드립니다.~~~~
74798 재문의 답 주시면 감사하겠습니다~~
2021-11-25
1017
글번호 153929
답변완료
시스템
안녕하세요
아래식을 최대한 자세히 설명 부탁드립니다
input : P1(5),p2(20);
var : mav1(0),mav2(0),mav3(0),diff(0),sum(0);
mav1 = ma(c,P1);
mav2 = ma(c,P2);
diff = mav2-mav2[1];
sum = AccumN(diff,10);
if sum >= PriceScale*10 and crossup(c,mav1) Then
buy("b");
감사합니다 수고하세요
2021-11-25
1354
글번호 153922
답변완료
부탁드립니다
매수는
양봉이면서 종가가 5이평 위에서 끝나면 매수신호
매도는
음봉이면서 종가가 5이평 아래에서 끝나면 매도신호
부탁합니다.
2021-11-25
1182
글번호 153920