커뮤니티

예스랭귀지 Q&A

글쓰기

고성 님에 의해서 삭제되었습니다.

프로필 이미지
고성
2025-09-24
2
글번호 194224
시스템
답변완료

문의드립니다

해외선물5분봉챠트에서 사용하려고하는데 오류가 뜹니다 저는 잘이해가 되질않습니다 수정부탁드립니다 Inputs: // STS 파라미터 Length(20), Mult(2.0), SmoothLen(5), // Flow 파라미터 Period(240), Smooth(5), Thr(0.75), UseAutoScale(true), ScaleFix(10000); Vars: // STS 변수 Basis(0), Dev(0), Upper(0), Lower(0), UpTrend(false), DownTrend(false), Strength(0), StrengthSm(0), PriceArray(0), i(0), // Flow 변수 U(0), D(0), SU(0), SD(0), FlowRaw(0), Flow(0), Slope(0), Col(magenta), Scale(0); // --- 1차원 배열 선언 --- Array: PriceArr[1000]; // --- 최근 Length 봉 종가를 배열에 저장 --- For i = 0 to Length - 1 begin PriceArr[i] = Close[i]; end; // --- STS 이동평균 & 표준편차 --- Basis = Average(Close, Length); Dev = Mult * StandardDevArray(PriceArr, Length, 1); Upper = Basis + Dev; Lower = Basis - Dev; // --- STS 추세 판별 --- UpTrend = Close > Upper; DownTrend = Close < Lower; // --- STS 강도 계산 --- If Dev <> 0 Then Strength = (Close - Basis) / Dev; Else Strength = 0; // --- STS 강도 스무딩 --- StrengthSm = XAverage(Strength, SmoothLen); // --- Flow: 상승/하락 거래량 분해 --- If Close > Close[1] Then begin U = Volume; D = 0; end Else If Close < Close[1] Then begin U = 0; D = Volume; end Else begin U = Volume * 0.5; D = Volume * 0.5; end; // --- Flow: 최근 Period 합계 --- SU = Summation(U, Period); SD = Summation(D, Period); // --- Flow: 정규화 --- If (SU + SD) <> 0 Then FlowRaw = (SU - SD) / (SU + SD); Else FlowRaw = 0; // --- Flow: 스무딩 --- Flow = XAverage(FlowRaw, Smooth); // --- Flow: 기울기 색상 --- Slope = Flow - Flow[1]; If Slope > 0 Then Col = Magenta; Else If Slope < 0 Then Col = Cyan; // --- Flow: 자동 스케일 --- If UseAutoScale Then Scale = 1000 / MaxList(0.0001, Average(AbsValue(Flow), 200)); Else Scale = ScaleFix; // --- 통합 매수/매도 조건 --- If UpTrend and Flow > Thr Then begin Plot1(Close, "StrongBuy"); SetPlotColor(1, Green); end Else If DownTrend and Flow < -Thr Then begin Plot2(Close, "StrongSell"); SetPlotColor(2, Red); end; // --- 보조 플롯 --- Plot3(StrengthSm, "PriceStrength"); SetPlotColor(3, Orange); Plot4(Flow * Scale, "Flow xScale", Col); PlotBaseLine1(1000); Plot5(Thr * Scale, "UpperBand"); Plot6(-Thr * Scale, "LowerBand");
프로필 이미지
처음처럼22
61
글번호 194223
지표
답변완료

문의 드립니다.

안녕하세요 평소 많은 도움 주심에 감사드립니다. 아래의 A 라인이 B라인을 Crossup 하는 종목의 검색식을 부탁 드립니다. A 라인; 2*(DayOpen()+DayClose()+DayLow()+DayHigh())/4- (NpreDayOpen(A1)+NpreDayClose(A1) +NpreDayLow(A1)+NpreDayHigh(A1))/4 B 라인; 2*(NpreDayOpen(A1)+NpreDayClose(A1) +NpreDayLow(A1)+NpreDayHigh(A1))/4 - (DayOpen()+DayClose()+DayLow()+DayHigh())/4 지표조건 A1 ; 20 감사합니다.
프로필 이미지
ikksoo
78
글번호 194222
검색
답변완료

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

안녕하세요 분봉에서 현재가가 5선을 돌파하면 현재가 5선 20선이 정배열 되는 종목과 현재가가 20선을 돌파하면 현재가 5선 20선이 정배열이 되는 종목을 같이 검색되게 부탁드립니다.
프로필 이미지
60
글번호 194221
종목검색
답변완료

문의드립니다.

안녕하세요. 무포지션이면 1번째 100만원 1번째 최초 매수 무조건 들어갑니다. 이익 전량 청산 및 재매수 : 매수후에 매수가보다 200원 오르면 모두 1번째 매수분을 청산합니다. 청산 후에 무포지션이 되면 다시 100만원 재매수합니다. 물타기 : 1번째 매수가 보다 종가 아닌 현재가가 200원 떨어지면 2번째 100만원을 매수하여 1차 물타기 합니다. 총매수분은 200만원입니다. 그리고 매수평균가를 구합니다. 1차 물타기 후: 상방으로 매수평균가에 도달시: 1차 매수 후에 종가 아닌 현재가가 상방으로 매수평균가에 도달하면 전체 매수량의 절반을 청산합니다. 매수평균가에 도달후에: 1: 다시 상방으로 가서 매수평균가 + 200원 종가가 아닌 현재가로 오르면 즉시 잔량 전량을 전부 청산해서 잔고 0 으로 만들고 매수량이 없어지면 즉시 100만원어치를 최초 1차 매수합니다. 2: 반대로 하방으로 가면 매수평균가-200원 되면 물타기 100만원치 수량을 매수 합니다. 즉 물타기 매수후에 매수 평균가까지 오르면 절반만 청산하고 절반을 가지고 가는데 매수평준가 보다 200원 또 오르면 전부 청산하고 그 이후에 무포지션이면 100만원치를 사고 반대로 매수 평균가보다 200원 다시 내리면 100만원치를 다시 물타기 합니다. 1차 물타기후에 수직 연속 하방시: 1차 물타기 후에 상승 없이 수직 하락하면 1차 물타기 가격보다 -200원씩 아래로 더 내려갈 때마다 100만원치 수량을 25단계 까지 계속 삽니다. 그러나 현실은 내려가다가 오르다가 하기 때문에 이런 경우는 없어 보정합니다. 물타기 할 때마다 매수평균가를 정확히 구합니다. 어느 단계까지 물타기가 계속 될 지 모르지만 물타기 후에 상승하여 매수 평균가 까지 도달하면 총매수량의 절반을 즉시 청산하고 이 때의 매수평균가가 새로운 기준가격 B가 되어서 위로 200원 오르면 나머지 절반도 전부 청산해서 0 으로 만들고 무포지션이 되면 처음으로 돌아가 100만원치를 삽니다. 반대로 하방으로 내려가서 종가가 아닌 현재가가 새로운 기준가격 B - 200원 되면 100만원치를 삽니다. 그리고 새로운 매수평균가를 계산합니다. 즉 새로운 매수평균가 B보다 하방으로 현재가가 200원 움직이면 100만원치를 매수하고 상방으로 매수평균가에 도달하면 전체량의 절반 청산하고 절반 청산 후에 위로 200원 더 올라가면 전량을 청산해서 0 으로 만드는 것입니다.이것을 위험을 방지하기 위해 하방 25단계 까지도 진행되도록 설계합니다.하방 물타기 후에 매수평균가에 도달하지 못하고 계속 하방시 아래 최근 물타기 가격-200원 될 때마다 100만원치 수량을 계속 물타기 합니다. 설계 내용이 복잡하지만 수식을 부탁드립니다. 늘 감사드립니다.
프로필 이미지
종호
63
글번호 194220
시스템

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

프로필 이미지
구름달
2025-09-23
0
글번호 194219
지표

요타 님에 의해서 삭제되었습니다.

프로필 이미지
요타
2025-09-24
21
글번호 194218
지표
답변완료

지표 변환 부탁드립니다.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; EmreKb //@version=5 indicator("Market Structure Break & Order Block", "MSB-OB", overlay=true, max_lines_count=500, max_bars_back=4900, max_boxes_count=500) settings = "Settings" zigzag_len = input.int(9, "ZigZag Length", group=settings) show_zigzag = input.bool(true, "Show Zigzag", group=settings) fib_factor = input.float(0.33, "Fib Factor for breakout confirmation", 0, 1, 0.01, group=settings) text_size = input.string(size.tiny, "Text Size", [size.tiny, size.small, size.normal, size.large, size.huge], group=settings) delete_boxes = input.bool(true, "Delete Old/Broken Boxes", group=settings) bu_ob_inline_color = "Bu-OB Colors" be_ob_inline_color = "Be-OB Colors" bu_bb_inline_color = "Bu-BB Colors" be_bb_inline_color = "Be-BB Colors" bu_ob_display_settings = "Bu-OB Display Settings" bu_ob_color = input.color(color.new(color.green, 70), "Color", group=bu_ob_display_settings, inline=bu_ob_inline_color) bu_ob_border_color = input.color(color.green, "Border Color", group=bu_ob_display_settings, inline=bu_ob_inline_color) bu_ob_text_color = input.color(color.green, "Text Color", group=bu_ob_display_settings, inline=bu_ob_inline_color) be_ob_display_settings = "Be-OB Display Settings" be_ob_color = input.color(color.new(color.red, 70), "Color", group=be_ob_display_settings, inline=be_ob_inline_color) be_ob_border_color = input.color(color.red, "Border Color", group=be_ob_display_settings, inline=be_ob_inline_color) be_ob_text_color = input.color(color.red, "Text Color", group=be_ob_display_settings, inline=be_ob_inline_color) bu_bb_display_settings = "Bu-BB & Bu-MB Display Settings" bu_bb_color = input.color(color.new(color.green, 70), "Color", group=bu_bb_display_settings, inline=bu_bb_inline_color) bu_bb_border_color = input.color(color.green, "Border Color", group=bu_bb_display_settings, inline=bu_bb_inline_color) bu_bb_text_color = input.color(color.green, "Text Color", group=bu_bb_display_settings, inline=bu_bb_inline_color) be_bb_display_settings = "Be-BB & Be-MB Display Settings" be_bb_color = input.color(color.new(color.red, 70), "Color", group=be_bb_display_settings, inline=be_bb_inline_color) be_bb_border_color = input.color(color.red, "Border Color", group=be_bb_display_settings, inline=be_bb_inline_color) be_bb_text_color = input.color(color.red, "Text Color", group=be_bb_display_settings, inline=be_bb_inline_color) var float[] high_points_arr = array.new_float(5) var int[] high_index_arr = array.new_int(5) var float[] low_points_arr = array.new_float(5) var int[] low_index_arr = array.new_int(5) var box[] bu_ob_boxes = array.new_box(5) var box[] be_ob_boxes = array.new_box(5) var box[] bu_bb_boxes = array.new_box(5) var box[] be_bb_boxes = array.new_box(5) to_up = high >= ta.highest(zigzag_len) to_down = low <= ta.lowest(zigzag_len) trend = 1 trend := nz(trend[1], 1) trend := trend == 1 and to_down ? -1 : trend == -1 and to_up ? 1 : trend last_trend_up_since = ta.barssince(to_up[1]) low_val = ta.lowest(nz(last_trend_up_since > 0 ? last_trend_up_since : 1, 1)) low_index = bar_index - ta.barssince(low_val == low) last_trend_down_since = ta.barssince(to_down[1]) high_val = ta.highest(nz(last_trend_down_since > 0 ? last_trend_down_since : 1, 1)) high_index = bar_index - ta.barssince(high_val == high) if ta.change(trend) != 0 if trend == 1 array.push(low_points_arr, low_val) array.push(low_index_arr, low_index) if trend == -1 array.push(high_points_arr, high_val) array.push(high_index_arr, high_index) f_get_high(ind) => [array.get(high_points_arr, array.size(high_points_arr) - 1 - ind), array.get(high_index_arr, array.size(high_index_arr) - 1 - ind)] f_get_low(ind) => [array.get(low_points_arr, array.size(low_points_arr) - 1 - ind), array.get(low_index_arr, array.size(low_index_arr) - 1 - ind)] f_delete_box(box_arr) => if delete_boxes box.delete(array.shift(box_arr)) else array.shift(box_arr) 0 [h0, h0i] = f_get_high(0) [h1, h1i] = f_get_high(1) [l0, l0i] = f_get_low(0) [l1, l1i] = f_get_low(1) if ta.change(trend) != 0 and show_zigzag if trend == 1 line.new(h0i, h0, l0i, l0) if trend == -1 line.new(l0i, l0, h0i, h0) market = 1 market := nz(market[1], 1) // market := market == 1 and close < l0 and low < l0 - math.abs(h0 - l0) * fib_factor ? -1 : market == -1 and close > h0 and high > h0 + math.abs(h0 - l0) * fib_factor ? 1 : market last_l0 = ta.valuewhen(ta.change(market) != 0, l0, 0) last_h0 = ta.valuewhen(ta.change(market) != 0, h0, 0) market := last_l0 == l0 or last_h0 == h0 ? market : market == 1 and l0 < l1 and l0 < l1 - math.abs(h0 - l1) * fib_factor ? -1 : market == -1 and h0 > h1 and h0 > h1 + math.abs(h1 - l0) * fib_factor ? 1 : market bu_ob_index = bar_index bu_ob_index := nz(bu_ob_index[1], bar_index) for i=h1i to l0i[zigzag_len] index = bar_index - i if open[index] > close[index] bu_ob_index := bar_index[index] bu_ob_since = bar_index - bu_ob_index be_ob_index = bar_index be_ob_index := nz(be_ob_index[1], bar_index) for i=l1i to h0i[zigzag_len] index = bar_index - i if open[index] < close[index] be_ob_index := bar_index[index] be_ob_since = bar_index - be_ob_index be_bb_index = bar_index be_bb_index := nz(be_bb_index[1], bar_index) for i=h1i - zigzag_len to l1i index = bar_index - i if open[index] > close[index] be_bb_index := bar_index[index] be_bb_since = bar_index - be_bb_index bu_bb_index = bar_index bu_bb_index := nz(bu_bb_index[1], bar_index) for i=l1i - zigzag_len to h1i index = bar_index - i if open[index] < close[index] bu_bb_index := bar_index[index] bu_bb_since = bar_index - bu_bb_index if ta.change(market) != 0 if market == 1 line.new(h1i, h1, h0i, h1, color=color.green, width=2) label.new(int(math.avg(h1i, l0i)), h1, "MSB", color=color.new(color.black, 100), style=label.style_label_down, textcolor=color.green, size=size.small) bu_ob = box.new(bu_ob_index, high[bu_ob_since], bar_index + 10, low[bu_ob_since], bgcolor=bu_ob_color, border_color=bu_ob_border_color, text="Bu-OB", text_color=bu_ob_text_color, text_halign=text.align_right, text_size=text_size) bu_bb = box.new(bu_bb_index, high[bu_bb_since], bar_index + 10, low[bu_bb_since], bgcolor=bu_bb_color, border_color=bu_bb_border_color, text=l0 < l1 ? "Bu-BB" : "Bu-MB", text_color=bu_bb_text_color, text_halign=text.align_right, text_size=text_size) array.push(bu_ob_boxes, bu_ob) array.push(bu_bb_boxes, bu_bb) if market == -1 line.new(l1i, l1, l0i, l1, color=color.red, width=2) label.new(int(math.avg(l1i, h0i)), l1, "MSB", color=color.new(color.black, 100), style=label.style_label_up, textcolor=color.red, size=size.small) be_ob = box.new(be_ob_index, high[be_ob_since], bar_index + 10, low[be_ob_since], bgcolor=be_ob_color, border_color=be_ob_border_color, text="Be-OB", text_color=be_ob_text_color, text_halign=text.align_right, text_size=text_size) be_bb = box.new(be_bb_index, high[be_bb_since], bar_index + 10, low[be_bb_since], bgcolor=be_bb_color, border_color=be_bb_border_color, text=h0 > h1 ? "Be-BB" : "Be-MB", text_color=be_bb_text_color, text_halign=text.align_right, text_size=text_size) array.push(be_ob_boxes, be_ob) array.push(be_bb_boxes, be_bb) for bull_ob in bu_ob_boxes bottom = box.get_bottom(bull_ob) top = box.get_top(bull_ob) if close < bottom f_delete_box(bu_ob_boxes) else if close < top alert("Price in the BU-OB zone") else box.set_right(bull_ob, bar_index + 10) for bear_ob in be_ob_boxes top = box.get_top(bear_ob) bottom = box.get_bottom((bear_ob)) if close > top f_delete_box(be_ob_boxes) if close > bottom alert("Price in the BE-OB zone") else box.set_right(bear_ob, bar_index + 10) for bear_bb in be_bb_boxes top = box.get_top(bear_bb) bottom = box.get_bottom(bear_bb) if close > top f_delete_box(be_bb_boxes) else if close > bottom alert("Price in the BE-BB zone") else box.set_right(bear_bb, bar_index + 10) for bull_bb in bu_bb_boxes bottom = box.get_bottom(bull_bb) top = box.get_top(bull_bb) if close < bottom f_delete_box(bu_bb_boxes) else if close < top alert("Price in the BU-BB zone") else box.set_right(bull_bb, bar_index + 10) alertcondition(ta.change(market) != 0, "MSB", "MSB")
프로필 이미지
삼손감자
83
글번호 194217
지표

2wnwn 님에 의해서 삭제되었습니다.

프로필 이미지
2wnwn
2025-09-23
21
글번호 194216
지표
답변완료

조건검색식 문의드립니다.

M = floor(date/a); S = sum(b); HH = sum(H); MS1 = S - valuewhen(1, M!=M(1), S(1)); MH1 = HH - valuewhen(1, M!=M(1), HH(1)); MS2 = S - valuewhen(2, M!=M(1), S(1)) - MS1; MH2 = HH - valuewhen(2, M!=M(1), HH(1)) - MH1; 지표라인 = MH2 / MS2; 신호 = CrossUp(C, 지표라인); 지표변수 A 8 b 11.2 당일 장중에서, 30분봉 상에서, 위 신호가 한번이라도 발생했던 모든 종목들을 검출할 수 있도록 식 변환해주시면 감사드리겠습니다 (__)
프로필 이미지
사공하늘
64
글번호 194205
검색