커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1642
글번호 230811
답변완료
질문드립니다
1번 2번 3번 4번
시스템 식으로 매수 신호만 으로
1번 매수화살표 2번 3번 4번 신호
한지표에표시가 가능한지요
2022-10-09
1020
글번호 162857
답변완료
부탁드립니다
수고하십니다
번호 79095번 수식에서
1. Plot3 와 Plot6 이 종가가 교차 하면 선긋기 or (또는) 교차실패시 종가와 종가사이가
0.15되면선긋고 안되면 선긋지않는다
선은 봉4개까지만 긋는다 이때 data1 에도 같은 위치에 긋기
2. Plot3과 Plot4도 동일하게
3. Plot6과 Plot1 도 동일하게 수식 부탁드립니다
2022-10-09
1093
글번호 162856
답변완료
지표수정부탁드립니다
안녕하세요
항상 바쁘신중에도 빠른답변 감사합니다
아래수식 예스로 변환부탁 드립니다
1 valuewhen(1,date!=date(1)(h+l)/2)
2 if (npredayclose(1) > npredayopen(1), (npredayhigh(1)+npredaylow(1)+npredayclose(1)+npredayhigh(1))/4,
if (npredayclose(1) < npredayopen(1), (npredayhigh(1)+npredaylow(1)+npredayclose(1)+npredaylow(1))/4,
(npredayclose(1)+npredaylow(1)+npredayclose(1)+npredayclose(1))/4)))
수고하세요
2022-10-08
1083
글번호 162855
답변완료
문의 드립니다
1.
input : 익절틱수(160),손절틱수(100);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("ss",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("ss1",AtStop,EntryPrice+10);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("sss1",AtStop,EntryPrice+10);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b8",AtStop,NextBarOpen+PriceScale*10);
Sell("s8",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("bb",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("bb1",AtStop,EntryPrice+10);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b9",AtStop,NextBarOpen+PriceScale*10);
Sell("s9",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("bbb",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("bbb1",AtStop,EntryPrice+10);
if NextBarSdate != sDate Then
{
if NextBarOpen == C Then
{
Buy("bsave",AtStop,NextBarOpen+PriceScale*10);
Sell("ssave",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen == C Then
{
ExitLong("bsave1",AtStop,NextBarOpen-PriceScale*10);
ExitShort("ssave1",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("ssave11",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("bsave11",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
----------
2.
input : 익절틱수(180),손절틱수(100);
var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False);
var : ST(0),ET(0),entry(0);
if sDate != sDate[1] Then
{
DD = DayOfWeek(Sdate);
Year = Floor(Sdate/10000);
V1 = (10000 * Year) + (100 * 3) + 1;
V2 = 15 - dayofweek(v1);
v3 = (10000 * Year) + (100 * 11) + 1;
v4 = 8 - dayofweek(v3);
Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4;
if summer == true Then
{
ST = 70000;
ET = 55000;
}
Else
{
ST = 80000;
ET = 65000;
}
}
if Year > 0 Then
{
IF ET > ST Then
SetStopEndofday(ET);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(ET);
}
if ((NextBarSdate != sDate and NextBarStime >= ST) or
(NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then
{
if NextBarOpen != c Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
}
Else
{
if h < DayOpen+PriceScale*10 Then
Buy("b1",AtStop,DayOpen+PriceScale*10);
if l > DayOpen-PriceScale*10 Then
Sell("s1",AtStop,DayOpen-PriceScale*10);
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
--------------
위 첨부파일 1번은 게시판 79099번의 3번째 올린 해외선물 일봉매매의 수식어입니다.
일봉매매에서 진입후 청산싯점이 부정확함에 분봉으로 작성을 문의한 바
2번으로 작성해 주셨고 그래프는 그 결과 입니다.
저가 생각한 수식어의 진입은 전일대비 당일시가의 전일비 상하 기준에따라
폭의 신호가 주어지는데 질의에대한 귀사에서 수정한 수식어에는 그러한 신호들이
아침7시 이후에 나오질않고 진입후 청산싯점은 한국시간으로 거의 AM 1시부터 3~4시전후
입니다.
위 수식어에 혹여 부분 수정이 가능한지 문의 드리고 아래의 수식어도 해외선물 분봉매매
로 변경 부탁드립니다.
input : 익절틱수(300),손절틱수(100);
var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False);
var : ST(0),ET(0),entry(0);
if sDate != sDate[1] Then
{
DD = DayOfWeek(Sdate);
Year = Floor(Sdate/10000);
V1 = (10000 * Year) + (100 * 3) + 1;
V2 = 15 - dayofweek(v1);
v3 = (10000 * Year) + (100 * 11) + 1;
v4 = 8 - dayofweek(v3);
Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4;
if summer == true Then
{
ST = 70000;
ET = 55000;
}
Else
{
ST = 80000;
ET = 65000;
}
}
if Year > 0 Then
{
IF ET > ST Then
SetStopEndofday(ET);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(ET);
}
if ((NextBarSdate != sDate and NextBarStime >= ST) or
(NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then
{
IF ET <= ST Then
{
SetStopEndofday(0);
}
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell ("bx",AtStop,NextBarOpen-PriceScale*10);
Buy("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell ("b1x",AtStop,NextBarOpen-PriceScale*10);
Buy ("s1x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell("b2x",AtStop,NextBarOpen-PriceScale*10);
Buy("s2x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*10);
Sell("s3",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell("b3x",AtStop,NextBarOpen-PriceScale*10);
Buy("s3x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b4",AtStop,NextBarOpen+PriceScale*10);
Sell("s4",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell("b4x",AtStop,NextBarOpen-PriceScale*10);
Buy("s4x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b1y",AtStop,NextBarOpen+PriceScale*10);
Sell("s1y",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
Sell("b1yy",AtStop,NextBarOpen-PriceScale*10);
Buy("s1yy",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b2y",AtStop,NextBarOpen+PriceScale*10);
Sell("s2y",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
Sell("b2yy",AtStop,NextBarOpen-PriceScale*10);
Buy("s2yy",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b3y",AtStop,NextBarOpen+PriceScale*10);
Sell("s3y",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
Sell("b3yy",AtStop,NextBarOpen-PriceScale*10);
Buy ("s3yy",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen == C Then
{
Buy("bz",AtStop,NextBarOpen+PriceScale*10);
Sell("sz",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen == C Then
{
Sell ("b1z",AtStop,NextBarOpen-PriceScale*10);
Buy ("s1z",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen == C Then
{
Buy("b2z",AtStop,NextBarOpen+PriceScale*10);
Sell("s2z",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen == C Then
{
Sell("b2zz",AtStop,NextBarOpen-PriceScale*10);
Buy("s2zz",AtStop,NextBarOpen+PriceScale*10);
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
}
-----------------------------------
아래는 참부파일2의 수식어 입니다.
해외선물 분봉 매매 수식어에서
7시 시가기준 진입신호에서 특정시간 ( 00 :00 )에 진입후 청산신호가 나타납니다.
체결내역의 파란사각형은 신호가 나오고 빨간사각형은 분봉차트에서 신호가 없네요.
또한 7시 장시작후 몇분내 당일청산신호(stopendofday)가 나옵니다.
input : 익절틱수(160),손절틱수(100);
var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False);
var : ST(0),ET(0),entry(0);
if sDate != sDate[1] Then
{
DD = DayOfWeek(Sdate);
Year = Floor(Sdate/10000);
V1 = (10000 * Year) + (100 * 3) + 1;
V2 = 15 - dayofweek(v1);
v3 = (10000 * Year) + (100 * 11) + 1;
v4 = 8 - dayofweek(v3);
Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4;
if summer == true Then
{
ST = 70000;
ET = 55000;
}
Else
{
ST = 80000;
ET = 65000;
}
}
if Year > 0 Then
{
IF ET > ST Then
SetStopEndofday(ET);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(ET);
}
if ((NextBarSdate != sDate and NextBarStime >= ST) or
(NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then
{
IF ET <= ST Then
{
SetStopEndofday(0);
}
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell ("bx",AtStop,NextBarOpen-PriceScale*10);
Buy("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell ("b1x",AtStop,NextBarOpen-PriceScale*10);
Buy ("s1x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell("b2x",AtStop,NextBarOpen-PriceScale*10);
Buy("s2x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*10);
Sell("s3",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell("b3x",AtStop,NextBarOpen-PriceScale*10);
Buy("s3x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b4",AtStop,NextBarOpen+PriceScale*10);
Sell("s4",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
Sell("b4x",AtStop,NextBarOpen-PriceScale*10);
Buy("s4x",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b1y",AtStop,NextBarOpen+PriceScale*10);
Sell("s1y",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
Sell("b1yy",AtStop,NextBarOpen-PriceScale*10);
Buy("s1yy",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b2y",AtStop,NextBarOpen+PriceScale*10);
Sell("s2y",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
Sell("b2yy",AtStop,NextBarOpen-PriceScale*10);
Buy("s2yy",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b3y",AtStop,NextBarOpen+PriceScale*10);
Sell("s3y",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
Sell("b3yy",AtStop,NextBarOpen-PriceScale*10);
Buy ("s3yy",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen == C Then
{
Buy("bz",AtStop,NextBarOpen+PriceScale*10);
Sell("sz",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen == C Then
{
Sell ("b1z",AtStop,NextBarOpen-PriceScale*10);
Buy ("s1z",AtStop,NextBarOpen+PriceScale*10);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen == C Then
{
Buy("b2z",AtStop,NextBarOpen+PriceScale*10);
Sell("s2z",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen == C Then
{
Sell("b2zz",AtStop,NextBarOpen-PriceScale*10);
Buy("s2zz",AtStop,NextBarOpen+PriceScale*10);
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
}
2022-10-12
1000
글번호 162854
답변완료
시스템식 종목 검색식으로 부탁드립니다
AA=eavg(C, 125) >= eavg(C, 5) and eavg(C, 5) >= eavg(C, 20);
//상승초입
CC=(97<=disparity(5)) and (disparity(5)<=103);
DD=(97<=disparity(20)) and (disparity(20)<=103);
EE=(97<=disparity(60)) and (disparity(60)<=103);
//이평 압축
FF=C>C(1); //상승마감
GG=V>eavg(V(1), 5)*2; // 거래량
HH=O>=C; //음봉
AA and CC and DD and EE and FF and GG
종목검색
시스템식 매수 신호만 부탁드립니다
2022-10-08
1234
글번호 162853
답변완료
수식 수정좀 부탁합니다.
국선 전일 종가 기준 2포 이상 상승된 가격으로 당일 시초가격이 형성되면 시초가에서 바로 매도 진입하는 수식을 작성해보았는데 전일 종가 기준 2포 이상 상승 출발인데도 매도 진입이 안됩니다.
아래 수식 어디가 잘못된 것인지 수정좀 부탁합니다.
if DayClose(1)+2 <= DayOpen and NextBarSdate != Sdate Then
Sell("s",AtMarket);
2022-10-08
932
글번호 162852
답변완료
검색
항상감사합니다
1]
고가높이고,고가높이고 올라가던가던캔들이
앞(이전)고가 못가고 앞(이전)저가 깰때
이전(앞)캔들고가에 고가표시 해주십시요!
2]
저가깨고저가깨고 하락하던캔들이
앞저가안깨고 앞고가 높일때
앞(이전)저가에 저가표시 해주십시요!
2022-10-08
1147
글번호 162850
매치다는 님에 의해서 삭제되었습니다.
2022-10-08
22
글번호 162849
답변완료
추가 질문 드립니다
이 수식을 data2와 data3에서도 적용하고싶은데 가능한지 여쭈어봅니다.
Input : Period1(600);
var : DJ(0);
var1 = ma(C,Period1);
DJ = DateToJulian(CurrentDate)-2;
IF DayOfWeek(CurrentDate) == 1 Then
DJ = DJ-2;
if sDate >= JulianToDate(DJ) Then
plot1(var1,"이평");
ps: c 대신에 data2(c)를 넣어서 해보고 다른 수치를 바꿔보고 했는데 안되네요;
늘 감사하게 생각하고 있습니다.
2022-10-12
1038
글번호 162848