커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1590
글번호 230811
답변완료
수식변환요청드립니다
수고많습니다
키움수식을 검색식으로 부탁드립니다
m5=ma(c,5);
m20=ma(c,20);
cu=crossup(m5,m20);
hh=highestsince(1,cu,h);
h_high=
valuewhen(1,hh==hh(1) && hh>h,hh);
ll=if(m20)>l,1,0);
l_sum=sum(ll);
ls=
l_sum-valuewhen(1,cu,l_sum(1));
조건=crossup(c,h_hugh) && ls>0;
cnt=countsince(cu,조건)==1;
cnt=!cnt(1)
2025-03-02
461
글번호 188701
답변완료
수식의뢰 드립니다.
안녕하세요!
거래의 도움을 받고자 수식 의뢰를 드립니다!
데이터1= 선물 현재가
데이터2 = 코스피200 현재가
두 상품가격 차트를 하나로 합쳐서 두 상품가격의 차이(베이시스)가 실시간으로
계속 표시되는 수식을 만들고 싶습니다.
--------------------------------------
특정 조건에 충족하면 봉색상이 특정색으로 변화되는 강조식을 만들고 싶습니다
키움식 참조
1. 분봉에서 봉의 크기가 6틱 이하인 봉 강조식
크기=h-l;
크기(1)<=틱*0.05
2.도지 강조식 o==c (조건:상하 꼬리가 같은 크기인 도지 이면서 크기가 5틱 이하인 도지)
---------------------------------------
아래식을 예스로 변환 부탁드립니다.
(predayhigh()-predaylow())*0.5+predaylow()
부탁드립니다.
2025-03-02
412
글번호 188700
답변완료
검색식부탁드립니다
수고많습니다
피봇1차저항과전일고점이 1%이내에있는 검색식을 부탁드립니다
2025-03-02
371
글번호 188699
답변완료
함수 문의드립니다.
영웅문에서 '최근진입가'를 나타내는 함수 문의드립니다.
예스트레이더에서는 entryprice() 로 알고있는데 영웅문 변경 시
종가 = C
당일시가 = DayOpen()
최근진입가 = ??
영웅문에서 최근에 들어간 '진입가격' 함수가 궁금합니다.
문의드려요.
2025-03-01
366
글번호 188698
답변완료
수식 변환 부탁드립니다.
안녕하세요?
수고 많으십니다.
트레이딩뷰 아래 지표를 수식변환 부탁드리겠습니다.
감사합니다.
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo
//@version=5
indicator("Range Sentiment Profile [LuxAlgo]", overlay = true, max_boxes_count = 500)
//------------------------------------------------------------------------------
//Tooltips
//-----------------------------------------------------------------------------{
widthTooltip = "Bin width percentage. Determine the length of the returned profile bin as a percentage of the Length setting"
offsetTooltip = "Determine the amount of bars each graphical elements are shifted by"
//-----------------------------------------------------------------------------}
//Settings
//-----------------------------------------------------------------------------{
length = input.int(80, minval = 2)
rows = input.int(20, minval = 2)
useIb = input(false, 'Use Intrabar', inline = 'intrabar')
tf = input.timeframe('1', '' , inline = 'intrabar')
//Style
width = input.float(20, 'Width %', minval = 0, maxval = 100, group = 'Style', tooltip = widthTooltip)
showRange = input(true, 'Show Range Levels', inline = 'range', group = 'Style')
rangeCss = input(color.gray, '' , inline = 'range', group = 'Style')
bullBin = input(#2157f3, 'Bullish Bin', inline = 'bull', group = 'Style')
bullMax = input(true, 'Maximum' , inline = 'bull', group = 'Style')
bearBin = input(#ff5d00, 'Bearish Bin', inline = 'bear', group = 'Style')
bearMax = input(true, 'Minimum' , inline = 'bear', group = 'Style')
showFill = input(true, 'Show Fill' , inline = 'fill', group = 'Style')
bullFill = input(color.new(#2157f3, 90), '' , inline = 'fill', group = 'Style')
bearFill = input(color.new(#ff5d00, 90), '' , inline = 'fill', group = 'Style')
offset = input.int(8, group = 'Style', tooltip = offsetTooltip)
//-----------------------------------------------------------------------------}
//Function
//-----------------------------------------------------------------------------{
get_data() => [close, open]
//-----------------------------------------------------------------------------}
//Main variables
//-----------------------------------------------------------------------------{
var boxes = array.new<box>(0)
//Populate bins array
if barstate.isfirst
for i = 0 to rows-1
boxes.push(box.new(na,na,na,na,na
, text_valign = text.align_center
, text_color = color.white))
n = bar_index
upper = ta.highest(length)
lower = ta.lowest(length)
sumad = math.sum(math.abs(close - open), length)
//Get intrabar data
[get_close, get_open] = request.security_lower_tf(syminfo.tickerid, tf, get_data())
//-----------------------------------------------------------------------------}
//Set profile
//-----------------------------------------------------------------------------{
//Range levels
var ltop = line.new(na,na,na,na, color = rangeCss)
var l75 = line.new(na,na,na,na, color = rangeCss, style = line.style_dashed)
var l50 = line.new(na,na,na,na, color = rangeCss)
var l25 = line.new(na,na,na,na, color = rangeCss, style = line.style_dashed)
var lbtm = line.new(na,na,na,na, color = rangeCss)
var fill = linefill.new(ltop, lbtm, na)
//Max / Min levels
var bull_max = line.new(na,na,na,na, color = bullBin)
var bear_min = line.new(na,na,na,na, color = bearBin)
//Set profile
if barstate.islast
avg = math.avg(upper, lower)
avg75 = math.avg(upper, avg)
avg25 = math.avg(lower, avg)
//Set lines coordinates
ltop.set_xy1(n - length, upper), ltop.set_xy2(n + offset, upper)
lbtm.set_xy1(n - length, lower), lbtm.set_xy2(n + offset, lower)
//Display range levels
if showRange
l75.set_xy1(n - length, avg75) , l75.set_xy2(n + offset, avg75)
l50.set_xy1(n - length, avg) , l50.set_xy2(n + offset, avg)
l25.set_xy1(n - length, avg25) , l25.set_xy2(n + offset, avg25)
else
ltop.set_color(na)
lbtm.set_color(na)
//Get bullish/absolute delta sums for each row
up = upper
dn = upper
sums = array.new_float(0)
sums_abs = array.new_float(0)
//Loop trough each rows
for i = 0 to rows-1
dn -= (upper - lower) / rows
sum = 0.
den = 0.
//Loop trough most recent bars
for j = 0 to length-1
if useIb //Loop trough intrabar prices
for k = 0 to (get_close[j]).size()-1
c = (get_close[j]).get(k)
o = (get_open[j]).get(k)
sum += math.max(c, o) <= up and math.min(c, o) >= dn ? c - o : 0
else
sum += high[j] > dn and low[j] < up ? close[j] - open[j] : 0
sums.push(sum)
sums_abs.push(math.abs(sum))
up := dn
//Set profile bins
max = sums_abs.max()
up := upper
dn := upper
for [index, element] in sums
dn -= (upper - lower) / rows
x2 = n + int(element / max * length * (width / 100))
css = element > 0 ? color.new(bullBin, 50) : color.new(bearBin, 50)
//Set box coordinates
get_bx = boxes.get(index)
get_bx.set_lefttop(n + offset, .9 * up + .1 * dn)
get_bx.set_rightbottom(x2 + offset, .9 * dn + .1 * up)
get_bx.set_bgcolor(css)
get_bx.set_text(str.tostring(element / sumad * 100, format.percent))
//Set area MAX/MIN levels
if element == sums.max() and bullMax
bull_max_val = math.avg(up, dn)
bull_max.set_xy1(n + offset, bull_max_val)
bull_max.set_xy2(n - length, bull_max_val)
if element == sums.min() and bearMax
bear_min_val = math.avg(up, dn)
bear_min.set_xy1(x2 + offset, bear_min_val)
bear_min.set_xy2(n - length, bear_min_val)
up := dn
//Fill Area
if showFill
fill.set_color(sums.sum() > 0 ? color.new(bullBin, 90) : color.new(bearBin, 90))
//-----------------------------------------------------------------------------}
2025-03-01
579
글번호 188697
답변완료
문의 드립니다.
하기 키움 신호 수식에 대한 종목 검색식 부탁 드립니다.
Crossup(DIPlus(20), DIMinus(20))
&& Crossup(CCI(20), 0)
&& Crossup(MACD(5, 12), eavg(MACD(5, 12), 9)
&& v>v(1)*배수
감사합니다.
2025-03-01
446
글번호 188696
파워 님에 의해서 삭제되었습니다.
2025-03-01
332
글번호 188695
답변완료
지표 문의
안녕하세요.
볼린져밴드가 상, 하단을 찍으면 바탕색이 변하는 수식이 궁금합니다.
예를 들어 볼린져밴드가 상단을 찍으면 바탕색이 계속 핑크색으로 되고 (하단을 찍기 전까지는 계속 핑크색) 하단을 찍게 되면 바탕색이 회색(다시 상단을 찍기 전까지는 회색)으로 변하는 수식입니다.
2025-03-01
404
글번호 188694
답변완료
30분봉 BOX의 시간 불일치
수고하십니다!
1. 위 그림 파일(5분봉차트)에서 보시는 것 같이 30분Box와 선으로 그린 30분 사각형(선사작형)에서 Box는 끝나는 시간이 5분 늦게 끝나고, 선사각형은 9시 이후 부터 5분 늦게 선이 그려집니다.
2. 8시 45분에서 9시까지 Box와 선사각형 각 1개 그리고 9시 이후부터는 30분 단위로 Box와 선사각형을 30분 단위로 정확한 시간에 일치시키고 싶습니다.
감사합니다.
// 30분 Box
input : ntime1(30),PP(5);
var : SS1(0),DD1(0),TTM(0),TTF(0);
var : SM1(0),box(0), m3var(0), Bx3Higt(0), m3L(0), cnt(0);
Array : Mb30[100](0);
if Bdate != Bdate[1] Then{
SS1 = TimeToMinutes(0);
DD1 = sdate;
}
if DD1 > 0 then{
if sdate == DD1 Then
TTM = TimeToMinutes(stime)-SS1;
Else
TTM = TimeToMinutes(stime)+1440-SS1;
TTF = TTM%ntime1;
if Bdate != Bdate[1] or sTime == 90000 or // 90000
(Bdate == Bdate[1] && ntime1 > 1 && TTF < TTF[1]) or
(Bdate == Bdate[1] && ntime1 > 1 && TTM >= TTM[1]+ntime1) or
(Bdate == Bdate[1] && ntime1 == 1 && TTM > TTM[1]) Then
{
m3L = 1;
for cnt = 99 downto 1{
Mb30[cnt] = Mb30[cnt-1];
}
m3var = O;
box = box_new(sDate,sTime,m3var,NextBarSdate,NextBarStime,C);
}
else m3L = 0;
Mb30[0] = C;
Box_SetEnd(box,NextBarSdate,NextBarStime,C);
if Mb30[0] > m3var Then{
Box_SetColor(box,red );
Bx3Higt = 1;}
Else{
Box_SetColor(box,Blue);
Bx3Higt = -1;
}
Box_SetFill(box,true, 10);
}
// 30봉 선 그리기
var : TL11(0),TL12(0),TL13(0),TL14(0),idx2(-1);
var : M3date(0), M3time(0), StrtV(0), m3UD(0), mrCl(0);
if m3L == 1 Then{
idx2 = 0;
StrtV = O; //O;
M3date = sdate;
M3time = stime;
}
else{
idx2 = idx2+1;
if idx2 > 0 then{
if idx2 == 1 then{
TL11 = TL_New(sdate[1],stime[1],StrtV, sdate, stime, StrtV);
TL12 = TL_New(M3date, M3time, O, sdate, stime, C);
TL13 = TL_New(M3date, M3time, StrtV, M3date,M3time,C);
TL14 = TL_New(sdate, stime, StrtV, sdate, stime, C);
}
else {
TL_SetEnd(TL11,sdate,stime,StrtV);
TL_SetBegin(TL12,M3date, M3time,C);
TL_SetEnd( TL12,sdate,stime,C);
TL_SetBegin(TL13,M3date,M3time,StrtV);
TL_SetEnd( TL13,M3date,M3time,C);
TL_SetBegin(TL14,sdate,stime,StrtV);
TL_SetEnd( TL14,sdate,stime,C);
}
if C > StrtV Then{
m3UD = 1;
TL_SetColor(TL11,RGB(235,000,000));
TL_SetColor(TL12,RGB(235,000,000));
TL_SetColor(TL13,RGB(235,000,000));
TL_SetColor(TL14,RGB(235,000,000));
TL_SetSize(TL11,0); TL_SetSize(TL12,0); TL_SetSize(TL13,0); TL_SetSize(TL14,0);
}
else {
m3UD = 0;
TL_SetColor(TL11,RGB(000,000,235));
TL_SetColor(TL12,RGB(000,000,235));
TL_SetColor(TL13,RGB(000,000,235));
TL_SetColor(TL14,RGB(000,000,235));
TL_SetSize(TL11,0); TL_SetSize(TL12,0); TL_SetSize(TL13,0); TL_SetSize(TL14,0);
}
}
}
2025-03-01
464
글번호 188693