커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6143
글번호 230811
답변완료
변환 부탁드립니다
수고하십니다. 다음 트레이딩뷰 지표를 예스트레이더 용으로 변환시켜 주시면 감사하겠습니다.
plot은 현 시간대(Data1)에 대해 구현하고, 내용 중 5가지의 다른 시간대에 대한 trend 값을 이용하여 테이블을 만드는 것이 있는데, 차트에 다른 분봉, 일봉 종목을 추가로 넣어서 구현하도록 하려고 합니다. 즉, 현재는 trend 값을 구하는 것만 있는데, Data2를 이용하여 trend2 값을 구하는 방법을 알려주시면 됩니다. 나머지 분봉에 대한 부분이나 테이블로 구현하는 부분은 따로 만들겠습니다. 감사합니다.
시간대: Data1=5분봉, Data2=15분봉
(Data1과 Data2만 사용하여 trend, trend2까지만 구함)
(트레이딩뷰 지표)
//@version=5
indicator("Zero Lag Trend Signals (MTF) [AlgoAlpha]", shorttitle="AlgoAlpha - 0??Zero Lag Signals", overlay=true)
length = input.int(70, "Length", tooltip = "The Look-Back window for the Zero-Lag EMA calculations", group = "Main Calculations")
mult = input.float(1.2, "Band Multiplier", tooltip = "This value controls the thickness of the bands, a larger value makes the indicato less noisy", group = "Main Calculations")
t1 = input.timeframe("5", "Time frame 1", group = "Extra Timeframes")
t2 = input.timeframe("15", "Time frame 2", group = "Extra Timeframes")
t3 = input.timeframe("60", "Time frame 3", group = "Extra Timeframes")
t4 = input.timeframe("240", "Time frame 4", group = "Extra Timeframes")
t5 = input.timeframe("1D", "Time frame 5", group = "Extra Timeframes")
green = input.color(#00ffbb, "Bullish Color", group = "Appearance")
red = input.color(#ff1100, "Bearish Color", group = "Appearance")
src = close
lag = math.floor((length - 1) / 2)
zlema = ta.ema(src + (src - src[lag]), length)
volatility = ta.highest(ta.atr(length), length*3) * mult
var trend = 0
if ta.crossover(close, zlema+volatility)
trend := 1
if ta.crossunder(close, zlema-volatility)
trend := -1
zlemaColor = trend == 1 ? color.new(green, 70) : color.new(red, 70)
m = plot(zlema, title="Zero Lag Basis", linewidth=2, color=zlemaColor)
upper = plot(trend == -1 ? zlema+volatility : na, style = plot.style_linebr, color = color.new(red, 90), title = "Upper Deviation Band")
lower = plot(trend == 1 ? zlema-volatility : na, style = plot.style_linebr, color = color.new(green, 90), title = "Lower Deviation Band")
fill(m, upper, (open + close) / 2, zlema+volatility, color.new(red, 90), color.new(red, 70))
fill(m, lower, (open + close) / 2, zlema-volatility, color.new(green, 90), color.new(green, 70))
plotshape(ta.crossunder(trend, 0) ? zlema+volatility : na, "Bearish Trend", shape.labeldown, location.absolute, red, text = "▼", textcolor = chart.fg_color, size = size.small)
plotshape(ta.crossover(trend, 0) ? zlema-volatility : na, "Bullish Trend", shape.labelup, location.absolute, green, text = "▲", textcolor = chart.fg_color, size = size.small)
plotchar(ta.crossover(close, zlema) and trend == 1 and trend[1] == 1 ? zlema-volatility*1.5 : na, "Bullish Entry", "▲", location.absolute, green, size = size.tiny)
plotchar(ta.crossunder(close, zlema) and trend == -1 and trend[1] == -1 ? zlema+volatility*1.5 : na, "Bearish Entry", "▼", location.absolute, red, size = size.tiny)
s1 = request.security(syminfo.tickerid, t1, trend)
s2 = request.security(syminfo.tickerid, t2, trend)
s3 = request.security(syminfo.tickerid, t3, trend)
s4 = request.security(syminfo.tickerid, t4, trend)
s5 = request.security(syminfo.tickerid, t5, trend)
s1a = s1 == 1 ? "Bullish" : "Bearish"
s2a = s2 == 1 ? "Bullish" : "Bearish"
s3a = s3 == 1 ? "Bullish" : "Bearish"
s4a = s4 == 1 ? "Bullish" : "Bearish"
s5a = s5 == 1 ? "Bullish" : "Bearish"
if barstate.islast
var data_table = table.new(position=position.top_right, columns=2, rows=6, bgcolor=chart.bg_color, border_width=1, border_color=chart.fg_color, frame_color=chart.fg_color, frame_width=1)
table.cell(data_table, text_halign=text.align_center, column=0, row=0, text="Time Frame", text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=1, row=0, text="Signal", text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=0, row=1, text=t1, text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=1, row=1, text=s1a, text_color=chart.fg_color, bgcolor=s1a == "Bullish" ? color.new(green, 70) : color.new(red, 70))
table.cell(data_table, text_halign=text.align_center, column=0, row=2, text=t2, text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=1, row=2, text=s2a, text_color=chart.fg_color, bgcolor=s2a == "Bullish" ? color.new(green, 70) : color.new(red, 70))
table.cell(data_table, text_halign=text.align_center, column=0, row=3, text=t3, text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=1, row=3, text=s3a, text_color=chart.fg_color, bgcolor=s3a == "Bullish" ? color.new(green, 70) : color.new(red, 70))
table.cell(data_table, text_halign=text.align_center, column=0, row=4, text=t4, text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=1, row=4, text=s4a, text_color=chart.fg_color, bgcolor=s4a == "Bullish" ? color.new(green, 70) : color.new(red, 70))
table.cell(data_table, text_halign=text.align_center, column=0, row=5, text=t5, text_color=chart.fg_color)
table.cell(data_table, text_halign=text.align_center, column=1, row=5, text=s5a, text_color=chart.fg_color, bgcolor=s5a == "Bullish" ? color.new(green, 70) : color.new(red, 70))
/////////////////////////////////////////ALERTS FOR SMALL ARROWS (ENTRY SIGNALS)
alertcondition(ta.crossover(close, zlema) and trend == 1 and trend[1] == 1, "Bullish Entry Signal",
message="Bullish Entry Signal detected. Consider entering a long position.")
alertcondition(ta.crossunder(close, zlema) and trend == -1 and trend[1] == -1, "Bearish Entry Signal",
message="Bearish Entry Signal detected. Consider entering a short position.")
/////////////////////////////////////////ALERTS FOR TREND CONDITIONS
alertcondition(ta.crossover(trend, 0), "Bullish Trend")
alertcondition(ta.crossunder(trend, 0), "Bearish Trend")
alertcondition(ta.cross(trend, 0), "(Bullish or Bearish) Trend")
alertcondition(ta.crossover(s1, 0), "Bullish Trend Time Frame 1")
alertcondition(ta.crossunder(s1, 0), "Bearish Trend Time Frame 1")
alertcondition(ta.cross(s1, 0), "(Bullish or Bearish) Trend Time Frame 1")
alertcondition(ta.crossover(s2, 0), "Bullish Trend Time Frame 2")
alertcondition(ta.crossunder(s2, 0), "Bearish Trend Time Frame 2")
alertcondition(ta.cross(s2, 0), "(Bullish or Bearish) Trend Time Frame 2")
alertcondition(ta.crossover(s3, 0), "Bullish Trend Time Frame 3")
alertcondition(ta.crossunder(s3, 0), "Bearish Trend Time Frame 3")
alertcondition(ta.cross(s3, 0), "(Bullish or Bearish) Trend Time Frame 3")
alertcondition(ta.crossover(s4, 0), "Bullish Trend Time Frame 4")
alertcondition(ta.crossunder(s4, 0), "Bearish Trend Time Frame 4")
alertcondition(ta.cross(s4, 0), "(Bullish or Bearish) Trend Time Frame 4")
alertcondition(ta.crossover(s5, 0), "Bullish Trend Time Frame 5")
alertcondition(ta.crossunder(s5, 0), "Bearish Trend Time Frame 5")
alertcondition(ta.cross(s5, 0), "(Bullish or Bearish) Trend Time Frame 5")
alertcondition(ta.crossover(close, zlema) and trend == 1 and trend[1] == 1, "Bullish Entry")
alertcondition(ta.crossunder(close, zlema) and trend == -1 and trend[1] == -1, "Bearish Entry")
2025-09-11
897
글번호 193905
답변완료
최대 가능한 계약 수 관련 문의 드립니다.
항상 많은 도움 감사드립니다.
예스트레이더로 시스템 식을 작성할때 진입 계약수를 지정할 수 있고.
시스템식을 시작할때 설정창에서 계약수를 지정할 수 있는것으로 알고 있는데요..
거래 계좌에 무한대로 금액이 있다고 설정을 하고
1. 시스템식으로 지정할 수 있는 최대 진입 가능 계약수가 얼마인지?
2. 설정창에서 지정할 수 있는 최대 진입 가능 계약수가 얼마인지?
1,2의 설정을 조압해서 진입할 수 있는 최대 계약수가 얼마인지 궁금합니다.
참고로 미니 나스닥과 마이크로 미니 나스닥 주로 거래하고 있습니다.
2025-09-11
380
글번호 193904
답변완료
종목검색식 부탁드립니다.
수식변환 부탁드립니다.
이평1=ma(C, 기간1);
이평2=ma(C, 기간2);
골든=CrossUp(이평1, 이평2);
최고=HighestSince(1, 골든, H);
최고가=Valuewhen(1, 최고==최고(1) && 최고>H, 최고);
최저=if(이평2>L, 1, 0);
최저가=sum(최저);
결론=최저가 - Valuewhen(1, 골든, 최저가(1));
조건=CrossUp(C, 최고가) && 결론>0;
카운트=CountSince(골든, 조건)==1;
카운트 && !카운트(1)
(지표변수) 기간1: 5 / 기간2: 10
2025-09-11
260
글번호 193903
답변완료
수식변경 부탁드립니다.
아래 수식을 한번에 30일치를 종목검색 할 수 있게 변경 부탁드립니다.
*** 8봉내에서 상한가가 발생한 종목 중(a3) 에서 a1 과 a2 조건을 동시에 만족하는 첫번째 조건만을 찾는 검색입니다. (즉, 상한가 발생후 a1 과 a2를 만족하는 것이 4봉째, 5번째, 6번째 봉에서 발생하더라도 첫번째 만족한 4봉째만 검색이 되도록 하고 싶습니다.
countsince 함수를 사용하였는데, 수식에 문제가 있다면 변경해주세요.)
A=avg(c,5);
B=A(1);
a1 = A/B*100 < 100 ;
a2 = c < ma(c,5,단순) and c > ma(c,20,단순) and o > c ;
a3 = (c(3)*1.29 < c(2) and c(2) > c and o(2) < c and 거래대금(2) > 5500) or
(c(4)*1.29 < c(3) and c(3) > c and o(3) < c and 거래대금(3) > 5500 ) or
(c(5)*1.29 < c(4) and c(4) > c and o(4) < c and 거래대금(4) > 5500 ) or
(c(6)*1.29 < c(5) and c(5) > c and o(5) < c and 거래대금(5) > 5500 ) or
(c(7)*1.29 < c(6) and c(6) > c and o(6) < c and 거래대금(6) > 5500 ) or
(c(8)*1.29 < c(7) and c(7) > c and o(7) < c and 거래대금(7) > 5500 ) or
(c(9)*1.29 < c(8) and c(8) > c and o(8) < c and 거래대금(8) > 5500 ) or
(c(10)*1.29 < c(9) and c(9) > c and o(9) < c and 거래대금(9) > 5500) or
(c(11)*1.29 < c(10) and c(10) > c and o(10) < c and 거래대금(10) > 5500) or
(c(12)*1.29 < c(11) and c(11) > c and o(11) < c and 거래대금(11) > 5500) or
(c(13)*1.29 < c(12) and c(12) > c and o(12) < c and 거래대금(12) > 5500) or
(c(14)*1.29 < c(13) and c(13) > c and o(13) < c and 거래대금(13) > 5500) or
(c(15)*1.29 < c(14) and c(14) > c and o(14) < c and 거래대금(14) > 5500) ;
d = a1 and a2 and a3 ;
cnt = countsince(date!=date(1), d)==1 ;
cnt && !cnt(1)
2025-09-11
359
글번호 193902
답변완료
수정부탁드립니다.
안녕하세요
아래 수식을 드레그하여 캔들과 같이 화면 왼쪽에 표시, 챠트표시를 원형으로
하여 놓고 보면 기준선 0.00을 기준으로 하여 상하로 표시가 됩니다.
수정할 사항은 기준선 0.00 에서 올라오거나 내려온 색상이 0.03 (변수부탁) 을 넘기면 반대 색상으로 표시되었으면 합니다.
즉 파랑색이 0.00을 기준으로 생성되어 + 0.03을 넘기면 반대색인 빨강색으로...
빨강색이 0.00 을 기준으로 생성되어 - 0.03을 넘기면 반대색인 파랑색으로...
차선으로 만약 반대색상표시가 안된다면 0.03을 넘긴 어떤 색상표시도 안되게 부탁드립니다.
var :macdv(0),macdsig(0),macdosc(0),매수신호(False),매도신호(False);
var : t(0),p0(0),q0(0),r(0);
MACDv = MACD(12,26);
MACDsig = ema(MACDv,9);
macdosc = MACDv-ema(MACDv,9);
매수신호 = MACDv > 0 && macdosc > macdosc[1];
매도신호 = MACDv < 0 && macdosc < macdosc[1];
if 매수신호 Then
{
t = 1;
p0 = c;
r = 0;
}
Else if 매도신호 Then
{
t = -1;
q0 = c;
r = 0;
}
Else
{
if t == 1 Then
r = (c-p0)/p0*100;
if t == -1 Then
r = (c-q0)/q0*100;
}
Plot1(r,"r",IFf(t==1,red,Blue));
2025-09-10
406
글번호 193901
답변완료
해당 날짜에 매수나 매도를 체결 횟수를 혹시 알 수 있을까요..?
안녕하세요ㅎㅎ
환절기 감기 조심하세욤!
다름이 아니라
'보유수량이 총매수체결건수의 20% 이하이고 전날 매도체결된게 없을 때 9시 20분 매도'
하는 로직을 만들고 싶은데 혹시 해당 날짜에 매수나 매도를 체결 횟수를 혹시 알 수 있을까요..?
2025-09-10
253
글번호 193900
답변완료
INPUT으로 지정한 봉부터 지표출력
아래는 주식 (60)분봉에
지정한 봉수 부터 변동율을 출력하기 위한 수식입니다.
지표(변동율)를 INPUT으로
지정한 봉부터(15분봉전<=지정)
출력하고 싶습니다.
도와주셔요.
미리 감사드립니다.
--- 아 래 ---
INPUT : 봉수(15);
var : D1_시작가(0), D2_시작가(0);
var : D1_현재가(0), D2_현재가(0);
var : D1_변동율(0), D2_변동율(0);
D1_현재가=data1(C);
D2_현재가=data2(C);
D1_시작가 = D1_현재가[봉수];
D2_시작가 = D2_현재가[봉수];
D1_변동율=(D1_현재가-D1_시작가)/D1_시작가*100;
D2_변동율=(D2_현재가-D2_시작가)/D2_시작가*100;
//=== 지표의 출력
PLOT11(D1_변동율, "D1");
PLOT12(D2_변동율, "D2");
2025-09-10
346
글번호 193899
째국 님에 의해서 삭제되었습니다.
2025-09-10
23
글번호 193898
답변완료
종목 검색 부탁드립니다.
input : P(11),Per(1);
VAR: var1(0),B(0);
var1 = EnvelopeUP(P,per);
B=ma(C,3);
if CrossUp(B,var1) Then
Find(1);
위 수식이 10일 전 부터 어제까지 발생한 종목 검색식 부탁드립니다
2025-09-10
266
글번호 193897