커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1316
글번호 230811
답변완료
수식 부탁드립니다
지표식 부탁드립니다.
//@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    ', 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
325
글번호 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
263
글번호 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, "종가");
}
2025-05-26
327
글번호 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
287
글번호 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
268
글번호 191161
답변완료
검색식 부탁드립니다.
M0=MACD(12,24);
valuewhen(1, Crossup(M0, 0), C)
이지표를 돌파할때 종목검색하고 싶습니다
이 지표를 이용하여 파워종목 검색에 나타내려고 합니다.
2025-05-26
323
글번호 191160
답변완료
종목검색식 요청드립니다.
아래 키움수식을 돌파한 종목을 검색하는 검색식을 만들고 싶습니다. 도움 부탁드립니다.
* 키움수식
Valuewhen(2,RSI(Period)<30,H);
항상 감사합니다.^^ 좋은하루되세요
2025-05-26
330
글번호 191159
답변완료
국채 1분봉 데이터를 엑셀로 추출
안녕하세요.
1분봉으로 데이터 추출하고자 하는데 국채도 가능한지요?
다른 국내선물은 추출이 되는데 국채는 되는지... 가능하다면 어떻게 해야 하는지요..
2025-05-26
288
글번호 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();
}
위 시스템 수식과 대칭(반대)되는 시스템 수식
문의합니다..
2025-05-26
299
글번호 191151