커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1316
글번호 230811
답변완료
종목검색과 지표 부탁드립니다.
종가가 이평선 고가 라인을 돌파하는 종목을 찾고 싶습니다.
죄송하지만 지표와 종목 검색 부탁드립니다.
고점
M=ma(C,기간,종류);
HH=Highest(M, 봉수);
Valuewhen(1, HH>HH(1), HH)
저점
M=ma(C, 기간, 종류);
LL=Lowest(M, 봉수);
Valuewhen(1, LL<LL(1), LL)
기간 20
종류 단순
봉수 20
2025-05-26
195
글번호 191194
답변완료
키움
가=sum(v*
((Pow((C-L),2) - Pow((H-C),2))
/
(H-L)),9
);
BI=sum(v*
((Pow((C-L),2) - Pow((H-C),2))
/
(H-L)),9
);
나=eavg(BI,16);
crossUP(가, 나)
2025-05-26
218
글번호 191193
답변완료
지표 변환 부탁드립니다.
번번히 폐를 끼치네요. TradingView 지표 변환 부탁드립니다.
/@version=6
indicator("Range Filtered Trend Signals [AlgoAlpha]", overlay=true)
groupKalman = "Kalman Filter"
kalmanAlpha = input.float(0.01, title="Kalman Alpha")
kalmanBeta = input.float(0.1, title="Kalman Beta")
kalmanPeriod = input.int(77, title="Kalman Period")
dev = input.float(1.2, title="Deviation")
groupSupertrend = "Supertrend"
supertrendFactor = input.float(0.7, title="Supertrend Factor")
supertrendAtrPeriod = input.int(7, title="ATR Period")
groupColors = "Colors"
green = input.color(#00ffbb, title="Bullish Color")
red = input.color(#ff1100, title="Bearish Color")
kalman(a, b, alpha, beta) =>
var float v1 = na
var float v2 = 1.0
var float v3 = alpha * b
var float v4 = 0.0
var float v5 = na
if na(v1)
v1 := a[1]
v5 := v1
v4 := v2 / (v2 + v3)
v1 := v5 + v4 * (a - v5)
v2 := (1 - v4) * v2 + beta / b
v1
pine_supertrend(k, factor, atrPeriod) =>
src = k
atr = ta.atr(atrPeriod)
upperBand = src + factor * atr
lowerBand = src - factor * atr
prevLowerBand = nz(lowerBand[1])
prevUpperBand = nz(upperBand[1])
lowerBand := lowerBand > prevLowerBand or k[1] < prevLowerBand ? lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or k[1] > prevUpperBand ? upperBand : prevUpperBand
int _direction = na
float superTrend = na
prevSuperTrend = superTrend[1]
if na(atr[1])
_direction := 1
else if prevSuperTrend == prevUpperBand
_direction := k > upperBand ? -1 : 1
else
_direction := k < lowerBand ? 1 : -1
superTrend := _direction == -1 ? lowerBand : upperBand
[superTrend, _direction]
k = kalman(close, kalmanPeriod, kalmanAlpha, kalmanBeta)
[supertrend, direction] = pine_supertrend(k, supertrendFactor, supertrendAtrPeriod)
vola = ta.wma(high-low, 200)
upper = k+vola*dev
lower = k-vola*dev
midbody = math.avg(close, open)
var trend = 0
if close > upper
trend := 1
else if close < lower
trend := -1
ktrend = 0
if direction < 0
ktrend := 1
else if direction > 0
ktrend := -1
t = 70
t_ = 20
p1 = plot(ktrend * trend == 1 ? k : na, color=color.gray, style = plot.style_linebr, linewidth = 3, title = 'k')
m = plot(midbody, color=color.gray, display = display.none, title = 'midbody')
up = plot(trend == -1 or ktrend * trend == -1 ? upper : na, color=ktrend * trend == -1 ? color.gray : ktrend == -1 ? color.new(red, t) : color.gray, style = plot.style_circles, title = 'upper')
lo = plot(trend == 1 or ktrend * trend == -1 ? lower : na, color=ktrend * trend == -1 ? color.gray : ktrend == 1 ? color.new(green, t) : color.gray, style = plot.style_circles, title = 'lower')
plotchar(ta.crossover(ktrend * trend, 0) ? k : na, location = location.absolute, color=trend == 1 ? green : red, char="◉", size=size.tiny)
x = color.new(chart.bg_color, 80)
x_ = color.new(trend == -1 ? green:red, t)
//fill(p1, m, k, midbody, x, x_)
fill(p1, m, color = x_)
//fill(up, lo, ktrend * trend == -1 ? color.new(color.gray, 90) : na, "Range")
fill(up, lo, color = x_)
2025-05-27
304
글번호 191192
답변완료
청산 수식 수정 좀 요청 드립니다.
ㅇ 항상 많은 도움에 고맙습니다.
ㅇ 아래 매매식에서 청산부분이 안되는데 수정좀 요청 드림니다.
# 매수식 (요부분이 안됨니다)
1. 360틱 수익 이었다가 320틱 이하로 떨어지면 청산
2. 240틱 수익 이었다가 220틱 이하로 떨어지면 청산
3. 150틱 수익 이었다가 120틱 이하로 떨어지면 청산
4. 130틱 수익 이었다가 90틱 이하로 떨어지면 청산
5. 80틱 수익 이었다가 40틱 이하로 떨어지면 청산
6. 38틱 수익 이었다가 0틱 이하로 떨어지면 청산
## 아래 수식
##============================================================================================================
##============================================================================================================
If sDate >= 20250422 and stime >= 100000 and stime <= 220000
AND CrossUp( ma(c,5) , ma(c,20) ) Then
{
Buy( "수");
}
If sDate >= 20250422 and stime >= 100000 and stime <= 220000
AND CrossDown( ma(c,5) , ma(c,20) ) ) Then
{
Sell("도");
}
if MarketPosition == 1 then
{
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice + PriceScale*360 Then ExitLong("bx1",AtStop, EntryPrice - PriceScale*320);
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice + PriceScale*240 Then ExitLong("bx2",AtStop, EntryPrice - PriceScale*220);
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice + PriceScale*150 Then ExitLong("bx3",AtStop, EntryPrice - PriceScale*120);
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice + PriceScale*130 Then ExitLong("bx4",AtStop, EntryPrice - PriceScale*90);
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice + PriceScale*80 Then ExitLong("bx5",AtStop, EntryPrice - PriceScale*40);
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice + PriceScale*38 Then ExitLong("bx6",AtStop, EntryPrice - PriceScale*0);
}
if MarketPosition == -1 then
{
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice - PriceScale*160 Then ExitShort("sx1",AtStop,EntryPrice - PriceScale*140);
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice - PriceScale*130 Then ExitShort("sx2",AtStop,EntryPrice - PriceScale*100);
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice - PriceScale*80 Then ExitShort("sx3",AtStop,EntryPrice - PriceScale*40);
}
##============================================================================================================
##============================================================================================================
SetStopEndofday(220000);
##============================================================================================================
##============================================================================================================
ㅇ 고맙 습니다. 수고하십시요.
2025-05-27
241
글번호 191191
답변완료
삼각형 표시 부탁드려요
short long 둘다 70 이상 올라 갔다가 70 이하로 떨어질때 매수 삼각형 ▲
short long 둘다 -75 이하로 떨어지면 매도 삼각형 ▼
부탁드려요 건강하세요
INPUT : short(12), Long(24);
var : A(0) , B(0);
A=iff(ACCUMN(C-C[1], short) > 0,
ACCUMN(C-C[1], short)*(-100)/
ACCUMN(iff(C<C[1], C-C[1], 0), short),
ACCUMN(C-C[1],short)*100/ACCUMN(iff(C<C[1], C-C[1], 0), short));
B=iff(ACCUMN(C-C[1], Long) > 0,
ACCUMN(C-C[1], Long)*(-100)/
ACCUMN(iff(C<C[1], C-C[1], 0), Long),
ACCUMN(C-C[1],Long)*100/ACCUMN(iff(C<C[1], C-C[1], 0), Long));
plot1(A , "short", red);
plot1(B , "long", blue);
plotbaseline1(70,"70")
plotbaseline2(-75,"-75")
2025-05-26
228
글번호 191190
답변완료
문의 드립니다.
안녕하세요
항상 감사합니다.
아래의 조건에 부합하는 시스템 서식을 부탁드립니다.
1. 시초가 5pt 갭상승 시작시 하락 진입, 반대의 경우 상승 진입
2. 익절: 최고가 대비 3pt 하락시 또는 10pt 수익실현시 전량 익절
3. 손절: 5pt 하락시 전량 손절
모두 최적화 가능할 수 있도록 input으로 넣어주시면 감사하겠습니다.
2025-05-26
229
글번호 191189
답변완료
Gradient Trend Filter 예스랭귀지로 변환 요청드립니다.
아래는 트레이딩뷰에서 많이 활용하고 있는 Chart Prime의 Gradient Trend Filter 수식입니다.
예스스탁에서 검토해보고자 변환 요청 드립니다.
Gradient Trend Filter 설명 자료를 유첨하였습니다.
감사합니다!
// --------------------------------------------------------------------------------------------------------------------}
// 𝙄𝙉𝘿𝙄𝘾𝘼𝙏𝙊𝙍 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// --------------------------------------------------------------------------------------------------------------------{
// Noise filter function
noise_filter(src, length) =>
alpha = 2 / (length + 1)
nf_1 = 0.0
nf_2 = 0.0
nf_3 = 0.0
nf_1 := (alpha * src) + ((1 - alpha) * nz(nf_1[1]))
nf_2 := (alpha * nf_1) + ((1 - alpha) * nz(nf_2[1]))
nf_3 := (alpha * nf_2) + ((1 - alpha) * nz(nf_3[1]))
nf_3 // Final output with three-stage smoothing
// Bands function
bands(src)=>
val = noise_filter(high-low, length)
upper3 = src + val * 0.618*2.5
upper2 = src + val * 0.382*2
upper1 = src + val * 0.236*1.5
lower1 = src - val * 0.236*1.5
lower2 = src - val * 0.382*2
lower3 = src - val * 0.618*2.5
[upper3, upper2, upper1, lower1, lower2, lower3]
float base = noise_filter(src, length)
[upper3, upper2, upper1, lower1, lower2, lower3] = bands(base)
float diff = base - base[2]
// Signals
bool signal_up = ta.crossover(diff, 0) and barstate.isconfirmed
bool signal_dn = ta.crossunder(diff, 0) and barstate.isconfirmed
// --------------------------------------------------------------------------------------------------------------------}
// 𝙑𝙄𝙎𝙐𝘼𝙇𝙄𝙕𝘼𝙏𝙄𝙊𝙉
// --------------------------------------------------------------------------------------------------------------------{
color gradient_col = color.from_gradient(diff, ta.lowest(diff, 100), ta.highest(diff, 100), color2, color1)
color trend_color = color.new(gradient_col, transp)
plot(base, "Filter", linewidth = width, color = diff >= 0 ? color1 : color2)
up3 = plot(upper3, display = display.none, editable = false)
up2 = plot(upper2, display = display.none, editable = false)
up1 = plot(upper1, display = display.none, editable = false)
lw1 = plot(lower1, display = display.none, editable = false)
lw2 = plot(lower2, display = display.none, editable = false)
lw3 = plot(lower3, display = display.none, editable = false)
fill(up3, lw3, trend_color)
fill(up2, lw2, trend_color)
fill(up1, lw1, trend_color)
plotshape(signal_up ? base[1] : na, "", shape.diamond, location.absolute, offset = -1, size = size.tiny, color = color.orange)
plotshape(signal_dn ? base[1] : na, "", shape.diamond, location.absolute, offset = -1, size = size.tiny, color = color.orange)
// --------------------------------------------------------------------------------------------------------------------}
2025-05-26
336
글번호 191187
답변완료
부탁드립니다
종목검색부탁드립니다
Period: 20
D1: 2
Bollinger Bands 하한선 하향돌파 검색종목
Bollinger Bands 하한선 상향돌파 검색종목
2025-05-26
230
글번호 191186
가자아이 님에 의해서 삭제되었습니다.
2025-05-26
29
글번호 191184