커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1314
글번호 230811
윤호석 님에 의해서 삭제되었습니다.
2025-06-03
99
글번호 191371
답변완료
수식 부탁 드립니다
당일 고점 형성후 100개의 봉이 형성되지 않았을때
당일 저점 형성후 100개의 봉이 형성 되지 않았을때
를 수식으로 정의 하면 어떻게 하는지 부탁드립니다
2025-06-03
195
글번호 191370
답변완료
문의드립니다
전주의 최고가-최저가 (고저차) 구하는 식 부탁드립니다
감사합니다
2025-06-03
228
글번호 191369
답변완료
질문 부탁드립니다
도움에 늘 감사드립니다
질문 몇 가지 부탁드립니다
질문1)
find 함수 관련인데요
아래 식처럼 작성을 하면 (분봉상에서)
현재봉이 if에 해당되거나 else 에 해당되는 종목을 찾는게 맞나요??
마지막에
if condition1==true and condition2==true then find(1);
이 부분을 어디에 위치 시켜야 하는지 알고싶습니다
(수식은 필요한 부분만 포함시켜서 간소화했습니다)
if (h>l*1.08) then
{
...
if h>aa[0] Then condition1=true;
}
else
{
if h>aa[0]*1.1 Then condition2=true;
}
if Bdate != Bdate[1] Then
Condition3 = False;
if condition3==False and condition1==true and condition2==true Then
{
condition3=true;
find(1)
}
질문2)
아래 식처럼 countif 를 이용해 검색을 하게 되면
if countif(condition1==true and condition2==true,50) >1 then find(1);
이라고 작성하게 되면
만약 현재봉에서 30봉전 부터는 직전 조건만족 범위에 속하게 된다면
고가값들을 현재 기준으로 봤을때 aa[1] 과 비교하게 되는건가요? (계속 aa[0] 와 비교하는게 아니고)
그렇다면 혹시 계속 aa[0]나 특정시점의 aa[] (예를들어 aa[2]) 와 비교하게 작성할 수도 있나요?
# 식에서 틀린 부분이 있다면 수정해주시면 감사하겠습니다
if (h>l*1.08) then
{
...
if h>aa[0] Then condition1=true;
}
else
{
if h>aa[0]*1.1 Then condition2=true;
}
if Bdate != Bdate[1] Then
Condition3 = False;
if condition3==False and countif(condition1==true and condition2==true,50) >1 Then
{
condition3=true;
find(1)
}
질문3)
for 문 관련인데요 아래와 같이 작성하면 최초만족시에 값들을 저장하는데요
만약에 두번째 만족 할때까지의 값들을 저장하려면 어떻게 작성하면 될까요?
if cnt==1, if cnt==2 로 나눠서 작성하면 될까요?
각각 값들을 따로 저장하려고 합니다
최초 만족 (value1 ~ value3 ) , 두번째 만족 (value4 ~ value6)
for cnt = 1 to (var1-var2)
{
if h[cnt]>var3 then
{
value1= h[cnt];
value2=sdate[cnt];
value3=stime[cnt];
cnt=(var1-var2)+1;
}
}
감사합니다
2025-06-04
216
글번호 191368
답변완료
부탁드립니다.
A1=shift((highest(high,5)+lowest(low,5)+highest(high,20)+
lowest(low,20))/4,20-1);
A2=shift((highest(high,60)+lowest(low,60))/2,20-1);
A3=ma(C,120);
A4=Valuewhen(1,Crossup(A1,A2) or Crossdown
(A1,A2),min(L,L(1)));
Crossup(C,A4) && Crossup(C,A3) &&
V>=V(1)*2 && C>O
2025-06-03
227
글번호 191367
답변완료
지표 부탁드립니다.
안녕하세요
늘 도움주셔서 감사합니다.
다음 지표를 부탁드립니다.
* 30분 시가선 기준
전환선이 시가선 위에 있을때 상승중일때 red
전환선이 시가선 위에 있을때 하락중일때 blue
전환선이 시가선 아래에 있을때 하락중일때 red
전환선이 시가선 아래에 있을때 상승중일때 blue
** 30분 시간과 전환선 수치는 변수 부탁드립니다.
2025-06-02
203
글번호 191366
땅끝 님에 의해서 삭제되었습니다.
2025-06-02
117
글번호 191365
답변완료
부탁드립니다.
도움에 감사 드립니다.
수식에서
var1=(MA(v*((c-trl())/(trh()-trl())),n)//MA(v,n));
c-trl()의 값
trh()-trl()의 값
v가
간혹 zero가 나오면 문제가 생깁니다.
조치가 가능한지요?
2025-06-02
217
글번호 191364
답변완료
지표식 부탁드립니다.
TradomgView 식을 변환해보았는데 원래와 모양이 다르군요. 수정을 부탁드립니다. 미리 감사드립니다.
//@version=6
indicator('#SwingArm ATR Trend', overlay = true, timeframe = '')
//{
// # Author: Jose Azcarate
//}
// inputs //
//{
trailType = input.string('modified', 'Trailtype', options = ['modified', 'unmodified'])
ATRPeriod = input(28, 'ATR Period')
ATRFactor = input(5, 'ATR Factor')
show_fib_entries = input(true, 'Show Fib Entries?')
//norm_o = security(tickerid(syminfo.prefix,syminfo.ticker), timeframe.period, open)
//norm_h = security(tickerid(syminfo.prefix,syminfo.ticker), timeframe.period, high)
//norm_l = security(tickerid(syminfo.prefix,syminfo.ticker), timeframe.period, low)
//norm_c = security(tickerid(syminfo.prefix,syminfo.ticker), timeframe.period, close)
norm_o = open
norm_h = high
norm_l = low
norm_c = close
//}
//////// FUNCTIONS //////////////
//{
// Wilders ma //
Wild_ma(_src, _malength) =>
_wild = 0.0
_wild := nz(_wild[1]) + (_src - nz(_wild[1])) / _malength
_wild
/////////// TRUE RANGE CALCULATIONS /////////////////
HiLo = math.min(norm_h - norm_l, 1.5 * nz(ta.sma(norm_h - norm_l, ATRPeriod)))
HRef = norm_l <= norm_h[1] ? norm_h - norm_c[1] : norm_h - norm_c[1] - 0.5 * (norm_l - norm_h[1])
LRef = norm_h >= norm_l[1] ? norm_c[1] - norm_l : norm_c[1] - norm_l - 0.5 * (norm_l[1] - norm_h)
trueRange = trailType == 'modified' ? math.max(HiLo, HRef, LRef) : math.max(norm_h - norm_l, math.abs(norm_h - norm_c[1]), math.abs(norm_l - norm_c[1]))
//}
/////////// TRADE LOGIC ////////////////////////
//{
loss = ATRFactor * Wild_ma(trueRange, ATRPeriod)
Up = norm_c - loss
Dn = norm_c + loss
TrendUp = Up
TrendDown = Dn
Trend = 1
TrendUp := norm_c[1] > TrendUp[1] ? math.max(Up, TrendUp[1]) : Up
TrendDown := norm_c[1] < TrendDown[1] ? math.min(Dn, TrendDown[1]) : Dn
Trend := norm_c > TrendDown[1] ? 1 : norm_c < TrendUp[1] ? -1 : nz(Trend[1], 1)
trail = Trend == 1 ? TrendUp : TrendDown
ex = 0.0
ex := ta.crossover(Trend, 0) ? norm_h : ta.crossunder(Trend, 0) ? norm_l : Trend == 1 ? math.max(ex[1], norm_h) : Trend == -1 ? math.min(ex[1], norm_l) : ex[1]
//}
// //////// PLOT TP and SL /////////////
//{
plot(trail, 'Trailingstop', style = plot.style_line, color = Trend == 1 ? color.red : Trend == -1 ? color.green : na)
plot(ex, 'Extremum', style = plot.style_circles, color = Trend == 1 ? color.fuchsia : Trend == -1 ? color.lime : na)
//}
////// FIBONACCI LEVELS ///////////
//{
state = Trend == 1 ? 'long' : 'short'
fib1Level = 61.8
fib2Level = 78.6
fib3Level = 88.6
f1 = ex + (trail - ex) * fib1Level / 100
f2 = ex + (trail - ex) * fib2Level / 100
f3 = ex + (trail - ex) * fib3Level / 100
l100 = trail + 0
Fib1 = plot(f1, 'Fib 1', style = plot.style_line, color = color.new(color.yellow, 0))
Fib2 = plot(f2, 'Fib 2', style = plot.style_line, color = color.new(color.yellow, 0))
Fib3 = plot(f3, 'Fib 3', style = plot.style_line, color = color.new(color.yellow, 0))
L100 = plot(l100, 'l100', style = plot.style_line, color = color.new(color.yellow, 0))
fill(Fib1, Fib2, color = state == 'long' ? color.new(color.red, 70) : state == 'short' ? color.new(color.green, 70) : na)
fill(Fib2, Fib3, color = state == 'long' ? color.new(color.red, 50) : state == 'short' ? color.new(color.green, 50) : na)
fill(Fib3, L100, color = state == 'long' ? color.new(color.red, 30) : state == 'short' ? color.new(color.green, 30) : na)
l1 = state[1] == 'long' and ta.crossunder(norm_c, f1[1])
l2 = state[1] == 'long' and ta.crossunder(norm_c, f2[1])
l3 = state[1] == 'long' and ta.crossunder(norm_c, f3[1])
s1 = state[1] == 'short' and ta.crossover(norm_c, f1[1])
s2 = state[1] == 'short' and ta.crossover(norm_c, f2[1])
s3 = state[1] == 'short' and ta.crossover(norm_c, f3[1])
atr = ta.sma(trueRange, 14)
/////////// FIB PLOTS /////////////////.
plotshape(show_fib_entries and l1 ? low - atr : na, 'LS1', style = shape.triangleup, location = location.belowbar, color = color.new(color.yellow, 0), size = size.tiny)
plotshape(show_fib_entries and l2 ? low - 1.5 * atr : na, 'LS2', style = shape.triangleup, location = location.belowbar, color = color.new(color.yellow, 0), size = size.tiny)
plotshape(show_fib_entries and l3 ? low - 2 * atr : na, 'LS3', style = shape.triangleup, location = location.belowbar, color = color.new(color.yellow, 0), size = size.tiny)
plotshape(show_fib_entries and s1 ? high + atr : na, 'SS1', style = shape.triangledown, location = location.abovebar, color = color.new(color.purple, 0), size = size.tiny)
plotshape(show_fib_entries and s2 ? high + 1.5 * atr : na, 'SS2', style = shape.triangledown, location = location.abovebar, color = color.new(color.purple, 0), size = size.tiny)
plotshape(show_fib_entries and s3 ? high + 2 * atr : na, 'SS3', style = shape.triangledown, location = location.abovebar, color = color.new(color.purple, 0), size = size.tiny)
//}
2025-06-02
380
글번호 191359