커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
5492
글번호 230811
답변완료
문의합니다..
var : T(0),데드값(0),골드값(0);
var : 직전골드대비등락률(0),직전데드대비등락률(0);
var1 = WMA(H,5);
var2 = WMA(L,5);
var3 = WMA(C,20);
if T <= 0 and CrossUp(var2,var3) Then
{
T = 1;
골드값 = var2;
직전데드대비등락률 = (골드값-데드값)/데드값*100;
if 직전데드대비등락률<직전골드대비등락률 then
Buy();
}
위 시스템 수식과 대칭(반대)되는 시스템 수식
문의합니다..
2025-05-26
364
글번호 191151
답변완료
해외선물 시스템 단일방향 진입신호
해외선물 지표를 활용하여 매수매도 양방향진입이 아닌
매수진입 < 매수청산 < 매수진입 < 매수청산
매도진입 < 매도청산 < 매도진입 < 매도청산
큰추세를 보고 한방향만 진입 청산 가능한지 문의 드립니다
2025-05-26
374
글번호 191150
답변완료
피봇 돌파
분봉 피봇 2차 돌파를 하는 종목중에서
거래대금 3분봉에서 30억 이상 터진 종목 검색식 부탁드립니다.
2025-05-26
443
글번호 191149
답변완료
수식변환 부탁드립니다.
안녕하세요
수식변환 부탁드립니다.
1
수식1
A=highest(c,period);
valuewhen(1,A>A(1),A)
수식2
B=lowest(c,period);
valuewhen(1,B<B(1),B)
period 13
2
수식1.
TT=Ttsf(C,기간);
ValueWhen(1,TT >TT(1),TT)
수식2
TT=Ttsf(C,기간);
ValueWhen(1,TT < TT(1),TT)
수식3
Ttsf(C,기간)
기간 14
2025-05-25
449
글번호 191148
답변완료
진입봉의 저가/고가
안녕하세요
해당 코드로 진입 시 손절라인을 진입봉의 저가/고가 or 특정 봉 수 지난 후로 설정하고 있습니다
var : hh(0),ll(0);
input:X1(5); // 1~10, 직전 XX봉 횟수
ll = lowest(L,X1);
hh = highest(H,X1);
Condition1 = CrossUp(C,hh[1]) and MarketPosition == 0;
Condition2 = CrossDown(C,ll[1]) and MarketPosition == 0;
If Condition1 == True then Buy("B1",AtMarket,DEf,1);
If Condition2 == True then Sell("B2",AtMarket,DEf,1);
// 손절: 진입신호 봉의 저가 손절
input:FF(8); // 1~10, 진입 후 XX봉 경과
If MarketPosition == 1 and (EntryPrice < L[BarsSinceEntry[0]] or BarsSinceEntry > FF) Then ExitLong("C1");
If MarketPosition == -1 and (EntryPrice > H[BarsSinceEntry[0]] or BarsSinceEntry > FF) Then ExitShort("C2");
// 청산: 1% 단위로 일정 되돌림 비율
If OpenPositionProfit / EntryPrice >= 0.01 and OpenPositionProfit / EntryPrice < 0.02
Then SetStopTrailing(1,2,PercentStop);
If OpenPositionProfit / EntryPrice >= 0.02 and OpenPositionProfit / EntryPrice < 0.03
Then SetStopTrailing(1.8,3,PercentStop);
If OpenPositionProfit / EntryPrice >= 0.03 and OpenPositionProfit / EntryPrice < 0.04
Then SetStopTrailing(2.8,4,PercentStop);
If OpenPositionProfit / EntryPrice >= 0.04 and OpenPositionProfit / EntryPrice < 0.05
Then SetStopTrailing(4,5,PercentStop);
하지만 NG.1로 백테스트했을때 진입봉 저가/고가 조건이 전혀 발동이 안되네요
확인 부탁드리겠습니다
감사합니다
2025-05-25
455
글번호 191147
답변완료
SymbolCode 지원 문의
안녕하세요.
종목검색에서는 SymbolCode는 지원하지 않는 건가요?
if(SymbolCode == "XXXXXX") Then
{
find(1);
}
이런 수식이 동작을 안하네요.
2025-05-25
379
글번호 191146
사공하늘 님에 의해서 삭제되었습니다.
2025-05-25
98
글번호 191145
답변완료
수식확인요청
안녕하세요
아래와 같이 주봉시가 함수를 만들려고 하는데
Input: N(Numeric);
Var: j(0);
Var: 요일(0);
Array: weekO[100](0);
Begin
요일 = DayOfWeek(Date);
If Date[1] < Date and 요일[1] >= 요일 Then Begin
For j = 99 Downto 1 Begin
weekO[j] = weekO[j-1];
End;
weekO[0] = O;
End;
WeekOpen = weekO[N];
End;
상기와 같이 수정하니 선언되지 않은 이름 weekopen이 사용되었다고 하고 값을 대입할 수 있는 입력변수, 입력변수배열의 요소가 와야 한다고 합니다. 혹시 수정가능하신지요
미리 감사드립니다.
2025-05-25
451
글번호 191144
답변완료
부틱드립니다
수고하십니다
아래수식을 예스로 부탁드립니다
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Adarsh
//@version=4
// Moving Average 3.0 (3rd Generation) s cript may be freely distributed under the MIT license. Copyright (c) 2018-present, Alex Orekhov (everget)
study("IDEAL BB with MA (With Alerts) by Adarsh", overlay=true)
length1 = input(title="1st Length", type=input.integer, minval=1, defval=120)
length2 = input(title="2nd Length", type=input.integer, minval=1, defval=12)
maInput = input(title="MA Type", defval="EMA", options=["EMA", "SMA", "VWMA", "WMA"])
src = input(title="Source", type=input.source, defval=hl2)
getMA(src, length) =>
ma = 0.0
if maInput == "EMA"
ma := ema(src, length)
if maInput == "SMA"
ma := sma(src, length)
if maInput == "VWMA"
ma := vwma(src, length)
if maInput == "WMA"
ma := wma(src, length)
ma
getNMA(src, length1, length2) =>
lambda = length1 / length2
alpha = lambda * (length1 - 1) / (length1 - lambda)
ma1 = getMA(src, length1)
ma2 = getMA(ma1, length2)
nma = (1 + alpha) * ma1 - alpha * ma2
nma = getNMA(src, length1, length2)
//emaLength = input(90, minval=1, title="EMA Length")
//emaSource = input(close, title="EMA Source")
//ema = ema(emaSource, emaLength)
plot(nma, title="NMA Black Line", linewidth=2, style=plot.style_stepline, color=color.black, transp=0)
//plot(ema, title="EMA", linewidth=1, color=color.red, transp=0)
//VWAP BANDS
lenvwap = input(1, minval=1, title="VWAP Length")
src1a = input(close, title="VWAP Source")
offsetvwap = input(title="VWAP Offset", type=input.integer, defval=0, minval=-500, maxval=500)
srcvwap = hlc3
vvwap = vwap(srcvwap)
line1 = sma(src1a, lenvwap)
plot(vvwap, color=#e91e63, linewidth=2, style=plot.style_line, title="VWAP MIDDLE")
// Boll Bands
emaSource = close
emaPeriod = 20
devMultiple = 2
baseline = sma(emaSource, emaPeriod)
plot(baseline, title = "BB Red Line", color = color.red)
stdDeviation = devMultiple * (stdev(emaSource, emaPeriod))
upperBand = (baseline + stdDeviation)
lowerBand = (baseline - stdDeviation)
p1 = plot(upperBand, title = "BB Top", color = color.blue)
p2 = plot(lowerBand, title = "BB Bottom", color = #311b92)
fill(p1, p2, color = color.blue)
//HULL TREND WITH KAHLMAN
srchull = input(hl2, "Price Data")
lengthhull = input(24, "Lookback")
showcross = input(true, "Show cross over/under")
gain = input(10000, "Gain")
k = input(true, "Use Kahlman")
hma(_srchull, _lengthhull) =>
wma((2 * wma(_srchull, _lengthhull / 2)) - wma(_srchull, _lengthhull), round(sqrt(_lengthhull)))
hma3(_srchull, _lengthhull) =>
p = lengthhull/2
wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p)
kahlman(x, g) =>
kf = 0.0
dk = x - nz(kf[1], x)
smooth = nz(kf[1],x)+dk*sqrt((g/10000)*2)
velo = 0.0
velo := nz(velo[1],0) + ((g/10000)*dk)
kf := smooth+velo
a = k ? kahlman(hma(srchull, lengthhull), gain) : hma(srchull, lengthhull)
b = k ? kahlman(hma3(srchull, lengthhull), gain) : hma3(srchull, lengthhull)
c = b > a ? color.lime : color.red
crossdn = a > b and a[1] < b[1]
crossup = b > a and b[1] < a[1]
p1hma = plot(a,color=c,linewidth=1,transp=75, title="Long Plot")
p2hma = plot(b,color=c,linewidth=1,transp=75, title="Short Plot")
fill(p1hma,p2hma,color=c,transp=55,title="Fill")
plotshape(showcross and crossdn ? a : na, location=location.abovebar, style=shape.labeldown, color=color.red, size=size.tiny, text="Sell", textcolor=color.white, transp=0, offset=-1)
plotshape(showcross and crossup ? a : na, location=location.belowbar, style=shape.labelup, color=color.green, size=size.tiny, text="Buy", textcolor=color.white, transp=0, offset=-1)
//ALERTS
alertcondition(crossup, title='Buy', message='Go Long')
alertcondition(crossdn, title='Sell', message='Go Short')
2025-05-25
1053
글번호 191143