커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1520
글번호 230811
답변완료
수식어 부탁드립니다.
항상 감사드립니다.
2025-10-02
188
글번호 194483
답변완료
질문드립니다
안녕하세요?
1. 챠트(모니터 왼쪽)에 여백을 줄 수 있나요?
2. 전일종가봉과 당일시작봉 간격을 조절할 수 있는 방법이 있는지요?
여쭈어 봅니다.
풍요롭고 즐거운 한가위되세요.
2025-10-02
205
글번호 194481
답변완료
문의 드립니다
예스스팟으로 스토캐스틱(10,5,5) 분봉으로 골든크로스 10시 까지 매수하는 경우에
복수의 종목이 매수 될터인데, 예를 들어 5종목,
매도는 손절 또는 데드크로스로 하는 경우
매수된 5종목(A,B,C,D,E) 모두 매도시간이 다를터인데
이 경우 각 종목별 차트로 매매식을 띄워놓고 매매해야 하는지,
계죄에 매수된 5종목이 예스스팟에 따라 손절, 데드크로스로 일률적으로
매매되는지 궁금합니다
2025-10-02
214
글번호 194480
답변완료
수정좀 부탁합니다
input : time1(070000),time2(070600),time3(030000);
var : TF(0),HH(0),LL(0);
if (sdate != sDate[1] and sTime >= time1) or
(sdate == sDate[1] and sTime >= time1 and sTime[1] < time1) Then
{
TF = 1;
HH = H;
LL = L;
}
if TF == 1 Then
{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
}
if (sdate != sDate[1] and sTime >= time2) or
(sdate == sDate[1] and sTime >= time2 and sTime[1] < time2) Then
{
TF = 2;
}
if (sdate != sDate[1] and sTime >= time3) or
(sdate == sDate[1] and sTime >= time3 and sTime[1] < time3) Then
{
TF = 3;
if MarketPosition == 1 Then
ExitLong("btx");
if MarketPosition == -1 Then
ExitShort("stx");
}
if TF == 2 Then
{
if MarketPosition == 0 and CrossUp(C,HH) Then
Buy("b",OnClose,Def,1);
if MarketPosition == 0 and CrossDown(C,LL) Then
Sell("s",OnClose,Def,1);
}
if MarketPosition == 1 Then
{
ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*100,"b");
}
If MarketPosition == -1 Then
{
ExitShort("Sp1",AtLimit,EntryPrice-PriceScale*100,"s");
}
수정좀 부탁드립니다
게시글 번호 참조 하시면서 해주셨으면 합니다 94518
질문 1
buy 한글 매수1 로
sell 한글 매도2 로
ExitLong 한글 시간종료1 로
ExitShort 한글 시간종료2 로
질문2
추후 매수2 매수3 도 추가할 생각입니다 참고 해서 수정부탁합니다
매수1 매도 1은 장시작하면 딱 한번씩만(각각) 나오게 부탁합니다(손절이든 수익이든)
질문3
한번에 3계약 매매 들어갑니다
매수1 또는 매도1 수익시
100틱 청산 200틱 청산 300틱 청산 이렇게 1계약시 청산 부탁합니다 (이 식은 매수1 매도1 에만 해당합니다)
질문 4
고점매수시 저점이탈시 손절
저점 매도시 고점돌파시 손절 (이 역시 매수1 매도2 에서만 적용됩니다)
부탁드리고 감사합니다
2025-10-02
242
글번호 194479
답변완료
질문 드립니다
input : ntime(070600),Endtime(070000);
var : Tcond(False),OO(0),HH(0),LL(0),CC(0);
if (sdate != sDate[1] and sTime >= ntime) or
(sdate == sDate[1] and sTime >= ntime and sTime[1] < ntime) Then
{
value1 = DayOpen(0);
value2 = (DayHigh(0)+daylow(0))/2;
value3 = DayHigh(0);
value4 = DayLow(0);
}
plot1(value3,"고");
plot2(value4,"저");
plot3(value2,"중");
plot4(value1,"당시");
질문드립니다
우선 이렇게 작성하면 제가 원하는 선을 드려집니다
질문 1
input : ntime(070600),Endtime(070000);
시작시간과 끝나는 시간이 반대로 해야 되는 이유좀 알고 싶어요
질문 2
위 식에서 고가 위에 100틱 선하나 추가
위 식에서 저가 아래에 100틱 선하나 추가
감사합니다
추석 잘 보내세요
2025-10-02
197
글번호 194477
답변완료
지표 수정 부탁드립니다
다음 키움수식을 변환해 봤습니다. 이렇게 하면 될까요? 추석 잘 쇠십시오.
A1 = floor(date / 100);
A2 = A1 % 100;
A3 = highestSINCE(1,A2 !=A2(1) and A2 != 12, H);
valuewhen(1, A2 != A2(1), A3(1))
=============================================================
var: A1(0),A2(0),A3(0),B(0);
A1 = floor(date / 100);
A2 = A1 % 100;
//A3 = highestSINCE(1,A2 !=A2(1) and A2 != 12, H);
if A2!=A2[1] && A2!=12 Then
A3 = H;
//valuewhen(1, A2 != A2(1), A3(1))
if A2!=A2[1] Then
B = A3[1];
Plot1(B, "월시초가");
2025-10-02
258
글번호 194472
답변완료
문의드립니다.
아래의 트레이딩뷰 수식을 변환 부탁드립니다.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Duyck
//@version=4
study("Blackflag FTS", overlay = true, resolution = "")
//{
// # Author: Jose Azcarate
//}
// inputs //
//{
trailType = input("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)
//}
//////// FUNCTIONS //////////////
//{
// Wilders ma //
Wild_ma(_src, _malength) =>
_wild = 0.0
_wild := nz(_wild[1]) + (_src - nz(_wild[1])) / _malength
/////////// TRUE RANGE CALCULATIONS /////////////////
HiLo = min(norm_h - norm_l, 1.5 * nz(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" ? max(HiLo, HRef, LRef) :
max(norm_h - norm_l, abs(norm_h - norm_c[1]), 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] ? max(Up, TrendUp[1]) : Up
TrendDown := norm_c[1] < TrendDown[1] ? 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 :=
crossover(Trend, 0) ? norm_h :
crossunder(Trend, 0) ? norm_l :
Trend == 1 ? max(ex[1], norm_h) :
Trend == -1 ? min(ex[1], norm_l) : ex[1]
//}
// //////// PLOT TP and SL /////////////
//{
plot(trail, "Trailingstop", style = plot.style_line, color = Trend == 1 ? color.green : Trend == -1 ? color.red : na)
plot(ex, "Extremum", style = plot.style_circles, color = Trend == 1? color.lime : Trend == -1? color.fuchsia : na)
//}
////// FIBONACCI LEVELS ///////////
//{
state = Trend == 1 ? "long" : "short"
fib1Level = 61.8
fib2Level = 75.4
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.black)
Fib2 = plot(f2, "Fib 2", style = plot.style_line, color = color.black)
Fib3 = plot(f3, "Fib 3", style = plot.style_line, color = color.black)
L100 = plot(l100, "l100", style = plot.style_line, color = color.black)
fill(Fib1, Fib2, color = state == "long"? color.green : state == "short"? color.red : na)
fill(Fib2, Fib3, color = state == "long"? color.new(color.green, 70) : state == "short"? color.new(color.red, 70) : na)
fill(Fib3, L100, color = state == "long"? color.new(color.green, 60) : state == "short"? color.new(color.red, 60) : na)
l1 = state[1] == "long" and crossunder(norm_c, f1[1])
l2 = state[1] == "long" and crossunder(norm_c, f2[1])
l3 = state[1] == "long" and crossunder(norm_c, f3[1])
s1 = state[1] == "short" and crossover(norm_c, f1[1])
s2 = state[1] == "short" and crossover(norm_c, f2[1])
s3 = state[1] == "short" and crossover(norm_c, f3[1])
atr = sma(trueRange, 14)
/////////// FIB PLOTS /////////////////.
plotshape(show_fib_entries and l1 ? low - atr : na, "LS1", style = shape.triangleup, location = location.belowbar, color = color.yellow, size = size.tiny)
plotshape(show_fib_entries and l2 ? low - 1.5 * atr : na, "LS2", style = shape.triangleup, location = location.belowbar, color = color.yellow, size = size.tiny)
plotshape(show_fib_entries and l3 ? low - 2 * atr : na, "LS3", style = shape.triangleup, location = location.belowbar, color = color.yellow, size = size.tiny)
plotshape(show_fib_entries and s1 ? high + atr : na, "SS1", style = shape.triangledown, location = location.abovebar, color = color.purple, size = size.tiny)
plotshape(show_fib_entries and s2 ? high + 1.5 * atr : na, "SS2", style = shape.triangledown, location = location.abovebar, color = color.purple, size = size.tiny)
plotshape(show_fib_entries and s3 ? high + 2 * atr : na, "SS3", style = shape.triangledown, location = location.abovebar, color = color.purple, size = size.tiny)
//}
======================
항상 감사드립니다. 수고하세요!!!
2025-10-02
349
글번호 194471
답변완료
시스템
안녕하세요
아래식 매수매도전략 완성 부탁드립니다
//@version=5
strategy("YES Language 전략 - Squeeze + Momentum + ADX", overlay=false, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// 사용자 설정
bbLength = input.int(20, title="BB 기간")
bbMult = input.float(2.0, title="BB 표준편차 배수")
kcLength = input.int(20, title="KC 기간")
kcMult = input.float(1.5, title="KC 배수")
useTR = input.bool(true, title="켈트너 채널에 TR 사용")
adxLength = input.int(14, title="ADX 기간")
adxThreshold = input.float(25, title="추세 기준 ADX 수치")
// Bollinger Band
src = close
bbBasis = ta.sma(src, bbLength)
bbDev = bbMult * ta.stdev(src, bbLength)
bbUpper = bbBasis + bbDev
bbLower = bbBasis - bbDev
// Keltner Channel
kcMA = ta.sma(src, kcLength)
kcRange = useTR ? ta.tr : high - low
kcRangeMA = ta.sma(kcRange, kcLength)
kcUpper = kcMA + kcRangeMA * kcMult
kcLower = kcMA - kcRangeMA * kcMult
// 스퀴즈 감지
squeezeOn = bbLower > kcLower and bbUpper < kcUpper // 스퀴즈 발생 (변동성 축소)
squeezeOff = bbLower < kcLower and bbUpper > kcUpper // 스퀴즈 해제 (변동성 확장)
// Momentum 계산
mid = (ta.highest(high, kcLength) + ta.lowest(low, kcLength)) / 2
avgMid = (mid + ta.sma(close, kcLength)) / 2
momentum = ta.linreg(src - avgMid, kcLength, 0)
momentumUp = momentum > momentum[1] // 모멘텀 증가
momentumDown = momentum < momentum[1] // 모멘텀 감소
// ADX 계산
adx = ta.adx(adxLength)
isTrending = adx > adxThreshold // ADX가 임계치 이상: 추세 발생 중
// === 매수 조건 (YES Language Style) ===
// 1. 스퀴즈 해제 AND 2. 모멘텀 양수 AND 3. 모멘텀 증가 AND 4. 추세 발생 중
buyCondition = squeezeOff and momentum > 0 and momentumUp and isTrending
// === 매도 조건 (YES Language Style) ===
// 1. 스퀴즈 해제 AND 2. 모멘텀 음수 AND 3. 모멘텀 감소 AND 4. 추세 발생 중
sellCondition = squeezeOff and momentum < 0 and momentumDown and isTrending
// --- 포지션 진입 및 반전 (YES Language Style) ---
// 매수 조건 충족 시: 롱 포지션 진입 (현재 숏 포지션이 있으면 청산 후 롱으로 반전)
if (buyCondition)
strategy.entry("YES 롱", strategy.long, comment="YES 롱 진입")
// 매도 조건 충족 시: 숏 포지션 진입 (현재 롱 포지션이 있으면 청산 후 숏으로 반전)
if (sellCondition)
strategy.entry("YES 숏", strategy.short, comment="YES 숏 진입")
// 전략 상태 메시지 (차트 표시)
plotshape(buyCondition, location=location.belowbar, color=color.lime, style=shape.labelup, text="예스 매수", textcolor=color.black)
plotshape(sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="예스 매도", textcolor=color.white)
// 추가: 지표 시각화 (선택 사항)
plot(momentum, title="Momentum", color=color.new(color.blue, 0))
hline(0, color=color.gray)
2025-10-02
322
글번호 194470
답변완료
문의드립니다
input : ndate(20211101);
if sDate >= ndate Then
{
--------------
날짜를 입력해야하는 식인데요
날짜를 어제(전일)로 고정하려면 어떻게 표현해야 하나요?
어제 이후...
감사합니다
2025-10-02
177
글번호 194469