커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6137
글번호 230811
답변완료
지표식 하나 부탁드립니다.
안녕하세요 항상 감사드립니다. 올린 사진과 같이 지표식을 만들어 주시면 감사하겠습니다. 1. 1분봉 5개를 모아서 하나의 묶음으로 만들어서 Box 를 만든다 0. Box 의 윗부분은 5개봉중에서 최고점으로 한다. 0. Box 의 아랫부분은 5개 봉중에서 최저점으로 한다 2. 만들어진 Box 의 중간값을 만든다. 0. 5개의 봉중에서 (최고값+최저값/2) 3. Box의 중간값이 앞봉보다 높으면은 만들어진 그 Box 색을 노란색으로 한다. 4. Box의 중간값이 앞봉보다 낮으면은 만들어진 그 Box 의 색을 하늘색으로 한다
2025-10-28
319
글번호 227399
답변완료
문의드립니다.
아래 식에서 이평선 5 20 60 120 정배열에서 매수/ 역배열에서 매도가 되도록 추가 부탁드립니다.다른 조건은 그대로 적용하고자 합니다. 감사합니다^.^Input : Period(14), sigPeriod(9),수량(1);
var : TRIXv(0),TRIXs(0);
TRIXv = TRIX(Period);
TRIXs = ema(TRIXv,sigPeriod);
if MarketPosition <= 0 and CrossUp(TRIXv,TRIXs) and TRIXv < 0 Then
Buy("B",OnClose,def,수량);
if MarketPosition == 1 and CrossDown(TRIXv,TRIXs) Then
ExitLong("BX");
if MarketPosition >= 0 and CrossDown(TRIXv,TRIXs) and TRIXv > 0 Then
Sell("S",OnClose,def,수량);
if MarketPosition == -1 and CrossUp(TRIXv,TRIXs) Then
ExitShort("SX");
2025-10-28
271
글번호 227398
답변완료
문의 드립니다
var1 = (upvol - downvol); var2 = var2+var1;if var2 > 0 Then plot1(var2,"1",red);Else plot1(var2,"1",blue);----------------------복합차트에서 쓸건데요매일 아침 8시45분 ~ 오후 3시 45분 까지의 순매수거래량을 표시하고 싶습니다다음날이 되면 다시 8시 45분부터 카운트 합니다감사합니다
2025-10-28
235
글번호 227397
답변완료
지표식 요청 드립니다.
안녕하세요항상 빠른 답변 감사드립니다.일봉상 5일 볼린져 밴드를 분봉상에서 구현 하는 식을 요청 드립니다.그럼 좋은 하루 되세요
분봉에서일봉볼린져밴드
2025-10-28
235
글번호 227396
답변완료
문의 드립니다
input : short1(48),long1(62),sig1(12); input : shor(1000),long(1500),sig(200); var : macdv1(0),macdv2(0),macds1(0),macds2(0); macdv1 = macd(short1,long1); macdv2 = macd(shor,long); macds1 = Ema(macdv1,sig1); macds2 = Ema(macdv2,sig); If CrossUp(macdv1,0) Then { Buy("b"); } If CrossDown(macdv1,0) Then { ExitLong("s"); } 매수가 될때 예외구간을 정하고 싶습니다. CrossDown(macdv2,0) 한 상황 부터 macds2 < 0 구간에 CrossUp(macdv1,0) 하여도 매수가 안되게 매수를 제한하고 싶어서 수식을 만드는데 잘 안되네요... 예외구간을 정하는 수식은 어떻게 해야될까요?
2025-10-28
308
글번호 227390
답변완료
문의드립니다
안녕하세요? 아래 지표수식에서 노란색 물음표 ? 가 나올때마다 1봉뒤 즉 다음봉시가에서 매수또는 매도 신호가 발생되도록 시스템식으로부탁드립니다 감사합니다 input:length(12);Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),Text1(0),process(0),T(0);Array:HH[10,2](0),LL[10,2](0);var : idx(0),TL2(0),LRLv(0),LRSv(0),maxR(0),cnt(0),mid(0);var : TL21(0),TL22(0),TL23(0);process = 0;If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If LL[1,1] > L Then process = -1; If HH[1,1] < H Then process = 1;} Else If Highest(H,length) == H and lastHiVal <> H Then process = 1;Else If Lowest(L,length) == L and lastLoVal <> L Then process = -1; If process == 1 Then { T = 1; lastHiVal = H; If HH[1,2] < LL[1,2] Then { For j = 10 DownTo 2 { HH[j,1] = HH[j-1,1]; HH[j,2] = HH[j-1,2]; } } If HH[1,2] < LL[1,2] or HH[1,1] < H Then { HH[1,1] = H; HH[1,2] = Index; sBar = Index - LL[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } if LL[1,1] > 0 Then { TL1 = TL_New(sDate[sBar],sTime[sBar],LL[1,1],sDate[eBar],sTime[eBar],HH[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],NewLine+NumToStr(HH[1,1],2)); Text_SetStyle(Text1, 2, 1); } Else { Text_Delete(text1); Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],NewLine+NumToStr(HH[1,1],2)); Text_SetStyle(Text1, 2, 1); } Text_SetStyle(Text1, 2, 1); }}If process == -1 Then { T = -1; lastLoVal = L; If LL[1,2] < HH[1,2] Then { For j = 10 DownTo 2 { LL[j,1] = LL[j-1,1]; LL[j,2] = LL[j-1,2]; } } If LL[1,2] < HH[1,2] or LL[1,1] > L Then { LL[1,1] = L; LL[1,2] = Index; sBar = Index - HH[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } if HH[1,1] > 0 Then { TL1 = TL_New(sDate[sBar],sTime[sBar],HH[1,1],sDate[eBar],sTime[eBar],LL[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],NumToStr(LL[1,1],2)); Text_SetStyle(Text1, 2, 0); } Else { Text_Delete(text1); Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],NumToStr(LL[1,1],2)); Text_SetStyle(Text1, 2, 0); } }}if T != T[1] Then{ if T == 1 Then { idx = LL[1,2]; } if T == -1 Then { idx = HH[1,2]; } TL21 = TL2[1]; TL22 = TL21[1]; TL23 = TL22[1]; TL_Delete(TL23);}if idx > 0 Then{ LRLv = LRL(C,index-idx); LRSv = LRS(C,Index-idx); maxR = 0; For cnt = 0 to Index-idx+1 { Mid = LRLV-LRSv*cnt; if abs(L[cnt]-Mid) > maxR Then maxR = abs(L[cnt]-Mid); if abs(H[cnt]-Mid) > maxR Then maxR = abs(H[cnt]-Mid); } if T != T[1] Then { TL_SetExtRight(TL2,False); TL2 = TL_New(sDate[Index-idx],sTime[Index-idx],Mid,sDate,sTime,LRLv); TL_SetExtRight(TL2,true); TL_SetColor(tL2,Red); } Else { if T == 1 and HH[1,1] != HH[1,1][1] Then { TL_SetBegin(TL2,sDate[Index-idx],sTime[Index-idx],Mid); TL_SetEnd(TL2,sDate,sTime,LRLv); } if T == -1 and LL[1,1] != LL[1,1][1] Then { TL_SetBegin(TL2,sDate[Index-idx],sTime[Index-idx],Mid); TL_SetEnd(TL2,sDate,sTime,LRLv); } }}//---------------------------------------------// 검정추세선(TL1)과 빨강추세선(TL2) 교차 감지 //---------------------------------------------Vars: valTL1(0), valTL2(0), diff(0), LastCrossBar(0), TxtID(0);If TL1 > 0 and TL2 > 0 ThenBegin // 각 추세선의 현재 시점 가격값 가져오기 valTL1 = TL_GetValue(TL1, Date, Time); valTL2 = TL_GetValue(TL2, Date, Time); If (valTL1 > 0) and (valTL2 > 0) Then Begin diff = AbsValue(valTL1 - valTL2); // 두 선의 가격 차이가 3틱 이하일 때 If diff <= (PriceScale * 3) Then Begin // 중복 표시 방지 If LastCrossBar <> Index Then Begin TxtID = Text_New(Date, Time, (valTL1 + valTL2) / 2, "?"); Text_SetColor(TxtID, Yellow); Text_SetSize(TxtID, 20); Text_Setbold(txtID,10); LastCrossBar = Index; End; End; End;End;//If diff <= (PriceScale * 3) Then//예://*2 → 더 민감하게,//*5 → 더 느슨하게.
2025-10-28
463
글번호 227389
답변완료
종목검색식 부탁드립니다
아래수식 변환 부탁드립니다################################T=ma(C,기간);Up=T>T(1);Dn=T<T(1);조건=sum(하락, 일수)==일수 && sum(상승(일수), 일수)==일수;TH = valuewhen(1,조건, T(일수));CrossUp(C,TH)감사합니다
2025-10-28
216
글번호 227388
답변완료
문의
/@version=5indicator("Higher Time Frame Support/Resistance [BigBeluga]", "HTF Support/Resistance [BigBeluga]", overlay = true, max_bars_back = 5000, max_labels_count = 500)// Groupsstring group1 = "Levels 1"string group2 = "Levels 2"string group3 = "Levels 3"string group4 = "Levels 4"// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{bool on_1 = input.bool(true, "", inline = group1)int len1 = input.int(4, group1, inline = group1),string timeframe1 = input.timeframe("240", "", inline = group1),string style1 = input.string("Solid", "", ["Solid", "Dashed", "Dotted"], inline = group1)color color1 = input.color(color.green, "", inline = group1)bool on_2 = input.bool(true, "", inline = group2)int len2 = input.int(5, group2, inline = group2),string timeframe2 = input.timeframe("720", "", inline = group2),string style2 = input.string("Solid", "", ["Solid", "Dashed", "Dotted"], inline = group2)color color2 = input.color(color.blue, "", inline = group2)bool on_3 = input.bool(true, "", inline = group3)int len3 = input.int(5, group3, inline = group3),string timeframe3 = input.timeframe("D", "", inline = group3),string style3 = input.string("Solid", "", ["Solid", "Dashed", "Dotted"], inline = group3)color color3 = input.color(color.purple, "", inline = group3)bool on_4 = input.bool(true, "", inline = group4)int len4 = input.int(5, group4, inline = group4),string timeframe4 = input.timeframe("W", "", inline = group4),string style4 = input.string("Solid", "", ["Solid", "Dashed", "Dotted"], inline = group4)color color4 = input.color(color.orange, "", inline = group4)// Shadow of levels inputsint s_lWidth = input.int(5, "Levels Width", group = "Shadow", inline = "Shadow")int s_tnsp = input.int(85, "Transperent", group = "Shadow", inline = "Shadow")int offset = input.int(15, "Offset", group = "Labels")string t_size = input.string("Small", "Size", ["Tiny", "Small", "Normal"], group = "Labels")// }// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{// Non Repainting data request functionnon_rep_request(tf, expresion1)=> indexHighTF = barstate.isrealtime ? 1 : 0 indexCurrTF = barstate.isrealtime ? 0 : 1 nonRepainting = request.security(syminfo.tickerid, tf, expresion1[indexHighTF])[indexCurrTF] nonRepainting// Pivot levels functionpivot_levels(timeframe, len, color, stl)=> style = switch stl "Solid" => line.style_solid "Dotted" => line.style_dotted "Dashed" => line.style_dashed text_s = switch t_size "Small" => size.small "Tiny" => size.tiny "Normal" => size.normal var line pivot_h = line(na) var line pivot_l = line(na) var line pivot_hs = line(na) var line pivot_ls = line(na) var float p_h = float(na) var float p_l = float(na) bool ph = ta.pivothigh(len, len) bool pl = ta.pivotlow(len, len) float p_H = non_rep_request(timeframe, (not na(ph) ? high[len] : na)) float p_L = non_rep_request(timeframe, (not na(pl) ? low[len] : na)) if not na(p_H) p_h := float(na) p_h := p_H pivot_h := line.new(bar_index[len], p_H, last_bar_index, p_H, color = color) pivot_h.set_extend(extend.both) pivot_h.set_style(style) line.delete(pivot_h[1]) // Shadow Line pivot_hs := line.new(bar_index[len], p_H, last_bar_index, p_H, color = color.new(color, s_tnsp), width = s_lWidth) pivot_hs.set_extend(extend.both) line.delete(pivot_hs[1]) if not na(p_L) p_l := float(na) p_l := p_L pivot_l := line.new(bar_index[len], p_L, last_bar_index, p_L, color = color) pivot_l.set_extend(extend.both) pivot_l.set_style(style) line.delete(pivot_l[1]) // Shadow Line pivot_ls := line.new(bar_index[len], p_L, last_bar_index, p_L, color = color.new(color, s_tnsp), width = s_lWidth) pivot_ls.set_extend(extend.both) line.delete(pivot_ls[1]) if barstate.islast count1 = 0 count2 = 0 for i = 1 to 4000 if high[i]*1.0009 >= p_h and high[i] *0.9999 <= p_h and count1 == 0 count1 := 1 label.delete(label.new(bar_index[i], p_h, "", color = color, style = label.style_label_down, size = size.tiny)[1]) if low[i]*1.0009 >= p_l and low[i]*0.999 <= p_l and count2 == 0 count2 := 1 label.delete(label.new(bar_index[i], p_l, "", color = color, style = label.style_label_up, size = size.tiny)[1]) label.delete(label.new(bar_index+offset, p_h, timeframe + " Pivot High " + str.tostring(p_h, "(#.#)"), color = chart.bg_color, style = label.style_label_left, textcolor = chart.fg_color, size = text_s)[1]) label.delete(label.new(bar_index+offset, p_l, timeframe + " Pivot Low " + str.tostring(p_l, "(#.#)"), color = chart.bg_color, style = label.style_label_left, textcolor = chart.fg_color, size = text_s)[1])if on_1 pivot_levels(timeframe1,len1,color1, style1)if on_2 pivot_levels(timeframe2,len2,color2, style2)if on_3 pivot_levels(timeframe3,len3,color3, style3)if on_4 pivot_levels(timeframe4,len4,color4, style4)// }레벨에서 15분 30분 1시간 4시간으로 변환하여 나타나도록 부탁드립니다.
타분봉swinhigh
타분봉swinglow
2025-10-28
716
글번호 227387
답변완료
종목검색식 부탁드립니다
전월봉의 고점을 돌파하는 일봉 . 부탁 드립니다.
2025-10-28
231
글번호 227385