커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1676
글번호 230811
답변완료
문의 드립니다.
1. 항셍(오전 10시 18분 ~ 오전 11시 40분), 나스닥(22시 30분 ~ 01시 10분) 골드(21시 ~22시 10분) 거래시간 지정
2. 매도신호가 나오는 캔들의 종가에 매도. 음봉일 때만 매도(양봉일 때는 안함)
3. 매수신호가 나오는 캔들의 종가에 매수. 양봉일 때만 매수(음봉일 때는 안함)
4. 매수와 매도, 모두1계약을 진입합니다.
항셍 10시 18분 ~ 10시 30분까지는 익절 30틱, 손절 30틱 / 10시 30분 ~ 11시 40분까지는 익절 50틱, 손절 30틱.
나스닥은 오후 22시 30분 ~ 01시 10분까지 익절 50틱, 손절 30틱
골드는 오후 21시 ~ 22시 10분까지 익절 20틱, 손절 15틱
5. 거래시간 종료시에 포지션이 있을 경우 수식에 따라 익절 또는 손절 종료함.
6. 익절 3회 연속, 또는 손절 3회 연속이면 당일 거래 종료.
아래에 수식은 일전에 문의한 것에 대해 답을 해주신 것입니다.
위 내용에 대한 수식으로의 변경을 할 경우, 추가나 수정해야 할 부분이 헷갈려서요. 답변 부탁드립니다.
늘 친절히 답변해주심에 감사드립니다.
input : StartTime(101500),EndTime(120000);
input : Length(20), D1(2);
var : Tcond(false);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
Tcond = true;
var1 = BollBandUp(Length,D1);
var2 = BollBandDown(Length,D1);
if Tcond == true Then
{
If CrossUP(H,var1) and c > o then
Buy("b",OnClose,DEF,2);
If CrossDown(L,Var2) and C < O then
Sell("s",OnClose,DEF,2);
}
if MarketPosition == 1 Then
{
ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*50,"",1,1);
ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*100,"",1,1);
ExitLong("Bl",AtStop,EntryPrice-PriceScale*3,"",1,1);
if CurrentContracts < MaxContracts and Highest(H,BarsSinceEntry) > EntryPrice+PriceScale*50 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*10);
}
if MarketPosition == -1 Then
{
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*50,"",1,1);
ExitShort("sp2",AtLimit,EntryPrice-PriceScale*100,"",1,1);
ExitShort("sl",AtStop,EntryPrice+PriceScale*3,"",1,1);
if CurrentContracts < MaxContracts and lowest(L,BarsSinceEntry) < EntryPrice-PriceScale*50 Then
ExitShort("str",AtStop,EntryPrice+PriceScale*10);
}
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);
}
}
2
24시는 0시 입니다.
input : StartTime(223000),EndTime(0);
input : Length(20), D1(2);
var : Tcond(false);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
Tcond = true;
var1 = BollBandUp(Length,D1);
var2 = BollBandDown(Length,D1);
if Tcond == true Then
{
If CrossUP(H,var1) and c > o then
Buy("b",OnClose,DEF,2);
If CrossDown(L,Var2) and C < O then
Sell("s",OnClose,DEF,2);
}
if MarketPosition == 1 Then
{
ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*50,"",1,1);
ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*100,"",1,1);
ExitLong("Bl",AtStop,EntryPrice-PriceScale*3,"",1,1);
if CurrentContracts < MaxContracts and Highest(H,BarsSinceEntry) > EntryPrice+PriceScale*50 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*10);
}
if MarketPosition == -1 Then
{
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*50,"",1,1);
ExitShort("sp2",AtLimit,EntryPrice-PriceScale*100,"",1,1);
ExitShort("sl",AtStop,EntryPrice+PriceScale*3,"",1,1);
if CurrentContracts < MaxContracts and lowest(L,BarsSinceEntry) < EntryPrice-PriceScale*50 Then
ExitShort("str",AtStop,EntryPrice+PriceScale*10);
}
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-10-07
1280
글번호 152745
답변완료
문의
input : Period1(10),Period2(20);
var : Hval1(0),Lval1(0),UPV1(0),MID1(0),DOWNV1(0);
var : Hval2(0),Lval2(0),UPV2(0),MID2(0),DOWNV2(0);
Hval1 = highest(H,Period1);
Lval1 = Lowest(L,Period1);
UPV1 = Hval1 - (Hval1-Lval1)/3;
MID1 = Lval1 + (Hval1-Lval1)/2;
DOWNV1 = Lval1 + (Hval1-Lval1)/3;
Hval2 = highest(H,Period2);
Lval2 = Lowest(L,Period2);
UPV2 = Hval2 - (Hval2-Lval2)/3;
MID2 = Lval2 + (Hval2-Lval2)/2;
DOWNV2 = Lval2 + (Hval2-Lval2)/3;
plot1(MID1,"중간선1");
plot2(MID2,"중간선2");
위 지료식 에서 중간선2가 중간선1을 상향돌파하는 종목검색식 부탁합니다
2021-10-07
980
글번호 152737
답변완료
부탁 드립니다~~^^
오늘 거래대금 100 억 이상 들어온 종목 중에서
5이평 > 60 이평
avg(C(1),5) < avg(C(4),5)
and
avg(C(1),5) < avg(C,5)
and
C(1) < C
and
O < C
이 부분이 부합 되는 종목을 찾고 싶습니다.
2021-10-07
1048
글번호 152734
회원 님에 의해서 삭제되었습니다.
2021-10-07
7
글번호 152730
답변완료
이격도 수식인데 수정 및 검수 부탁드림니다.
현 사용 수식 입니다.
이격도 매수값이 다른 수식 3개을 사용중입니다.
같은 나스닥 60분봉차트에 이격도 매수값 93 일때 96 일 때 98일때 (나머지 변수는 동일)
차트를 3개를 띄어서 적용하고 있는데요
한차트에 이격도매수값만 다른식들을 반영될수 있을까요???
예를들면 이격도 93 , 94, 95, 96, 97, 98 일때 적용되는 수식입니다.
원래 이렇게 하려면 6개 수식을 만들고 6개 차트를 열고 입력해야하는데요
그것을 하나의 수식과 하나의 차트로 적용될수 있게 수식 변경 부탁드릴께요~~~~
--- 기존 이격도 매수값(96)인 수식임 --------
# 나스닥 60분봉 차트 이격도 매수 진입 청산 버전 20210930
input : 이격도기간(50),이격도매수값(96),
input : 이격도청산값(100.5),하락틱수(300),손절틱수(500);
input : 추가매수횟수(2);
var1 = Disparity(이격도기간);
if MarketPosition == 0 and var1 < 이격도매수값 and V > V[1] and C < C[1] Then
Buy("b",OnClose,DEf,1);
if MarketPosition == 1 and MaxEntries < 추가매수횟수 Then
Buy("bb",AtLimit,LatestEntryPrice(0)-PriceScale*하락틱수);
if MarketPosition == 1 and var1 > 이격도청산값 Then
ExitLong("bx");
SetStopLoss(PriceScale*손절틱수,PointStop);
2021-10-07
930
글번호 152729
회원 님에 의해서 삭제되었습니다.
2021-10-07
0
글번호 152728
답변완료
틱단위 수식 작성에 도움 요청드립니다.
n틱 연속 매수발생이면 매수포지션 진입
n틱 연속 매도발생이면 매도포지션 진입
하루 손실 틱수 제한
히루 수익 틱수 제한
하루중 거래시간 시작시간과 종료시간 설정
2021-10-07
575
글번호 152724
러블리 님에 의해서 삭제되었습니다.
2021-10-07
14
글번호 152723
답변완료
수식
안녕하세요.
하기 조건에 대한 수식 요청드립니다.
Exit청산 후 청산봉에 진입 금지입니다. 청산봉 다음봉부터 진입 가능하도록 부탁드립니다.(일봉)
감사합니다.
2021-10-07
1524
글번호 152722