커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3449
글번호 230811
답변완료
지표식 문의
지표식 문의드립니다.
특정값의 adx를 구하는 지표식을 만들고 싶습니다.
즉 adx는 당일고가 당일저가 전일고가 전일저가를 var1,2,3,4로 대체한 식을
알고 싶습니다.
2020-03-22
374
글번호 137082
답변완료
질문 올립니다.
안녕하세요. 늘 감사드립니다.
1.
ExitLong ExitShort의 수량 옵션 질문 드립니다.
If CrossDown(이평1, 이평2) then ExitLong("EL1", AtStop, C, "B1");
이렇게 하면, 만일 이평1, 이평2 골든크로스로 진입한 진입명 "B1"의 진입분은,
이 조건이 만족하는 즉시 모조리 청산돼 버리는지요?
((즉, 청산식에서, 진입명 뒤의 수량, 수량조건을 안 써 버리면, 그냥 B1으로 진입 돼 있던 거 다 모조리 청산돼 버리는지요?))
2.
그리고 이 때 ExitLong()속의
AtStop, C
이 부분은 제대로 쓴 건지요?
즉 앞의
CrossDown(이평1, 이평2)
이라는 조건이 만족되자 마자 즉시 현재가에서 청산해라 라는 의미가 되는지요?
아니면, 이렇게 해도, 결국은 조건 만족 다음 봉 시가에서 청산되게 되는지요?
대단히 감사합니다.
2020-03-22
343
글번호 137081
알리섬 님에 의해서 삭제되었습니다.
2020-03-23
23
글번호 137080
답변완료
오류
Input : signal(30);
var : K1s(0), Pred(C);
// ClearDebug;
K1s = ma(Pred,signal);
if sTime == 12000 then {
MessageLog("%s%f","Pred=",Pred);
MessageLog("%s%f","K1s=",K1s);
// 1.#QNAN0 계산은 되지만 무한 숫자가 나오는 오류
if Pred > K1s then {
Buy("매수");
}
}
Debug 내용에 보면 'K1s=1.#QNAN0'라고 표시 됩니다.
무슨 뜻인지는 알겠는데, 어떻게 해결해야 하나요?
2020-03-21
380
글번호 137079
답변완료
수식수정 바랍니다.
안녕하세요.
아래 수식은 해선용으로 쓰는데 월요일엔 수식이 작동이 아주 늦은시간이거나
다음날이 되야 작동합니다.월요일도 정상작동하게 수정바랍니다.
var:idx(0);
if Bdate != Bdate[1] Then
{
idx = 0;
value1 = V;
}
if V > value1 Then{
value1 = V;
if C >= O Then
plot1(H+0.02,"1");
PlaySound("C:₩Users₩Administrator₩Desktop₩예스글로벌₩data₩Sound₩stop.wav");
if C <= O Then
plot1(L-0.02,"1");
PlaySound("C:₩Users₩Administrator₩Desktop₩예스글로벌₩data₩Sound₩stop.wav");
}
수고하십시요.
2020-03-21
401
글번호 137078
답변완료
분봉시스템식에서일봉지표값
안녕하세요
당일분봉시스템식진입조건에
일봉지표수치를필터링으로사용하고싶습니다
일봉 rsi 값이30이하 ,70이상
아래수식 설명부탁드리고 rsi랑똑같이일봉값을사용할수잇게코딩부탁합니다
Input : Period(20), D(2);
var : Bdown(0),BUp(0),Band(0);
BDown = BollBandDown(Period,D);
BUp = BollBandUp(Period,D);
Band = ((C-BDown)/(BUp-BDown))*100;//주석및 30이하,70이상시 나타내는시장성향
위 두가지일봉지표값이가각30이하 70이상인 선물종목을찾아낼려면
검색식으로사용해야하나요?강조식으로사용해야하나요?
해당식으로코팅부탁합니다
감사합니다
2020-03-21
433
글번호 137077
답변완료
문의드립니다.
하기식을 예스로 부탁드립니다.
** 시스템식은 추가신호도 나올수 있게 부탁드립니다.
( 매수신호가 있을 경우에도 추가 매수 나올수있게 부탁드립니다.)
study(title="VDUB_BINARY_PRO_3_V2", shorttitle="VDUB_BINARY_PRO_3_V2", overlay=true)
source = close
length = input(56, minval=1, title = "WMA Length")
atrlen = input(100, minval=1, title = "ATR Length")
mult1 = 2
mult2 = 3
ma = wma(source, length)
range = tr
rangema = wma(range, atrlen)
up1 = ma + rangema * mult1
up2 = ma + rangema * mult2
dn1 = ma - rangema * mult1
dn2 = ma - rangema * mult2
color1 = white
color2 = white
u4 = plot(up1, color = color1)
u8 = plot(up2, color = color2)
d4 = plot(dn1, color = color1)
d8 = plot(dn2, color = color2)
fill(u8, u4, color=#30628E, transp=80)
fill(d8, d4, color=#30628E, transp=80)
fill(d4, u4, color=#128E89, transp=80)
//Linear regression band
src = close
//Input
nlookback = input (defval = 20, minval = 1, title = "Number of Lookback")
scale = input(defval=1, title="scale of ATR")
nATR = input(defval = 14, title="ATR Parameter")
//Center band
periods=input(21, minval=1, title="MA Period")
pc = input(true, title="MA BAND")
hld = iff(close > sma(high,periods)[1], 1, iff(close<sma(low,periods)[1],-1, 0))
hlv = valuewhen(hld != 0, hld, 1)
hi = pc and hlv == -1 ? sma(high, periods) : na
lo = pc and hlv == 1 ? sma(low,periods) : na
plot(avg(sma(high,periods)+2.5*(sma(high,periods)-sma(low,periods)),sma(low,periods)-2.5*(sma(high,periods)-sma(low,periods))), color=red, style=line,linewidth=4)
plot(pc and sma(high, periods) ? sma(high, periods):na ,title="Swing High Plot", color=black,style=line, linewidth=1)
plot(pc and sma(low,periods) ? sma(low,periods) : na ,title="Swing Low Plot", color=black,style=line, linewidth=1)
//fill(hlv,hld,color=#1c86ee,transp=80)
//--------------------------------------------------------------------------------------------
// Base line_VX1
source2 = close
short = sma(close, 3)
long = sma(close, 13)
plot(short, color=red, linewidth=2)
plot(long, color=navy, linewidth=4)
plot(cross(long, short) ? long : na, style = circles, color=blue, linewidth = 9)
OutputSignal = long >= short ? 1 : 0
bgcolor(OutputSignal>0?red:gray, transp=100)
//=======================================================
//Vdub_Tetris_V2
LRG_Channel_TF_mins_D_W_M = input("30")
Range2 = input(1)
SELL = security(tickerid, LRG_Channel_TF_mins_D_W_M, highest(Range2))
BUY = security(tickerid, LRG_Channel_TF_mins_D_W_M, lowest(Range2))
HI = plot(SELL, color=SELL!=SELL[1]?na:red,linewidth=2 )
LO = plot(BUY, color=BUY!=BUY[1]?na:green,linewidth=2 )
fill(HI, LO, color=#E3CAF1, transp=100)
Hcon = high >= SELL
Lcon = low <= BUY
plotshape(Hcon, style=shape.triangledown, color=maroon, location=location.abovebar)
plotshape(Lcon, style=shape.triangleup, color=green, location=location.belowbar)
range2 = SELL-BUY
//--------------------------------------------------
SML_Channel_TF_mins_D_W_M = input('240')
M_HIGH = security(tickerid, SML_Channel_TF_mins_D_W_M, high)
M_LOW = security(tickerid, SML_Channel_TF_mins_D_W_M, low)
plot(M_HIGH, color=M_HIGH != M_HIGH[1] ?na:fuchsia, style=line, linewidth=2)
plot(M_LOW, color=M_LOW != M_LOW[1] ?na:fuchsia, style=line, linewidth=2)
//--------------------------------------------------
Zingzag_length = input(7)
hls = rma(hl2, Zingzag_length)
isRising = hls >= hls[1]
zigzag1 = isRising and not isRising[1] ? lowest(Zingzag_length) : not isRising and isRising[1] ? highest(Zingzag_length) : na
plot(zigzag1, color=black)
Zigzag2 = input(false)
zigzag = Hcon ? high : Lcon ? low : na
plot(not Zigzag2 ? na : zigzag, color=red, style=line, linewidth=3)
//=====================================================================//
2020-03-21
516
글번호 137076
답변완료
수식부탁합니다
수고하십니다
년n봉전 저가 월n봉전 저가 주n봉전 저가 일봉n봉전 저가를 분봉차트에 라인을 만들고십습니다 부탁합니다
2020-03-21
411
글번호 137075
답변완료
수식 추가로 작성 요청드릴께요~~
아래수식은 b1~b8번 까지 다른 매수조건이지만
청산 조건은 진입후 11% 수익시 청산하게되는 수식입니다.
각각 매수조건별로 청산조건을 다르게 설계가능할까요?
예를 들면
b1조건에 매수후 3% 수익시 청산
b2조건에 매수후 4% 수익시 청산
b3조건에 매수후 5% 수익시 청산
b4조건에 매수후 6% 수익시 청산
b5조건에 매수후 7% 수익시 청산
b6조건에 매수후 8% 수익시 청산
b7조건에 매수후 9% 수익시 청산
b8조건에 매수후 10% 수익시 청산
하게 하는 식을 부탁드릴게요~~
input : n(180),하락퍼센트(0.95);
input : p(20),MFI값(70);
input : 매매수(25),금액1(0),금액2(0),금액3(5),금액4(10),금액5(15),금액6(15),금액7(15),금액8(15);
input : 전일대비하락률(0.85),청산률(11);
var1 = highest(H,n);
var2 = mfi(P);
if stime < 143000 then
{
if MaxEntries < 매매수 and
c < var1*하락퍼센트 and
var2 < MFI값 and
c < o and
c <= c[1]*(100-전일대비하락률)/100 Then
buy("b1",OnClose,def,Floor(금액1*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.04) and
var2 < (MFI값-7) and
c < o and
c <= c[1]*(99.4-전일대비하락률)/100 Then
buy("b2",OnClose,def,Floor(금액2*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.08) and
var2 < (MFI값-14) and
c < o and
c <= c[1]*(99.2-전일대비하락률)/100 Then
buy("b3",OnClose,def,Floor(금액3*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.12) and
var2 < (MFI값-21) and
c < o and
c <= c[1]*(98.8-전일대비하락률)/100 Then
buy("b4",OnClose,def,Floor(금액4*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.16) and
var2 < (MFI값-28) and
c < o and
c <= c[1]*(98.4-전일대비하락률)/100 Then
buy("b5",OnClose,def,Floor(금액5*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.2) and
var2 < (MFI값-35) and
c < o and
c <= c[1]*(98.0-전일대비하락률)/100 Then
buy("b6",OnClose,def,Floor(금액6*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.24) and
var2 < (MFI값-42) and
c < o and
c <= c[1]*(97.6-전일대비하락률)/100 Then
buy("b7",OnClose,def,Floor(금액6*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.28) and
var2 < (MFI값-48) and
c < o and
c <= c[1]*(97.2-전일대비하락률)/100 Then
buy("b8",OnClose,def,Floor(금액6*10000/c));
SetStopProfittarget(청산률,PercentStop);
}
Else
SetStopProfittarget(0);
2020-03-21
412
글번호 137074