커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7656
글번호 230811
답변완료
스토캐스틱
스토캐스틱 슬로우(5.3.3) 보조지표를 사용하고 있는데요..
현재 제공되고 있는 지수이평을 단순이평 수식으로 부탁드립니다.
2012-05-02
478
글번호 50684
답변완료
30분봉 양봉시
선물 지수 30분봉이 양봉이면 매수 음봉이면 매도
진입은 신호가로 하고 1포인트 익절 1포인트 손절 수식 부탁드려요
매매는 수익이든 손실이든 한번입니다.
수고하세요^^
2012-05-02
488
글번호 50683
답변완료
문의드립니다.
안녕하세요.
5분봉 차트에서 전일 마지막봉(15시00)과 14시45분봉을 지정하는 수식을 알려주세요.
또 전전일 마지막봉과 14시45분봉도...
수고하세요.
2012-05-02
402
글번호 50682
답변완료
수식질문드립니다.
Input : occur(1),left(3),right(3),p(200);
var1 = SwingHigh(occur,c,left,right,p); // 전고
var2 = SwingLow(occur,c,left,right,p); // 전저
전저점과 전고점의 차이를 plot1으로
전고점의 ovb - 전저점의 ovb 를 plot2로
부탁드립니다.
2012-05-02
448
글번호 50681
답변완료
퇴출전략이 실행이 안됩니다.
안녕하세요.
수식이 맞는것 같은데, 실제로 시뮬레이션 하면 퇴출전략이 작동이 안되네요.
문제가 무엇인지 확인, 수정 부탁드립니다.
==============================================================================
Input : Period1(100), Losscut(15), StopCut(120), st11(10), st12(10), st21(10), st22(10), stoptime(150500);
value1 = ma(O, Period1);
If sTime == 151500 and Open < Value1 Then
buy("매수", AtMarket);
If sTime == 151500 and Open > Value1 Then
Sell("매도", AtMarket);
If MarketPosition == 1 Then {
ExitLong("stopLoss", AtStop, EntryPrice-(PriceScale*Losscut));
Exitlong("Profit", AtLimit, EntryPrice+(PriceScale*StopCut));
if highest(H,BarsSinceEntry) >= EntryPrice+(PriceScale*st21) Then
exitlong("stop2step",AtStop,highest(H,BarsSinceEntry)-st22);
if highest(H,BarsSinceEntry) >= EntryPrice+(PriceScale*st11) Then
exitlong("stop1step",AtStop,highest(H,BarsSinceEntry)-st12);
}
If MarketPosition == -1 Then {
ExitShort("stopLoss", AtStop, EntryPrice+(PriceScale*Losscut));
ExitShort("Profit", AtLimit, EntryPrice-(PriceScale*StopCut));
If Lowest(L,BarsSinceEntry) <= EntryPrice-(PriceScale*st21) Then
ExitShort("stop2step",AtStop,Lowest(L,BarsSinceEntry)+st22);
If Lowest(L,BarsSinceEntry) <= EntryPrice-(PriceScale*st11) Then
ExitShort("stop1step",AtStop,Lowest(L,BarsSinceEntry)+st12);
}
SetStopEndofday(Var3-000001);
==============================================================================
궁굼한 것이 있는데요,
퇴출전략도 봉이 완성되어야 실제로 체결이 이루어지나요?
조건에 만족하면(예, 저의 시스템 스탑트레일링 전략처럼 10틱 이상 상승 후 10틱 내려오면 청산) 바로 청산이 이루어지는지, 아니면 조건이 만족한 봉이 완성된 후 주문이 나가는지 궁굼합니다. IF 문은 봉 완성이 되어야 주문이 발생된다는 말을 들었습니다.
2012-05-02
440
글번호 50680
답변완료
분할매입 분할청산
항상 빠른 답변 감사드립니다.
기본시스템입니다.
__________________________________________________________________________________
Input: FastLen(10),SlowLen(500),ChLen(30),TrailBar(160),ReBars(30),stopPer(1.0);
Vars: FastMA(0),SlowMA(0),LEntryPrice(0),SEntryPrice(0),LCount(-999),SCount(-999);
FastMA = ma(C , FastLen );
SlowMA = ma(C , SlowLen );
If CrossUp(FastMA , SlowMA) and index > 1 then {
LEntryPrice = Highest(H , TrailBar )[1];
LCount = index;
}
If MarketPosition <> 1 AND index < LCount + ChLen then
Buy ("Cross Over Buy", atstop,LEntryPrice,10);
If CrossDown(FastMA , SlowMA) and index > 1 then {
SEntryPrice = Lowest(L , TrailBar )[1];
SCount = index;
}
If MarketPosition <> -1 AND index < SCount + ChLen then
Sell ("Cross Under Sell", atstop,SEntryPrice,10);
If MarketPosition == 1 and IsEntryName("Cross Over Buy",0) == True then {
LCount = -999;
ExitLong ("LongTStop", atstop, Lowest(L , TrailBar ));
ExitLong("BLoss",AtStop,EntryPrice-1);
}
If MarketPosition == -1 and IsEntryName("Cross Under Sell",0) == True then {
SCount = -999;
ExitShort ("ShortTStop", atstop, Highest(H , TrailBar ));
ExitShort("SLoss",AtStop,EntryPrice+1);
}
____________________________________________________________________________
이 시스템을 가지고 분할매입 분할청산 식으로 고치려고 합니다.
아래의 식이 제가 만든것인데, 잘못된 부분 수정좀 부탁드립니다.
두번의 추가 진입을 허용하고, 추가진입 계약들은 각각의 진입명과
각각의 추가진입가격에 맞추어 이익청산과 손절을 하도록 할려고 합니다.
(각각의 추가진입가격을 어떻게 설정하는지 모르겠습니다)
또한 매진입마다 10계약식 진입, 각 청산마다 10계약식 청산하려고 합니다.
그럼 미리 감사드립니다.
_____________________________________________________________________________
Input: FastLen(10), SlowLen(500), ChLen(30), TrailBar(160), ReBars(30), stopPer(1.0);
Vars: FastMA(0), SlowMA(0),LEntryPrice(0), SEntryPrice(0), LCount(-999), SCount(-999);
FastMA = ma(C , FastLen );
SlowMA = ma(C , SlowLen );
If CrossUp(FastMA , SlowMA) and index > 1 then {
LEntryPrice = Highest(H , TrailBar )[1];
LCount = index;
}
If MarketPosition <> 1 AND index < LCount + ChLen then
Buy ("Cross Over Buy", atstop,LEntryPrice,10);
If CrossDown(FastMA , SlowMA) and index > 1 then {
SEntryPrice = Lowest(L , TrailBar )[1];
SCount = index;
}
If MarketPosition <> -1 AND index < SCount + ChLen then
Sell ("Cross Under Sell", atstop,SEntryPrice,10);
If MarketPosition == 1 and CurrentEntries == 1 Then
buy("Cross Over Buy_2",AtStop,EntryPrice+(ATR(30)*0.5),10);
If MarketPosition == -1 and CurrentEntries == 1 Then
sell("Cross Under Sell_2",AtStop,EntryPrice-(ATR(30)*0.5),10);
If MarketPosition == 1 and CurrentEntries == 2 Then
buy("Cross Over Buy_3",AtStop,EntryPrice+ATR(30),10);
If MarketPosition == -1 and CurrentEntries == 2 Then
sell("Cross Under Sell_3",AtStop,EntryPrice-ATR(30),10);
If MarketPosition == 1 and IsEntryName("Cross Over Buy",0) == True then {
LCount = -999;
ExitLong ("LongTStop", atstop, Lowest(L , TrailBar ),"Cross Over Buy",10,1);
ExitLong("BLoss",AtStop,EntryPrice-1,"Cross Over Buy",10,1);
}
If MarketPosition == -1 and IsEntryName("Cross Under Sell",0) == True then {
SCount = -999;
ExitShort ("ShortTStop", atstop, Highest(H , TrailBar),"Cross Under Sell",10,1);
ExitShort("SLoss",AtStop,EntryPrice+1,"Cross Under Sell",10,1);
}
If MarketPosition == 1 and IsEntryName("Cross Over Buy_2",0) == True then {
LCount = -999;
ExitLong ("LongTStop_2", atstop, Lowest(L , TrailBar ),"Cross Over Buy_2",10,1);
ExitLong("BLoss_2",AtStop,EntryPrice-1,"Cross Over Buy_2",10,1);
ExitLong("BProfit_2",AtLimit,EntryPrice+1,"Cross Over Buy_2",10,1);
}
If MarketPosition == -1 and IsEntryName("Cross Under Sell_2",0) == True then {
SCount = -999;
ExitShort ("ShortTStop_2", atstop, Highest(H , TrailBar),"Cross Under Sell_2",10,1);
ExitShort("SLoss_2",AtStop,EntryPrice+1,"Cross Under Sell_2",10,1);
ExitShort("SProfit_2",atlimit,EntryPrice-1,"Cross Under Sell_2",10,1);
}
If MarketPosition == 1 and IsEntryName("Cross Over Buy_3",0) == True then {
LCount = -999;
ExitLong ("LongTStop_3", atstop, Lowest(L , TrailBar ),"Cross Over Buy_3",10,1);
ExitLong("BLoss_3",AtStop,EntryPrice-1,"Cross Over Buy_3",10,1);
ExitLong("BProfit_3",AtLimit,EntryPrice+2,"Cross Over Buy_3",10,1);
}
If MarketPosition == -1 and IsEntryName("Cross Under Sell_3",0) == True then {
SCount = -999;
ExitShort ("ShortTStop_3", atstop, Highest(H , TrailBar),"Cross Under Sell_3",10,1);
ExitShort("SLoss_3",AtStop,EntryPrice+1,"Cross Under Sell_3",10,1);
ExitShort("SProfit_3",atlimit,EntryPrice-2,"Cross Under Sell_3",10,1);
}
2012-05-01
450
글번호 50679
답변완료
문의 드립니다...
분봉에서!
전일의 고가.저가의 중심값을 5지수이평이
3봉이상 지속 하락이탈시 매도
5봉이상 지속 상승이탈시 매수
당일 매수.매도 각 1회만....
전 일의 고가.저가의 중심값------
2일합의 고가.저가의 중심값 -
3일합의 고가.저가의 중심값 ----외부변수 처리
4일합의 고가.저가의 중심값 -
5일합의 고가.저가의 중심값------
5지수이평,3봉.5봉 외부변수처리 부탁드립니다.....
2012-05-01
415
글번호 50678
답변완료
간단한 지표식 문의 드립니다.
1.첫번째 질문
var1=if(c < c(1), v(1),0);
var2=if(c < c(2), v(2),0);
var3=if(c < c(3), v(3),0);
,,,,,,,,,
varn=if(c < c(n), v(n),0);
var1+var2+var3+...........+varn
위 식을 좀 간단한 구문으로 문장을 만들어 보고싶습니다.
즉, 특정기간 동안 종가기준으로 현재종가보다 높은종가 였을때의 거래량의 합을
의미합니다.
2.두번째 질문
위 내용을 분봉에 나타내고 싶습니다.
분봉에 나타낼때 당일 첫봉거래량부터 현재거래량까지 거래량으로 하나 만들고 싶고,,,
3.세번째 질문
분봉에 나타낼때 전일 첫봉거래량부터 현재거래량까지 거래량으로 하나 만들고 싶습니다.
항상 친절한 답변에 감사드립니다.
2012-05-01
489
글번호 50677
답변완료
print 함수 되나요?
우선 제꺼에선 안되고 있구요,
글을 검색해보니 2010년 5월에 안된다는 것도 같다가 2011년엔 된다는것도 같고..
당췌 모르겠습니다. print 함수 되는건가요?
되면 위치는 어디에 저장되나요? YesLang 폴더에 없던데요.
2012-05-01
443
글번호 50676