답변완료
수식 부탁 드림니다
안녕 하세요수식 문의 드립니다PSAR 지표1. ma(C, per) // per = 12. sar(af, maxAf)3. PSAR _고점A = sar(af, maxAf);Valuewhen(1, A > A(1), A)4.PSAR 저점A = sar(af, maxAf);Valuewhen(1, A < A(1), A)5. G/CA = ma(C, per);B = sar(af, maxAf);Valuewhen(1, CrossUp(A,B), A) 6. D/CA = ma(C, per);B = sar(af, maxAf);Valuewhen(1, CrossDown(A, B), A) 7.G/C_수직선A = ma(C, per);B = sar(af, maxAf);조건 = CrossUp( A, B);if(조건, A, 0)8. D/C_수직선A = ma(C, per);B = sar(af, maxAf);조건 = CrossDown( A, B);if(조건, A, 0)---------------------------------------------------------챠트 표시에1. M1 2. PSAR 3. 고점 4. 저점5. G/C 6. D/C 7.G/C_수직선 8. D/C_수직선나타나게 해 주십시요항상 감사 합니다
답변완료
종목검색식으로 변환 부탁드립니다.
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);수식 배열을 정리해 주시면 감사하겠습니다.
답변완료
부탁드립니다
사용가능하도록 부탁드립니다.//@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
102
글번호 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
141
글번호 229373
지표