커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1523
글번호 230811
답변완료
지표 변환 부탁드립니다.
// 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("Supply and Demand Visible Range [LuxAlgo]", overlay = true, max_boxes_count = 500, max_bars_back = 500)
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
per = input.float(10., 'Threshold %', minval = 0, maxval = 100)
div = input.int(50, 'Resolution' , minval = 2, maxval = 500)
tf = input.timeframe('', 'Intrabar TF')
//Colors
showSupply = input(true ,'Supply        ', inline = 'supply', group = 'Style')
supplyCss = input(#2157f3, '' , inline = 'supply', group = 'Style')
supplyArea = input(true ,'Area' , inline = 'supply', group = 'Style')
supplyAvg = input(true ,'Average' , inline = 'supply', group = 'Style')
supplyWavg = input(true ,'Weighted' , inline = 'supply', group = 'Style')
showEqui = input(true ,'Equilibrium' , inline = 'equi' , group = 'Style')
equiCss = input(color.gray, '' , inline = 'equi' , group = 'Style')
equiAvg = input(true ,'Average' , inline = 'equi' , group = 'Style')
equiWavg = input(true ,'Weighted' , inline = 'equi' , group = 'Style')
showDemand = input(true ,'Demand    ' , inline = 'demand', group = 'Style')
demandCss = input(#ff5d00, '' , inline = 'demand', group = 'Style')
demandArea = input(true ,'Area' , inline = 'demand', group = 'Style')
demandAvg = input(true ,'Average' , inline = 'demand', group = 'Style')
demandWavg = input(true ,'Weighted' , inline = 'demand', group = 'Style')
//-----------------------------------------------------------------------------}
//UDT's
//-----------------------------------------------------------------------------{
type bin
float lvl
float prev
float sum
float prev_sum
float csum
float avg
bool isreached
type area
box bx
line avg
line wavg
//-----------------------------------------------------------------------------}
//Functions
//-----------------------------------------------------------------------------{
n = bar_index
get_hlv()=> [high, low, volume]
method set_area(area id, x1, top, btm, avg, wavg, showArea, showAvg, showWavg)=>
if showArea
id.bx.set_lefttop(x1, top)
id.bx.set_rightbottom(n, btm)
if showAvg
id.avg.set_xy1(x1, avg)
id.avg.set_xy2(n, avg)
if showWavg
id.wavg.set_xy1(x1, wavg)
id.wavg.set_xy2(n, wavg)
//-----------------------------------------------------------------------------}
//Main variables
//-----------------------------------------------------------------------------{
var max = 0.
var min = 0.
var x1 = 0
var csum = 0.
//Intrabar data
[h, l, v] = request.security_lower_tf(syminfo.tickerid, tf, get_hlv())
//Init on left bar
if time == chart.left_visible_bar_time
max := high
min := low
csum := volume
x1 := n
else //Accumulate
max := math.max(high, max)
min := math.min(low, min)
csum += volume
//-----------------------------------------------------------------------------}
//Set zones
//-----------------------------------------------------------------------------{
var supply_area = area.new(
box.new(na, na, na, na, na, bgcolor = color.new(supplyCss, 80))
, line.new(na, na, na, na, color = supplyCss)
, line.new(na, na, na, na, color = supplyCss, style = line.style_dashed))
var demand_area = area.new(
box.new(na, na, na, na, na, bgcolor = color.new(demandCss, 80))
, line.new(na, na, na, na, color = demandCss)
, line.new(na, na, na, na, color = demandCss, style = line.style_dashed))
var equi = line.new(na, na, na, na, color = equiCss)
var wequi = line.new(na, na, na, na, color = equiCss, style = line.style_dashed)
var float supply_wavg = na
var float demand_wavg = na
if time == chart.right_visible_bar_time
r = (max - min) / div
supply = bin.new(max, max, 0, 0, 0, 0, false)
demand = bin.new(min, min, 0, 0, 0, 0, false)
//Loop trough intervals
for i = 0 to div-1
supply.lvl -= r
demand.lvl += r
//Accumulated volume column
if not supply.isreached and showSupply and supplyArea
box.new(x1, supply.prev, x1 + int(supply.sum / csum * (n - x1)), supply.lvl, na
, bgcolor = color.new(supplyCss, 50))
if not demand.isreached and showDemand and demandArea
box.new(x1, demand.lvl, x1 + int(demand.sum / csum * (n - x1)), demand.prev, na
, bgcolor = color.new(demandCss, 50))
//Loop trough bars
for j = 0 to (n - x1)-1
//Loop trough intrabars
for k = 0 to (v[j]).size()-1
//Accumulate if within upper internal
supply.sum += (h[j]).get(k) > supply.lvl and (h[j]).get(k) < supply.prev ? (v[j]).get(k) : 0
supply.avg += supply.lvl * (supply.sum - supply.prev_sum)
supply.csum += supply.sum - supply.prev_sum
supply.prev_sum := supply.sum
//Accumulate if within lower interval
demand.sum += (l[j]).get(k) < demand.lvl and (l[j]).get(k) > demand.prev ? (v[j]).get(k) : 0
demand.avg += demand.lvl * (demand.sum - demand.prev_sum)
demand.csum += demand.sum - demand.prev_sum
demand.prev_sum := demand.sum
//Test if supply accumulated volume exceed threshold and set box
if supply.sum / csum * 100 > per and not supply.isreached
avg = math.avg(max, supply.lvl)
supply_wavg := supply.avg / supply.csum
//Set Box/Level coordinates
if showSupply
supply_area.set_area(x1, max, supply.lvl, avg, supply_wavg, supplyArea, supplyAvg, supplyWavg)
supply.isreached := true
//Test if demand accumulated volume exceed threshold and set box
if demand.sum / csum * 100 > per and not demand.isreached and showDemand
avg = math.avg(min, demand.lvl)
demand_wavg := demand.avg / demand.csum
//Set Box/Level coordinates
if showDemand
demand_area.set_area(x1, demand.lvl, min, avg, demand_wavg, demandArea, demandAvg, demandWavg)
demand.isreached := true
if supply.isreached and demand.isreached
break
if supply.isreached and demand.isreached and showEqui
//Set equilibrium
if equiAvg
avg = math.avg(max, min)
equi.set_xy1(x1, avg)
equi.set_xy2(n, avg)
//Set weighted equilibrium
if equiWavg
wavg = math.avg(supply_wavg, demand_wavg)
wequi.set_xy1(x1, wavg)
wequi.set_xy2(n, wavg)
break
supply.prev := supply.lvl
demand.prev := demand.lvl
//-----------------------------------------------------------------------------}
2025-09-19
394
글번호 194141
답변완료
지표관련 문의 드립니다.
안녕하세요. 운영자님
아래 작성해 주신 수식을 수정을 좀 해야할 것 같아서 부탁드립니다.
보내주신 수식의 볼린저밴드 예측선인데, 제가 표현하고 싶은 것은
수식1 : 일반 볼린저밴드에서의 수평선 그리기 (그림에서는 수형선이 뒤쪽으로만 나오는데
앞쪽으로도 나올 수 있도록 부탁드립니다)
첨부된 그림에서와 같이 차트속성에 현재가를 수평선(녹색) 그리는 기능이 있는데
동일한 방식으로 그려기기을 원합니다.
수식2 : 볼린저밴드 예측선도 수식1과 동일한 방식으로 작성되기를 원합니다.
기본볼린저 밴드와 볼린저 밴드 예측선이 하나의 수식에 포함되기를 원하지 않습니다.
====================================================================================
안녕하세요
예스스탁입니다.
특정값을 차트에 수평으로 그리기 위해서는
추세선함수를 사용해야 하는데
추세선함수가 봉완성시에만 동작해서 마지막봉값은 출력하지 못합니다.
마지막완성봉의 값으로 출력하신다면 아래식 이용하시면 됩니다.
input : Period(20),dv(2);
input : 상단색(Red),하단색(Blue);
input : 상단긁기(1),하단굵기(1);
var : bbmd(0),SumSqrt(0),cnt(0),stdv(0);
var : bbup(0),bbdn(0);
bbmd = (C+AccumN(C,Period-1))/Period;
SumSqrt = (C-bbmd)^2;
For cnt = 0 To Period - 2
{
SumSqrt = SumSqrt + (C[cnt] - bbmd)^2;
}
Stdv = SquareRoot(SumSqrt / Period);
bbup = BBmd + stdv*dv;
bbdn = BBmd - stdv*dv;
Plot1(bbup,"상단");
Plot2(bbmd,"중단");
Plot3(bbdn,"하단");
//오른쪽으로 1봉 이동
FixPlotShift(1,1);
FixPlotShift(2,1);
FixPlotShift(3,1);
var : TL1(0),TL2(0);
TL_Delete(TL1);
TL_Delete(TL2);
TL1 = TL_New(sDate,sTime,BBup,NextBarSdate,NextBarStime,BBup);
TL2 = TL_New(sDate,sTime,BBdn,NextBarSdate,NextBarStime,BBdn);
TL_SetExtLeft(TL1,true);
TL_SetExtLeft(TL2,true);
TL_SetColor(TL1,상단색);
TL_SetColor(TL2,하단색);
TL_SetSize(TL1,상단긁기);
TL_SetSize(TL2,하단굵기);
2025-09-19
268
글번호 194140
답변완료
매수신호
안녕하세요
주간 일 중 5분선이 20선을 통과 할 때 매수, 매도 신호가 나오나
일 시작시 조건이 맞으면 8시 50분에 신호가 나옵니다.
날짜가 바뀌는 거와 상관없이 장시작 후 에만 신호가 나오게 수식 부탁합니다.
2025-09-19
179
글번호 194136
답변완료
종목검색식 부탁드립니다
1. 주봉 10이평을(단순) 몸통으로 돌파하고 양봉인
0봉전 ~10봉전의 모든종목 검색식 부탁드립니다
2. 주봉 10이평 기준(단순),
상.하 0.5% 에 있고(위아래) 양봉인 0봉전~10봉전 모든종목 검색식 부탁드려요.
2025-09-19
181
글번호 194131
답변완료
지표 변환 부탁드립니다.
//@version=3
//@author=cI8DH
study(title="Accumulation/Distribution Money Flow (ADMF) [cI8DH]", shorttitle="ADMF [cI8DH]", precision=0)
len = input(14, minval=1, title="length") // EMA27 = SMMA/RMA14 ~ lunar month
price_enable = input(true, title="factor price (=money flow)")
AD_weight = input(0.0, minval=0.0, maxval=1.0, step=0.5, title="A/D weight (at 1 all volume is included)")
AD_ratio = nz(change(close)/tr(true)) // 'True Range' fixes issues caused by gaps in price
AD_ratio := (1-AD_weight)*AD_ratio+sign(AD_ratio)*AD_weight
trl = min(low,close[1]), trh = max(high,close[1])
vol = if price_enable
volume*hlc3
else
volume
plot(rma(vol*AD_ratio,len), style=line, color=#4477ffff, title="A/D Money Flow")
hline(0, color=#88888888, linestyle=dotted, title="0 line")
2025-09-19
274
글번호 194130
답변완료
lowest 질문이요
lowest(L,1000) -> 1000봉 중 최저가로 알고 있는데
1000봉이 날짜가 넘어가면 최저가가 1이 나오더라고요
방법있을까요?
2025-09-19
147
글번호 194128
답변완료
종목검색식 부탁합니다.
주가범위 1000원이상부터 무한대
주가이평추세 (일봉) 120이평 하락 또는 상승추세유지 3회 이상
주가이평 (일봉) 60일선이 볼린저밴드 상한선 하향돌파
2025-09-19
162
글번호 194125
답변완료
추세전환 라인
매번 감사드립니다.
이동평균선의 추세가 전환되는 지점 가격차트에 세로로 라인이 그려지도록 부탁드립니다.
첨부파인 참조
수고하세요.
2025-09-19
185
글번호 194123
답변완료
시총
3201 에서 시총을 어떻게 설정하는지 경로를 부탁드립니다.
2025-09-19
204
글번호 194122