커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
4355
글번호 230811
답변완료
문의 드립니다
아래의 수식중 4차청산에 400틱 수익실현이 아닌 3차 청산 이후에 최고점을 찍고서 50틱 하락시,3차 청산 이후에 최저점을 찍고서 50틱 상승시로 청산 시점을 바꿔 주십시요
이 부분이요>>
ExitLong("4",atlimit,EntryPrice+PriceScale*400,"",1,1);
ExitShort("④",atlimit,EntryPrice-PriceScale*400,"",1,1);
Input : P1(1),P2(2);
var1 = ma(C,P1);
var2 = ma(C,P2);
if crossup(var1,var2) Then
buy("b",OnClose,def,4);
if CrossDown(var1,var2) Then
sell("s",OnClose,def,4);
if MarketPosition == 1 Then
{
ExitLong("1",atlimit,EntryPrice+PriceScale*100,"",1,1);
ExitLong("2",atlimit,EntryPrice+PriceScale*200,"",1,1);
ExitLong("3",atlimit,EntryPrice+PriceScale*300,"",1,1);
ExitLong("4",atlimit,EntryPrice+PriceScale*400,"",1,1);
}
if MarketPosition == -1 Then
{
ExitShort("①",atlimit,EntryPrice-PriceScale*100,"",1,1);
ExitShort("②",atlimit,EntryPrice-PriceScale*200,"",1,1);
ExitShort("③",atlimit,EntryPrice-PriceScale*300,"",1,1);
ExitShort("④",atlimit,EntryPrice-PriceScale*400,"",1,1);
}
2018-02-22
149
글번호 116827
답변완료
함수요청
안녕하세요?
함수요청드립니다.
매수: 일봉상 파라볼릭 매수신호 상태에서 60분봉 파라볼릭 매수신호에 진입
매도: 일봉상 파라볼릭 매도신호 상태에서 60분봉 파라볼릭 매도신호에 진입
2018-02-22
139
글번호 116826
답변완료
함수요청
안녕하세요?
시스템 트레이딩 설정-> 시스템 매매 설정-> 매매-> 매매가격에 진입과 청산가를 설정할 수 있도록 되어 있습니다.
변동성이 크고 해외거래소로 주문이 접수되다보니 미체결리스크가 있습니다.
시장가 지원이 되지 않는 홍콩선물거래소 상품들의 미체결리스크를 줄일 수 있는 방법(설정 및 함수)이 어떤 것이 있을련지요?
2018-02-22
134
글번호 116825
답변완료
재문의 드립니다.
Input : 매수가격(60.30),매도가격(60.00),당일수익틱수(100);
Var : N1(0),dayPl(0),당일수익(0),Xcond(false),Tcond(false);
var : T1(0),count(0);
당일수익 = PriceScale*당일수익틱수;
if (sdate != sdate[1] and stime >= 80000) or
(sdate == sdate[1] and stime >= 80000 and stime[1] < 80000) Then{
Tcond = true;
Xcond = false;
N1 = NetProfit;
T1 = TotalTrades;
}
if MarketPosition == 0 Then
count = TotalTrades-T1;
Else
count = TotalTrades-T1+1;
if (sdate != sdate[1] and stime >= 055000) or
(sdate == sdate[1] and stime >= 055000 and stime[1] < 055000) Then{
Tcond = false;
if MarketPosition == 1 Then
exitlong();
if MarketPosition == -1 Then
ExitShort();
}
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] and
(IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then
Xcond = true;
if Tcond == true and Xcond == false then{
if crossup(c,매수가격) Then{
buy("b",OnClose,def,1+count*2);
}
if CrossDown(c,매도가격) Then{
sell("s",OnClose,def,1+count*2);
}
}
if MarketPosition == 1 then{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
매수 매도 상향돌파 하향돌파는 빼고
매수가격 매도가격 지정한 가격에서 1틱 오르면 매수 1틱 내리면 매도
이 부분을 변경했으면 합니다.
부탁드립니다. 수고하세요.
2018-02-22
145
글번호 116824
답변완료
문의드립니다.
감사합니다.
1. 코딩 변환 부탁드립니다.
inputs:
MALength( 30 ),
DMILength( 14 ) ;
variables:
vDMIMinus( 0 ),
vDMIPlus( 0 ),
MA( 0 ),
DMILong( false ),
DMIShort( false ),
MALong( false ),
MAShort( false ) ;
vDMIMinus = DMIMinus( DMILength ) ;
vDMIPlus = DMIPlus( DMILength ) ;
MA = Average( Close, MALength ) ;
if CurrentBar > 1 then
begin
if vDMIPlus crosses over vDMIMinus then
begin
DMILong = true ;
DMIShort = false ;
end
else if vDMIPlus crosses under vDMIMinus then
begin
DMILong = false ;
DMIShort = true ;
end ;
if Close crosses over MA then
begin
MALong = true ;
MAShort = false ;
end
else if close crosses under MA then
begin
MALong = false ;
MAShort = true ;
end ;
if DMILong and MALong then
Buy this bar Close ;
if DMIShort and MAShort then
Sell this bar on Close ;
end ;
Indicator: DMI_MA RS
inputs:
MALength( 30 ),
DMILength( 14 ) ;
variables:
vDMIMinus( 0 ),
vDMIPlus( 0 ),
MA( 0 ),
DMILong( false ),
DMIShort( false ),
MALong( false ),
MAShort( false ),
MADiffPct( 0 ),
DMIDiff( 0 ) ;
vDMIMinus = DMIMinus( DMILength ) ;
vDMIPlus = DMIPlus( DMILength ) ;
MA = Average( Close, MALength ) ;
if CurrentBar > 1 then
begin
if vDMIPlus crosses over vDMIMinus then
begin
DMILong = true ;
DMIShort = false ;
end
else if vDMIPlus crosses under vDMIMinus then
begin
DMILong = false ;
DMIShort = true ;
end ;
if Close crosses over MA then
begin
MALong = true ;
MAShort = false ;
end
else if close crosses under MA then
begin
MALong = false ;
MAShort = true ;
end ;
if MA <> 0 then
MADiffPct = ( Close - MA ) / MA ;
DMIDiff = vDMIPlus - vDMIMinus ;
Plot1( MADiffPct, “MADiff%” ) ;
Plot2( DMIDiff, “DMIDiff” ) ;
if MALong then
begin
SetPlotBGColor( 1, Green ) ;
SetPlotColor( 1, Black ) ;
end
else
begin
SetPlotBGColor( 1, Red ) ;
SetPlotColor( 1, White ) ;
end ;
if DMILong then
begin
SetPlotBGColor( 2, Green ) ;
SetPlotColor( 2, Black ) ;
end ;
else
begin
SetPlotBGColor( 2, Red ) ;
SetPlotColor( 2, White ) ;
end ;
if DMILong and MALong then
begin
Plot3( “LongSig”, “Signal” ) ;
SetPlotBGColor( 3, Green ) ;
SetPlotColor( 3, Black ) ;
end ;
if DMIShort and MAShort then
begin
Plot3( “ExitSig” , “Signal” ) ;
SetPlotBGColor( 3, Red ) ;
SetPlotColor( 3, White ) ;
end ;
end ;
2018-02-22
169
글번호 116823
답변완료
수식문법
키움증권 수식관리자인데 예스트레이더 문법으로 변환하기 너무 어렵네요ㅠㅠ 부탁드려요
(((H+L)/2)+((predayhigh()+predaylow())/2))/2
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
(((DayHigh()+Daylow())/2)+((predayhigh()+predaylow())/2)+((npredayhigh(2)+npredaylow(2))/2))/3
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
(C + nPreDayClose(1) + nPreDayClose(2) + nPreDayClose(3) + nPreDayClose(4) )/ 5
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
A = (C + nPreDayClose(1) + nPreDayClose(2) + nPreDayClose(3) +
nPreDayClose(4) + nPreDayClose(5) + nPreDayClose(6) + nPreDayClose(7) +
nPreDayClose(8) + nPreDayClose(9))/10;
B = (DayClose() + nPreDayClose(1) + nPreDayClose(2) + nPreDayClose(3) +
nPreDayClose(4) + nPreDayClose(5) + nPreDayClose(6) + nPreDayClose(7) +
nPreDayClose(8) + nPreDayClose(9) + nPreDayClose(10) + nPreDayClose(11) +
nPreDayClose(12) + nPreDayClose(13) + nPreDayClose(14) + nPreDayClose(15) +
nPreDayClose(16) + nPreDayClose(17) + nPreDayClose(18) + nPreDayClose(19)
)/20;
(A+B)/2
------------위 연결---
a1 = (A+B)/2;
(a1+ B) /2
2018-02-22
218
글번호 116820
답변완료
함수요청
안녕하세요?
함수요청드립니다.
매수: 일봉상 ADX값이 20이상인 상태에서 직전 ADX값보다 크며, 일봉상 PDI > MDI인 상태에서
60분봉상 파라볼릭 매수신호
매도: 일봉상 ADX값이 20이상인 상태에서 직전 ADX값보다 크며, 일봉상 PDI < MDI인 상태에서 60분봉상 파라볼릭 매도신호
거래시간: 9시~16시(진입기준)
2018-02-22
150
글번호 116817
답변완료
코드의 오류...
아래 코드로 작성된 첨부 차트를 보시면, 새로운 문자열이 생성되면 과거의 문자열은 지워져야 하는데 지워지지 않고 있습니다. 왜 그런지 오류를 좀 찾아 주시면 감사하겠습니다.
그리고 또 한 가지는 제 컴퓨터의 시간을 거래소 시간과 동기화 시키는 방법을 알고 싶습니다. 혹시 아신다면 좀 알려 주시면 감사하겠습니다.
var : AA(0,data2),BB(0,data3),cc(0,data1);
var: str1(""),str2(""),tx1(0),tx2(0),tx3(0);
AA = data2(C);#외국인
BB = data3(C);#개인
CC = -(AA+BB);#기관
var1=(aa-aa[1])*(bb-bb[1]);
var2=(aa-aa[1])*(cc-cc[1]);
if var1<0 and var2>0 then plot1(400);
else plot1(0);
#if var2>0 then plot2(400);
# else plot2(0);
var10=c-c[1];
var11=(aa-aa[1])/100;
str1="소극";
if var10*var11>0 then str1="적극";
str2="하락";
if var11>0 then str2="상승";
text_delete(tx1);
text_delete(tx2);
text_delete(tx3);
tx1=text_new(sdate[20],stime[20],l[20]-0.25,str1);
tx2=text_new(sdate[20],stime[20],l[20]-0.50,str2);
tx3=Text_New(sdate[20],stime[20],l[20]-0.75,NumToStr(var11,1));
2018-02-22
182
글번호 116815
답변완료
문의드립니다.
선물차트 기준으로 문의드립니다.
틱차트에 5분봉차트의 삼각가중평균20선(이하 a라 함)을 나타내서, 틱차트의 가중이동평균 20선(이하 b라 함)과 비교하여 b가 a선 위에 있으면 그 사이를 빨강색 색채우기하고, b가 a선 아래에 있으면 그 사이를 파란색으로 채우기 하고자 합니다.
분봉차트의 시간주기와 기간값, 가중이평 기간값은 수정가능하게 부탁드립니다.
수식을 어떻게 작성해야 하는지요? 부탁드립니다.
항상 감사드립니다. 수고하세요!!!
2018-02-22
169
글번호 116811