커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

후행스팬 60이평 돌파

안녕하세요, 도움 감사드립니다. 키움HTS에서 지표로 사용하고 있는, 후행스팬이 지수60이평 돌파시의 신호입니다. M=shift(close,-midPeriod+1); Crossup(M,eavg(M,60,25)) 지표변수 - midperiod 26 이것을 종목검색으로 변환 부탁드립니다.
프로필 이미지
리버피닉스
2025-05-15
233
글번호 190853
종목검색
답변완료

지표 변환 부탁드립니다.

//@version=6 //----------------------------------------------------------------------------- // NeuroTrend &#8211; Adaptive AI Trend Engine // //: // NeuroTrend is an adaptive, AI-assisted trend indicator designed for momentum // and swing trading. It uses dynamic EMAs, slope forecasting, neural memory, // and a trend classification engine to deliver real-time insights. The system // includes confidence scoring, reversal detection, and a premium visual dashboard. // // Key Features: // &#8226; Adaptive EMA smoothing based on volatility and momentum conditions // &#8226; Real-time slope angle, power, and projected trend forecasts // &#8226; Neural memory system for volatility-aware threshold calibration // &#8226; Classification of trend phases: Impulse, Cooling, Reversal, Stall, Neutral // &#8226; Confidence score derived from DMI, slope, and volatility ratio // &#8226; Reversal and stall zone detection with alert labeling // &#8226; AI-style commentary with smart coaching logic // &#8226; Compact dashboard with all trend diagnostics in one view // // Usage: // Best used to time entries // into strong trend conditions, confirm trend continuation, or detect exhaustion // before reversals. // // Author: AresIQ // License: Mozilla Public License 2.0 // Terms: This open-source 스크립트 may be modified and reused with attribution. // // Link to License: https://www.mozilla.org/en-US/MPL/2.0/ //----------------------------------------------------------------------------- indicator("NeuroTrend", overlay=true) // USER INPUTS ₩₩ enableReflex = input.bool(false, "Enable Reflex Mode", inline="reflex", group="Turbo Mode") showCommentary = input.bool(true, "Show AI Commentary", inline="ai", group="Neuro Settings") tablePosition = input.string("Top Right", "Dashboard Position", options=["Top Left", "Top Middle", "Top Right", "Bottom Left", "Bottom Middle", "Bottom Right"], group="Neuro Settings") pos = tablePosition == "Top Left" ? position.top_left : tablePosition == "Top Middle" ? position.top_center : tablePosition == "Top Right" ? position.top_right : tablePosition == "Bottom Left" ? position.bottom_left : tablePosition == "Bottom Middle" ? position.bottom_center : position.bottom_right commentaryTextColor = input.color(color.white, "Commentary Text Color", inline="commentaryColor", group="Neuro Settings") tableTextColor = input.color(color.white, "Dashboard Text Color", group="Neuro Settings") baseFast = input.int(10, "Base Fast EMA") baseSlow = input.int(21, "Base Slow EMA") showConfidence = input.bool(true, "Show Confidence Score", inline="conf", group="Neuro Settings") showReversal = input.bool(true, "Show Reversal Warnings", inline="rev", group="Neuro Settings") showStall = input.bool(true, "Show Stall Alerts", inline="stall", group="Neuro Settings") showProjection = input.bool(true, "Show Slope Projection", inline="proj", group="Neuro Settings") enableAlerts = input.bool(true, "Enable Smart Alerts", inline="alerts", group="Alerts") // CUSTOM ALERT BUILDER ₩₩ customEnableAlerts = input.bool(false, "Enable Custom Alerts", group="Alerts") customMinConfidence = input.int(60, "Min Confidence", minval=0, maxval=100, group="Alerts") customRequireImpulse = input.bool(true, "Require Impulse", group="Alerts") customRequireBullish = input.bool(false, "Only Bullish Trends", group="Alerts") customRequireBearish = input.bool(false, "Only Bearish Trends", group="Alerts") customBlockReversal = input.bool(true, "Ignore Reversal Risk", group="Alerts") customBlockStall = input.bool(false, "Ignore Stall", group="Alerts") // SESSION PHASE DETECTION ₩₩ hourNow = hour(time) minuteNow = minute(time) sessionMinute = (hourNow - 9) * 60 + minuteNow - 30 // 0 at 9:30 AM sessionPhase = sessionMinute < 90 ? "&#9200; Morning Drive" : sessionMinute < 270 ? "&#128564; Midday Drift" : sessionMinute <= 390 ? "&#9889; Power Hour" : "&#9203; After Hours" // CONTEXT ₩₩ atr = ta.atr(14) rsi = ta.rsi(close, 14) volFactor = atr / close momentumFactor = (rsi - 50) / 100 // ADAPTIVE LENGTHS ₩₩ fastLen = enableReflex ? baseFast * 0.75 : baseFast - volFactor * 5 + momentumFactor * 5 slowLen = enableReflex ? baseSlow * 0.85 : baseSlow + volFactor * 5 - momentumFactor * 5 alphaFast = 2.0 / (fastLen + 1.0) alphaSlow = 2.0 / (slowLen + 1.0) // ADAPTIVE EMA FUNCTION ₩₩ adaptiveEMA(src, alpha) => var float result = na result := na(result[1]) ? src : alpha * src + (1 - alpha) * result[1] // EMAS ₩₩ emaFast = adaptiveEMA(close, alphaFast) emaSlow = adaptiveEMA(close, alphaSlow) // SLOPE METRICS ₩₩ slopeDeg = math.atan(emaFast - emaSlow) * 180 / math.pi slopePower = enableReflex ? slopeDeg * (1 + volFactor * 0.5 + momentumFactor * 1.5) : slopeDeg * (1 + volFactor + momentumFactor) glowIntensity = math.min(math.abs(slopePower), 50) // COLOR ENGINE ₩₩ baseColor = slopePower > 0 ? color.rgb(38, 230, 0) : color.rgb(168, 45, 36) // RENDER LAYERS ₩₩ glowBase = slopePower > 0 ? color.rgb(80, 255, 100) : color.rgb(255, 70, 70) coreColor = color.new(glowBase, 0) glow1 = color.new(glowBase, 75) glow2 = color.new(glowBase, 85) shadowTrail = color.new(glowBase, 92) plot(emaFast, title="Fast EMA Core", color=coreColor, linewidth=3) plot(emaFast, title="Glow Layer 1", color=glow1, linewidth=6) plot(emaFast, title="Glow Layer 2", color=glow2, linewidth=9) plot(emaSlow, title="Slow EMA", color=color.new(glowBase, 80), linewidth=2) plot(emaFast[5], title="Shadow Trail", color=shadowTrail, linewidth=1, style=plot.style_line) // FILLS ₩₩ fill(plot(emaFast), plot(emaSlow), color=color.new(glowBase, 90), title="Trend Ribbon Fill") // NEURAL MEMORY ENGINE ₩₩ atrMemory = ta.sma(atr, enableReflex ? 20 : 50) slopeStdDev = ta.stdev(slopePower, enableReflex ? 20 : 50) volatilityState = (atr / atrMemory + slopeStdDev / 30) / 2 volatilityFactor = math.min(math.max(volatilityState, 0.5), 1.5) // Auto-calibrated thresholds impulseThreshold = 40 * volatilityFactor coolingThreshold = 20 * volatilityFactor stallSlopeLimit = 10 * volatilityFactor rsiFlatMin = 48 - (5 * (volatilityFactor - 1)) rsiFlatMax = 52 + (5 * (volatilityFactor - 1)) // TREND STATE CLASSIFIER ₩₩ isImpulse = math.abs(slopePower) > impulseThreshold isCooling = math.abs(slopePower) > coolingThreshold and math.abs(slopePower) <= impulseThreshold isNeutral = math.abs(slopePower) <= 20 isReversal = ta.change(slopeDeg, 1) < -30 or ta.rsi(close, 14) < 40 trendDir = slopePower > 0 ? "Bullish" : "Bearish" // TREND AGE & DECAY ₩₩ var int trendAge = 0 trendAge := trendDir == trendDir[1] ? trendAge + 1 : 1 decayFactor = math.max(1.0 - trendAge / 100, 0.5) // Caps decay at 50% trendColor = slopePower > 0 ? color.lime : color.red phaseText = isImpulse ? "&#128293; Impulse" : isCooling ? "&#127744; Cooling" : isReversal ? "&#9888;&#65039; Reversal Risk" : "&#9940; Neutral" // PHASE MEMORY ENGINE ₩₩ var string prevPhase = na phaseChanged = not na(prevPhase) and phaseText != prevPhase prevPhase := phaseText slopeScore = math.round(math.abs(slopePower) * 2) // CONFIDENCE SCORING ENGINE ₩₩ [plusDI, minusDI, adx] = ta.dmi(14, 14) trendStrength = math.min(adx, 50) / 50 directionBias = math.abs(plusDI - minusDI) / 100 volatilityRatio = math.min(atr / math.abs(emaFast - emaSlow), 3.0) / 3.0 slopeNorm = math.min(math.abs(slopePower), 50) / 50 // CONFIDENCE SCORE ₩₩ confidenceRaw = (trendStrength + directionBias + slopeNorm + (1 - volatilityRatio)) / 4 confidenceScore = math.round(confidenceRaw * 100 * decayFactor) confidenceLabel = confidenceScore >= 75 ? "High" : confidenceScore >= 50 ? "Medium" : "Low" // REVERSAL SENSOR ENGINE ₩₩ slopeFlipping = ta.change(math.sign(slopePower)) != 0 slopeCollapsing = math.abs(slopePower) < 10 rsiDro*pping = rsi < 45 reversalRisk = (slopeFlipping and slopeCollapsing) or (rsiDro*pping and slopePower < 0) // REVERSE SYMMETRY ₩₩ isBullishReversal = reversalRisk and slopePower > 30 and close > emaFast and close > emaSlow isBearishReversal = reversalRisk and slopePower < -30 and close < emaFast and close < emaSlow isReversingNow = isBullishReversal or isBearishReversal reversalLabel = isBullishReversal ? "&#128640; Bullish Reversal" : isBearishReversal ? "&#128680; Bearish Reversal" : reversalRisk ? "&#9888;&#65039; Reversal Threat" : "&#9989; Stable" // RECOVERY DETECTION ENGINE ₩₩ wasBearish = trendDir[1] == "Bearish" emaCrossover = close > emaFast and close[1] < emaFast[1] and close > emaSlow recoveryBounce = isBullishReversal and wasBearish and emaCrossover // STALL DETECTOR ENGINE ₩₩ slopeLow = math.abs(slopePower) < stallSlopeLimit rsiFlat = rsi > rsiFlatMin and rsi < rsiFlatMax atrCompression = atr < ta.sma(atr, 20) stallDetected = rsiFlat and slopeLow and atrCompression stallLabel = stallDetected ? "&#128721; Dead Zone" : "&#9989; Active" // SLOPE PROJECTION ENGINE ₩₩ slopeNow = slopeDeg slopePrev = math.atan(emaFast[1] - emaSlow[1]) * 180 / math.pi slopeDelta = slopeNow - slopePrev slopeAccel = slopeDelta - (slopePrev - math.atan(emaFast[2] - emaSlow[2]) * 180 / math.pi) slopeForecast = slopeNow + slopeDelta + slopeAccel // ADAPTIVE SLOPE CLAMPING ENGINE ₩₩ baseClamp = 45.0 dynamicRange = 15.0 forecastVolatilityFactor = math.min(math.max((atr / ta.sma(atr, 50) + ta.stdev(slopePower, 50) / 30) / 2, 0.5), 1.5) adaptiveClamp = baseClamp + (forecastVolatilityFactor - 1.0) * dynamicRange slopeForecastClamped = math.max(math.min(slopeForecast, adaptiveClamp), -adaptiveClamp) // SLOPE PROJECTION CONFIDENCE ₩₩ slopeMomentum = math.abs(slopeAccel) forecastConfidence = slopeMomentum > 2.5 ? "High" : slopeMomentum > 1.0 ? "Medium" : "Low" projectionLabel = slopeForecastClamped > 15 ? "&#128200; Rising" : slopeForecastClamped < -15 ? "&#128201; Falling" : "&#10134; Sideways" projectionValue = " (" + str.tostring(math.round(slopeForecastClamped)) + "°, " + forecastConfidence + " Confidence)" // MOMENTUM FADING DETECTION ₩₩ slopeFading = ta.change(slopePower) < 0 and not stallDetected and not reversalRisk and math.abs(slopePower) > 15 momentumFading = slopeFading and slopePower[1] > slopePower[2] and slopePower > 10 // SMART ENTRY WINDOW DETECTION ₩₩ impulseActive = isImpulse and slopePower > 20 and confidenceScore >= 60 pulledBack = close[1] < emaFast[1] and close > emaFast and low < emaFast smartEntryWindow = impulseActive and pulledBack plotshape(smartEntryWindow, title="Smart Entry", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.teal) // COMMENTARY GENERATOR ₩₩ aiCommentary = phaseChanged ? "&#128260; Phase Shift: " + prevPhase + " → " + phaseText : recoveryBounce ? "&#128257; Recovery rally &#8212; bounce reclaiming trend structure. (" + sessionPhase + ")" : smartEntryWindow ? "&#127919; Smart entry window &#8212; impulse pullback with reclaim. (" + sessionPhase + ")" : momentumFading ? "&#129707; Momentum weakening &#8212; trend may lose steam soon. (" + sessionPhase + ")" : isImpulse and confidenceScore >= 75 and not reversalRisk ? "&#128200; Strong trend forming &#8212; consider riding momentum. (" + sessionPhase + ")" : isCooling and confidenceScore >= 50 ? "&#127744; Trend slowing &#8212; caution if already in position. (" + sessionPhase + ")" : stallDetected and not isImpulse ? "&#9208;&#65039; Price stalling &#8212; this is not the time to enter. (" + sessionPhase + ")" : isBullishReversal ? "&#128640; Bullish reversal confirmed &#8212; breakout in progress. (" + sessionPhase + ")" : isBearishReversal ? "&#128680; Bearish reversal confirmed &#8212; breakdown in progress. (" + sessionPhase + ")" : reversalRisk and confidenceScore < 50 ? "&#9888;&#65039; Reversal threat building &#8212; watch for breakdown or bounce. (" + sessionPhase + ")" : confidenceScore < 30 ? "&#129514; Low conviction trend &#8212; better to wait for clarity. (" + sessionPhase + ")" : "&#10134; Trend steady &#8212; no action required right now. (" + sessionPhase + ")" var label commentaryLabel = na if showCommentary and not na(high) if not na(commentaryLabel) label.delete(commentaryLabel) commentaryLabel := showCommentary and not na(high) ? label.new(bar_index, math.max(high, high[1], high[2]) + atr * 1.5, aiCommentary, xloc.bar_index, yloc.price, style=label.style_label_center, size=size.normal, textcolor=commentaryTextColor, color=color.new(#eece89, 85), textalign=text.align_center, tooltip="NeuroTrend Commentary") : commentaryLabel // DASHBOARD RENDERING ₩₩ var table dashboard = table.new(pos, 7, 2, border_width=1, frame_color=color.new(color.white, 90), bgcolor=color.new(color.navy, 95)) if bar_index % 5 == 0 table.cell(dashboard, 0, 0, "&#129504; Phase", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 0, 1, phaseText, text_color=tableTextColor, bgcolor=color.new(trendColor, 20), text_size=size.small) table.cell(dashboard, 1, 0, "&#128200; Direction", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 1, 1, trendDir, text_color=tableTextColor, bgcolor=color.new(trendColor, 10), text_size=size.small) table.cell(dashboard, 2, 0, "&#128267; Slope Power", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 2, 1, str.tostring(slopeScore) + " / 100", text_color=tableTextColor, bgcolor=color.new(trendColor, 85), text_size=size.small) if showConfidence table.cell(dashboard, 3, 0, "&#129504; Confidence", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 3, 1, confidenceLabel + " (" + str.tostring(confidenceScore) + ")", text_color=tableTextColor, bgcolor=color.new(trendColor, 80), text_size=size.small) if showReversal table.cell(dashboard, 4, 0, "&#128680; Reversal Risk", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 4, 1, reversalLabel, text_color=tableTextColor, bgcolor=reversalRisk ? color.new(color.red, 60) : color.new(color.green, 80), text_size=size.small) if showStall table.cell(dashboard, 5, 0, "&#9208;&#65039; Momentum", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 5, 1, stallLabel, text_color=tableTextColor, bgcolor=stallDetected ? color.new(color.orange, 60) : color.new(color.green, 80), text_size=size.small) if showProjection table.cell(dashboard, 6, 0, "&#128225; Projection", text_color=tableTextColor, bgcolor=color.new(color.black, 85), text_size=size.small) table.cell(dashboard, 6, 1, projectionLabel + projectionValue, text_color=tableTextColor, bgcolor=color.new(trendColor, 70), text_size=size.small) // SMART ALERT CONDITION ₩₩ customAlertCondition = customEnableAlerts and confidenceScore >= customMinConfidence and (not customRequireImpulse or isImpulse) and (not customRequireBullish or slopePower > 0) and (not customRequireBearish or slopePower < 0) and (not customBlockReversal or not reversalRisk) and (not customBlockStall or not stallDetected) alertcondition(customAlertCondition, title="Custom NeuroTrend Alert", message="&#128276; NeuroTrend: Your custom alert conditions have been met.") // BUY / SELL SIGNAL LABELS ₩₩ showBuySellLabels = input.bool(true, "Show Buy/Sell Labels", group="Neuro Settings") buySignal = ta.crossover(slopeDeg, 0) and slopePower > 0 sellSignal = ta.crossunder(slopeDeg, 0) and slopePower < 0 if showBuySellLabels if buySignal label.new(bar_index, low, "BUY", style=label.style_label_up, color=color.green, textcolor=color.white, yloc=yloc.belowbar) if sellSignal label.new(bar_index, high, "SELL", style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
프로필 이미지
삼손감자
2025-05-15
569
글번호 190852
지표
답변완료

글번호92636관련 수정부탁드립니다

글번호92636 관련... 조건식 잘적용해서쓰고있는데요... 캔들이 양봉일때는 검색이 안되는것같아요.. 양봉일때도 같이 검색되게 수정부탁드립니다
프로필 이미지
장대박
2025-05-15
206
글번호 190851
종목검색
답변완료

수식을 짜보려하는데, 자꾸 에러가 납니다.

수식을 짜봤는데, 잘 안됩니다. 장기단순이평(150, 200) 정배열 단순이평 50/150/200 우상향 특히(200이평은 최소 1달 이상 우상향) 이런 조건을 구현하려고 다음과 같이 짜봤는데 MA(CLOSE,150)>MA(CLOSE,200) AND MA(CLOSE,50)>MA(CLOSE,50[1] AND MA(CLOSE,150)>MA(CLOSE,150[1] AND MA(CLOSE,200)>MA(CLOSE,200[1] AND MA(CLOSE,200)>MA(CLOSE,200[20] 계속 오류가 뜹니다.(( 5번째줄, 문법에러, 잘못된 토큰:'<File End>',올수있는것:';' )) 이렇게요... 위에 의도에 맞게 수식을 짜보고 싶은데 도와주세요.
프로필 이미지
unclecho
2025-05-15
212
글번호 190850
종목검색

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

프로필 이미지
요타
2025-05-15
9
글번호 190849
지표
답변완료

문의드려요

시스템 성능보고서 중 "거래내역" 탭을 매일 엑셀로 자동으로 받는 방법이 있을까요? 아니면 항상 수동으로 엑셀로 보내야 하는지요
프로필 이미지
gunman
2025-05-15
186
글번호 190848
시스템

당근인생 님에 의해서 삭제되었습니다.

프로필 이미지
당근인생
2025-05-15
12
글번호 190847
종목검색
답변완료

질문드립니다

안녕하세요 장이 갭(갭상, 또는 갭락)이 발생하며 시작하는 날, 신호 "A"가 첫번째 발생할때는 진입을 안 시키고 두번째 신호부터 진입시키는 식이 궁금합니다. 감사합니다
프로필 이미지
맘속의행복
2025-05-15
163
글번호 190846
시스템
답변완료

시스템 진입 오류

안녕하세요 해당 코드가 진입이 전혀 발생하지 않아 혹시 틀린 부분이 있는 검증 부탁드립니다. 감사합니다. 전략 전일 23:00~23:30 사이 형성된 고저 범위를 기준으로, 자정(00:00)봉에서 돌파 시 다음 봉에 진입하고, 손절은 해당 범위만큼, 익절은 손절의 1.5배로 설정합니다. Inputs: ORLen(1), // OR 범위 길이 (1=2봉, 2=3봉, ...) 1~3(step 1) RR(1.5), // 익절: 손절의 RR배 1.5~2.5 (step 0.25) MinRange(0.0); // OR 범위가 이 값보다 작으면 진입 안함 0~0.03 (step 0.005) Vars: orHigh(0), orLow(0), orRange(0), tradeEntered(False), orStartTime(2300 - (ORLen - 1) * 100); // OR 시작 시간 계산 // Opening Range 계산 If Time == orStartTime Then Begin orHigh = High; orLow = Low; tradeEntered = False; End; If Time > orStartTime and Time <= 2330 Then Begin orHigh = MaxList(orHigh, High); orLow = MinList(orLow, Low); End; If Time == 2330 Then orRange = orHigh - orLow; // 자정 봉에서 돌파 여부 확인 If Time >= 0 and Time <= 30 and tradeEntered == False and MarketPosition == 0 Then Begin If orRange >= MinRange Then Begin If Close > orHigh Then Begin Buy("ORB_Long", AtMarket, DEf, 1); tradeEntered = True; End Else If Close < orLow Then Begin Sell("ORB_Short", AtMarket, DEf, 1); tradeEntered = True; End; End; End; // 롱 포지션: 손절 / 익절 If MarketPosition == 1 Then Begin If Close < EntryPrice - orRange Then ExitLong("StopL"); If Close > EntryPrice + orRange * RR Then ExitLong("TargetL"); End; // 숏 포지션: 손절 / 익절 If MarketPosition == -1 Then Begin If Close > EntryPrice + orRange Then ExitShort("StopS"); If Close < EntryPrice - orRange * RR Then ExitShort("TargetS"); End;
프로필 이미지
sewzie
2025-05-15
180
글번호 190845
시스템

오말리 님에 의해서 삭제되었습니다.

프로필 이미지
오말리
2025-05-15
0
글번호 190844
종목검색