답변완료
종목검색식으로 변환 부탁드립니다.
input : Period(20),N(5);var : T(0),상승(False),하락(False),조건(False);var : TH(0),TH상단(0);T = LRL(C,period) + LRS(C,period);상승=T>T[1]; 하락=T<T[1]; 조건=CountIf(하락, n)==n && CountIf(상승, n)[n]==n; if 조건 Then TH = T[n]; TH상단 = iff(T> TH, 0, TH);value1 = Ema(T, 20); value2 = Ema(value1, 20) ;value3 = Ema(value2, 20) ;if TH상단 > 0 and value1 > Value2 and Value2 > Value3 Then Find(1);위 수식에아래 수식을 추가로 넣고 싶습니다.c >= BollBandUp(20,2) and c >= BollBandUp(240,2) and c >= ma(C,240) and C == highest(C,299) and C > (H+L)/2 if m >= 10000000000 and C >= C[1] and C == highest(C,299) and O >= C[1]*1.045 또 위수식에 아래 수식을 넣고 싶습니다.var1 = OSCV(5,20);var2 = OSCV(5,60);var3 = OSCV(5,120);var4 = OSCV(5,300);if C >= C[1]*1.05 and C > H[1] and H == highest(H,60) and var1 >= 0 and var2 >= 0 and var3 >= 0 and var4 >= 0 Then Find(1);수식 배열을 정리해 주시면 감사하겠습니다.
2025-12-26
189
글번호 229395
종목검색
답변완료
부탁드립니다
사용가능하도록 부탁드립니다.//@version=6indicator("Reverse RSI", overlay=false)rsi_length = input.int(14, title="RSI Length", minval=1)ob_level = input.int(75, title="Overbought Level")os_level = input.int(25, title="Oversold Level")invRSI(target, length) => target_rs = target / (100 - target) up = math.max(close-close[1], 0) down = math.max(close[1]-close, 0) prev_avg_up = ta.rma(up, length) prev_avg_down = ta.rma(down, length) price_up = target_rs * (prev_avg_down * (length - 1)) - (prev_avg_up * (length - 1)) + close price_down = (prev_avg_down * (length - 1) - (prev_avg_up * (length - 1)) / target_rs) + close current_rsi = ta.rsi(close, length) price = target > current_rsi ? price_up : price_down priceprice_ob = invRSI(ob_level, rsi_length)price_mid = invRSI(50, rsi_length)price_os = invRSI(os_level, rsi_length)upside = (price_ob-close)/close*100downside = (close-price_os)/close*100net = upside-downsideplot(upside, title="Upside Line", color=color.green)plot(downside, title="Downside Line", color=color.red)plot(net, title="Net Line", color=net>0?color.new(color.green, 30):color.new(color.red, 30), style=plot.style_columns)hline(0, "Zero Line")
2025-12-26
316
글번호 229381
지표
답변완료
변환 부탁 드립니다.
트레이팅 뷰 지표입니다.사용가능 하도록 수정 부탁 드립니다.//@version=6indicator( title="Kalman Adjusted Average True Range [BackQuant]", shorttitle = "Kalman ATR [BackQuant]", overlay=true)// Define User Inputsconst string tooltip1 = "If T3 is selected as the moving average this will be the volume factor, if ALMA is selected it will be the sigma, ELSE it is nothing"simple bool showAtr = input.bool(true, "Plot Kalman Atr on Chart?")series float pricesource = input.source(close, "Kalman Price Source", group = "Calculation")simple float processNoise = input.float(0.01, title="Process Noise", step = 0.01, group = "Calculation")simple float measurementNoise = input.float(3.0, title="Measurement Noise", group = "Calculation")simple int N = input.int(5, title="Filter Order", minval=1, group = "Calculation")simple int periodAtr = input.int(5, "Period", group = "Kalman Atr")simple float factorAtr = input.float(0.5, "Factor", step = 0.01, group = "Kalman Atr")simple bool paintCandles = input.bool(false, "Paint Candles According to trend?")simple bool showMA = input.bool(false, "Show Atr Moving Average as Confluence?",group = "Confluence")string movingAverageType = input.string("Ema", title="MA Type", options=["SMA", "Hull", "Ema", "Wma", "Dema", "RMA", "LINREG", "ALMA"],group = "Confluence")simple float vfsig = input.float(0.7, "Volume Factor if T3, Sigma if ALMA", group = "Confluence", tooltip = "If T3 is selected as the moving average this will be the volume factor, if ALMA is selected it will be the sigma, ELSE it is nothing")simple int movingAveragePeriod = input.int(50, "Moving Average Period", group = "Confluence")simple color longColour = input.color(#00ff00, "Long Colour", group = "Colors")simple color shortColour = input.color(#ff0000, "Short Color", group = "Colors")/////////////////////////////////////////////////////////////// © BackQuant ///////////////////////////////////////////////////////////////// Functionvar float[] stateEstimate = array.new_float(N, na)var float[] errorCovariance = array.new_float(N, 100.0)f_init(series float pricesource) => if na(array.get(stateEstimate, 0)) for i = 0 to N-1 array.set(stateEstimate, i, pricesource) array.set(errorCovariance, i, 1.0)f_kalman(series float pricesource) => // Prediction Step predictedStateEstimate = array.new_float(N) predictedErrorCovariance = array.new_float(N) for i = 0 to N-1 array.set(predictedStateEstimate, i, array.get(stateEstimate, i)) // Simplified prediction array.set(predictedErrorCovariance, i, array.get(errorCovariance, i) + processNoise) kalmanGain = array.new_float(N) for i = 0 to N-1 kg = array.get(predictedErrorCovariance, i) / (array.get(predictedErrorCovariance, i) + measurementNoise) array.set(kalmanGain, i, kg) array.set(stateEstimate, i, array.get(predictedStateEstimate, i) + kg * (pricesource - array.get(predictedStateEstimate, i))) array.set(errorCovariance, i, (1 - kg) * array.get(predictedErrorCovariance, i)) array.get(stateEstimate, 0)KalmanAtrWithBands(pricesource, lookback, atrFactor)=> f_init(pricesource) kalmanFilteredPrice = f_kalman(pricesource) atr = ta.atr(lookback) trueRange = atr * atrFactor kalmanatr = kalmanFilteredPrice kalmanatr := nz(kalmanatr[1], kalmanatr) trueRangeUpper = kalmanFilteredPrice + trueRange trueRangeLower = kalmanFilteredPrice - trueRange if trueRangeLower > kalmanatr kalmanatr := trueRangeLower if trueRangeUpper < kalmanatr kalmanatr := trueRangeUpper kalmanatr// Function Outkalmanatr = KalmanAtrWithBands(pricesource, periodAtr, factorAtr)/////////////////////////////////////////////////////////////// © BackQuant ///////////////////////////////////////////////////////////////// Moving Average Switch TypemovingAverage(source, length, type, vfsig) => switch type "SMA" => ta.sma(source, length) "Hull" => ta.hma(source, length) "Ema" => ta.ema(source, length) "Wma" => ta.wma(source, length) "Dema" => ta.dema(source, length) "RMA" => ta.rma(source, length) "LINREG" => ta.linreg(source, length, 0) "ALMA" => ta.alma(source, length, 0, vfsig)maOut = movingAverage(kalmanatr, movingAveragePeriod, movingAverageType, vfsig)/////////////////////////////////////////////////////////////// © BackQuant ///////////////////////////////////////////////////////////////// ConditionskalmanatrLong = ta.crossover(kalmanatr, kalmanatr[1])kalmanatrShort = ta.crossunder(kalmanatr, kalmanatr[1])// Colour Condtionsvar color Trend = #ffffffif kalmanatrLong Trend := longColourif kalmanatrShort Trend := shortColour// Plottingplot( showAtr ? kalmanatr : na, "ATR", color=Trend, linewidth = 2 )barcolor(paintCandles ? Trend : na)plot(showMA ? maOut : na, "Moving Average", color.white, 2, plot.style_line)/////////////////////////////////////////////////////////////// © BackQuant ///////////////////////////////////////////////////////////////// Alertsalertcondition( kalmanatrLong, title="Kalman ATR Trend Up", message="Kalman ATR Trend Up - {{ticker}} - {{interval}}" )alertcondition( kalmanatrShort, title="Kalman ATR Trend Down", message="Kalman ATR Trend Down - {{ticker}} - {{interval}}" )
2025-12-26
412
글번호 229373
지표
답변완료
문의드립니다.
아래 식에서 조정하려고 합니다. (아래 식은 주가가 하단선 또는 상단선을 닿거나 돌파한 경우 즉 선과 붙어 있을 때만 신호가 발행하는데 선과 떨어져 있어도 신호 발생을 원합니다.) 우선 매수 경우 볼린져 하단선을 닿거나 돌파 할 것(주가가 하단선을 벗어나 붙어 있지 않거나 또는 다시 하단선 위로 올라 온 경우라도 적용되기를 원함) 다음으로 TRIX 0선 아래이고 골든 크로스 발생 할 때 매수 (피라미딩 방식) 청산은 제가 직접 할 것입니다. 매도 경우 볼린져 상단선을 닿거나 돌파 할 것(주가가 상단선을 벗어나 붙어 있지 않거나 또는 다시 상단선 아래로 내려온 경우라도 적용되기를 원함) 다음으로 TRIX 0선 위이고 데드 크로스 발생 할 때 매도 (피라미딩 방식) 청산은 제가 직접 할 것입니다. 부탁드립니다.1Input : Period(5), sigPeriod(3),BBP(20),DV(1);var : TRIXv(0),TRIXs(0),BBdn(0);TRIXv = TRIX(Period);TRIXs = ema(TRIXv,sigPeriod);BBdn = BollBandDown(BBP,dv);if L <= BBdn and CrossUp(TRIXv,TRIXs) and TRIXv < 0 Then Buy("B",OnClose,def);2Input : Period(5), sigPeriod(3),BBP(20),DV(1);var : TRIXv(0),TRIXs(0),BBup(0);TRIXv = TRIX(Period);TRIXs = ema(TRIXv,sigPeriod);BBup = BollBandUp(BBP,dv);if H >= BBup and CrossDown(TRIXv,TRIXs) and TRIXv > 0 Then Sell("S",OnClose,def);
2025-12-26
147
글번호 229368
시스템