커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 부탁 드림니다

안녕하십니까?수식 부탁 드립니다1. 9시 시가선2. 9시 시가_수직선3.고점A = ma(가격, 기간1, 이평종류); B = ma(가격, 기간2, 이평종류); HighestSince(1, CrossUp(A, B), A)4. 저점A = ma(가격, 기간1, 이평종류); B = ma(가격, 기간2, 이평종류); LowestSince(1, CrossDown(A, B), A)---------------------------------------------가격 = 종가기간1 = 5 기간2 = 20이평종류 = 가중----------------------------------------------5. 5일선(가중)6. 20일선(가중)7. 5-20_GC 선8. 5-20_GC 자리_수직선--------------------------------------------항상 감사 합니다
프로필 이미지
s1017051
2025-12-01
25
글번호 228532
지표
답변완료

수식 확인부탁드립니다.

1..mvar1 = Sarv+(AF_value)*(EP-SAR_Value); mvar2 = MAX(mvar1,EntryPrice- EntryATR*ATr1); mvar3 = Min(mvar1,EntryPrice+ EntryATR*1.5); if marketPosition == -1 and Direction == -1 Then { ExitShort("sx1",AtStop,mvar3); ExitShort("sx3",AtLimit,EntryPrice-entryatr*5,"",1,1); } 이 청산식은 파라볼릭반전신호와 atr*1.5 중 비교하여 으로 손절을하라는 내용과 파라볼릭반전신호와 atr*5값중에서 둘중에 먼저 도달하는 지표에 청산하라는 내용이 다 들어간게 맞는건가요? 요지는 파라볼릭 돌파가 손절과 익절에 모두 작동하는지요? 2.참고차트가 일봉이고 일봉의 macd>0 이면 1이다(Data2(C)). 이고 1인상태에서 60분차트(기본차트)에서 macd>0 이면 buy라는 조건이 있다면 . . 만약 어제 종가기준으로는 1상태였으나 당일 장중에는 일봉상 macd가 >< 0 를 반복하게 되면 장중에는 60분차트에서 macd>0 라고 해도 buy진입을 하지못하는게 맞는가요?
프로필 이미지
산수유
2025-12-01
21
글번호 228529
시스템
답변완료

문의드립니다

수고하십니다.아래수식참고하여 시스템식부탁드림니다1. data2 rsi oscillotor bull매수신호시 data1매수하고 data1 스토캐스틱과열시 매도식.Inputs: RSILength(10), OverSold(30);If Crossup(RSI(RSILength), OverSold) Then Buy ("RSI");Input : Period(12), Period1(5);Var : value(0);value = StochasticsK(Period,Period1);# 매도/매수청산If CrossDown(value, 80) Then { Sell(); }
프로필 이미지
2685up
2025-12-01
16
글번호 228522
시스템
답변완료

문의 드립니다.

도움에 감사 드립니다.Array : dizii[500](0);를 Array : dizii[1](0);로 변경해도 지표의 결과가 같이 나옵니다.질문) Array : dizii[1](0);로 해도 수식에 영향이 없는지요?input : len(88),mult(2.0);input : cu(Red),cl(Lime);input : dashed(false);input : transp(true);var : src(0),crr(0),k(0),sum(0),i(0),dev(0);var : nmid(0),nupper(0),nlower(0);var : upper(0),lower(0);Array : dizii[500](0);src = (h+l+c)/3;Function cr Numeric input : x(Numeric),y(Numeric); var : z(0),weight(0),i(0); z = 0.0; weight = 0.0; for i = 0 to y - 1 step 1 { z = z + x[i] * ((y - 1) / 2 + 1 -abs(i - (y - 1) / 2)); } cr = z / ((y + 1) / 2 * (y + 1) / 2);EndFunctioncrr = cr(src, 2 * len - 1);for k = 0 to len - 1 step 1{ sum = 0.0; for i = 0 to 2 * len - 2 - k step 1 { sum = sum + (len - abs(len - 1 - k - i)) * src[i] / (len * len - k * (k + 1) / 2); } dizii[k] = sum;}dev = mult * std(src, len);nmid = wma(src, len);nupper = nmid + wma(dev,len);nlower = nmid - wma(dev,len);upper = crr + cr(dev, 2 * len - 1);lower = crr - cr(dev, 2 * len - 1);plot1(lower,"lowr",cl);plot2(upper,"upper",cu);
프로필 이미지
yes
2025-12-01
31
글번호 228514
지표

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

프로필 이미지
와우리
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
40
글번호 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
25
글번호 228510
지표
답변완료

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

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

문의

거래량이 20이평 거래량보다 클때는 붉은색 작을 때는 검정색부탁드립니다
프로필 이미지
레전드
2025-12-01
19
글번호 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
39
글번호 228493
지표