커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 부탁드립니다

지표식 부탁드립니다. //@version=5 indicator("Ultimate RSI", "Ultimate RSI", overlay = false) //Settings length = input.int(14, minval = 2) smoType1 = input.string('RMA', 'Method', options = ['EMA', 'SMA', 'RMA', 'TMA']) src = input(close, 'Source') arsiCss = input(color.silver, 'Color', inline = 'rsicss') autoCss = input(true, 'Auto', inline = 'rsicss') //Signal Line smooth = input.int(14, minval = 1, group = 'Signal Line') smoType2 = input.string('EMA', 'Method', options = ['EMA', 'SMA', 'RMA', 'TMA'], group = 'Signal Line') signalCss = input(#ff5d00, 'Color', group = 'Signal Line') //OB/OS Style obValue = input.float(80, 'Overbought', inline = 'ob', group = 'OB/OS Style') obCss = input(#089981, '', inline = 'ob', group = 'OB/OS Style') obAreaCss = input(color.new(#089981, 80), '', inline = 'ob', group = 'OB/OS Style') osValue = input.float(20, 'Oversold&#8196;&#8196;&#8196;&#8196;', inline = 'os', group = 'OB/OS Style') osCss = input(#f23645, '', inline = 'os', group = 'OB/OS Style') osAreaCss = input(color.new(#f23645, 80), '', inline = 'os', group = 'OB/OS Style') //Functions ma(x, len, maType)=> switch maType 'EMA' => ta.ema(x, len) 'SMA' => ta.sma(x, len) 'RMA' => ta.rma(x, len) 'TMA' => ta.sma(ta.sma(x, len), len) //Augmented RSI upper = ta.highest(src, length) lower = ta.lowest(src, length) r = upper - lower d = src - src[1] diff = upper > upper[1] ? r : lower < lower[1] ? -r : d num = ma(diff, length, smoType1) den = ma(math.abs(diff), length, smoType1) arsi = num / den * 50 + 50 signal = ma(arsi, smooth, smoType2) //Plots plot_rsi = plot(arsi, 'Ultimate RSI' , arsi > obValue ? obCss : arsi < osValue ? osCss : autoCss ? chart.fg_color : arsiCss) plot(signal, 'Signal Line', signalCss) //Levels plot_up = plot(obValue, color = na, editable = false) plot_avg = plot(50, color = na, editable = false) plot_dn = plot(osValue, color = na, editable = false) //OB-OS fill(plot_rsi, plot_up, arsi > obValue ? obAreaCss : na) fill(plot_dn, plot_rsi, arsi < osValue ? osAreaCss : na) //Gradient fill(plot_rsi, plot_avg, obValue, 50, obAreaCss, color.new(chart.bg_color, 100)) fill(plot_avg, plot_rsi, 50, osValue, color.new(chart.bg_color, 100), osAreaCss) hline(obValue, 'Overbought') hline(50, 'Midline') hline(osValue, 'Oversold') //시그널 교차 감지 및 화살표 표시 추가 crossUp = ta.crossover(arsi, signal) crossDn = ta.crossunder(arsi, signal) plotshape(crossUp, title="RSI Cross Up", location=location.bottom, style=shape.triangleup, color=#00ff00, size=size.tiny) plotshape(crossDn, title="RSI Cross Down", location=location.top, style=shape.triangledown, color=#ff0000, size=size.tiny)
프로필 이미지
사노소이
2025-05-26
252
글번호 191183
지표
답변완료

문의

input : Period(14); var : ADXv(0),DP(0),DM(0); ADXv = ADX(Period); DP = DiPlus(Period); DM = DiMinus(Period); plot1(ADXv,"ADX"); plot2(DP,"+DI"); plot3(DM,"-DI"); 외부변수로 해서 조정할수 있게 타주기로 부탁드립니다
프로필 이미지
레전드
2025-05-26
199
글번호 191181
지표
답변완료

확인을 부탁 드립니다.

안녕하세요! 아래식으로 지표를 설정하고 종가선이 트랜드기준선을 돌파해서 상승일때, 하락일때 배경색이 나타나게 설정하고싶은데 하락시는 바탕색이 적용이 되는데 상승시는 배경색이 안나타납니다. 확인 좀 부탁드립니다. 감사합니다. input : upertrendAtrPeriod(10); input : supertrendAtrMultiplier(2.7); var : haClose(0),haOpen(0),haHigh(0),haLow(0),haTR(0),alpha(0),haTrueRange(0); var : haSupertrendUp(0),haSupertrendDown(0),trendingUp(Nan),trendingDown(Nan); var : direction(0),supertrend(0),supertrendUp(False),supertrendDown(False); if index == 0 then { haClose = (O+H+L+C)/4; haOpen = open; haHigh = MaxList( high, haOpen, haClose); haLow = MinList( low, haOpen,haClose); } else { haClose = (O+H+L+C)/4; haOpen = (haOpen [1] + haClose [1])/2 ; haHigh = MaxList(High, haOpen, haClose) ; haLow = MinList(Low, haOpen, haClose) ; } haTR = max(haHigh - haLow, abs(haHigh - haClose[1]), abs(haLow - haClose[1])); alpha = 1 / upertrendAtrPeriod ; haTrueRange = IFf(IsNan(haTrueRange[1]) == true, ma(haTR,upertrendAtrPeriod) , alpha * haTR + (1 - alpha) * IFf(isnan(haTrueRange[1])==true,0,haTrueRange[1])); haSupertrendUp =((haHigh +haLow )/2 )-(supertrendAtrMultiplier *haTrueRange ); haSupertrendDown =((haHigh +haLow )/2 )+(supertrendAtrMultiplier *haTrueRange ); direction = 0; trendingUp = iff(haClose[1]>trendingUp[1] , max (haSupertrendUp ,trendingUp[1]) , haSupertrendUp); trendingDown = iff(haClose[1]<trendingDown[1] , min (haSupertrendDown ,trendingDown[1]) , haSupertrendDown); direction = iff(haClose > trendingDown[1] , 1 , iff(haClose < trendingUp[1], -1 , IFf(IsNan(direction[1]) == true,1,direction[1]))); supertrend = iff(direction == 1 , trendingUp , trendingDown); if direction == 1 Then { plot1(supertrend,"supertrendUp", Green); NoPlot(2); } Else { plot2(supertrend,"supertrendDow", Red); NoPlot(1); Plot3(c, "종가"); }
프로필 이미지
qha71
2025-05-26
246
글번호 191163
지표
답변완료

변수 관련

안녕하세요 항상감사합니다. 아래와 같은 수식에서 수평선을 만들고 싶은데 수평선이 만들어지지 않습니다... var1 이 if 문 밖에서 초기화 되는거 같은데.... 초기화가 안되게하는 방법이 있는지요? if sDate==CurrentDate Then { var1 = 6755; } TL_Delete(TL); TL = TL_New(시작일,시작시간,var1,종료일,종료시간,var1); TL_SetExtRight(TL,true); TL_SetColor(TL,Yellow); TL_SetSize(TL,2);
프로필 이미지
디딤돌
2025-05-26
221
글번호 191162
지표
답변완료

매수조건에서 매수되지 않고 더 높은 가격에서 매수가 됩니다

매수조건에서 매수되지 않고 더 높은 가격에서 매수가 됩니다 수식입니다 감사합니다 input : 금액(10000000),lowp(0), highp(0), nn(0) ,손절(0), 프로(99), 날짜(20240822), 저날짜(20250422),고가격(9999999999); var: PP(99999999999),count(0); if Bdate != Bdate[1] Then count = 0; if sDate > 날짜 Then if MarketPosition == 0 and Low <= highp and count == 0 Then buy("b1"); if MarketPosition == 1 Then{ if MaxEntries == 1 and Low <= (highp - lowp)*(9/nn)+lowp Then buy("b2"); if MaxEntries == 2 and Low <= (highp - lowp)*(8/nn)+lowp Then buy("b3"); if MaxEntries == 3 and Low <= (highp - lowp)*(7/nn)+lowp Then buy("b4"); if MaxEntries == 4 and Low <= (highp - lowp)*(6/nn)+lowp Then buy("b5"); if MaxEntries == 5 and Low <= (highp - lowp)*(5/nn)+lowp Then buy("b6"); if MaxEntries == 6 and Low <= (highp - lowp)*(4/nn)+lowp Then buy("b7"); if MaxEntries == 7 and Low <= (highp - lowp)*(3/nn)+lowp Then buy("b8"); if MaxEntries == 8 and Low <= (highp - lowp)*(2/nn)+lowp Then buy("b9"); if MaxEntries == 9 and Low <= (highp - lowp)*(1/nn)+lowp Then buy("b10"); } if sdate > 저날짜 and High >= (고가격-lowest(L,240))*0.27+lowest(L,240) Then ExitLong("BP",atlimit,h); count = count + 1; if Low < 손절 Then exitlong("BL"); count = count + 1;
프로필 이미지
사과쥬스
2025-05-26
191
글번호 191161
시스템
답변완료

검색식 부탁드립니다.

M0=MACD(12,24); valuewhen(1, Crossup(M0, 0), C) 이지표를 돌파할때 종목검색하고 싶습니다 이 지표를 이용하여 파워종목 검색에 나타내려고 합니다.
프로필 이미지
빅토리아75
2025-05-26
268
글번호 191160
검색
답변완료

종목검색식 요청드립니다.

아래 키움수식을 돌파한 종목을 검색하는 검색식을 만들고 싶습니다. 도움 부탁드립니다. * 키움수식 Valuewhen(2,RSI(Period)<30,H); 항상 감사합니다.^^ 좋은하루되세요
프로필 이미지
onlypsn
2025-05-26
268
글번호 191159
종목검색
답변완료

국채 1분봉 데이터를 엑셀로 추출

안녕하세요. 1분봉으로 데이터 추출하고자 하는데 국채도 가능한지요? 다른 국내선물은 추출이 되는데 국채는 되는지... 가능하다면 어떻게 해야 하는지요..
프로필 이미지
타잔94
2025-05-26
207
글번호 191156
지표
답변완료

문의합니다..

var : T(0),데드값(0),골드값(0); var : 직전골드대비등락률(0),직전데드대비등락률(0); var1 = WMA(H,5); var2 = WMA(L,5); var3 = WMA(C,20); if T <= 0 and CrossUp(var2,var3) Then { T = 1; 골드값 = var2; 직전데드대비등락률 = (골드값-데드값)/데드값*100; if 직전데드대비등락률<직전골드대비등락률 then Buy(); } 위 시스템 수식과 대칭(반대)되는 시스템 수식 문의합니다..
프로필 이미지
wscamtk
2025-05-26
236
글번호 191151
시스템
답변완료

해외선물 시스템 단일방향 진입신호

해외선물 지표를 활용하여 매수매도 양방향진입이 아닌 매수진입 < 매수청산 < 매수진입 < 매수청산 매도진입 < 매도청산 < 매도진입 < 매도청산 큰추세를 보고 한방향만 진입 청산 가능한지 문의 드립니다
프로필 이미지
주꼬보이
2025-05-26
244
글번호 191150
시스템