커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식 부탁합니다

아래 수식 부탁 드립니다. 지표 부탁합니다 분봉에서 지표로 거래대금을 20억 단위로 3칸으로 나누어 막대모양으로 나타내는 지표 부탁합니다. 예를 들어 5분봉 또는 3분봉이든 거래대금이 나타나는 지표 부탁합니다
프로필 이미지
미래테크
2025-06-20
336
글번호 191980
지표
답변완료

부탁드립니다.

안녕하세요. 수고에 항상 감사드립니다. 1> 아래 수식에 signal이 50선 상방 통과시 분홍색● 봉이 생길때 봉의 저가선 종가선(연한그레이) 생기고 저가선과 종가선 사이는 연한 분홍색이 채워져 박스형식으로 생기도록 부탁드립니다. 다음 ●이 생기면 그전의 선은 없어지고 새로 생겨 선은 항상 하나만 유지합니다. 반대로 파랑색● 고가선 종가선 (연한그레이) --- 연한 연두색 채워지게 2> signal 선 그림처럼 다이버전스 선이 생기도록 가능하다면 부탁드립니다. 봉에도 같이 생기는게 가능하다면 그럼처럼 부탁드립니다. 3> 그림처럼 노랑 박스안 80과 20사이에 5단위의 얇은회색점선 부탁드립니다. input : length(14); input : smoType1(3); #1:EMA, 2:SMA, 3:RMA, 4TMA input : arsiCss(silver); input : autoCss(true); //Signal Line input : smooth(14); input : smoType2(1);#1EMA, 2SMA, 3RMA, 4TMA input : signalCss(Orange); //OB/OS Style input : obValue(80); input : obCss(Green); input : obAreaCss(LightGreen); input : osValue(20); input : osCss(Red); input : osAreaCss(LightRed); var : src(0); var : upper(0),lower(0),r(0); var : d(0),diff(0),alpha(0),num(0),den(0),arsi(0),signal(0),a(0),tx(0); src = close; upper = highest(src, length); lower = lowest(src, length); r = upper - lower; d = src - src[1]; diff = iff(upper > upper[1] , r , iff(lower < lower[1] , -r , d)); if smoType1 == 1 Then { num = ema(diff, length); den = ema(abs(diff), length); } if smoType1 == 2 Then { num = ma(diff, length); den = ma(abs(diff), length); } if smoType1 == 3 Then { alpha = 1/length; num = iff(isnan(num[1]) == true, ma(diff, length) , alpha * diff + (1 - alpha) * iff(isnan(num[1])==true,0,num[1])); den = iff(isnan(den[1]) == true, ma(abs(diff), length) , alpha * abs(diff) + (1 - alpha) * iff(isnan(den[1])==true,0,den[1])); } if smoType1 == 4 Then { num = ma(ma(diff, length),length); den = ma(ma(abs(diff), length), length); } arsi = num / den * 50 + 50; if smoType2 == 1 Then { signal = ema(arsi, smooth); } if smoType2 == 2 Then { signal = ma(arsi, smooth); } if smoType2 == 3 Then { a = 1/smooth; signal = iff(isnan(signal[1]) == true, ma(arsi, length) , a * arsi + (1 - a) * iff(isnan(signal[1])==true,0,signal[1])); } if smoType2 == 4 Then { signal = ma(arsi, smooth); } plot1(arsi, "Ultimate RSI",IFf(arsi > obValue , obCss , IFF(arsi < osValue , osCss ,IFf( autoCss , Black , arsiCss)))); plot2(signal, "Signal Line", signalCss); PlotBaseLine1(obValue, "Overbought"); PlotBaseLine2(50, "Midline"); PlotBaseLine3(osValue, "Oversold"); var : tx1(0),tx2(0); if CrossUp(signal,50) Then { tx1 = Text_New(sDate,sTime,L,"●"); Text_SetColor(tx1,rgb(255, 0, 127)); Text_SetStyle(tx1,2,0); Text_SetSize(tx1,30); tx2 = Text_New_Self(sDate,sTime,50,"●"); Text_SetColor(tx2,rgb(255, 0, 127)); Text_SetStyle(tx2,2,0); Text_SetSize(tx2,16); } if CrossDown(signal,50) Then { tx1 = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx1,rgb(0, 145, 255)); Text_SetStyle(tx1,2,1); Text_SetSize(tx1,30); tx2 = Text_New_Self(sDate,sTime,50,"●"); Text_SetColor(tx2,rgb(0, 145, 255)); Text_SetStyle(tx2,2,1); Text_SetSize(tx2,16); } if CrossUp(signal,80) Then { tx1 = Text_New(sDate,sTime,L,"◈"); Text_SetColor(tx1,rgb(255, 0, 212)); Text_SetStyle(tx1,2,0); Text_SetSize(tx1,15); tx2 = Text_New_Self(sDate,sTime,50,"◈"); Text_SetColor(tx2,Red); Text_SetStyle(tx2,2,0); Text_SetSize(tx2,20); } if CrossDown(signal,20) Then { tx1 = Text_New(sDate,sTime,H,"◈"); Text_SetColor(tx1,rgb(34, 0, 204)); Text_SetStyle(tx1,2,1); Text_SetSize(tx1,15); tx2 = Text_New_Self(sDate,sTime,50,"◈"); Text_SetColor(tx2,Blue); Text_SetStyle(tx2,2,1); Text_SetSize(tx2,20); }
프로필 이미지
어떤하루
2025-06-23
431
글번호 191979
지표
답변완료

질문드립니다.

거래량 한봉으로만 표현되는것을 , 총 누적수량으로 볼수 있을까요?? input : 조정1(23.6),조정2(38.2),조정3(60.0),조정4(61.8),조정5(78.4); input : 글자크기(12); var : a1(0),a2(0),a3(0),b1(0),b2(0),b3(0),Grid(0); value1=(high-close)/(high-low); Value2=(close-low)/(high-low); var1 = iff((high+low)/2<=close,volume,0); var2 = iff((high+low)/2<=close,volume*value1,0); var3 = iff((high+low)/2>close,volume,0); Var4 = iff((high+low)/2>close,volume*Value2,0); a1=iff((high+low)/2<=close,volume,0); a2=(high-close)/(high-low); a3=iff((high+low)/2<=close,volume*a2,0); b1=iff((high+low)/2>close,volume,0); b2=(close-low)/(high-low); b3=iff((high+low)/2>close,volume*b2,0); Var5 = iff(a1>0,(a3/a1)*100,iff(b1>0,(b3/b1)*100,0)); Plot1(var1); Plot2(Var2); Plot3(Var3); Plot4(Var4); Plot5(Var5); if Index == 0 Then Grid = Grid_New(7, 2, 5,White, Gray, 1, Gray, 0); if LastBarOnChart == 1 Then { Grid_Cell(Grid,0,0,"매수",0,0,BLACK,White); Grid_Cell(Grid,1,0,NumToStr(var1,2),0,0,Red,White); Grid_CellSetTextSize(Grid,0,0,글자크기); Grid_CellSetTextSize(Grid,1,0,글자크기); Grid_Cell(Grid,0,1,"매수중매도",0,0,BLACK,White); Grid_Cell(Grid,1,1,NumToStr(var2,2),0,0,BLACK,White); Grid_CellSetTextSize(Grid,0,1,글자크기); Grid_CellSetTextSize(Grid,1,1,글자크기); Grid_Cell(Grid,0,2,"매도",0,0,BLACK,White); Grid_Cell(Grid,1,2,NumToStr(var3,2),0,0,Blue,White); Grid_CellSetTextSize(Grid,0,2,글자크기); Grid_CellSetTextSize(Grid,1,2,글자크기); Grid_Cell(Grid,0,3,"매도중매수",0,0,BLACK,White); Grid_Cell(Grid,1,3,NumToStr(var4,2),0,0,BLACK,White); Grid_CellSetTextSize(Grid,0,3,글자크기); Grid_CellSetTextSize(Grid,1,3,글자크기); Grid_Cell(Grid,0,4,"대비(%)",0,0,Green,White); Grid_Cell(Grid,1,4,NumToStr(var5,2),0,0,BLACK,White); Grid_CellSetTextSize(Grid,0,4,글자크기); Grid_CellSetTextSize(Grid,1,4,글자크기);
프로필 이미지
아이덜
2025-06-20
386
글번호 191973
지표
답변완료

부탁드립니다

아래글에 답변감사드립니다. 그런데 매수신호가 나지않습니다. 아래수식에 매일오후3시5분 추가매수식수정부탁드립니다. input : short1(12),long1(26),sig1(9); input : period(20); input : Per(10); var : MACDO1(0,Data1),Mav2(0,Data2); var : tt(0,Data1),t1(0,Data1),entry(0,Data1); MACDO1 = Data1(MACD_OSC(short1,long1,sig1)); Mav2 = Data2(ma(C,period)); tt = TotalTrades; if Data1(Bdate != Bdate[1]) Then t1 = tt[1]; entry = tt-t1+IFf(MarketPosition!=0,1,0); if MarketPosition == 0 and Data2(CrossUp(c,Mav2)) and entry < 1 and sTime >= 150500 and sTime <= 151000 Then Buy(); if MarketPosition == 1 Then { if data1(CrossDown(MACDO1,0)) Then ExitLong("bx1",OnClose,Def,"",Ceiling(MaxContracts*(Per/100)/10)*10,2); if data2(CrossDown(c,Mav2)) Then ExitLong("bx2"); }
프로필 이미지
2685up
2025-06-20
272
글번호 191971
시스템
답변완료

지표로 전환 부탁드려요

건강하세요 var : aa(0),bb(0),a(0),b(0),av(0),bv(0),d(0),e(0),f(0),g(0); var : bf(0),sf(0),pbf(0),psf(0),bfh(0),SFH(0); aa=C-(H+L)/2; bb=(O+C+H+L+Iff(0<=aa,(C+H)/2,(C+L)/2))/5; A=Accum(Iff(0<=aa,bb*V,0)); B=Accum(Iff(aa<0,bb*V,0)); AV=Accum(Iff(0<=aa,V,0)); BV=Accum(Iff(aa<0,V,0)); if sDate != sDate[1] Then { D=A[1]; E=B[1]; F=AV[1]; G=BV[1]; } BF=(A-D)/(AV-F); SF=(B-E)/(BV-G); PBF=Iff(0<BF,BF,bb); PSF=Iff(0<SF,SF,bb); IF PBF>PSF && CROSSUP(C, PBF) && C>O TheN Find(1);
프로필 이미지
뽀스뽀스
2025-06-20
306
글번호 191964
지표
답변완료

수식 부탁드립니다

지표식 부탁 드립니다. //@version=5 indicator(title='Machine Learning Momentum Index (MLMI)', shorttitle='Machine Learning Momentum Index (MLMI)', overlay=false, precision=1) // ~~ ToolTips { t1 ="This parameter controls the number of neighbors to consider while making a prediction using the k-Nearest Neighbors (k-NN) algorithm. By modifying the value of k, you can change how sensitive the prediction is to local fluctuations in the data. ₩n₩nA smaller value of k will make the prediction more sensitive to local variations and can lead to a more erratic prediction line. ₩n₩nA larger value of k will consider more neighbors, thus making the prediction more stable but potentially less responsive to sudden changes." t2 ="The parameter controls the length of the trend used in computing the momentum. This length refers to the number of periods over which the momentum is calculated, affecting how quickly the indicator reacts to changes in the underlying price movements. ₩n₩nA shorter trend length (smaller momentumWindow) will make the indicator more responsive to short-term price changes, potentially generating more signals but at the risk of more false alarms. ₩n₩nA longer trend length (larger momentumWindow) will make the indicator smoother and less responsive to short-term noise, but it may lag in reacting to significant price changes." //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Input Parameters { numNeighbors = input(200, title='Prediction Data (k)', tooltip=t1) momentumWindow = input.int(20, step=2, minval=10, maxval=200, title='Trend Length', tooltip=t2) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Moving Averages & RSI { MA_quick = ta.wma(close, 5) MA_slow = ta.wma(close, 20) rsi_quick = ta.wma(ta.rsi(close, 5),momentumWindow) rsi_slow = ta.wma(ta.rsi(close, 20),momentumWindow) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Crossover Conditions { pos = ta.crossover(MA_quick, MA_slow) neg = ta.crossunder(MA_quick, MA_slow) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Type Definition { type Data array<float> parameter1 array<float> parameter2 array<float> priceArray array<float> resultArray // Create a Data object var data = Data.new(array.new_float(1, 0), array.new_float(1, 0), array.new_float(1, 0), array.new_float(1, 0)) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Method that saves the last trade and temporarily holds the current one. { method storePreviousTrade(Data d, p1, p2) => d.parameter1.push(d.parameter1.get(d.parameter1.size() - 1)) d.parameter2.push(d.parameter2.get(d.parameter2.size() - 1)) d.priceArray.push(d.priceArray.get(d.priceArray.size() - 1)) d.resultArray.push(close >= d.priceArray.get(d.priceArray.size() - 1) ? 1 : -1) d.parameter1.set(d.parameter1.size() - 1, p1) d.parameter2.set(d.parameter2.size() - 1, p2) d.priceArray.set(d.priceArray.size() - 1, close) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Method to Make Prediction { method knnPredict(Data d, p1, p2, k) => // Create a Distance Array distances = array.new_float(0) n = d.parameter1.size() - 1 for i = 0 to n distance = math.sqrt(math.pow(p1 - d.parameter1.get(i), 2) + math.pow(p2 - d.parameter2.get(i), 2)) distances.push(distance) // Get Neighbors sortedDistances = distances.copy() sortedDistances.sort() 셀렉티드Distances = sortedDistances.slice( 0, math.min(k, sortedDistances.size())) maxDist = 셀렉티드Distances.max() neighbors = array.new_float(0) for i = 0 to distances.size() - 1 if distances.get(i) <= maxDist neighbors.push(d.resultArray.get(i)) // Return Prediction prediction = neighbors.sum() prediction if pos or neg data.storePreviousTrade(rsi_slow, rsi_quick) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Plots { prediction = data.knnPredict(rsi_slow, rsi_quick, numNeighbors) prediction_ = plot(prediction, color=color.new(#426eff, 0), title="MLMI Prediction") prediction_ma = ta.wma(prediction, 20) plot(prediction_ma, color=color.new(#31ffc8, 0), title="WMA of MLMI Prediction") hline(0, title="Mid Level") //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Gradient Fill { upper = ta.highest(prediction,2000) lower = ta.lowest(prediction,2000) upper_ = upper - ta.ema(ta.stdev(prediction,20),20) lower_ = lower + ta.ema(ta.stdev(prediction,20),20) channel_upper = plot(upper, color = na, editable = false, display = display.none) channel_lower = plot(lower, color = na, editable = false, display = display.none) channel_mid = plot(0, color = na, editable = false, display = display.none) // ~~ Channel Gradient Fill { fill(channel_mid, channel_upper, top_value = upper, bottom_value = 0, bottom_color = na, top_color = color.new(color.lime,75),title = "Channel Gradient Fill") fill(channel_mid, channel_lower, top_value = 0, bottom_value = lower, bottom_color = color.new(color.red,75) , top_color = na,title = "Channel Gradient Fill") //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} // ~~ Overbought/Oversold Gradient Fill { fill(prediction_, channel_mid, upper, upper_, top_color = color.new(color.lime, 0), bottom_color = color.new(color.green, 100),title = "Overbought Gradient Fill") fill(prediction_, channel_mid, lower_, lower, top_color = color.new(color.red, 100), bottom_color = color.new(color.red, 0),title = "Oversold Gradient Fill")
프로필 이미지
사노소이
2025-06-20
535
글번호 191959
지표
답변완료

진입횟수 조절

안녕하세요 일 진입횟수를 1~10회까지 변경 적용할 수 있도록 수식 부탁드리빈다. 진입 수식은 매수 crossup(C,H[10]) then buy 매도 crossdown(C, L[10]) then sell 이 두가지로 적용해주시면 됩니다.
프로필 이미지
소드노
2025-06-20
265
글번호 191952
시스템
답변완료

부틱드립니다

수고하십니다 매번 부탁드려서 죄송합니다 예스로 변경드립니다 // This Pine S cript™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; ChartPrime //@version=5 indicator('Linear Regression Channel', overlay = true, max_lines_count = 3) // ---------------------------------------------------------------------------------------------------------------------} // &#120400;&#120398;&#120384;&#120397; &#120388;&#120393;&#120395;&#120400;&#120399;&#120398; // ---------------------------------------------------------------------------------------------------------------------{ bool bands = input.bool(true, "Plot Linear Regression Bands", group = "Settings Bands") int window = input.int(150, "Length", group = "Settings Bands") float devlen_b = input.float(3., "Deviation Linear Regression Bands",step=0.1, group = "Settings Bands") bool channel = input.bool(false, "Plot Linear Regression Channel", group = "Settings Channel") int window1 = input.int(150, "Channel Length", group = "Settings Channel") float devlen1 = input.float(1., "Deviation Linear Regression Channel",step=0.1, group = "Settings Channel") bool channel1 = input.bool(false, "Plot Future Projection of linear regression", group = "Future Projection Channel") bool arr_dirc = input.bool(false, "Plot Arrow Direction", group = "Future Projection Channel") int window2 = input.int(50, "Length", group = "Future Projection Channel") float devlen2 = input.float(1., "Deviation Future Projection Regression Channel",step=0.1, group = "Future Projection Channel") // Define colors for up, down, and mid lines color col_dn = #f01313 color col_up = color.aqua color col_mid = color.yellow color gray = color.gray color fg_col = chart.fg_color // Regression Channel Arrays Line var reglines = array.new_line(3) var reglines_ = array.new_line(3) // ---------------------------------------------------------------------------------------------------------------------} // &#120388;&#120393;&#120383;&#120388;&#120382;&#120380;&#120399;&#120394;&#120397; &#120382;&#120380;&#120391;&#120382;&#120400;&#120391;&#120380;&#120399;&#120388;&#120394;&#120393;&#120398; // ---------------------------------------------------------------------------------------------------------------------{ //@function linear_regression //@des cription Calculates linear regression coefficients for a given source and window. //@param src (series float) The data series on which linear regression is calculated. //@param window (int) The number of bars to use in the calculation. //@returns the intercept slope, Deviation, end of the channel. linear_regression(src, window) => sum_x = 0.0 sum_y = 0.0 sum_xy = 0.0 sum_x_sq = 0.0 // Calculate sums for i = 0 to window - 1 by 1 sum_x += i + 1 sum_y += src[i] sum_xy += (i + 1) * src[i] sum_x_sq += math.pow(i + 1, 2) // Calculate linear regression coefficients slope = (window * sum_xy - sum_x * sum_y) / (window * sum_x_sq - math.pow(sum_x, 2)) intercept = (sum_y - slope * sum_x) / window y1 = intercept + slope * (window - 1) dev = 0.0 for i = 0 to window - 1 dev := dev + math.pow(src[i] - (slope * (window - i) + intercept), 2) dev := math.sqrt(dev/window) [intercept, y1, dev, slope] [y2, y1, dev, slope] = linear_regression(close, window) [y2_, y1_, dev_, slope_] = linear_regression(close, window1) [y2__, y1__, dev__, slope__] = linear_regression(close, window2) // Linear Regression Channel Lines series float mid = y2 + slope series float upper = mid + ta.rma(high - low, window) * devlen_b series float lower = mid - ta.rma(high - low, window) * devlen_b // Returns True for window length period isAllowed = (last_bar_index - bar_index < window1) // ---------------------------------------------------------------------------------------------------------------------} // &#120401;&#120388;&#120398;&#120400;&#120380;&#120391;&#120388;&#120405;&#120380;&#120399;&#120388;&#120394;&#120393; // ---------------------------------------------------------------------------------------------------------------------{ // Plot upper, lower, and mid lines if channel is not enabled p_u = plot(upper, color = bands and channel ? na : bands ? gray : na, linewidth = 2) p_l = plot(lower, color = bands and channel ? na : bands ? gray : na, linewidth = 2) p_m = plot(mid, color = bands and channel ? na : bands ? gray : na) // Fill areas between upper/mid and lower/mid lines fill(p_u, p_m, mid, upper, na, bands and channel ? na : bands ? color.new(col_up, 80) : na) fill(p_m, p_l, lower, mid, bands and channel ? na : bands ? color.new(col_dn, 80) : na, na) if barstate.islast and channel for i = 0 to 2 array.set(reglines, i, line.new(x1 = bar_index - (window1 - 1), y1 = y1_ + dev_ * devlen1 * (i - 1), x2 = bar_index, y2 = y2_ + dev_ * devlen1 * (i - 1), color = color.gray, style = i % 2 == 1 ? line.style_dashed : line.style_solid, width = 2, extend = extend.none) ) linefill.new(array.get(reglines, 1), array.get(reglines, 2), color = color.new(col_up, 90)) linefill.new(array.get(reglines, 1), array.get(reglines, 0), color = color.new(col_dn, 90)) if barstate.islast and channel1 for i = 0 to 2 array.set(reglines_, i, line.new(x1 = bar_index - (window2 - 1), y1 = y1__ + dev__ * devlen2 * (i - 1), x2 = bar_index, y2 = y2__ + dev__ * devlen2 * (i - 1), color = color.gray, style = i % 2 == 1 ? line.style_dotted : line.style_dashed, width = 1, extend = extend.right) ) linefill.new(array.get(reglines_, 1), array.get(reglines_, 2), color = color.new(col_up, 95)) linefill.new(array.get(reglines_, 1), array.get(reglines_, 0), color = color.new(col_dn, 95)) if arr_dirc l1 = label.new(chart.point.from_index(bar_index, hl2 > y2__ ? high : low), text = hl2 > y2__ ? "&#8663;" : hl2 < y2__ ? "&#8664;" : "⇒", textcolor = hl2 > y2__ ? col_up : hl2 < y2__ ? col_dn : gray, color = color(na), size = size.huge, style = label.style_label_left ) label.delete(l1[1]) // Bar Heat Map b_c = (close - lower) / (upper - lower) b_c := b_c > 1 ? 1 : b_c < 0 ? 0 : b_c bar_color = channel ? (isAllowed ? (b_c <= 0.5 ? color.from_gradient(b_c, 0, 0.5, col_up, col_mid) : color.from_gradient(b_c, 0.5, 1, col_mid, col_dn)) : na) : (b_c >= 0.5 ? color.from_gradient(b_c, 0.5, 1, col_mid, col_up) : color.from_gradient(b_c, 0, 0.5, col_dn, col_mid)) plotcandle(open, high, low, close, title = "Bar HeatMap", color = bar_color, wickcolor = bar_color, bordercolor = bar_color ) barcolor(bar_color) // Conditions for crossovers condition1 = bands and channel ? na : bands ? ta.pivotlow(3, 3) and close < lower : na condition2 = bands and channel ? na : bands ? ta.pivothigh(3, 3) and close > upper: na // Plot markers for channel break outs plotchar(condition1, "", "◆", size=size.tiny, location=location.belowbar, color = col_up) plotchar(condition2, "", "◆", size=size.tiny, location=location.abovebar, color = col_dn) // ------------------------------------------------------------------------------------
프로필 이미지
파생돌이
2025-06-20
480
글번호 191951
지표
답변완료

종목검색식 부탁드림니다.

항상 노고에 감사드림니다. 아래의 수식을 종목검색식으로 부탁드림니다. A=wavg(2*wavg(scr,len/2) - wavg(scr,len), floor(sqrt(len))); A>A(1) && A(1)<A(2); A1=MM=MA(C, 기간1, 종류); MN=MA(C, 기간2, 종류); 조건=CrossUp(MM, MN); Valuewhen(1, 조건, H); Crossup(C, A, A1) 지표변수 scr 종가 len 49 기간1 5 기간2 20 종류 가중
프로필 이미지
존슨비치
2025-06-20
313
글번호 191950
종목검색