커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식 부탁드립니다.

가.스토케스틱 슬로우(12,5,5) %K와 %D가 일정기준(30)이하에서 %K가 %D보다 밑에서 하향하다가 상승전환하여 %K가 %D를 1차상향돌파 한 후 %K가 %D를 다시 하향이탈했다가 다시 %K가 %D를 2차상향돌파 할 때의 매수신호 수식 나.단, 가의 조건에서 %K가 %D보다 밑에서 하향하다가 1차상승전환시의 %K 변곡저점보다 %K가 %D를 2차상향돌파하기전에 발생한 %K의 2차변곡저점이 높아야 한다는 조건과 1차상향돌파봉과 2차상향돌파봉간의 봉수는 20봉이내라는 수식 추가요망 상기내용을 만족하는 신호수식을 부탁드립니다
프로필 이미지
해피오
2023-02-02
967
글번호 165946
검색

팔보채 님에 의해서 삭제되었습니다.

프로필 이미지
팔보채
2023-02-02
18
글번호 165944
지표
답변완료

문의 드립니다.

현재 봉의 종가가 전봉의 고가를 넘기면 매수 진입 청산은 현재 봉의 종가가 전봉의 고가를 아래로 돌파 시 매도 청산 완료 현재 봉의 종가가 전봉의 저가를 아래로 돌파하면 매도 진입 청산은 현재 봉의 종가가 전봉의 저가를 위로 돌파 시 매수 청산 완료 매수 진입과 매도 진입 각각 나누어 부탁드립니다.
프로필 이미지
선물대장
2023-02-02
645
글번호 165939
시스템
답변완료

일봉상 패스트 스토캐스틱으로 종목검색식 부탁드립니다..

안녕하세요.. 패스트 스토캐스틱 지표수식으로 52일의 최고, 최저가로 종목을 검색하고 싶은데요.. 키움에서 지표는 만들었는데 종목검색은 할 수가 없어서 문의드립니다.. A=(C-lowest(L,52))/(highest(H,52)-lowest(L,52))*100; B=EAVG(A,5); D=EAVG(A,20); Crossup(B,D) 패스트 스토캐스틱 52일의 최고, 최저가의 5이평이 20이평을 골든크로스하는 종목으로 검색식 부탁드립니다.. 감사합니다..
프로필 이미지
흙발고쇼미
2023-02-02
664
글번호 165935
종목검색
답변완료

함수요청

안녕하세요? 아래의 전략에 대해 스크립트 작성 요청드립니다. 국내선물 1분봉으로 일중거래를 하고자 합니다. 1. data2 전영업일 종가 > data1의 시가 > data1의 전영업일 종가이면 당일 시가선 기준으로 2번 연속 돌파되면 익봉 시가 매수 당일 시가선 기준으로 2번 연속 이탈되면 익봉 시가 매수청산 당일 시가선 기준으로 4번 연속 돌파되면 익봉 시가 매수청산 100ma 돌파 및 이탈시 익봉 시가 매수청산 2. data2 전영업일 종가 < data1의 시가 < data1의 전영업일 종가이면 당일 시가선 기준으로 2번 연속 이탈되면 익봉 시가 매도 당일 시가선 기준으로 2번 연속 돌파되면 익봉 시가 매도청산 당일 시가선 기준으로 4번 연속 이탈되면 익봉 시가 매도청산 100ma 돌파 및 이탈시 익봉 시가 매도청산 3. data1의 시가 > data2 전영업일 종가 > data1의 전영업일 종가이면 당일 시가선 기준으로 2번 연속 돌파되면 익봉 시가 매도 당일 시가선 기준으로 2번 연속 이탈되면 익봉 시가 매도청산 당일 시가선 기준으로 4번 연속 돌파되면 익봉 시가 매도청산 100ma 돌파 및 이탈시 익봉 시가 매도청산 4.data1의 시가 < data2 전영업일 종가 < data1의 전영업일 종가이면 당일 시가선 기준으로 2번 연속 이탈되면 익봉 시가 매수 당일 시가선 기준으로 2번 연속 돌파되면 익봉 시가 매수청산 당일 시가선 기준으로 4번 연속 이탈되면 익봉 시가 매수청산 100ma 돌파 및 이탈시 익봉 시가 매수청산 아침에 시가가 결정되면 1~4번 가운데 1개의 시나리오를 적용할 것입니다. 청산조건은 or이며 15:20에는 강제청산입니다.
프로필 이미지
흰둥이아빠
2023-02-02
624
글번호 165934
시스템
답변완료

지표문의

1.누적upvol ,누적downvol 5분봉에서 누적upvol-누적downvol 가감해서 매시간마다누적 표시 되게끔 작성 좀해 주세요 9시에서 10시 그다음 초기화 하고 10시에서 11시 매시간 마다 오후4시 까지 2.그럼 즐거운 하루 되세요
프로필 이미지
성공예견
2023-02-02
688
글번호 165933
지표
답변완료

최고가발생종목검색

일봉에서 10봉이내에 5봉최고가가 발생한 종목 검색 부탁드립니다
프로필 이미지
팔보채
2023-02-02
658
글번호 165932
종목검색
답변완료

문의 드립니다.

아래는 게시판 80595 질답 내용입니다. 180분 캔들을 매매에 사용중인데 180분봉 완성시 그다음 시가 청산후 30분후에 진입신호가 적용되질 않습니다. 보완해야할 것이 있는지 문의 드립니다. 1 현재 진입이 완성봉에서 값이 셋팅되서 다음봉 미완성시에 발생하는 내용입니다. atstop,atlimit으로 봉완성시 값이 셋팅이 되면 다음봉 미완성시에 신호발생을 제어할 수 없습니다. 또한 if문이 봉완성기준입니다. 미완성시에 청산시점에서 30분이후로 지정이 불가능합니다. 문의하신 내용이면 시가에 청산이 발생하면 봉단위로 30분이후 봉부터 진입이 발생하게만 작성이 됩니다. 올리신 식이 봉완성시 진입이 있으면 다음봉 시가에서 청산을 모두 하므로 봉완성시 진입이 있으면 다음진입은 30분봉 이상 경과한 다음봉부터 신호가 발생하게 됩니다. input : starttime(160000),endtime(80000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(0); var : s1(0),d1(0),tm(0),trade(False),tt(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; Trade = true; } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; } input : 익절틱수(0),손절틱수(0); if MarketPosition != 0 Then { Trade = False; TT = TM; } Else { Trade = true; } if Trade == False and TM >= TT+30 Then Trade = true; if NextBarSdate != sDate and Trade == true Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b1",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx1",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b2",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx2",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b3",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx3",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b4",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx4",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b5",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx5",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b6",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx6",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b7",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx7",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b8",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx8",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b9",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx9",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b10",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx10",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b11",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx11",AtMarket); if NextBarSdate != sDate and Trade == true Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s1",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx1",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s2",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx2",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s3",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx3",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s4",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx4",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s5",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx5",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s6",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx6",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s7",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx7",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s8",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx8",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s9",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx9",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s10",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx10",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s11",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx11",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------ input : starttime(160000),endtime(80000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(0); var : s1(0),d1(0),tm(0),trade(False),tt(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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; hh = h; ll = l; h1 = hh[1]; l1 = ll[1]; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; Trade = true; } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; } input : 익절틱수(0),손절틱수(0); if MarketPosition != 0 Then { Trade = False; TT = TM; } Else { Trade = true; } if Trade == False and TM >= TT+30 Then Trade = true; if NextBarSdate != sDate and Trade == true Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b1",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx1",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b2",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx2",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b3",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx3",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b4",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx4",AtMarket); if NextBarOpen != C and Trade == true Then { Buy("b5",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx5",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b6",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx6",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b7",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx7",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b8",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx8",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b9",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx9",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b10",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx10",AtMarket); if NextBarOpen == C and Trade == true Then { Buy("b11",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx11",AtMarket); if NextBarSdate != sDate and Trade == true Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s1",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx1",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s2",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx2",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s3",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx3",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s4",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx4",AtMarket); if NextBarOpen != C and Trade == true Then { Sell("s5",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx5",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s6",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx6",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s7",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx7",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s8",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx8",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s9",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx9",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s10",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx10",AtMarket); if NextBarOpen == C and Trade == true Then { Sell("s11",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx11",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어의 캔들이 180분봉으로 가정했을때 시가청산후 진입신호를 매수는 동일상품의 캔들 1분봉 골든(5,20) 3회시 주문, 청산은 180분봉 완성후 시가청산 매도는 동일상품의 캔들 1분봉 데드(20,5) 3회시 주문, 청산은 180분봉 완성후 시가청산 으로 된 수식어를 추가로 부탁드리고자 합니다.
프로필 이미지
푸른
2023-02-02
826
글번호 165931
시스템
답변완료

수식 변환 요청드립니다

아래는 트레이딩 뷰에서 Mansfield Relative Strength지표입니다. 변환 부탁드립니다 //@version=3 // Use this indicator to compare how security is performing in compare with prefered index (SPX by default). // > 0 outperforming // < 0 underperforming // Works best for weekly, but can be applied to monthly and daily charts. It will be rather useless to use it in smaller timeframes // Apply it to SPX, industry index, sector index or other security in similar sector // UPDAT E 1: Added sector and industry as optional params. Leave them same as index if you don't want to use them study("Mansfield Relative Strength indicator") index = input(title="Index", type=symbol, defval="SP:SPX") sector = input(title="Sector (optional)", type=symbol, defval="SP:SPX") industry = input(title="Industry (optional)", type=symbol, defval="SP:SPX") ma_type = input(title="Which moving average to use?", defval="SMA", options=["SMA", "WMA", "EMA"]) len_daily = input(title="MA length for Daily", defval=200) len_weekly = input(title="MA length for Weekly", defval=52) len_monthly = input(title="MA length for Monthly", defval=10) len_other = input(title="MA length for all other periods", defval=52) val = close len = period == "W" ? len_weekly : (period == "D" ? len_daily : (period == "M" ? len_monthly : len_other)) ma_func(x, length) => ma_type == "WMA" ? wma(x, length) : (ma_type == "SMA" ? sma(x, length) : ema(x, length)) calc_mrs_func(x, ind, length) => ((x / security(ind, period, x)) / ma_func((x / security(ind, period, x)), length) - 1) * 10 mrs_index = calc_mrs_func(val, index, len) mrs_sector = calc_mrs_func(val, sector, len) mrs_industry = calc_mrs_func(val, industry, len) c = sign(mrs_index) + sign(mrs_sector) + sign(mrs_industry) bgcolor(c == 3 ? color(green, 80) : c == 2 ? color(green, 75) : c == 1 ? color(green, 70) : c == -1 ? color(red, 70) : c == -2 ? color(red, 75) : c == -3 ? color(red, 80) : gray) plot(mrs_index, linewidth=3, title="MRS index") plot(mrs_sector != mrs_index ? mrs_sector : na, linewidth=2, title="MRS sector") plot(mrs_industry != mrs_index ? mrs_industry : na, linewidth=1, title="MRS industry") hline(price=0, linestyle=dashed, title="Zero baseline")
프로필 이미지
dqzero
2023-02-02
976
글번호 165930
지표