커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7717
글번호 230811
답변완료
수식
수정부탁드립니다
청산후 바로재진입이되는데 수정부탁드립니다
//************************************************************************************************************************
If (stime > 91000 and stime < 113000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
if BarsSinceExit(1) > 1 then { ##청산신호 후에 1봉이 경과 할때까지 재진입을 금지하라
if stime>=090100 and Stime< 150300 and marketposition==0 then
if C > H[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
buy("매수");
if MarketPosition == 1 Then
sell("반대매도",AtStop,L[BarsSinceEntry]-0.5-PriceScale); ##진입봉의 고가는 H[BarsSinceEntry] if MarketPosition == -1 Then buy("SB",AtStop,H[BarsSinceEntry]+PriceScale);
##매도진입후 매도진입봉의 고가+1틱이상의 시세가 발생하면 매도로 전환
##진입봉의 저가는 L[BarsSinceEntry] if MarketPosition == 1 Then sell("BS",AtStop,L[BarsSinceEntry]-PriceScale);
##매수진입후 매수진입봉의 저가-1틱 이하의 시세가 발생하면 매수로 전환
if C < L[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
sell("매도");
if MarketPosition == -1 Then
buy("반대매수",AtStop,H[BarsSinceEntry]+0.7+PriceScale);
}
}
If (stime > 110000 and stime < 140000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
Inputs: PercentRLen(10), OverSold(10), OverBought(90), Trigger(62);
Variables: PcntR(0), AvgValue(0), Setup1(False), Setup2(False);
PcntR = PercentR(PercentRLen);
AvgValue = MA(Close, PercentRLen);
If PcntR < OverSold Then
Setup1 = True;
If PcntR > OverBought Then
Setup1 = False;
If PcntR > OverBought Then
Setup2 = True;
If PcntR < OverSold Then
Setup2 = False;
If Setup1 AND AvgValue > AvgValue[1] AND Crossup(PcntR,Trigger) and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then Begin{
Setup1 = False;
Buy ("11시이후매수");
}
End;
If Setup2 AND AvgValue < AvgValue[1] AND CrossDown(PcntR, Trigger) and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then Begin{
Setup2 = False;
}
End;
If (stime >= 100000 and stime < 145000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
Inputs: Length1(5),Length2(3),Length3(3),OverSold11(30),OverBought11(70);
Variables: KLine(0), DLine(0);
Var : value(0);
KLine = StochasticsK(Length1,Length2);
DLine = StochasticsD(Length1,Length2,Length3);
If Crossup(KLine[5], DLine[5]) AND KLine[5] < OverSold11 AND DLine[5] < OverSold11 and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then ##스토매수 신호을 3개봉뒤에 신호나옴
buy("스토매수",AtStop,value);
If (stime >= 100000 and stime < 135000) THEN {
If CrossDown(KLine, DLine) AND KLine > OverBought11 AND DLine < OverBought11 and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
sell ("스토매도",AtStop,value);
}
}
}
If (stime >= 90000 and stime < 150000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
Input : Period(12), Period1(5), Period2(5);
value1 = StochasticsK(Period,Period1);
value2 = StochasticsD(Period,Period1,Period2);
If CrossDown(value1, value2) Then {
var1 = C;#데드크로스시 발생시 초기값
var2 = var1[1]; # 직전 데드크로스 구간의 종가 중 최저가
}
#가장 최근 데드크로스 구간의 종가중 최저가 계산
if value1[1] < value2[1] Then{
if C < var1 Then
var1 = L;
}
if CrossUp(value1,value2) Then{
var3 = value1; #골든크로스시 value1값
var4 = var3[1];#직전골든크로스시 value1값
if var3 > var4 and var1 < var2 and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
buy("골든크로스시",atmarket);
}
}
If (stime >= 130000 and stime < 150000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
if min(c,O) > ma(c,3) and min(C,H) > ma(c,20) and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
buy("이평매수");
}
If (stime >= 110000 and stime < 150000) THEN {
if max(c,O) < ma(c,5) and max(C,H) > ma(c,20) and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
sell("이평매도");
}
If (stime >= 100000 and stime < 150000) THEN {
var : slowK1(0), slowD1(0), slowK2(0), slowD2(0);
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
slowK1 = stochasticsK(12,5);
slowD1 = stochasticsD(20,12,12);
slowK2 = stochasticsK(12,5);
slowD2 = stochasticsD(12,5,5);
if BarsSinceExit(1) > 3 then { ##청산신호 후에 1봉이 경과 할때까지 재진입을 금지하라
if stime>=100000 and Stime< 150300 and marketposition==0 then
if slowK1 > slowD1 and crossup(slowK2,slowD2) and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
buy("스토12");
//if CrossDown(slowK2,slowD2) and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
//ExitLong("청산매도");
}
}
SetStopProfittarget(1.0,PercentStop);
SetStopTrailing(0.05,1.0,PointStop);
SetStopLoss(1.0,PercentStop);
2011-06-16
615
글번호 39855
답변완료
지표 문의 드립니다.
수고많으십니다.
전일장의 고가,저가 대비 피보나치 수열을 적용한 채널지표 부탁드립니다.
감사합니다.
2011-06-16
681
글번호 39854
답변완료
문의
선물 만기일 이후 누적 수량
라인1. 외인 매수 -매도
라인2. 기관 매수 -매도
라인3. 개인 매수 -매도
라인4 1+2+3
매수 4 > 0 매수
매도 4 < 0 매도
가능한지 궁금합니다
2011-06-16
663
글번호 39850
답변완료
수식문의
수식 문의
직전봉이 양봉이면 매수 음봉이면 매도
매수 진입후 현재봉이 음봉 마감이면 청산후 신규매도
매도 진입후 현재봉이 양봉 마감이면 청산후 신규매수
감사합니다.
2011-06-16
712
글번호 39848
답변완료
사용자 함수
갭보정 이평과 RSI를 사용자 함수로 지정("GAP_Ma","GAP_RSI"로 정의)한뒤
지표식에서 일반이평 일반RSI처럼
아래와 같이
GAP_Ma(C,5)
GAP_Ma(C,10)
GAP_Ma(C,20)
GAP_RSI(10)
GAP_RSI(15)
GAP_RSI(20)
사용할수 있게 부탁드립니다
2011-06-16
652
글번호 39845
답변완료
전일비와 전일율 문의입니다
질문1)종합시세에서 전일율->{dayclose(1)/c[0]}/10 이 맞나요?
질문2)종합시세에서 전일비 산식이 궁금합니다.
질문3)전일 종가와 당일 시작가를 텍스트로 "차트창"에 표시하고 싶습니다. 되나요?
2011-06-16
677
글번호 39844
답변완료
매수매도 동시발생시
특정봉의 조건이 매수조건 매도조건을 동시에 발생시켜서 조건을 수정하지 않고
매수만 하고 싶은데요.
그래서 매도함수 조건에
buy("매수"); 일때
if condition1==true and isentryname("매수",1)!=1 then
exitlong();
이렇게 추가했는데요 매수매도가 일어나네요... 다른 방법이 없을까요?
2011-06-16
650
글번호 39841
답변완료
이평선+DMI 시스템식 문의
1.아래와 같은 식에서 정배열시 매수식에
+DMI(60) > -DMI(60) AND
+DMI(60) 20 이상 AND
+DMI(60) -DMI(60) 보다 이상 AND
ADX(60) 10 이상 AND
ADX(60) 전봉보다 상승전환시
빠른 답변 감사합니다
input : P1(10),P2(30),P3(60);
var1 = ma(C,p1);
var2 = ma(C,p2);
var3 = ma(C,p3);
Condition1 = var1 > var2 and var2 > var3;
Condition2 = var1 < var2 and var2 < var3;
if Condition1 == true and Condition1[1] == false AND Oi > Oi[60] Then
buy("정매수");
if Oi < Oi[60] Then
ExitLong("매수청산");
if Condition2 == true and Condition2[1] == false AND Oi > Oi[60] Then
sell("역배열매도");
if Oi < Oi[60] Then
ExitShort("매도청산");
2011-06-16
1067
글번호 39840
하루하루 님에 의해서 삭제되었습니다.
2011-06-16
11
글번호 39839