커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수정 부탁드립니다

안녕하세요! 지난번에 만들어 주신 수식 잘 사용하고 있습니다! 다름이 아니라 아래 식을 제가 분단위로도 선택할 수 있도록 외부변수로 수정을 부탁드립니다! 감사합니다! input : N(5); var1 = DateToJulian(CurrentDate); if var1 > 0 and DateToJulian(sDate) >= var1-N Then { Plot1(DayHigh(1)+(DayHigh(1)-DayLow(1)),"HL상"); Plot2(DayHigh(1)+(DayHigh(1)-DayLow(1)+0.1),"HL상1"); Plot3(DayLow(1)-(DayHigh(1)-DayLow(1)),"HL하"); Plot4(DayLow(1)-(DayHigh(1)-DayLow(1)-0.1),"HL하1"); }
프로필 이미지
qha71
2023-01-05
939
글번호 165114
지표
답변완료

수식수정

안녕하세요 수식 수정부탁드립니다 80159 수식을 아래와 같이 변경하고자 합니다 손익절.볼밴간 거리.삭제 date2 30분봉 매수 30분봉이 양봉이며 5일선위에 있고 매매는 2분봉으로함 2분봉에서 캔들이 볼밴 중심선 위에있고 Sw2선이 양선일때 매수 매도 Date 2 30분봉 음봉이며 이평5선 아래 매매 2분봉매매 볼밴중심선 아래서 Sw2선이 음선일때 매도 첨부파일 80159참조
프로필 이미지
아트정
2023-01-05
1206
글번호 165113
시스템
답변완료

수식부탁드립니다

macd 시그널 기준선으로 시그널 선이 기준선을 올라가면 매수 macd 시그널 기준선으로 시그널 선이 기준선 아래로 내려가면 매도 포지션으로 하고 싶습니다
프로필 이미지
스타그이상
2023-01-05
1065
글번호 165111
시스템
답변완료

수정 부탁합니다

안녕하세요^^ 맨 아래입니다 input:length(6); Var:j(0),jj(0),HH(0),LL(0),최종고가(0),최종저가(0),최종꼭지점(""),처리구분(""), TL1(0),Text1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL12(0),TL13(0),TL14(0),TL15(0),T(0),고점변곡(""),저점변곡(""); var : clr1(0),clr2(0),BE(0),SE(0); Array:고[10,4](0),저[10,4](0); // 1:가격,2:Index,3:sDate,4:sTime #==========================================# HH = IFF(0==1,data2(C),data2(H)); LL = IFF(0==1,data2(C),data2(L)); If data2(Index) == 0 Then { 고[1,1] = HH; 저[1,1] = LL; } Condition1 = data2(Highest(HH,length)) == HH and 최종고가 <> HH; Condition2 = data2(Lowest (LL,length)) == LL and 최종저가 <> LL; 처리구분 = ""; If Condition1 and Condition2 Then // 기간고점과 기간저점 동시 발생 { If 최종꼭지점 == "저점" Then { If 저[1,1] > LL Then 처리구분 = "저점처리"; Else 처리구분 = "고점처리"; } Else If 최종꼭지점 == "고점" Then { If 고[1,1] < HH Then 처리구분 = "고점처리"; Else 처리구분 = "저점처리"; } } Else If Condition1 Then 처리구분 = "고점처리"; Else If Condition2 Then 처리구분 = "저점처리"; #==========================================# If 처리구분 == "고점처리" Then { T = 1; 최종고가 = HH; // 신규고점을 체크하기 위해 저장 If 최종꼭지점 == "저점" Then { For j = 10 DownTo 2 { For jj = 1 To 4 { 고[j,jj] = 고[j-1,jj]; } } 고[1,1] = HH; 고[1,2] = data2(Index); 고[1,3] = data2(sDate); 고[1,4] = data2(sTime); TL1 = TL_New(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); If 1 == 1 Then { Text1 = Text_New(고[1,3],고[1,4],고[1,1],NumToStr(고[1,1],2)); Text_SetStyle(Text1, 0, 1); Text_SetColor(Text1,Red); } TL_SetSize(TL1,1); TL_SetColor(TL1,Gray); } Else If 고[1,1] < HH Then // 1번 고점보다 높은 고가 출현 { 고[1,1] = HH; 고[1,2] = data2(Index); 고[1,3] = data2(sDate); 고[1,4] = data2(sTime); TL_SetEnd(TL1,고[1,3],고[1,4],고[1,1]); // 시작점은 변동없고 끝점의 위치가 현재 봉으로 연장된 것임 If 1 == 1 Then { Text_SetLocation(Text1,고[1,3],고[1,4],고[1,1]); Text_SetString(Text1,NumToStr(고[1,1],2)); } } 최종꼭지점 = "고점"; } #==========================================# If 처리구분 == "저점처리" Then { T = -1; 최종저가 = LL; If 최종꼭지점 == "고점" then { For j = 10 DownTo 2 { For jj = 1 To 4 { 저[j,jj] = 저[j-1,jj]; } } 저[1,1] = LL; 저[1,2] = data2(Index); 저[1,3] = data2(sDate); 저[1,4] = data2(sTime); TL1 = TL_New(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); If 1 == 1 Then { Text1 = Text_New(저[1,3],저[1,4],저[1,1],NumToStr(저[1,1],2)); Text_SetStyle(Text1, 0, -1); Text_SetColor(Text1,Blue); } TL_SetSize(TL1,1); TL_SetColor(TL1,Gray); } Else If 저[1,1] > LL then { 저[1,1] = LL; 저[1,2] = data2(Index); 저[1,3] = data2(sDate); 저[1,4] = data2(sTime); TL_SetEnd(TL1,저[1,3],저[1,4],저[1,1]); If 1 == 1 Then { Text_SetLocation(Text1,저[1,3],저[1,4],저[1,1]); Text_SetString(Text1,NumToStr(저[1,1],2)); } } 최종꼭지점 = "저점"; } if T == -1 and T[1] != -1 Then { TL12 = TL_New(고[2,3],고[2,4],고[2,1],data2(sdate),data2(stime),고[2,1]); TL_Delete(TL13); TL13 = TL_New(고[1,3],고[1,4],고[1,1],data2(Sdate),data2(Stime),고[1,1]); TL_SetExtRight(TL13,true); TL_SetSize(TL13,2); TL_SetColor(TL12,clr1); TL_SetSize(TL12,2); clr1 = Pink; TL_SetColor(TL13,Pink); } if T == 1 and T[1] != 1 Then { TL14= TL_New(저[2,3],저[2,4],저[2,1],data2(sdate),data2(stime),저[2,1]); TL_Delete(TL15); TL15= TL_New(저[1,3],저[1,4],저[1,1],data2(sdate),data2(stime),저[1,1]); TL_SetExtRight(TL15,true); TL_SetColor(TL14,clr2); TL_SetSize(TL14,2); clr2 = LightBlue; TL_SetColor(TL15,clr2); TL_SetSize(TL15,2); } #================================================================# VAR:mav5(0),mav10(0),mav20(0),mav40(0),mav60(0),mav120(0); mav5=ma(c,5); mav10=ma(c,10); mav20=ma(c,20); mav40=ma(c,40); mav60=ma(c,60); mav120=ma(c,120); condition1=CountIf(mav10<mav20,20) >= 10 and t==1 and 저[1,1] <mav20[Index-저[1,2]] and 고[1,1]>mav20[Index-고[1,2]]; var:box1(0); if condition1 Then { Box1 = Box_New(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); Box_Setcolor(box1,MAGENTA); Box_Setfill(box1,true,100,true); } //박스가 저[1,1]에서 고[1,1]까지 그려지게 수정 부탁드립니다 //countif 조건은 역배열 상태에서 만족 하면 됩니다(저[1,1]확정부터가 아닌) //박스는 층층히 겹치는 부분을 없애주세요 //condition1 배열변수 가능하면 적용 부탁드립니다 감사합니다~
프로필 이미지
하늘거지
2023-01-05
1039
글번호 165110
지표
답변완료

변환좀 해주세요

바쁘신데 송구 합니다 . 아래의 트레이딩뷰의 지표를 예스로 변환좀 부탁 드립니다 . 가격캔들에 컬러를 넣도록 되어 있는것은 빼고 Heatmap Volume 만 보조지표로 만들도록 도움을 청합니다 . 감사합니다 . 이메일로 부탁드립니다 . cybersta11@ naver.com //@version=4 study(title="Heatmap Volume [xdecow]", shorttitle="HVol [xdecow]", max_bars_back=2000, format=format.volume) //------------------------------------------------------------------------------ // Inputs length = input(610, title="MA Length", type=input.integer, minval=2) slength = input(610, title='Std Length', type=input.integer, minval=2) cmode = input('Heatmap', 'Color Mode', options=['Heatmap', 'Up/Down']) zmode = input('Backgrounds', 'Display Heatmap Zones as', options=['None', 'Lines', 'Backgrounds', 'Both']) bcolor_enabled = input(true, 'Colored bars') osc = input(false, 'Show as oscillator') thresholdExtraHigh = input(4, title="Extra High Volume Threshold", type=input.float) thresholdHigh = input(2.5, title="High Volume Threshold", type=input.float) thresholdMedium = input(1, title="Medium Volume Threshold", type=input.float) thresholdNormal = input(-0.5, title="Normal Volume Threshold", type=input.float) //------------------------------------------------------------------------------ // Colors // heatmap colors chm1 = #ff0000 // extra high red chm2 = #ff7800 // high orange chm3 = #ffcf03 // medium yellow chm4 = #a0d6dc // normal chm5 = #1f9cac // low // heatmap colors chmthresholdExtraHigh = input(chm1, 'Heatmap Extra High') chmthresholdHigh = input(chm2, 'Heatmap High') chmthresholdMedium = input(chm3, 'Heatmap Medium') chmthresholdNormal = input(chm4, 'Heatmap Normal') chmthresholdLow = input(chm5, 'Heatmap Low') // up colors cupthresholdExtraHigh = input(#00FF00, 'Up Extra High') cupthresholdHigh = input(#30FF30, 'Up High') cupthresholdMedium = input(#60FF60, 'Up Medium') cupthresholdNormal = input(#8FFF8F, 'Up Normal') cupthresholdLow = input(#BFFFBF, 'Up Low') // down colors cdnthresholdExtraHigh = input(#FF0000, 'Down Extra High') cdnthresholdHigh = input(#FF3030, 'Down High') cdnthresholdMedium = input(#FF6060, 'Down Medium') cdnthresholdNormal = input(#FF8F8F, 'Down Normal') cdnthresholdLow = input(#FFBFBF, 'Down Low') // threshold colors cthresholdExtraHighUp = cmode == 'Heatmap' ? chmthresholdExtraHigh : cupthresholdExtraHigh cthresholdHighUp = cmode == 'Heatmap' ? chmthresholdHigh : cupthresholdHigh cthresholdMediumUp = cmode == 'Heatmap' ? chmthresholdMedium : cupthresholdMedium cthresholdNormalUp = cmode == 'Heatmap' ? chmthresholdNormal : cupthresholdNormal cthresholdLowUp = cmode == 'Heatmap' ? chmthresholdLow : cupthresholdLow cthresholdExtraHighDn = cmode == 'Heatmap' ? chmthresholdExtraHigh : cdnthresholdExtraHigh cthresholdHighDn = cmode == 'Heatmap' ? chmthresholdHigh : cdnthresholdHigh cthresholdMediumDn = cmode == 'Heatmap' ? chmthresholdMedium : cdnthresholdMedium cthresholdNormalDn = cmode == 'Heatmap' ? chmthresholdNormal : cdnthresholdNormal cthresholdLowDn = cmode == 'Heatmap' ? chmthresholdLow : cdnthresholdLow //------------------------------------------------------------------------------ // Calcs length := length > bar_index + 1 ? bar_index + 1 : length slength := slength > bar_index + 1 ? bar_index + 1 : slength pstdev(Series, Period) => mean = sum(Series, Period) / Period summation = 0.0 for i=0 to Period-1 sampleMinusMean = nz(Series[i]) - mean summation := summation + sampleMinusMean * sampleMinusMean return = sqrt(summation / Period) mean = sma(volume, length) std = pstdev(volume, slength) stdbar = (volume - mean) / std dir = close > open v = osc ? volume - mean : volume mosc = osc ? 0 : mean bcolor = stdbar > thresholdExtraHigh ? dir ? cthresholdExtraHighUp : cthresholdExtraHighDn : stdbar > thresholdHigh ? dir ? cthresholdHighUp : cthresholdHighDn : stdbar > thresholdMedium ? dir ? cthresholdMediumUp : cthresholdMediumDn : stdbar > thresholdNormal ? dir ? cthresholdNormalUp : cthresholdNormalDn : dir ? cthresholdLowUp : cthresholdLowDn // heatmap lines zshow_lines = zmode == 'Lines' or zmode == 'Both' zshow_backgrounds = zmode == 'Backgrounds' or zmode == 'Both' tst = highest(v, min(300, bar_index+1)) * 9999 ts0 = osc ? lowest(v, min(300, bar_index+1)) * 9999 : 0 ts1 = std * thresholdExtraHigh + mosc ts2 = std * thresholdHigh + mosc ts3 = std * thresholdMedium + mosc ts4 = std * thresholdNormal + mosc //------------------------------------------------------------------------------ // Plots barcolor(bcolor_enabled ? bcolor : na, editable=false) // hidden heatmap lines to fill pt = plot(zshow_backgrounds ? tst : na, color=na, display=display.none, editable=false) p0 = plot(zshow_backgrounds ? ts0 : na, color=na, display=display.none, editable=false) p1 = plot(zshow_backgrounds ? ts1 : na, color=na, display=display.none, editable=false) p2 = plot(zshow_backgrounds ? ts2 : na, color=na, display=display.none, editable=false) p3 = plot(zshow_backgrounds ? ts3 : na, color=na, display=display.none, editable=false) p4 = plot(zshow_backgrounds ? ts4 : na, color=na, display=display.none, editable=false) // heatmap fills tpf = 85 //fill(pt, p1, chm1, transp=tpf, title='Extra High heatmap zone') fill(p1, p2, chm2, transp=tpf, title='High heatmap zone') fill(p2, p3, chm3, transp=tpf, title='Medium heatmap zone') fill(p3, p4, chm4, transp=tpf, title='Normal heatmap zone') fill(p4, p0, chm5, transp=tpf, title='Low heatmap zone') // volume plot(v, color=bcolor, style=plot.style_columns, title='Volume', transp=0, editable=false) // moving average plot(osc ? na : mean, color=#000000, linewidth=2, title='Moving Average', style=plot.style_line, transp=0, display=display.none) // heatmap lines tpp = 50 plot(zshow_lines ? ts1 : na, color=chm1, title='Extra High heatmap line', transp=tpp) plot(zshow_lines ? ts2 : na, color=chm2, title='High heatmap line', transp=tpp) plot(zshow_lines ? ts3 : na, color=chm3, title='Medium heatmap line', transp=tpp) plot(zshow_lines ? ts4 : na, color=chm4, title='Normal heatmap line', transp=tpp)
프로필 이미지
생각하는허수아비
2023-01-05
1188
글번호 165109
지표
답변완료

문의 드립니다

. . . . . For j = 2 to nn + 2 step 20 { end_x = j; end_v = a1 * ((nn - j) ^ 4) + b1 * ((nn - j) ^ 3) + c1 * ((nn - j) ^ 2) + d1 * (nn - j) + e1; TL = TL_New(sDate[start_x],sTime[start_x],start_v,sDate[end_x],sTime[end_x],end_v); TL_SetColor(TL,Red); TL_SetSize(TL,1); start_x = end_x; start_v = end_v; } 예를 들면 15분 봉에서 저 For문 안에 있는 TL 라인이 생성되었다가 다시 지워지고 다시 그려지게 할려면 어떨게 해야 되나요 ? TL_Delete(TL); 을 앞 뒤로 넣어봐도 안되네요 새해 복 많이 받으시구요. 부탁드립니다.
프로필 이미지
사4구9팔8구9
2023-01-04
932
글번호 165108
지표
답변완료

Bolinger bands 관련입니다.

안녕하세요^^ 시스템에서 제어가 잘 않되서요 Bolinger bands의 이평선 상단밴드 하단밴드 표현 다시한번 부탁드립니다 삼사합니다.
프로필 이미지
yjh7474
2023-01-04
1196
글번호 165107
시스템
답변완료

부탁드립니다.

1. 종가가 가장 최근 양봉의 고가 위로 오르면 파란색으로, 종가가 가장 최근 음봉의 저가 밑으로 내리면 빨강색으로 구현해 주세요
프로필 이미지
서태공
2023-01-04
1005
글번호 165106
강조

에구머니 님에 의해서 삭제되었습니다.

프로필 이미지
에구머니
2023-01-04
2
글번호 165105
지표