커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

문의드립니다.

아래식을 신호는 제외하고 지표와 강조만을 예스로 부탁합니다. study(title="UT Bot", overlay = true) //CREDITS to HPotter for the orginal code. The guy trying to sell this as his own is a scammer lol. src = close keyvalue = input(3, title = "Key Vaule. 'This changes the sensitivity'", step = .5) atrperiod = input(10, title="ATR Period") xATR = atr(atrperiod) nLoss = keyvalue * xATR xATRTrailingStop = 0.0 xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss), iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss), iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss))) pos = 0 pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1, iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0))) xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue plot(xATRTrailingStop, color = xcolor, title = "Trailing Stop") buy = crossover(src,xATRTrailingStop) sell = crossunder(src,xATRTrailingStop) barcolor = src > xATRTrailingStop plotshape(buy, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white, transp = 0, size = size.tiny) plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, color= color.red,textcolor = color.white, transp = 0, size = size.tiny) barcolor(barcolor? color.green:color.red) alertcondition(buy, title='UT BOT Buy', message='UT BOT Buy') alertcondition(sell, title='UT BOT Sell', message='UT BOT Sell')
프로필 이미지
as8282
2020-04-08
1134
글번호 137689
지표
답변완료

사용하고 있는 수식중에서 4가지 정도 정말 궁금한사항이 있습니다.

쿠르드 오일 14분봉 차트를 활용하고 있습니다. 기본적인 컨셉은 RSI와 심리도의 저점에 진입해서일정 수준 반등시 청산하는 (역추세매매 컨셉) 것이 기본 논리로 작성하였고 부가적으로 일봉 RSI 중위부위(저점/고점 제외)에서만 적용 거래량도 적절한 수준일때 적용으로 변수를 반영한 수식이며 청산은 5가지 버전을 운용하고 있습니다. ( 목표가 도달시 청산 / 손절가도달시 청산, 상승후 하락시 청산, 하락후 반등시 청산 /주말청산 ) 1. 제가 원하는 수식이 제대로 구현되는 수식이 맞는지 검토 해주시고요 ..( 매수 진입 및 청산 수식 ) 2. RSI(7)<28 심리도(14)<36의 교집합 신호와 실제 시뮬레이션의 진입신호가 다름 ( 첨부사진 참조 ) 원인 및 이유 체크 요망 3. 아무리 생각해도 진입할수 없는 지점에서 진입이 되는 경우 ( 첨부사진 참조 ) 정말 모르겠어요.... 4. 일봉 RSI값의 변동 관련해서 문의드림니다. (첨부화일 3참조 ) 5 아래 수식에서 conditon1 에 매수 조건을 아래 if 문에 매수조건 부문에 넣으면 결과가 다르게 나옴니다... 무슨 차이가 있는지 알려주시면 감사하겠습니다. Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); ----------------------------------------------------------------------------------- 적용 수식 # 오일 14분봉 극단적 승률 버전 쉼 # 매수 진입 조건 변수 Input : RSIPeriod(7),RSI매수값(28),SimPeriod(14),심리도값(36); # RSI와 심리도 기간 및 값 변수 Input : N1(1),초기화(7); # 위 해당 조건 발생후 진입 유효 기간, 7일경과후 초기화 Input : 하락틱수(5); # 해당 조건 발생후 하락틱수만큼 하락후 진입 변수 Input : RSIPeriod1(8),A(80),B(45); # 일봉기준 RSI값이 해당변수안에 속해있을때 진입 변수 Input : 거래량1(600),거래량2(14000); # 해당 거래량1,2 사이에 속해 있을때 진입되는 변수 # 1일 1회 거래 # 청산 조건 변수 Input : CCI기간(20),CCI값(400); # CCI값에 의해 청산 수식 변수 Input : 즉시익절1(70),즉시손절1(90); # 익절값 손절값 변수 Input : N2(0.6),N3(0.05); # 상승후 본절청산 관련 수식 Input : tr수익(75),tr하락(25); # 트레일링 관련 수식 Input : N4(0.7),본전생각틱(12); # 하락후 본절청산 관련 수식 Input : N5(1),CCI값1(40); # 약 손절 관련 수식 var : cnt(0),SigSum(0),count2(0),RSIsig(0); Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0); var : idx(0), PreUpAvg(0), preDownAvg(0),RSIVv(0); Array : C1[100](0); var : CCIv(0),RSIv(0),Simri(0),BuySetup(false),DD(0),entry(0); CCIv = CCI(CCI기간); RSIV = RSI(RSIPeriod); Simri = Simrido(SimPeriod); if Bdate != Bdate[1] Then { for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; } PreUpAvg = UpAvg[1]; preDownAvg = DownAvg[1]; idx = idx + 1; } C1[0] = C; If idx == RSIPeriod1+2 Then { UpSum = 0; DownSum = 0; For Counter = 0 To RSIPeriod1 - 1 { UpAmt = C1[Counter] - C1[Counter+1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpSum = UpSum + UpAmt; DownSum = DownSum + DownAmt; } UpAvg = UpSum / RSIPeriod1; DownAvg = DownSum / RSIPeriod1; } If idx > RSIPeriod1+2 Then { UpAmt = C1[0] - C1[1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpAvg = (PreUpAvg * (RSIPeriod1 - 1) + UpAmt) / RSIPeriod1; DownAvg = (preDownAvg * (RSIPeriod1 - 1) + DownAmt) / RSIPeriod1; } If UpAvg + DownAvg <> 0 Then RSIvv = 100 * UpAvg / (UpAvg + DownAvg); Else RSIvv = 0; if bdate != bdate[1] Then { Entry = 0; Condition2 = true; } if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if TotalTrades > TotalTrades[1] and (IsExitName("즉시손절1",1) == true or IsExitName("본전청산1",1)) then Condition2 = false; Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); if MarketPosition == 1 then { BuySetup = false; if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and CCIv < CCI값 and C < O Then ExitLong("매수cci청산",OnClose); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then ExitLong("즉시익절1",OnClose); if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3); Else { ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); } if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1*N4 and C < O Then ExitLong("저점에서 올라와서 본전 청산",atlimit,EntryPrice+PriceScale*본전생각틱); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1 *N5 and CCIv >= CCI값1 and C < O Then ExitLong("저점에서 올라와서 약손절",OnClose); } if DayOfWeek(sdate) == 6 and ((NextBarSdate != sdate and NextBarStime >= 060000) or (NextBarSdate == sdate and NextBarStime >= 060000 and stime < 060000)) Then { ExitLong("주말매수청산"); ExitShort("주말매도청산"); } ps 정말 게시판에 올리지 않고 스스로 해결하고 싶은데 정말 공학적인 수식은 이해가 너무 어려워요 , 귀챦더라도 잘 봐주셔서 저의 고민을 해결해주셨으면 감사하겠습니다. 예스스탁으로 해외선물 돈벌고 싶어요..ㅠㅠ
프로필 이미지
이형지
2020-04-08
1011
글번호 137688
시스템
답변완료

지표수정부탁드립니다

input :카운팅시작일자(20200407), 카운팅시작시간(070000); var : Tcond(false); if sdate >= 카운팅시작일자 and stime >= 카운팅시작시간 Then Tcond = true; if Tcond == true Then { if (sdate != sdate[1] and stime >= 카운팅시작시간) or (sdate == sdate[1] and stime >= 카운팅시작시간 and stime[1] < 카운팅시작시간) Then { var1 = 0; var2 = 0; } if dayindex >= 0 Then{ if C > O Then var1 = var1+V; if C < O Then var2 = var2+V; if var1 > var2 Then{ plot1(var1,"양봉거래량합계",RED); plot2(var2,"음봉거래량합계",RED); } Else plot1(var1,"양봉거래량합계",BLUE); plot2(var2,"음봉거래량합계",BLUE); }} 상기수식에서 "양봉거래량합계-음봉거래량합계=거래량"으로 수식수정부탁드립니다.
프로필 이미지
수색대대
2020-04-08
1089
글번호 137687
지표
답변완료

안녕하세요

plot1(Histogrm,"RSI", Histogrm_Color); plot2(Histogrm,"RSI", blue); 이 플롯들에 plot3으로 plot(Signal_Line, title = "Signal", color = color.gray, style = plot.style_line) 추가 부탁드립니다. 감사합니다.
프로필 이미지
물고기
2020-04-08
1145
글번호 137684
지표
답변완료

시스템식 부탁해요

안녕하세요. 시스템식 부탁해요 4개의 시스템식을 하나의 식으로 부탁 함니다 (A or B) and (C or D) A식 Input : shortPeriod(5), longPeriod(20); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); } B식 Input : shortPeriod(10), longPeriod(30); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); } C식 Input : shortPeriod(20), longPeriod(30); value1 = ema(C, shortPeriod); value2 = ema(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); } D식 Input : shortPeriod(20), longPeriod(30); value1 = ema(C, shortPeriod); value2 = ema(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); }
프로필 이미지
zxc
2020-04-08
1073
글번호 137683
시스템
답변완료

분봉 거래량

안녕하세요..항상 감사합니다. 5분봉 차트에서, 첫봉이후에 첫봉의 거래량을 찾는 수식을 만들고 싶습니다.
프로필 이미지
디딤돌
2020-04-08
1017
글번호 137680
검색
답변완료

수식어 부탁드립니다.

매수의 조건 1. 캔들이 이동평균선 345분선 아래 2. 이격도 345 ( 98.5~99.5 ) 3. 3분 120분 골든크로스 청산의 조건 1. 이격도 345의 100.2 ------------------------------------------------ 매도의 조건 1. 캔들이 이동평균선 345분선 위 2. 이격도 345 ( 100.5~100.9 ) 3. 3분 20분 데드크로스 청산의 조건 1. 이격도 345의 100 이하 2. 3분 120분 골든크로스
프로필 이미지
푸른
2020-04-08
917
글번호 137679
시스템
답변완료

부탁 드립니다.

도움에 진심으로 감사 드립니다. 질문1) 수식1,2를 해선용으로 사용 하던 지표를 국내 주식용으로 사용 하고자 하오니 수정 부탁 드립니다. 질문2) 수식2를 타주기 틱용으로 부탁 드립니다. 미리 감사 드립니다. 수식1) input : Period(20),dv(2); var : cnt(0),TM(0); var : mav1(0),BBup1(0),BBdn1(0); var : TF2(0),sum2(0),mav2(0),SumSqrt2(0),Stdv2(0),BBup2(0),BBdn2(0); var : TF3(0),sum3(0),mav3(0),SumSqrt3(0),Stdv3(0),BBup3(0),BBdn3(0); var : TF4(0),sum4(0),mav4(0),SumSqrt4(0),Stdv4(0),BBup4(0),BBdn4(0); var : sum5(0),mav5(0); Array : C2[130](0),C3[130](0),C4[130](0); if bdate != Bdate[1] Then var1 = stime; if date != date[1] Then var2 = TM[1]; if stime >= var1 Then TM = TimeToMinutes(stime)-TimeToMinutes(var1); Else TM = TimeToMinutes(stime)+var2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF2 < TF2[1]) Then{ for cnt = 1 to 129{ C2[cnt] = C2[cnt-1][1]; } } C2[0] = C; if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF3 < TF3[1]) Then{ for cnt = 1 to 129{ C3[cnt] = C3[cnt-1][1]; } } C3[0] = C; if DayClose(Period-1) > 0 then{ sum4 = 0; for cnt = 0 to Period-1{ sum4 = sum4+DayClose(cnt); } mav4 = sum4/Period; SumSqrt4 = 0; For cnt = 0 To Period - 1 { SumSqrt4 = SumSqrt4 + (DayClose(cnt) - mav4) * (DayClose(cnt) - mav4); } Stdv4 = SquareRoot(SumSqrt4/ Period); } 수식2) input : Atime1(30),Period(20),dv(2); var : cnt(0),TM(0); var : mav1(0),BBup1(0),BBdn1(0); var : TF2(0),sum2(0),mav2(0),SumSqrt2(0),Stdv2(0),BBup2(0),BBdn2(0); var : TF3(0),sum3(0),mav3(0),SumSqrt3(0),Stdv3(0),BBup3(0),BBdn3(0); var : TF4(0),sum4(0),mav4(0),SumSqrt4(0),Stdv4(0),BBup4(0),BBdn4(0); var : sum5(0),mav5(0); Array : C2[60](0),C3[60](0),C4[60](0); if bdate != Bdate[1] Then var1 = stime; if date != date[1] Then var2 = TM[1]; if stime >= var1 Then TM = TimeToMinutes(stime)-TimeToMinutes(var1); Else TM = TimeToMinutes(stime)+var2; TF2 = TM%Atime1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF2 < TF2[1]) Then{ for cnt = 1 to 59{ C2[cnt] = C2[cnt-1][1]; } } C2[0] = C; if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF3 < TF3[1]) Then{ for cnt = 1 to 59{ C3[cnt] = C3[cnt-1][1]; } } C3[0] = C; if C2[Period-1] > 0 then{ sum2 = 0; for cnt = 0 to Period-1{ sum2 = sum2+C2[cnt]; } mav2 = sum2/Period; SumSqrt2 = 0; For cnt = 0 To Period - 1 { SumSqrt2 = SumSqrt2 + (C2[cnt] - mav2) * (C2[cnt] - mav2); } Stdv2 = SquareRoot(SumSqrt2/ Period); }
프로필 이미지
yes
2020-04-08
959
글번호 137678
지표
답변완료

질문 있습니다

질문이 있습니다. 1.시스템 보고서에 있는 최소필요금액은 어떻게 산출되는 건지 알 수 있을까요? 2. 이평선을 적용한 Crossup함수를 사용할때 일봉에서 분봉으로 변경하면, ()안에 들어가는 값들이 일봉 이평선에서 분봉 이평선으로 변경되나요?
프로필 이미지
파랭
2020-04-08
877
글번호 137677
시스템