커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1544
글번호 230811
답변완료
문의 드립니다.
중심선에서도 매매가 진행되고 있습니다.
중심선 위에 주가와 20이평이 있으면서 20이평을 상향 돌파 시 매수
중심선 아래에 주가와 20이평이 있으면서 20이평을 하향 돌파 시 매도
중심선은 추세 기준이고 20이평에서만 매매되도록 부탁드립니다.
var : mid(0),mav(0);
mid = (DayHigh+DayLow)/2;
mav = ma(c,20);
if MarketPosition <= 0 and c > mid and CrossUp(c,mav) Then
Buy();
if MarketPosition == 1 and CrossDown(c,mav) Then
ExitLong();
if MarketPosition >= 0 and c < mid and CrossDown(c,mav) Then
Sell();
if MarketPosition == -1 and CrossUp(c,mav) Then
ExitShort();
2025-05-27
196
글번호 191209
답변완료
질문 부탁드립니다
수고가 많으십니다
for문 수식 관련 질문 하나 부탁드립니다
if h>l*1.08 then
{
sum1=0; sumi1=0;
For cnt = 49 DownTo 1
{
id[cnt]=id[cnt-1];
}
id[0]= index;
For cnt = 1 to (id[0]-id[1])
{
sum1=sum1+l[cnt];
sumi1=sumi1+1;
}
value1=sum1/sumi1;
위 식에서요
For cnt = 1 to (id[0]-id[1])
{
sum1=sum1+l[cnt];
sumi1=sumi1+1;
}
value1=sum1/sumi1;
의 결과값 (sum1/ sum1 ) 을 bb[0] 에,
For cnt = 1 to (id[0]-id[2])
로 했을때 의 결과를 bb[1]
...반복해서
For cnt = 1 to (id[0]-id[4])
일때는 bb[3] 에 넣는 식을 만들고
bb[0] ~ bb[3] 중 가장 큰 값을 bb[4] 에,
bb[0] ~ bb[3] 의 평균 값을 bb[5]에 넣고
그리고 새로운 조건이 발생할때 기존 bb[0]~bb[5] 배열값을 6개씩 뒤로 옮기고자 합니다
(bb[6] ~ bb[11] , bb[12]~ bb[17] ...)
매번 감사드립니다
2025-05-27
210
글번호 191206
답변완료
키움신호를 종목검색 변환 부탁드립니다.
안녕하세요, 도움에 늘 감사드립니다.
아래 키움에서 쓰던 신호인데, 예스트레이더 종목검색으로 변환 부탁드립니다.
감사합니다.
S=supertrend(period, multiplier);
M=((고가+저가)/2)*거래량/100000000;
A=bbandsup(17,2);
B=bbandsup(40,2);
E=EnvelopeUp(20,2);
CROSSUP(C,S) &&
M>100 &&
C>O &&
((C>ma(h,5) and CrossUp(A,E)) or
(c>ma(h,5) and B>E and CrossUp(A,B))
or (A>B and B>E and CrossUP(C,A))
or (CrossUP(C,A) and CrossUP(C,B) and CrossUP(C,E)))
지표변수: Period 15 / Multiplier 3
2025-05-27
354
글번호 191203
답변완료
종목 검색 부탁드립니다.
A=if( sum(C-C(1), Short) >0,
sum(C-C(1), Short)*(-100) /
sum (if(C>C(1), C-C(1), 0), Short),
sum(C-C(1),Short)*100/sum(if(C<C(1), C-C(1), 0), Short));
B=if( sum(C-C(1), Long)>0,
sum(C-C(1), Long)*(-100) /sum(if(C>C(1), C-C(1), 0), Long),
sum(C-C(1),Long)*100/sum(if(C<C(1), C-C(1), 0), Long) );
A<=-70 && B<=-70
- 지표변수설정
Short : 12
Long : 24
첫번째 신호시 매수 조건 검색식 부탁 드립니다
2025-05-27
202
글번호 191196
디딤돌 님에 의해서 삭제되었습니다.
2025-05-26
17
글번호 191195
답변완료
종목검색과 지표 부탁드립니다.
종가가 이평선 고가 라인을 돌파하는 종목을 찾고 싶습니다.
죄송하지만 지표와 종목 검색 부탁드립니다.
고점
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
205
글번호 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
231
글번호 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
321
글번호 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
261
글번호 191191