커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1631
글번호 230811
답변완료
청산 수식 좀 봐 주십시요.
* 매번 많은 도움에 고맙습니다
* 청산 수식 추가 요청 드림니다.
사진에 보면 최대 손실이 -22.8틱 나옴니다. 이부분을 보완 하려 합니다.
* <요청 사항>
1. 진입후 "최고가 대비 100틱 이상 하락 하면 청산" 로직 좀 추가 요청 드립니다.
2. 진입후 50틱 이상 손실이고 이전 50봉 최저가 이탈시 청산" 로직 좀 추가 요청 드립니다.
ㅇ 소리음이 안 나는데 확인좀 부탁 드립니다.
(소리는 나는데 띵~~띵~~하고 소리음이 안나와요....)
var1 = ma(c,5);
var2 = ma(c,20);
If MarketPosition <= 0 and sDate >= 20250101 and CrossDown( var1 , var2 ) Then
{
Buy( "수");
PlaySound("C:KiwoomGlobalsoundsound9.wav");
}
if MarketPosition == 1 then
{
ExitLong("수수익",AtLimit,EntryPrice+PriceScale*90);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 Then
Exitlong("2프수",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*0.8);
if MaxEntries < 3 Then Buy("bb",AtLimit,LatestEntryPrice(0)-PriceScale*40);
ExitShort("수손절",AtStop,EntryPrice-PriceScale*50);
ExitLong("bx7",AtStop,highest(H,BarsSinceEntry)*0.95);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 Then
Exitlong("5프수",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*0.8);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*40 Then sell("bs2");
ExitLong("bx8",AtStop,lowest(L,BarsSinceEntry) -PriceScale*40 );
}
* 고맙 습니다, 좋은 주말 되십시요.
2025-01-17
543
글번호 187298
답변완료
종목검색식 부탁드립니다.
문의드립니다.
1. 볼륨 오실레이터 가 "3일 연속" 거래가 늘어날때의 종목검색식 부탁드려요.
(연속일수는 변수로 처리해서 사용하면 좋을듯합니다)
2. 볼륨 오실레이터 가 기준선0 아래에서 "4일연속 " 거래가 늘어날때의
종목검색식 부탁드립니다.(연속일수는 변수처리)
2025-01-17
538
글번호 187297
답변완료
문의
2선만나오독부탁드립니다
/ This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RedKTrader - March 2023
//@version=5
// ******************************
// EVEREX v2.0 adds markers for key patterns based on nPrice:nVol ratios
// starting with EoM and Compression - maybe add "Balanced" and "Mega" ??
// to-do list
// inspecting the effort vs result concept by plotting volume vs. price change
// this is like looking at distance versus fuel consumption - but comparing a normalized average of each
// to help reveal areas of volume & price action anomalies, contraction & expansion
indicator('RedK Effort Versus Results Explorer v2.0', 'RedK EVEREX v2.0', precision = 0,
timeframe = '', timeframe_gaps = false, explicit_plot_zorder = true)
// ***********************************************************************************************************
// This function calcualtes a xable average type
GetAverage(_data, _len, MAOption) =>
value = switch MAOption
'SMA' => ta.sma(_data, _len)
'EMA' => ta.ema(_data, _len)
'HMA' => ta.hma(_data, _len)
'RMA' => ta.rma(_data, _len)
=>
ta.wma(_data, _len)
// ***********************************************************************************************************
// ========================================================================================
// Normalization function - Normalizes values that are not restricted within a zero to 100 range
// This technique provides a scale that is closer to a "human" estimation of value in "bands"
// as in: low, below average, average, above average, high, super high
// this also avoids the issue of extreme values when using the stoch() -based technique
// these values are subjective, and can be changed - but slight changes here won't lead to major changes in outcome
// since all is relative to the same data series.
//
Normalize(_Value, _Avg) =>
_X = _Value / _Avg
_Nor =
_X > 1.50 ? 1.00 :
_X > 1.20 ? 0.90 :
_X > 1.00 ? 0.80 :
_X > 0.80 ? 0.70 :
_X > 0.60 ? 0.60 :
_X > 0.40 ? 0.50 :
_X > 0.20 ? 0.25 :
0.1
// ===================================================================================
// ===========================================================================================================
// Inputs
// ===========================================================================================================
grp_1 = 'Rate of FLow (RoF)'
grp_2 = 'Lookback Parameters'
grp_3 = 'Bias / Sentiment'
grp_4 = 'EVEREX Bands'
length = input.int(10, minval = 1, inline = 'ROF', group = grp_1)
MA_Type = input.string(defval = 'WMA', title = 'MA type',
options = ['WMA', 'EMA', 'SMA', 'HMA', 'RMA'], inline = 'ROF', group = grp_1)
smooth = input.int(defval = 3, title = 'Smooth', minval = 1, inline = 'ROF', group = grp_1)
//src = input.source(close, title = "Source (for 2-Bar Shift)", group = grp_1)
sig_length = input.int(5, 'Signal Length', minval = 1, inline = 'Signal', group = grp_1)
S_Type = input.string(defval = 'WMA', title = 'Signal Type',
options = ['WMA', 'EMA', 'SMA', 'HMA', 'RMA'], inline = 'Signal', group = grp_1)
lookback = input.int(defval = 20, title = 'Length', minval = 1, inline = 'Lookback', group = grp_2)
lkbk_Calc = input.string(defval = 'Simple', title = 'Averaging',
options = ['Simple', 'Same as RRoF'], inline='Lookback', group = grp_2 )
showBias = input.bool(defval = false, title = 'Bias Plot ? -- ', inline = 'Bias', group = grp_3)
B_Length = input.int(defval = 30, title = 'Length', minval = 1, inline = 'Bias', group = grp_3)
B_Type = input.string(defval = 'WMA', title = 'MA type',
options = ['WMA', 'EMA', 'SMA', 'HMA', 'RMA'], inline = 'Bias', group = grp_3)
showEVEREX = input.bool(true, 'Show EVEREX Bands ? -- ', inline = 'EVEREX', group = grp_4)
// a simple mechanism to control/change the strength band scale for improving visualization
// applies only to the "bands" and the level hlines
bandscale = str.tonumber(input.string("100", title = "Band Scale",
options = ['100', '200', '400'], inline = 'EVEREX', group = grp_4))
DispBias = showBias ? display.pane : display.none
DispBands = showEVEREX ? display.pane : display.none
showhlines = showEVEREX ? display.all : display.none
Disp_vals = display.status_line + display.data_window
// ===========================================================================================================
// Calculations
// ===========================================================================================================
// Volume "effort" Calculation -- will revert to no volume acceleration for instruments with no volume data
v = na(volume) ? 1 : volume // this part ensures we're not hit with calc issues due to NaN's
NoVol_Flag = na(volume) ? true : false // this is a flag to use later
lkbk_MA_Type = lkbk_Calc == 'Simple' ? 'SMA' : MA_Type
Vola = GetAverage(v, lookback, lkbk_MA_Type)
Vola_n_pre = Normalize(v, Vola) * 100
//Now trap the case of no volume data - ensure final calculation not impacted
Vola_n = NoVol_Flag ? 100 : Vola_n_pre
//plot(Vola_n , "Volume Normalized", color = color.white, display = display.none)
// ===============================================================================================================
// Price "result" calculation
// we'll consider "result" (strength or weakness) to be the outcome (average) of 6 elements:
// Same (in-)Bar strength elements:
// 1 - Bar Closing: the closing within the bar --> this will be a direct +100 / -100 value
// 2 - Spread to range: the spread to range ratio (that's BoP formula) --> direct +100 / -100 value
// 3 - Relative Spread: spread relative to average spread during lookback period --> normalized
// 2-bar strength elements:
// 4 - 2-bar closing: the closing within 2-bar range (that accomodates open gap effect)
// 5 - 2-bar Closing Shift to Range: Change in close relative to the 2-bar range
// 6 - 2-bar Relative Shift: the 2-bar Close (or source price) shift - relative to the average 2-bar shift during lookback period --> normalized
BarSpread = close - open
BarRange = high - low
R2 = ta.highest(2) - ta.lowest(2)
SrcShift = ta.change(close)
//TR = ta.tr(true)
sign_shift = math.sign(SrcShift)
sign_spread = math.sign(BarSpread)
// =========================================================================================================
// in-bar assessments
// =========================================================================================================
// 1. Calculate closing within bar - should be max value at either ends of the bar range
barclosing = 2 * (close - low) / BarRange * 100 - 100
//plot(barclosing, "Bar Closing %" , color=color.fuchsia, display = display.none)
// 2. caluclate spread to range ratio
s2r = BarSpread / BarRange * 100
//plot(s2r, "Spread:Range", color = color.lime, display = display.none)
// 3. Calculate relative spread compared to average spread during lookback
BarSpread_abs = math.abs(BarSpread)
BarSpread_avg = GetAverage(BarSpread_abs, lookback, lkbk_MA_Type)
BarSpread_ratio_n = Normalize(BarSpread_abs, BarSpread_avg) * 100 * sign_spread
//plot(BarSpread_ratio_n, "Bar Spread Ratio", color=color.orange, display=display.none)
// =========================================================================================================
// 2-bar assessments
// =========================================================================================================
// 4. Calculate closing within 2 bar range - should be max value at either ends of the 2-bar range
barclosing_2 = 2 * (close - ta.lowest(2)) / R2 * 100 - 100
//plot(barclosing_2, "2-Bar Closing %" , color=color.navy, display = display.none)
// 5. calculate 2-bar shift to range ratio
Shift2Bar_toR2 = SrcShift / R2 * 100
//plot(Shift2Bar_toR2, "2-bar Shift vs 2R", color=color.yellow, display = display.none)
// 6. Calculate 2-bar Relative Shift
SrcShift_abs = math.abs(SrcShift)
srcshift_avg = GetAverage(SrcShift_abs, lookback, lkbk_MA_Type)
srcshift_ratio_n = Normalize(SrcShift_abs, srcshift_avg) * 100 * sign_shift
//plot(srcshift_ratio_n, "2-bar Shift vs Avg", color=color.white, display = display.none)
// ===============================================================================
// =========================================================================================
// Relative Price Strength combining all strength elements
Pricea_n = (barclosing + s2r + BarSpread_ratio_n + barclosing_2 + Shift2Bar_toR2 + srcshift_ratio_n) / 6
//plot(Pricea_n, "Price Normalized", color=color.orange, display = display.none)
//Let's take Bar Flow as the combined price strength * the volume:avg ratio
// this works in a similar way to a volume-weighted RSI
bar_flow = Pricea_n * Vola_n / 100
//plot(bar_flow, 'bar_flow', color=color.green, display = display.none)
// calc avergae relative rate of flow, then smooth the resulting average
// classic formula would be this
//RROF = f_ma(bar_flow, length, MA_Type)
//
// or we can create a relative index by separating bulls from bears, like in an RSI - my preferred method
// here we have an added benefit of plotting the (average) bulls vs bears separately - as an option
bulls = math.max(bar_flow, 0)
bears = -1 * math.min(bar_flow, 0)
bulls_avg = GetAverage(bulls, length, MA_Type)
bears_avg = GetAverage(bears, length, MA_Type)
dx = bulls_avg / bears_avg
RROF = 2 * (100 - 100 / (1 + dx)) - 100
RROF_s = ta.wma(RROF, smooth)
Signal = GetAverage(RROF_s, sig_length, S_Type)
// Calculate Bias / sentiment on longer length
dx_b = GetAverage(bulls, B_Length, B_Type) / GetAverage(bears, B_Length, B_Type)
RROF_b = 2 * (100 - 100 / (1 + dx_b)) - 100
RROF_bs = ta.wma(RROF_b, smooth)
// ===========================================================================================================
// Colors & plots
// ===========================================================================================================
c_zero = color.new(#1163f6, 25)
c_band = color.new(color.yellow, 40)
c_up = color.aqua
c_dn = color.orange
c_sup = color.new(#00aa00, 70)
c_sdn = color.new(#ff180b, 70)
up = RROF_s >= 0
s_up = RROF_bs >=0
// ==================================== Plots ==========================================================
// // Display the ATR & VOl Ratio values only on the indicator status line & in the Data Window
// plotchar(shift, title = "Shift", char = "", color = color.white, editable=false, display=display.status_line + display.data_window)
// plotchar(lbk_tr, title = "Avg Shift", char = "", color = color.aqua, editable=false, display=display.status_line + display.data_window)
// plotchar(vola/lbk_vola, title = "Vol Ratio", char = "", color = color.yellow, editable=false, display=display.status_line + display.data_window)
hline(0, 'Zero Line', c_zero, linestyle = hline.style_solid)
// plot the band scale guide lines -- these lines will show/hide along with the EVEREX "Equalizer Bands Plot"
hline(0.25 * bandscale, title = '1/4 Level', color=c_band, linestyle = hline.style_dotted, display = showhlines)
hline(0.50 * bandscale, title = '2/4 Level', color=c_band, linestyle = hline.style_dotted, display = showhlines)
hline(0.75 * bandscale, title = '3/4 Level', color=c_band, linestyle = hline.style_dotted, display = showhlines)
hline(bandscale, title = '4/4 Level', color=c_band, linestyle = hline.style_dotted, display = showhlines)
// Plot Bulls & Bears - these are optional plots and hidden by default - adjust this section later
plot(ta.wma(bulls_avg, smooth), "Bulls", color = #11ff20, linewidth = 2, display = display.none)
plot(ta.wma(bears_avg, smooth), "Bears", color = #d5180b, linewidth = 2, display = display.none)
// =============================================================================
// Plot Bias / Sentiment
plot (RROF_bs, "Bias / Sentiment", style=plot.style_area,
color = s_up ? c_sup : c_sdn, linewidth = 4, display = DispBias )
// =============================================================================
// Plot Price Strength & Relative Volume as stacked "equalizer bands"
// adding visualization option to make the bands joint or separate at the mid-scale mark
Eq_band_option = input.string("Joint", title = 'Band Option', options = ["Joint", "Separate"], group = grp_4)
nPrice = math.max(math.min(Pricea_n, 100), -100)
nVol = math.max(math.min(Vola_n, 100), -100)
bar = bar_flow
c_vol_grn = color.new(#26a69a, 75)
c_vol_red = color.new(#ef5350, 75)
cb_vol_grn = color.new(#26a69a, 20)
cb_vol_red = color.new(#ef5350, 20)
c_vol = bar > 0 ? c_vol_grn : c_vol_red
cb_vol = bar > 0 ? cb_vol_grn : cb_vol_red
vc_lo = 0
vc_hi = nVol * bandscale / 100 / 2
plotcandle(vc_lo, vc_hi, vc_lo, vc_hi , "Volume Band", c_vol, c_vol, bordercolor = cb_vol, display = DispBands)
c_pri_grn = color.new(#3ed73e, 75)
c_pri_red = color.new(#ff870a, 75)
cb_pri_grn = color.new(#3ed73e, 20)
cb_pri_red = color.new(#ff870a, 20)
c_pri = bar > 0 ? c_pri_grn : c_pri_red
cb_pri = bar > 0 ? cb_pri_grn : cb_pri_red
pc_lo_base = Eq_band_option == "Joint" ? vc_hi : 0.50 * bandscale
pc_lo = pc_lo_base
pc_hi = pc_lo_base + math.abs(nPrice) * bandscale / 100 / 2
plotcandle(pc_lo, pc_hi, pc_lo ,pc_hi , "Price Band", c_pri, c_pri, bordercolor = cb_pri, display = DispBands)
// print the normalized volume and price values - only on statys line and in the data window
// these values are independant of the band scale or visualization options
plotchar(nVol, "Normalized Vol", char = "", color = c_vol, editable = false, display = Disp_vals)
plotchar(nPrice, "Normalized Price", char = "", color = c_pri, editable = false, display = Disp_vals)
// =============================================================================
// =============================================================================
// Plot main plot, smoothed plot and signal line
plot(RROF, 'RROF Raw', color.new(#2470f0, 9), display=display.none)
plot(RROF_s, 'RROF Smooth', color = color.new(#b2b5be,40), linewidth = 2)
plot(Signal, "Signal Line", up ? c_up : c_dn, 3)
// ===========================================================================================================
// basic alerts
// ===========================================================================================================
Alert_up = ta.crossover(RROF_s,0)
Alert_dn = ta.crossunder(RROF_s,0)
Alert_swing = ta.cross(RROF_s,0)
// "." in alert title for the alerts to show in the right order up/down/swing
alertcondition(Alert_up, ". RROF Crossing 0 Up", "RROF Up - Buying Action Detected!")
alertcondition(Alert_dn, ".. RROF Crossing 0 Down", "RROF Down - Selling Action Detected!")
alertcondition(Alert_swing, "... RROF Crossing 0", "RROF Swing - Possible Reversal")
// ===========================================================================================================
// v2.0 Adding Markers for Key Patterns
// ===========================================================================================================
// we can re-utilize the Normailize() function here too - but it's cleaner to have a separate ratio calc
nPrice_abs = math.abs(nPrice)
//EV_Ratio = 100 * Normalize(nPrice_abs, nVol)
EV_Ratio = 100 * nPrice_abs / nVol
// initial mapping of return ratios (to be revised)
// -------------------------------------------------------
// Case (1): Price > Vol => ratio > 120 = Ease of Move (EoM)
// Case (2): Price close to Vol => ratio between 80 - 120 = Reasonable Balance
// Case (3): Price less than Vol but reasonable => ratio between 80 - 50 = Drift / "nothing much to see here" bar
// Case (4): Price a lot less than Vol => 50 or less = Compression / Squat
// we're most interested in cases 1 & 4
//plot (EV_Ratio) // for validation only
is_positive = nPrice > 0
is_Compression = EV_Ratio <= 50
is_EoM = EV_Ratio >= 120
//Provide option to show/hide those EVEREX Markers - and an option for Compression bar
// - some folks would prefer a cross, others may prefer a circle - can adjust based on feedback
// no option for Ease of Move, guessing the triangle has the right significance
var showMarkers = input.bool(true, 'Show EVEREX Markers ?')
var Mshape = input.string("Circles", "Compression Marker", options = ['Circles','Crosses'])
SetShape(_x) =>
switch _x
'Circles' => shape.circle
'Crosses' => shape.cross
// Plot markers
plotshape(showMarkers and is_EoM and is_positive ? 0 : na, "EoM +ve", shape.triangleup, color=color.green,
location=location.absolute, size=size.auto, editable = false, display = display.pane)
plotshape(showMarkers and is_EoM and not(is_positive) ? 0 : na, "EoM -ve", shape.triangledown, color=color.red,
location=location.absolute, size=size.auto, editable = false, display = display.pane)
plotshape(showMarkers and is_Compression and is_positive ? 0 : na, "Compression +ve", style = SetShape(Mshape),
color=color.green, location=location.absolute, size = size.auto, editable = false, display = display.pane)
plotshape(showMarkers and is_Compression and not(is_positive) ? 0 : na, "Compression -ve", style = SetShape(Mshape),
color=color.red, location=location.absolute, size=size.auto, editable = false, display = display.pane)
fuction이라는 글자 옆에 금지어가 있어서 XX라고 표현햇습니다
2025-01-17
1239
글번호 187296
주식승부 님에 의해서 삭제되었습니다.
2025-01-17
383
글번호 187295
살빼고싶다 님에 의해서 삭제되었습니다.
2025-01-17
75
글번호 187294
답변완료
신고거래량 분봉에서 검색하는 방법 문의
1) 일봉에서 신고거래량 검색하는 방법
2) 분봉에서 신고거래량 검색하는 방법
부탁드립니다.
2025-01-17
571
글번호 187293
답변완료
수식문의 드립니다.
문의 드립니다.
1.아래 수식 코인 분봉용 수식에 일봉 crossup(cciv(50),ccisig)를 적용하고 싶습니다.
수식부탁드립니다.
2.추가 질문드립니다.
일봉 볼린져밴드(20,2)에서
2-1. 주가가 상승추세에서 볼린져밴드 상단을 돌파 또는 상단 부근에서 하락하여 저가가 중심선을 터치하고 상승(1%)에서 신호가 나오게 가능할까요?
부탁드립니다.
아래
Input : Period1(50),Period2(9),percent(2);
var : CCIv(0),CCIsig(0),count(0),a1(0),a2(0),a3(0),a4(0),a(0),b(0);
Input : Period(20), MultiD(2);
var : MAv(0),BBup(0),BBdn(0);
Inputs: TurnLen(9), StdLen(26), PrdLen(52);
Variables: 기준선(0), 전환선(0), 후행스팬(0), 선행스팬1(0), 선행스팬2(0);
전환선 = (Highest(High, TurnLen) + Lowest(Low, TurnLen)) / 2;
기준선 = (Highest(High, StdLen) + Lowest(Low, StdLen)) / 2;
후행스팬 = Close ;
선행스팬1 = (전환선 + 기준선) / 2 ;
선행스팬2 = (Highest(High, PrdLen) + Lowest(Low, PrdLen)) / 2;
MAv = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
CCIv = CCI(Period1);
CCIsig = ema(CCIv,Period2);
a=ma(c,5);
a1=ma(c,10);
a2=ma(c,20);
a3=ma(c,60);
a4=ma(c,120);
{
if crossup(c,BBup[25]) and 선행스팬1>선행스팬2 Then
Buy();
if MarketPosition == 1 Then
ExitLong("Bp",AtLimit,AvgEntryPrice*(1+percent/100));
}
2025-01-16
470
글번호 187292
cntbs 님에 의해서 삭제되었습니다.
2025-01-16
31
글번호 187291
답변완료
종목검색이 이상하게 나와요.
아래 수식으로 기간 500일을 지정했을때
82개의 종목이 나오는데
사진처럼 이격도랑 상관없는 종목이 나오고 해당종목을 차트에 띄우면
이상하게 나옵니다. ㅜㅜ
한번만 더 확인 해주세요
안돼여. ㅜㅜ
82개가 나오는데 이격도도 안맞구요.
사진처럼 거래량관련 정보랑 차트가 하나도 안그려집니다..
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 종목검색식 재 문의 드려요
> 안녕하세요
예스스탁입니다.
var : SDI50(0),SDI10(0);
var1 = Ema(C,6);
var2 = ma(C,50);
var3 = ma(C,10);
SDI50 = 100 * (var1 - var2) / var2;
SDI10 = 100 * (var1 - var3) / var3;
if max(SDI50,SDI10) <= min(SDI50,SDI10)*1.02 Then
Find(1);
즐거운 하루되세요
> 신데렐라맨 님이 쓴 글입니다.
> 제목 : 종목검색식 재 문의 드려요
> 만들어주신 수식으로 종목검색을하면
기간 500일. 일봉 기준으로
2260개가 나오고 이격도하고 상관없이 나오네요.
제가 요청하는 수식 아래와 같습니다.
Smart Disparity Index를 계산하는 공식:
SDI = 100 x (EMA6 - simple_moving_average) / simple_moving_average
50일 이동평균 : SDI50 = 100 x (EMA6 - SMA50) / SMA50
10일 이동평균 : SDI10 = 100 x (EMA6 - SMA10) / SMA10
이렇게 10일과 50일 각각의 이동평균선을 구하고
이 수식으로 만든 10일과 50일선 두 선의 이격도가 2%이내인 종목을 찾는 검색식입니다.
다시한번 확인 부탁드려요
안녕하세요
예스스탁입니다.
input : length1(10);
input : length2(50);
var1 = ma(C,length1);
var2 = ma(C,length2);
value1 = 100 * (var1 - var2) / var1;
if abs(value1) < 10 Then
Find(1);
즐거운 하루되세요
> 신데렐라맨 님이 쓴 글입니다.
> 제목 : 종목검색식 문의 드려요
> 트뷰 smart disparty index 라는 지표인데
일반적인 이격도에 수식을 추가하여 지표를 부드럽게 만든거같습니다.
이 지표기준 그림처럼 10일선과 50일선의 이격도가 2%이내인 종목을
찾는 검색식좀 만들어주세용~~
https://kr.tradingview.com/v/P6RTbphF/
2025-01-16
716
글번호 187290