커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

지표 질문입니다

일간 차트에서 L>C[19] 일 때 C[19] 를 틱 차트에서 타주기로 표시한다 일간 차트에서 H<C[19] 일 때 C[19] 를 틱 차트에서 타주기로 표시한다 즉 일간 차트에서 당일 저가가 19일전 종가보다 높을 때 19 일전 종가 를 틱 차트에서 타주기로 표시한다 일간 차트에서 당일 고가가 19일전 종가보다 낮을 때 19 일전 종가 를 틱 차트에서 타주기로 표시한다 감사합니다
프로필 이미지
para
2024-12-11
531
글번호 186180
지표
답변완료

종목 검색식 부탁드립니다

항상 친절하고 자상한 답변에 머리숙여 감사드립니다. 아래 신호수식을 에스트레이더 종목검색식으로 부탁드립니다. 1. A=Valuewhen(2,V>Highest(V(1),100) and H>Highest(H(1),10),H); CrossUp(C, A) 2. A=Ma((nPredayclose(4)+nPredayclose(3)+nPredayclose(2)+nPredayclose(1)+Dayclose())/5,5)*0.83; CrossDown (C,A) 3. R=RSI(21); S=Stochasticsslow(20, 12); M= Ma(C, 120); P= 2*((Predayhigh()+Predaylow()+Predayclose())/3)-Predaylow(); 조건 = R >= 70 && S >= 70 && C >= M && C >= P && R>R(1) && S>S(1); Cnt = Countsince(date!=date(1), 조건)==1; Cnt && !Cnt(1) 4. V1 = Ma(Close,20); V2 = V1 + 2 * Stdev(Close,20); BREAK_Condition=if(Close>V2,1,0) and if (REF(Close,1) <= V2,1,0); BREAK_COUNT = Sum(BREAK_Condition,10); UP_TREND = V1 > REF(V1,5); BREAK_Condition and BREAK_COUNT >= 2 and UP_TREND 5. A=avg(C,14)-avg(C,20)*12/100; A1=Sum(if(C-C(1)>0,C-C(1),0),14)/Sum(if(C-C(1)>0,C-C(1),C(1)-C),14)*100; A2=eavg(if(L(1)-L>0 && H-H(1)<L(1)-L,L(1)-L,0),14)/eavg(Max(Max(H-L,abs(C(1)-H)),abs(C(1)-L)),14)*100; (L(1)<=A(1) or L<=A) && (A1(1)<=30 or A1 <=30) && (A2(1)>30 or A2>30) && C>0 6. A=eavg(C,150); B=eavg(C,200); A1=Lowest(L,260,1)*1.25; A2=Valuewhen(1,A1,A1); (((A(2)>A(1) && CrossUp(A,A(1))) or (B(2)>B(1) && CrossUp(B,B(1)))) && (CrossUp(C,A) or CrossUp(C,A1) or CrossUp(C,A2))) and ((V>avg(V,20)*3.5 && V>V(1)*3.5 && O<C && C-0>(H-C)*1.2)) 7. 조건=Highest(H,28)==H(12); A=Valuewhen(1,조건,H(12),1); E5=eavg(V,5); E10=eavg(V,10); OSC=100*(E5- E10)/E10; CrossUp(C,A) && OSC>0 && OSC>OSC(1) 8. A=(H == C) && ((if(C < 5000, C+5, if(C < 20000, C+10, if(C < 50000, C+50, if(C < 200000, C+100, if(C < 500000, C+500,C+1000)))))) / Predayclose() > 1.3); Sum(A(1), 20) >= 1 and CrossUp(C, avg(C, 20)) 9. A = Lowest(L,30); B = Valuewhen(1, A(1) != A, RSI(30)); A(1) > A and B(1) < B 10. 양=C > O; 음=C < O; Cnt=Countsince(Date!=Date(1),음); 조건=(Cnt==1 && Cnt(1)==0) or (Date!=Date(1) && 음); Valuewhen(1, 조건, O)
프로필 이미지
파크에버뉴
2024-12-11
713
글번호 186179
검색
답변완료

지표문의 드립니다

유튜브에서 본것인데 이격도 20.60지표를 아래 파일에서 처럼 기본챠트에 올려서 사용하는걸 보았읍니다 혹시 구현이 가능하신지요?
프로필 이미지
jsi
2024-12-11
594
글번호 186178
지표

라몬 님에 의해서 삭제되었습니다.

프로필 이미지
라몬
2024-12-11
3
글번호 186177
시스템
답변완료

부탁드립니다

A=(dayhigh()+daylow())/2; crossup(C,A) AND crossup(C,BBANDSUP(20,2)) 위 신호수식의 검색식 부탁드립니다
프로필 이미지
다툼
2024-12-11
656
글번호 186176
검색
답변완료

종목 검색 부탁드립니다.

키움 수식 입니다 B1 = shift(ma(종가,30,이평방법)+2*stdev((C+H+L)/3,30),25); B2 = (eavg(c(25),30)) + (2*stdev((C(25)+H(25)+L(25))/3,30) ); if(C < B2 ,B1 * 0.98, B1*1.02); 위 라인를 주가가 돌파 종목 검색식 부탁드립니다
프로필 이미지
골든도라도
2024-12-11
689
글번호 186175
종목검색
답변완료

수식문의 드립니다.

안녕하세요. 아래수식을 Yes트레이더로 변환부탁드립니다. // This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International // https://creativecommons.org/licenses/by-nc-sa/4.0/ // &#169; BigBeluga //@version=5 indicator("Volumatic Variable Index Dynamic Average [BigBeluga]", "Volumatic VIDYA [BigBeluga]", overlay = true, max_lines_count = 500, max_labels_count = 500) // INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ // Input parameters for length, momentum, and source data int vidya_length = input.int(10, "VIDYA Length") // Length of the VIDYA calculation int vidya_momentum = input.int(20, "VIDYA Momentum") // Momentum length for VIDYA float band_distance = input.float(2, "Distance factor for upper/lower bands", step = 0.1) // Distance factor for upper/lower bands // Define pivot parameters int pivot_left_bars = 3 // Left side pivot bars int pivot_right_bars = pivot_left_bars // Right side pivot bars float source = input.source(close, "Source") // Source for VIDYA calculation // Define colors for up and down trends color up_trend_color = input(#17dfad, "+", group = "Color", inline = "c") // Color for uptrend color down_trend_color = input(#dd326b, "-", group = "Color", inline = "c") // Color for downtrend bool shadow = input.bool(true, "Shadow", group = "Color", inline = "c") // Initialize variables for line, volume, and trend state var line pivot_line = na // Variable for storing line references var float volume_value = na // Variable for storing volume data float smoothed_value = na // Smoothing variable for VIDYA trend levels var bool is_trend_up = na // Boolean variable for tracking trend direction // Initialize arrays for storing line and volume information var array<line> liquidity_lines_low = array.new<line>(500) // Array for storing lines for lows var array<line> liquidity_lines_high = array.new<line>(500) // Array for storing lines for highs var float up_trend_volume = na // Volume accumulated during uptrend var float down_trend_volume = na // Volume accumulated during downtrend // } // FUNCTIONS―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ // Define VIDYA (Variable Index Dynamic Average) function vidya_calc(src, vidya_length, vidya_momentum) => float momentum = ta.change(src) float sum_pos_momentum = math.sum((momentum >= 0) ? momentum : 0.0, vidya_momentum) float sum_neg_momentum = math.sum((momentum >= 0) ? 0.0 : -momentum, vidya_momentum) float abs_cmo = math.abs(100 * (sum_pos_momentum - sum_neg_momentum) / (sum_pos_momentum + sum_neg_momentum)) float alpha = 2 / (vidya_length + 1) var float vidya_value = 0.0 vidya_value := alpha * abs_cmo / 100 * src + (1 - alpha * abs_cmo / 100) * nz(vidya_value[1]) ta.sma(vidya_value, 15) // Method to extend lines and add labels for liquidity levels method extend_liquidity_lines(array<line> line_array, float price_level, bool is_cross, volume_val)=> if line_array.size() > 0 and last_bar_index - bar_index < 5000 for i = 0 to line_array.size()-1 if i < line_array.size() line liquidity_line = line_array.get(i) float current_line_level = line.get_y2(liquidity_line) bool price_cross = is_cross ? price_level < current_line_level and price_level[1] >= current_line_level : price_level > current_line_level and price_level[1] <= current_line_level bool is_short_line = bar_index - line.get_x1(liquidity_line) < 50 if price_cross and is_short_line line.set_x2(liquidity_line, bar_index) line_array.remove(i) // Add volume label to the liquidity zone label.new(bar_index-1, price_level[1], str.tostring(volume_val, format.volume), color = color.rgb(0, 0, 0, 99), style = is_cross ? label.style_label_lower_left : label.style_label_upper_left, textcolor = chart.fg_color, size = size.small) // Add a circle label to represent liquidity zone label.new(bar_index-1, price_level[1], text = "&#9673;", color = #00000003, textcolor = is_cross ? down_trend_color : up_trend_color, style = label.style_label_center, size = size.normal) // } // CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ // Calculate the Average True Range (ATR) float atr_value = ta.atr(200) // ATR calculation with length of 200 // Calculate the VIDYA (Variable Index Dynamic Average) vidya_value = vidya_calc(source, vidya_length, vidya_momentum) // Calculate upper and lower bands based on VIDYA and ATR float upper_band = vidya_value + atr_value * band_distance float lower_band = vidya_value - atr_value * band_distance // Detect trend direction using crossovers of source with bands if ta.crossover(source, upper_band) is_trend_up := true if ta.crossunder(source, lower_band) is_trend_up := false // Set trend-based smoothing variable if is_trend_up smoothed_value := lower_band if not is_trend_up smoothed_value := upper_band if ta.change(is_trend_up) smoothed_value := na // Calculate pivot highs and lows for price action float pivot_high = ta.pivothigh(pivot_left_bars, pivot_right_bars) float pivot_low = ta.pivotlow(close, pivot_left_bars, pivot_right_bars) // Create and store lines for pivot lows (support zones) if low[pivot_right_bars] > smoothed_value and pivot_low pivot_line := line.new( bar_index[pivot_right_bars], low[pivot_right_bars], bar_index[pivot_right_bars]+5, low[pivot_right_bars], color = color.new(up_trend_color, 50) ) liquidity_lines_low.push(pivot_line) volume_value := math.sum(volume, pivot_right_bars + pivot_left_bars) / (pivot_right_bars + pivot_left_bars) // Create and store lines for pivot highs (resistance zones) if high[pivot_right_bars] < smoothed_value and pivot_high pivot_line := line.new( bar_index[pivot_right_bars], high[pivot_right_bars], bar_index[pivot_right_bars]+5, high[pivot_right_bars], color = color.new(down_trend_color, 50) ) liquidity_lines_high.push(pivot_line) volume_value := math.sum(-volume, pivot_right_bars + pivot_left_bars) / (pivot_right_bars + pivot_left_bars) // Extend lines to track price movements liquidity_lines_high.extend_liquidity_lines(smoothed_value, true, volume_value) liquidity_lines_low.extend_liquidity_lines(smoothed_value, false, volume_value) // Detect changes in the trend direction bool trend_cross_up = not is_trend_up[1] and is_trend_up bool trend_cross_down = not is_trend_up and is_trend_up[1] // Reset volume counters when trend changes if ta.change(trend_cross_up) or ta.change(trend_cross_down) up_trend_volume := 0 down_trend_volume := 0 // Accumulate volume during trends if not(ta.change(trend_cross_up) or ta.change(trend_cross_down)) up_trend_volume += (close > open ? volume : 0) down_trend_volume += (close < open ? volume : 0) // Calculate average volume float avg_volume_delta = (up_trend_volume + down_trend_volume) / 2 // Determine the color of the trend color trend_color = is_trend_up ? up_trend_color : not is_trend_up ? down_trend_color : chart.fg_color // Calculate delta volume percentage string delta_volume = str.tostring(((up_trend_volume - down_trend_volume) / avg_volume_delta) * 100, format.percent) == "NaN%" ? "0%" : str.tostring(((up_trend_volume - down_trend_volume) / avg_volume_delta) * 100, format.percent) // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ // Display labels for volume and trend statistics on the last bar if barstate.islast label.delete( label.new(bar_index, smoothed_value, "Buy: " + str.tostring(up_trend_volume, format.volume) + "₩n Sell: " + str.tostring(down_trend_volume, format.volume) + "₩nDelta Volume: " + delta_volume, color = color.new(trend_color, 90), style = is_trend_up ? label.style_label_upper_left : label.style_label_lower_left, textcolor = chart.fg_color )[1]) label.delete(label.new(bar_index, smoothed_value, text = "&#10026;", color = #00000003, textcolor = trend_color, style = label.style_label_center, size = size.large)[1]) // Plot the VIDYA trend line p1 = plot(smoothed_value, color = trend_color, linewidth = 2, style = plot.style_linebr) p2 = plot(hl2, display = display.none) // Fill between the plot and the VIDYA line fill(p1, p2, smoothed_value, hl2, color.new(trend_color, shadow ? 80 : 100), na) // Plot trend change markers (up and down arrows) plotshape( series = trend_cross_up[1] ? smoothed_value[0] : na, title = "Trend Up", style = shape.labelup, location = location.absolute, color = color.new(up_trend_color, 50), text = "▲", textcolor = chart.fg_color ) plotshape( series = trend_cross_down[1] ? smoothed_value[0] : na, title = "Trend Down", style = shape.labeldown, location = location.absolute, color = color.new(down_trend_color, 50), text = "▼", textcolor = chart.fg_color ) // }
프로필 이미지
일프로
2024-12-11
892
글번호 186174
지표
답변완료

90410번 재문의

1분차트에 적용했는데 아무것도 안나와요 다시 부탁드립니다 라인의 색상, 굵기도 지정할수있게 부탁드립니다 감사합니다
프로필 이미지
러블리
2024-12-11
597
글번호 186173
지표
답변완료

Lowest

안녕하세요. 1분봉차트에서 당일 종가들중 가장 낮은값, 당일 시가들중에 가장 낮은값을 알려고 합니다. dayindex를 사용해서 가령, 당일 4번째봉이 완성되면(즉, dayindex 3 인 봉) Lowest(C,dayindex)[1] 로 쓰면, 당일 1~3번째 봉들 중에서 가장 작은 종가를 줘야 하는 것 같은데,, message로그로 찍어보면 좀 다른 값을 주는 것 같더라구요. 오류가 있는건지요? 당일 최저가는 daylow를 쓰면되지만, 시가나 종가들중에 최저값을 알수 있는 로직을 알려주시면 좋겠습니다~
프로필 이미지
건곤대
2024-12-11
545
글번호 186170
시스템