커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6279
글번호 230811
답변완료
지표
항상감사합니다.
고+저/2부탁드립니다.
2
input : 타주기분(60);
var : S1(0),D1(0),TM(0),TF(0),tx1(0),tx2(0),tx3(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%타주기분;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or
(Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then
{
var1 = O;
Var2 = H;
Var3 = L;
tx1 = text_new(sDate,sTime,var1,"시:"+NumToStr(var1,2));
tx2 = text_new(sDate,sTime,var2,"고:"+NumToStr(var2,2));
tx3 = text_new(sDate,sTime,var3,"저:"+NumToStr(var3,2));
Text_SetStyle(tx1,2,1);
Text_SetStyle(tx2,2,1);
Text_SetStyle(tx3,2,0);
}
if h > Var2 Then
Var2 = h;
if l < Var3 Then
Var3 = l;
Plot1(var1,"시");
Plot2(var2,"고");
Plot3(var3,"저");
Text_SetLocation(tx1,sDate,sTime,var1);
Text_SetString(tx2,"고:"+NumToStr(var2,2));
Text_SetLocation(tx2,sDate,sTime,var2);
Text_SetString(tx3,"저:"+NumToStr(var2,2));
Text_SetLocation(tx3,sDate,sTime,var3);
}
2022-10-10
1199
글번호 162862
신대륙발견 님에 의해서 삭제되었습니다.
2022-10-11
39
글번호 162861
답변완료
수식부탁드립니다^^)
분봉에 선물옵션만기일 강세약세
2022-10-09
818
글번호 162860
알로우kim 님에 의해서 삭제되었습니다.
2022-10-11
33
글번호 162859
알로우kim 님에 의해서 삭제되었습니다.
2022-10-09
0
글번호 162858
답변완료
질문드립니다
1번 2번 3번 4번
시스템 식으로 매수 신호만 으로
1번 매수화살표 2번 3번 4번 신호
한지표에표시가 가능한지요
2022-10-09
1072
글번호 162857
답변완료
부탁드립니다
수고하십니다
번호 79095번 수식에서
1. Plot3 와 Plot6 이 종가가 교차 하면 선긋기 or (또는) 교차실패시 종가와 종가사이가
0.15되면선긋고 안되면 선긋지않는다
선은 봉4개까지만 긋는다 이때 data1 에도 같은 위치에 긋기
2. Plot3과 Plot4도 동일하게
3. Plot6과 Plot1 도 동일하게 수식 부탁드립니다
2022-10-09
1156
글번호 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
1137
글번호 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
1097
글번호 162854