커뮤니티

예스랭귀지 Q&A

글쓰기

와우리 님에 의해서 삭제되었습니다.

프로필 이미지
와우리
2025-12-01
6
글번호 228512
지표
답변완료

수식 부탁합니다

다음 키움 지표 수식을 YT로 변환 부탁합니다. 제가 해봤는데 원래와 많이 다르네요. 부탁드립니다.<수식1: 눌림목최고가>MA60 = ma(C, 기간A);돌파 = CrossUp(C, MA60);눌림시작 = CrossDown(C, MA60);// 돌파 후 첫눌림 시작 조건횟수 = CountSince(돌파, 눌림시작);첫눌림 = 횟수 == 1 && 횟수(1) == 0;// 첫눌림 발생 이전 120봉 동안 돌파 1회만(현재 돌파)첫눌림발생봉 = BarsSince(첫눌림);돌파조건 = sum(돌파(첫눌림발생봉), 기간B) == 1;// 조건 만족하는 첫눌림만 필터링유효첫눌림 = 첫눌림 && 돌파조건;// 가장 최근 유효 첫눌림 캔들의 고가ValueWhen(1, 유효첫눌림, H)<수식2: 눌림목최저가>MA60 = ma(C, 기간A);돌파 = CrossUp(C, MA60);눌림시작 = CrossDown(C, MA60);// 돌파 후 첫눌림 시작 조건횟수 = CountSince(돌파, 눌림시작);첫눌림 = 횟수 == 1 && 횟수(1) == 0;// 첫눌림 발생 이전 120봉 동안 돌파 1회만(현재 돌파)첫눌림발생봉 = BarsSince(첫눌림);돌파조건 = sum(돌파(첫눌림발생봉), 기간B) == 1;// 조건 만족하는 첫눌림만 필터링유효첫눌림 = 첫눌림 && 돌파조건;// 가장 최근 유효 첫눌림 캔들의 저가ValueWhen(1, 유효첫눌림, L)<지표조건설정>기간A=20기간B=10
프로필 이미지
고도산
2025-12-01
119
글번호 228511
지표
답변완료

문의드립니다

블랙숄즈 이론가로 내재변동성과 이론가 계산하는 인디케이터를 부탁드립니다-------------------------------블랙숄즈이론가 계산[파일첨부] : 네이버 블로그블랙숄즈 이론가 계산하는 사용자함수입니다.내재변동성 계산할 때 필요합니다.#================================================## 사용자함수 : BlackSholes# 작 성 자 : 수식지왕# 블 로 그 : http://yahoosir.blog.me#================================================## cpFlag : Call,Put 구분, 1,2로 표현# S : 기초자산가격의 가격, 예)주가지수(KOSPI200)# X : 행사가격# T : 잔존만기(연율)# r : 무위험 이자율, 예) CD금리# Vol : 변동성#================================================#Input:cpflag(numeric),S(numeric),X(numeric),T(numeric),r(numeric),vol(numeric);#================================================#var1 = (log(S/X) + (r + (vol^2) / 2) * T) / (vol*sqrt(T));var2 = var1 - vol*sqrt(T);If cpflag == 1 Then _BlackSholes = S * _NormSDist(var1) - X * (Exp((-r)*T)) * _NormSDist(var2);If cpflag == 2 Then _BlackSholes = X * (Exp((-r)*T)) * _NormSDist(-var2) - S * _NormSDist(-var1);첨부파일첨부파일_BlackSholes.yfu
프로필 이미지
요한
2025-12-01
149
글번호 228510
지표
답변완료

data2에 당일의 새로운 값이 들어왔는 지 판단하는 방법

data2에 참조데이타를 (예:개인 순매수) 넣고 9시 넘어서 첫 데이타가 들어오기 전에, data1에서는 data2의 값을 조회하면 전일 마지막 값이 조회될 것 같은데, 당일 새로운 값이 들어왔는 지 여부를 확인하는 방법이 어떤 것이 있을까요? 그래서, 고민해 본 방법들이 아래와 같은데,1) data2(c)의 stime이 전일 날짜와 다른 지를 확인이 가능할까요? (stime[1] 같은 포맷이 안될 것 같은데, 아직 직접 실험은 안해봤습니다.) 2) 아니면, data1에서 날짜가 바뀔 때 data2(c)를 읽어서 그것과 달라지는 값이 들어왔을 때를 당일 첫 값이 들어왔다고 인식해야 할까요? (아주 낮은 확률이지만 마지막 값과 첫 값이 같으면 새로운 값이 들어왔다고 인식 못하는 상황 발생이 우려) 3) 9시라는 고정값을 사용하면 간혹 장 시간이 시프트 되었을 때 특정일에는 수동으로 바꿔주는 방법이 있다고 할지라도 백테스트를 위해서는 적용이 불가하므로 특정 시간 이후에 들어온 값이라는 사건으로는 인식하고 싶지 않습니다. 4) DayIndex도 data2에 대해서 적용할 수 있는 방법이 있다면, 그것을 활용해 보는 방법이 있을까요?
프로필 이미지
온고지신
2025-12-01
92
글번호 228495
지표
답변완료

문의

거래량이 20이평 거래량보다 클때는 붉은색 작을 때는 검정색부탁드립니다
프로필 이미지
레전드
2025-12-01
65
글번호 228494
지표
답변완료

문의 드립니다.

//============================================================================== // Inputs //==============================================================================smoothingLength = input.int(5, "Price Smoothing Length", group = "SuperSmoother Settings") fastLength = input.int(20, "Fast MA", group = "Moving Average Settings") slowLength = input.int(50, "Slow MA", group = "Moving Average Settings") srcMA = input.source(close, "Source Data", group = "Moving Average Settings")atrLength = input.int(20, "ATR Length", group = "Signal Generation") atrMultiplier = input.float(1.2, "ATR Multiplier", group = "Signal Generation") signalSensitivity = input.float(0.03, "Signal Sensitivity", minval=0.01, maxval=1.0, step=0.01, group = "Signal Generation")showVortexFill = input.bool(true, "Show Vortex Fill", group = "Visualization") fillTransparency = input.int(85, "Fill Transparency", minval = 0, maxval = 100, group = "Visualization") enhancedColors = input.bool(true, "Enhanced Colors", group = "Visualization")enableCandleColor = input.bool(true, "Enable Candle Coloring", group = "Candle Colors") //============================================================================== // SuperSmoother Function //==============================================================================supersmoother(src, length) => a1 = math.exp(-1.414 * 3.14159 / length) b1 = 2.0 * a1 * math.cos(1.414 * 3.14159 / length) c2 = b1 c3 = -a1 * a1 c1 = 1 - c2 - c3 ss = 0.0 ss := c1 * (src + nz(src[1])) / 2 + c2 * nz(ss[1]) + c3 * nz(ss[2]) ss//============================================================================== // Calculations //==============================================================================smoothedPrice = supersmoother(srcMA, smoothingLength) fastMA = ta.ema(smoothedPrice, fastLength) slowMA = ta.ema(smoothedPrice, slowLength)// True oscillator calculation - difference between MAs oscillator = fastMA - slowMA// Normalize oscillator for better visualization oscillatorNormalized = oscillator / ta.atr(20) * 100// Enhanced color system accel_raw = oscillator - oscillator[1] accel_smooth = ta.ema(accel_raw, 3)tanh(x) => ex = math.exp(2 * x) (ex - 1) / (ex + 1)accel_norm = tanh(accel_smooth / (ta.atr(20) * 0.01)) hue_raw = 60 + accel_norm * 60 hue = na(hue_raw[1]) ? hue_raw : (hue_raw + hue_raw[1]) / 2hsv_to_rgb(h, s, v) => c = v * s x = c * (1 - math.abs((h / 60) % 2 - 1)) m = v - c r = 0.0, g = 0.0, b = 0.0 if h < 60 r := c, g := x, b := 0 else if h < 120 r := x, g := c, b := 0 else if h < 180 r := 0, g := c, b := x else if h < 240 r := 0, g := x, b := c else if h < 300 r := x, g := 0, b := c else r := c, g := 0, b := x color.rgb(int((r + m) * 255), int((g + m) * 255), int((b + m) * 255))oscillatorColor = enhancedColors ? hsv_to_rgb(hue, 1.0, 1.0) : color.yellow// Signal line (smoothed oscillator) signalLine = ta.ema(oscillator, 25)//============================================================================== // Signal Generation - Focus on Oscillator-Signal Line Crossovers //==============================================================================atr = ta.atr(atrLength) minSignalThreshold = atr * signalSensitivity// Primary signals: Oscillator crossing above/below signal line bullishSignal = ta.crossover(oscillator, signalLine) and math.abs(oscillator - signalLine) > minSignalThreshold bearishSignal = ta.crossunder(oscillator, signalLine) and math.abs(oscillator - signalLine) > minSignalThreshold// Additional confirmation: momentum direction oscillatorMomentum = oscillator - oscillator[1] signalMomentum = signalLine - signalLine[1]// Enhanced signals with momentum confirmation strongBullishSignal = bullishSignal and oscillatorMomentum > 0 strongBearishSignal = bearishSignal and oscillatorMomentum < 0//============================================================================== // Plots //==============================================================================// Zero line reference zeroLine = hline(0, "Zero Line", color.gray, hline.style_dashed)// Main oscillator oscillatorPlot = plot(oscillator, color = oscillatorColor, title = "Oscillator", linewidth = 2)// Signal line signalColor = enhancedColors ? #FF6B35 : color.orange signalPlot = plot(signalLine, color = signalColor, title = "Signal Line", linewidth = 1)// Histogram (optional visualization) histogramColor = oscillator > signalLine ? (enhancedColors ? #00FF7F : color.green) : (enhancedColors ? #FF1493 : color.red) plot(oscillator - signalLine, color = color.new(histogramColor, 70), style = plot.style_histogram, title = "Histogram")// Zero line as plot for fill compatibility zeroLinePlot = plot(0, color = color.new(color.gray, 100), title = "Zero Line Plot")// Oscillator fills oscillatorFillColor = showVortexFill ? (oscillator > 0 ? color.new(enhancedColors ? #00FF7F : color.green, fillTransparency) : color.new(enhancedColors ? #FF1493 : color.red, fillTransparency)) : nafill(oscillatorPlot, zeroLinePlot, color = oscillatorFillColor, title = "Oscillator Fill")// Signal crossover fill crossFillColor = showVortexFill ? (oscillator > signalLine ? color.new(color.blue, fillTransparency + 10) : color.new(color.purple, fillTransparency + 10)) : nafill(oscillatorPlot, signalPlot, color = crossFillColor, title = "Signal Fill")// Updated Signal Plots - Focus on Crossover Signals plotshape(bullishSignal, "Buy Signal", shape.triangleup, location.belowbar, color.green, 0, size = size.small, force_overlay = true) plotshape(bearishSignal, "Sell Signal", shape.triangledown, location.abovebar, color.red, 0, size = size.small, force_overlay = true)// Strong signals with momentum confirmation plotshape(strongBullishSignal, "Strong Buy", shape.triangleup, location.belowbar, color.lime, 0, size = size.normal, force_overlay = true) plotshape(strongBearishSignal, "Strong Sell", shape.triangledown, location.abovebar, color.maroon, 0, size = size.normal, force_overlay = true)// Signal line crossover areas for additional context bgcolor(bullishSignal ? color.new(color.green, 95) : na, title = "Bullish Signal BG") bgcolor(bearishSignal ? color.new(color.red, 95) : na, title = "Bearish Signal BG")// Candle plot based on signal convergence and divergence // Determine candle color based on oscillator position relative to signal line candleColor = if not enableCandleColor na else if oscillator > signalLine color.green else if oscillator < signalLine color.red else color.gray// Apply candle coloring barcolor(candleColor, title = "Candle Color")위 수식에서 히스토그램은 빼고 두 라인선만 추출해서 예스 지표로 만들어주시고 그 두 선이 교차할때 매수/매도 신호가 나오는 시스템 수식도 하나 더 만들어주세요.
프로필 이미지
신대륙발견
2025-12-01
202
글번호 228493
지표
답변완료

종목검색식 요청드립니다.

아래 키움수식라인을 N봉(수정가능하게)이내 돌파한 종목을 검색하는 검색식과 지표를 만들고 싶습니다. 도움 부탁드립니다.* 키움수식라인 (Period - 14) Valuewhen(2,RSI(Period)<30,H);항상 감사합니다.^^
프로필 이미지
onlypsn
2025-11-30
89
글번호 228492
종목검색
답변완료

부탁드립니다

금일 Pivot이 전일 Pivot 보다 크다를 어떻게 표현하는지요?Pivot(1)Pivot[1]위의 두가지 차이가 무었입니까?
프로필 이미지
와우리
2025-11-30
82
글번호 228490
지표
답변완료

파라볼릭 강세약세

파라볼릭의 상승과 하락을, 강세 약세 박스로 표시. 감사합니다.
파라볼릭강세약세
프로필 이미지
고성
2025-11-30
80
글번호 228489
지표
답변완료

시스템식 질문입니다

1주식 1분봉 통합차트 에서조건 A 만족 종가의 진입가격 범위를 KRX 기준으로 상한가 하한가 사이 만족시스템식 입니다통합차트에서 단순히 dayclose(1) closeD(1) 를 불어오면 nxt 마지막값을 불어오게 되어서 상하한가 잘못불어오게 되더라구요2진입 후SL TP 설정으로 청산이 된 봉에는 (같은봉) 진입 금지 조건을 만들고싶습니다감사합니다
프로필 이미지
파인애플
2025-11-30
110
글번호 228488
시스템