커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
8231
글번호 230811
지표
답변완료

매물대

매물대를 구현할수 있게 프로그램 업할 계획은없나요.. 호가창을 보면 가격대별 체결량이표시되던데 분봉에서 이용할수 있도록 업 좀 부탁드립니다.
프로필 이미지
nadogaja
2011-08-07
751
글번호 41702
지표

2gloo 님에 의해서 삭제되었습니다.

프로필 이미지
2gloo
2011-08-07
72
글번호 41701
시스템
답변완료

시스템식 질문입니다

차트설정 종목1 타종목2 타종목3 타종목4 매수조건 타종목2 > 0 타종목3 > 0 타종목4 < 0 청산조건1 매수시 타종목2 종가 기억하여 타종목 종가 < 매수시타종목종가-0.3 청산조건2 매수시 타종목2 매수호가잔량을 기억하여 타종목 매수호가잔량 < 매수시타종목매수호가잔량 - 2000 수고하세요
프로필 이미지
파인애플
2011-08-07
677
글번호 41700
시스템
답변완료

시스템식수정부탁드림니다.

안녕하세요 현재의수식이 진입후 분명희 손실인데 이익으로 표시 되는 부분이 있어서 수정부탁드림니다. 선물3분봉 갯수 5000개 년 500p이익으로나오는데 상세하게보면 손실부분도 이익으로 표시가 되는군요 찾을방법이없네요 또한 SetStopEndofday 선정후 다시진입이되는데 이부분도 부탁드림니다. Input : af(0.02), maxAF(0.2); Var : value(0); value = sar(af,maxAF); Variables:Body(0),Highbody(0),Lowbody(0); Body = Abs(C-L); Highbody = Max(H,C); Lowbody = Min(O,C); if BarsSinceExit(0) > 1 then ##청산신호 후에 1봉이 경과 할때까지 재진입을 금지하라 //----------------------------------------------------------------------------------------------------------------- If ((dayindex == 0 and C >= dayopen+0.4) or (dayindex > 0 and CrossUp(c,dayopen+0.4))) and marketposition==0 Then { Buy("b",AtLimit,C); } If ((dayindex == 0 and C <= dayopen-0.4) or (dayindex > 0 and CrossDown(c,dayopen+0.4))) and marketposition==0 Then { sell("s"); } //------------------------------------------------------------------------------- Input : Period(10),DNSim(30),UPSim(70),A(0),A1(0),A2(0); var77 = Simrido(Period); if ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and var77 <= DNSim and C > O Then buy("b1"); if ((MarketPosition == 0) or (MarketPosition == -1 and C > 0)) and var77 >= UPSim and C < O Then sell("s1"); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C < value[1] and Body[1] > Ma(Body,10)[1]*2 then buy("b2",AtLimit,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C < value[2] and Body[2] > Ma(Body,10)[2]*2 then buy("b3",AtLimit,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C < value[3] and Body[3] > Ma(Body,10)[3]*2 then buy("b4",AtStop,O); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C < value[7] and Body[7] > Ma(Body,10)[7]*2 then buy("b6",AtLimit,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C < value[9] and Body[9] > Ma(Body,10)[9]*2 then buy("b7",AtStop,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C< value[7] and Body[7] > Ma(Body,10)[9]*2 then buy("b9",AtLimit,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C< value[8] and Body[8] > Ma(Body,10)[10]*2 then buy("b10",AtLimit,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C[5] < value[5] and Body[5] > Ma(Body,10)[10]*2 then buy("b11",AtLimit,C); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and C[7] < value[7] and Body[7] > Ma(Body,10)[10]*2 then buy("b12",AtLimit,C); If countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C[1] > Ma(C,10)[2] and Body[1] < Ma(Body,10)[1]*2 Then sell("s3"); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C < value[8] and Body[8] > Ma(Body,10)[8]*2 then Sell("s4"); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C < value[4] and Body[4] > Ma(Body,10)[4]*2 then Sell("s5",AtStop,H); If countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C[6] > Ma(C,10)[5] and Body[5] < Ma(Body,10)[5]*2 Then sell("s6"); If countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C[6] > Ma(C,10)[6] and Body[6] < Ma(body,10)[6]*2 Then sell("s7"); If countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C[7] > Ma(C,10)[7] and Body[7] > Ma(body,10)[7]*2 Then sell("s8"); If countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and C[10] > Ma(C,10)[10] and Body[10] < Ma(Body,10)[10]*2 Then sell("s9"); //------------------------------------------------------------------------------------------------------------------------------ Input : maPeriod(20), ROCPeriod(12), stoPeriod1(5), stoPeriod2(3), sPeriod(12), IPeriod(26),sigPeriod(9); var78 = BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2); var79 = ema(var78,sPeriod)-ema(var78,IPeriod); ##MACD_Sig값을 하향돌파하면 매도식 var80 = ema(Var79,sigPeriod); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and CrossDown(C,var80) Then Sell("s10"); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == 1 and C < 0)) and CrossDown(C,var79) Then Sell("s12"); //-------------------------------------------------------------------------------------------------------------------- var81 = max(dayhigh(1),dayhigh(2)); var82 = min(DayLow(1),daylow(2)); var83 = (var81+var82)/2; if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and crossup(c,var83) Then buy("bf1",AtLimit,L); if countif(MarketPosition!=0,1) == 0 and ((MarketPosition == 0) or (MarketPosition == -1 and C < 0)) and CrossUp(var81,var82) Then buy("b13",AtLimit,L); if stime == 151500 Then{ if NextBarOpen > (max(dayhigh,dayhigh(1))+min(daylow,daylow(1)))/2 And C < (max(dayhigh,dayhigh(1))+min(daylow,daylow(1)))/2 Then buy("b14",AtLimit,L); if NextBarOpen < (max(dayhigh,dayhigh(1))+min(daylow,daylow(1)))/2 And C > (max(dayhigh,dayhigh(1))+min(daylow,daylow(1)))/2 Then sell("s11"); } //---------------------------------------------------------------------------------------------------------------------- If (stime > 120000 and stime < 140000) THEN { input : P(10),Left(3),Right(3); var41 = ma(C,P); if SwingLow(1,var41,Left,Right,Left+Right+1) != -1 Then{ value43 = var41; value44 = value41[1]; if value43 > value44 and value44 > 0 Then buy("b15",AtLimit,L); } if SwingHigh(1,var41,Left,Right,Left+Right+1) != -1 Then{ value41 = var41; value42 = value41[1]; if value41 < value42 and value42 > 0 Then Buy("b19",AtLimit,L); } if SwingLow(1,var41,Left,Right,Left+Right+1) != -1 Then{ value43 = var41; value44 = value41[1]; if value43[1] < value44[1] and value44[1] > 0 Then buy("bd15",AtLimit,L); } if SwingHigh(1,var41,Left,Right,Left+Right+1) != -1 Then{ value41 = var41; value42 = value41[1]; if value41 > value42[2] and value42[1] > 0 Then Buy("bd19",AtLimit,L); } } //--------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------ Input : Period30(12), Period31(5), Period32(5); value91 = StochasticsK(Period30,Period31); value92 = StochasticsD(Period30,Period31,Period32); If CrossDown(value91, value92) Then { var91 = C;#데드크로스시 발생시 초기값 var92 = var91[1]; # 직전 데드크로스 구간의 종가 중 최저가 } #가장 최근 데드크로스 구간의 종가중 최저가 계산 if value91 < value92 Then{ if C < var91 Then var91 = C; } if CrossUp(value91,value92) Then{ var93 = value91; #골든크로스시 value1값 var94 = var93[1];#직전골든크로스시 value1값 if var93 > var94 and var91 < var92 and C > entryPrice Then buy("다이",AtLimit,C); } if IsEntryName("다이") Then{ if BarsSinceEntry == 10 and C < EntryPrice Then Sell("상승형다",AtLimit,H); } If (stime > 90000 and stime < 150000) THEN { if MarketPosition == 1 Then{ if Highest(C,BarsSinceEntry) >= EntryPrice+1 Then buy("ssgg1",AtStop,Highest(C,BarsSinceEntry)-0.05); } if MarketPosition == -1 Then{ if Lowest(L[1],BarsSinceEntry) <= entryPrice-1 Then Sell("bbgg1",AtStop,Lowest(L[1],BarsSinceEntry)+0.05); } } //------------------------------------------------------------------------------------- if ExitDate(1) == sdate and MarketPosition == 0 And #현재 무포지션 MarketPosition(1) == 1 And #직전거래 매수포지션 crossup(C,ExitPrice(1)) Then #진전거래의 청산가격을 상향돌파하면 재매수 buy("rebuy"); if ExitDate(1) == sdate and MarketPosition == 0 And #현재 무포지션 MarketPosition(1) == -1 And #직전거래 매도포지션 CrossDown(C,ExitPrice(1)) Then #직전거래의 청산가격을 상향돌파하면 재매도 sell("resell",AtLimit,H); if MarketPosition == -1 and IsEntryName("resell") Then{ if BarsSinceEntry == 6 and C > EntryPrice Then ExitShort("resell stop"); } if MarketPosition == 1 and IsEntryName("rebuy") Then{ if BarsSinceEntry == 6 and C < EntryPrice Then ExitShort("stop"); } //---------------------이익실현----------------------------------- If (stime >= 90000 and stime < 95000) THEN SetStopTrailing(0.02,1,PointStop); else If (stime > 94500 and stime < 115000) THEN SetStopTrailing(0.02,0.5,PointStop); else If (stime > 114000 and stime < 135000) THEN SetStopTrailing(0.02,0.5,PointStop); else If (stime > 120000 and stime < 142000) THEN SetStopTrailing(0.02,0.32,PointStop); else If (stime > 141000 and stime < 150000) THEN SetStopTrailing(0.02,0.5,PointStop); Else SetStopTrailing(0,0,0); SetStopProfittarget(1.0,PercentStop); SetStopLoss(1,PercentStop); SetStopEndofday(145900);
프로필 이미지
외국인
2011-08-07
889
글번호 41699
시스템
답변완료

시스템수정

Inputs: StartTme(1200), R66(False), R50(True), R33(True); Variables: NewHigh(0), NewLow(0), NewHighTime(0), NewLowTime(0), Price66(0), Price50(0), Price33(0), NoTradesToday(True), MP(0), LExitPrice(0), SExitPrice(0); {New Session Reset} If Date <> Date[1] Then Begin NewHigh=High; NewLow = Low; NewHighTime = TimeToMinutes(Time); NewLowTime = TimeToMinutes(Time); NoTradesToday = True; End; MP = MarketPosition; Condition1 = TimeToMinutes(Time) > TimeToMinutes(StartTme); If MP = 1 OR MP =-1 Then NoTradesToday = False; If Condition1 = False Then Begin {Highest High time and price} If High > NewHigh Then Begin NewHigh = High; NewHighTime = TimeToMinutes(Time); End; {Lowest Low time and price} If Low < NewLow Then Begin NewLow = Low; NewLowTime = TimeToMinutes(Time); End; {EntryPrice Setup} Price66 = NewLow + (NewHigh - NewLow) * .66; Price50 = (NewLow + NewHigh) / 2; Price33 = NewLow + (NewHigh - NewLow) * .33; End; If Condition1 AND NoTradesToday Then Begin {Long Entry} If NewHighTime > NewLowTime Then Begin If r66 Then Buy ("L66") Next Bar at Price66 Limit; If r50 Then Buy ("L50") Next Bar at Price50 Limit; If r33 Then Buy ("L33") Next Bar at Price33 Limit; End Else Begin {Short Entry} If r66 Then Sell ("S66") Next Bar at Price66 Limit; If r50 Then Sell ("S50") Next Bar at Price50 Limit; If r33 Then Sell ("S33") Next Bar at Price33 Limit; End; End; {Long Exit} If MP = 1 Then Begin If MP[1] <> 1 Then LExitPrice = EntryPrice - Average(Range, 4) * 2 Else LExitPrice = LExitPrice + (Low - LExitPrice) / 2; ExitLong Next Bar at LExitPrice Stop; End; {Short Exit} If MP = -1 Then Begin If MP[1] <> -1 Then SExitPrice = EntryPrice + Average(Range, 4) * 2 Else SExitPrice = SExitPrice - (SExitPrice - High) / 2; ExitShort Next Bar at SExitPrice Stop; End;
프로필 이미지
대두
2011-08-07
772
글번호 41698
시스템
답변완료

거래량에 대해서 질문1개

특정값의 거래량을 누적시켜 매물대를 만들려고 합니다. 예를 들어 선물270일 때 거래량 합을 변수"매물" 이라고 선언. var: 매물(0); if c==270 then 매물=매물+v; 위와 같이 식을 작성하였때 1분봉이 1분간 270, 269.95, 270.05, 의 가격을 넘나들었다면 가격이 270 이었을때 거래된 거래량만 변수 '매물'에 저장되는것인지 아니면 ,1분봉 종가가 270 이었때만 변수'매물'에 저장되는것인지 답변부탁드리고 시뮬과 실시간 챠트에서 위 로직을 실행했을때 차이가 나는지도 알려주요, 예를 들어 시뮬에서는 종가기준, 실시간 챠트에서는 특정된 가격대의 거래량이 누적 되는지 좀 자세히 알려주시면 감사합니다. 그리고 분봉에서 매물대를 표현할수 있는 로직 부탁드립니다.
프로필 이미지
nadogaja
2011-08-07
831
글번호 41697
시스템
답변완료

시스템식 질문입니다

하나의 매수식에서 옵션의 가격별로 매수 수량을 결정하고 싶습니다 가격 1 이하 3개 1이상 2이하 2개 2이상 1개 수고하세요
프로필 이미지
파인애플
2011-08-07
715
글번호 41696
시스템
답변완료

문의드립니다.

input : Atime(30),P(20),Dv(2); var : cnt(0),count(0),sum(0),mav(0),MiBBup(0),MiBBdn(0),Avgv(0),SumSqrt(0),Counter(0),Stdv(0); Array : CC[120](0); 이것이 무슨 뜻이고 어디가면 참조할수있나요?
프로필 이미지
두산위브
2011-08-07
818
글번호 41695
지표
답변완료

볼린저 밴드 주봉

안녕하십니까? 시스템 수식 부탁드립니다. 볼린저 밴드에서 1. kodex레버리지 2. 일봉, 주봉의 볼린저 밴드 활용 3. 매매는 일봉으로 하는데 3. 주봉상 볼린저 밴드 중심선을 상향돌파시 매수 4. 주봉상 볼린저 밴드 중심선을 하향 돌파시 매도 5. 단 매수시에는 다음 봉이 일봉상 중심선 위에 있을 경우만 매수 매도시에는 다음 봉이 일봉상 중심선 아래 있을 경우만 매도 조건이 어려울지 몰라도 부탁릅니다.
프로필 이미지
개미주주
2011-08-06
739
글번호 41694
시스템