커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1463
글번호 230811
답변완료
골든크로스
안녕하세요
300틱차트에 1,60 가중이평선골든크로스 조건검색식을 만들고 싶어서 문의드립니다
2024-01-23
909
글번호 175987
답변완료
시스템식 부탁드립니다.
항상 도움 주셔서 감사합니다.
아래 시스템식에서 불타기의 청산조건을
마지막 진입가격 대비 outgap(20) 만큼 하락시 청산하는
조건으로 시스템식 변경 부탁드립니다.
감사합니다.
input : Pst(1);
input : gap(20), outgap(20), gapmulti(0.7), multi(0.7), pt(20), sl(200);
var : vol(0),v1(0),t(0),b(0),s(0);
var : line1(0), line2(0);
value1 = gap/PointValue;
value2 = pt/PointValue;
value3 = sl/PointValue;
value4 = outgap/PointValue;
line1 = ma(c,10) ;
line2 = ma(c,20) ;
if pst == 1 Then
{
if MarketPosition == 0 and TotalTrades == TotalTrades[1] Then
{
vol = 1;
Buy("b",OnClose,Def,vol);
}
if MarketPosition == 1 Then
{
if CurrentContracts > CurrentContracts[1] Then
{
v1 = CurrentContracts-CurrentContracts[1];
if MaxEntries == 1 Then
t = value1 ;
Else
t = t+Round(t*gapmulti,0);
if LatestEntryName(0) == "upb" Then
b = 1;
if LatestEntryName(0) == "dnb" Then
b = -1;
}
vol = Round(v1+v1*multi,0);
Buy("dnb",AtLimit,EntryPrice(0)-PriceScale*(value1*MaxEntries),vol);
Buy("upb",AtStop,EntryPrice(0)+PriceScale*(value1*MaxEntries),vol);
if b == -1 Then
{
ExitLong("bx11",AtLimit,AvgEntryPrice+PriceScale*Value2);
ExitLong("bx12",AtLimit,EntryPrice);
}
if b == 1 Then
{
ExitLong("bx21",AtStop,AvgEntryPrice-PriceScale*Value2);
ExitLong("bx22",AtStop,EntryPrice);
}
}
Else
b = 0;
}
if pst == -1 Then
{
if MarketPosition == 0 and TotalTrades == TotalTrades[1] Then
{
vol = 1;
Sell("s",OnClose,Def,vol);
}
if MarketPosition == -1 Then
{
if CurrentContracts > CurrentContracts[1] Then
{
v1 = CurrentContracts-CurrentContracts[1];
if MaxEntries == 1 Then
t = value1 ;
Else
t = t+Round(t*gapmulti,0);
if LatestEntryName(0) == "ups" Then
s = 1;
if LatestEntryName(0) == "dns" Then
s = -1;
}
vol = Round(v1+v1*multi,0);
Sell("ups",AtLimit,EntryPrice(0)+PriceScale*(value1*MaxEntries),vol);
Sell("dns",AtStop,EntryPrice(0)-PriceScale*(value1*MaxEntries),vol);
if s == 1 Then
{
ExitShort("sx11",AtLimit,AvgEntryPrice-PriceScale*Value2);
ExitShort("sx12",AtLimit,EntryPrice);
}
if s == -1 Then
{
ExitShort("sx21",AtStop,AvgEntryPrice+PriceScale*Value2);
ExitShort("sx22",AtStop,EntryPrice);
}
}
Else
s = 0;
}
2024-01-23
861
글번호 175979
답변완료
문의드립니다.
다음 수식을 종목검색식으로 부탁드립니다.
(1)
A1 = (npredayclose(20)+npredayclose(19)+npredayclose(18)+npredayclose(17)+npredayclose(16)+npredayclose(15)+npredayclose(14)+npredayclose(13)+npredayclose(12)+npredayclose(11)+npredayclose(10)+npredayclose(9)+npredayclose(8)+npredayclose(7)+npredayclose(6)+npredayclose(5)+npredayclose(4)+npredayclose(3)+npredayclose(2)+npredayclose(1))/20;
B = ma(C, 20);
D = CrossDown(B, ,A1);
K = Valuewhen(1, D, (A1+C)/2);
CrossUp(C, K)
(2)
A = ma(C, 5);
B = ma(C, 20);
An= CrossDown(A, B);
k1 = Valuewhen(1, An, (C+ B)/2);
CrossUp(C, K1)
(3)
period 5
period1 10
period2 20
period3 60
percent 0.7
mult 1.1
prv 100
k1=avg(c,period);
k2=avg(c,period1);
k3=avg(c,period2);
k4=avg(c,period3);
k5=k1/k3*100;
k6=EnvelopeUp(Period,Percent);
CrossUp(c,k6) && c>k3 && c>k4 &&
k3>k4 && c>o && c>c(1)*mult &&
c>h(1) &&( k5(1)<prv or k5(2)<prv or
k5(3)<prv or k5(4 )<prv or
k5(5)<prv )
2024-01-22
945
글번호 175964
답변완료
문의 드립니다.
대신에서 쓰던 검색인데 변환좀 부탁 드립니다. 쉬워요 ;
1봉전 10봉이내 가격 단기 5이평이 장기 10 이평을 상향돌파
일간 2봉전 가격 단기20, 중기30, 장기 60이평비교 정배열 상대
일간 2봉전 단기 120 중기 180 장기 240 이평 정배열
일간 1봉전 5봉이내 5봉 평균거래량이 200000 이상
현재가가 300원 이상 20000원 이하
일간 rsi가 70 값을 상향 돌파
2024-01-22
924
글번호 175963
답변완료
수식작성 부탁드립니다.
안녕하세요. 운영자님
이번에 꼭좀 부탁드릴 사항은 다음의 트레이딩뷰 지표를 예스트레이더로 변환을 해주십사합니다.
//@version=4
study(title="Twin Range Filter", overlay=true)
source = input(defval=close, title="Source")
// Smooth Average Range
per1 = input(defval=27, minval=1, title="Fast period")
mult1 = input(defval=1.6, minval=0.1, title="Fast range")
per2 = input(defval=55, minval=1, title="Slow period")
mult2 = input(defval=2, minval=0.1, title="Slow range")
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ema(abs(x - x[1]), t)
smoothrng = ema(avrng, wper) * m
smoothrng
smrng1 = smoothrng(source, per1, mult1)
smrng2 = smoothrng(source, per2, mult2)
smrng = (smrng1 + smrng2) / 2
// Range Filter
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt[1]) ? x - r < nz(rngfilt[1]) ? nz(rngfilt[1]) : x - r :
x + r > nz(rngfilt[1]) ? nz(rngfilt[1]) : x + r
rngfilt
filt = rngfilt(source, smrng)
upward = 0.0
upward := filt > filt[1] ? nz(upward[1]) + 1 : filt < filt[1] ? 0 : nz(upward[1])
downward = 0.0
downward := filt < filt[1] ? nz(downward[1]) + 1 : filt > filt[1] ? 0 : nz(downward[1])
hband = filt + smrng
lband = filt - smrng
longCond = bool(na)
shortCond = bool(na)
longCond := source > filt and source > source[1] and upward > 0 or source > filt and source < source[1] and upward > 0
shortCond := source < filt and source < source[1] and downward > 0 or source < filt and source > source[1] and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni[1]
long = longCond and CondIni[1] == -1
short = shortCond and CondIni[1] == 1
// Plotting
plotshape(long, title="Long", text="Long", style=shape.labelup, textcolor=color.black, size=size.tiny, location=location.belowbar, color=color.lime, transp=0)
plotshape(short, title="Short", text="Short", style=shape.labeldown, textcolor=color.white, size=size.tiny, location=location.abovebar, color=color.red, transp=0)
// Alerts
alertcondition(long, title="Long", message="Long")
alertcondition(short, title="Short", message="Short")
2024-01-22
1212
글번호 175962
답변완료
수식작성 부탁드립니다.
안녕하세요. 운영자님
이번에 꼭좀 부탁드릴 사항은 다음의 트레이딩뷰 지표를 예스트레이더로 변환을 해주십사합니다.
Bollinger Bands Percentile + Stdev Channels (BBPct) [AlgoAlpha]
//@version=5
indicator(shorttitle="◭ BBPCT% [AlgoAlpha]", title="◭ Bollinger Bands Percent", overlay=false)
//Symmetrical Standard Deviation Channels
neon = input.bool(title = 'Neon Color Theme', defval = true)
upper1 = close + 0.05 * close
lower1 = close - 0.05 * close
stdL = close > lower1
stdS = close < upper1
//BBPCT
length = input.int(20, minval=1, group='Bollinger Band')
src = input(close, title="Source", group='Bollinger Band')
mult = input.float(2.0, minval=0.001, maxval=50, title="Multiplier", group='Bollinger Band')
lookback = 750
showStdev = input.bool(false, title='Show Bollinger Band Stdev %', group='Settings')
var stdevArray = array.new_float(lookback,0.0)
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev
positionBetweenBands = 100 * (src - lower)/(upper - lower)
array.push(stdevArray, dev/close)
if array.size(stdevArray)>=lookback
array.remove(stdevArray, 0)
rank = array.percentrank(stdevArray, lookback-1)
hist = 100*dev/close
bullcolor = neon ? #00ffbb : #00b712
bearcolor = neon ? #ff1100 : #c30010
//PLOTS
plot1 = plot(positionBetweenBands, color = color.new(color.white, 100))
obupper = plot(130, color = color.new(bearcolor, 0), display = display.none)
oblower = plot(110, color = color.new(bearcolor, 0), display = display.none)
obmid = plot(95, display = display.none)
osupper = plot(-10, color = color.new(bullcolor, 30), display = display.none)
oslower = plot(-30, color = color.new(bullcolor, 30), display = display.none)
osmid = plot(5, color = color.new(bullcolor, 70), display = display.none)
hline(50)
z = plot(positionBetweenBands, "Z", positionBetweenBands > 50 ? bullcolor : bearcolor)
mid = plot(50, display = display.none, editable = false)
fill(z, mid, positionBetweenBands > 50 ? positionBetweenBands : 50, positionBetweenBands > 50 ? 50 : positionBetweenBands, positionBetweenBands > 50 ? bullcolor : #00000000, positionBetweenBands > 50 ? #00000000 : bearcolor)
fill(obupper, oblower, color.new(bearcolor, 80))
fill (oblower, obmid, color.new(bearcolor, 87))
fill(osupper, oslower, color.new(bullcolor, 87))
fill(osupper, osmid, color.new(bullcolor, 93))
plotshape(ta.crossover(positionBetweenBands,-8) and stdL, style = shape.triangleup, color = bullcolor, location = location.bottom, size = size.tiny)
plotshape(ta.crossunder(positionBetweenBands,108) and stdS, style = shape.triangledown, color = bearcolor, location = location.top, size = size.tiny)
plot(showStdev ? hist : na, style=plot.style_columns, color=(hist[1] < hist ? #26A69A : #B2DFDB) , title='Stdev %')
//Alerts
alertcondition(ta.crossover(positionBetweenBands,-10), title="Bullish Reversal", message="Bullish Reversal {{exchange}}:{{ticker}}")
alertcondition(ta.crossunder(positionBetweenBands,110), title="Bearish Reversal", message="Bearish Reversal {{exchange}}:{{ticker}}")
alertcondition(ta.crossover(positionBetweenBands,50), title="Bullish Trend", message="Bullish Trend {{exchange}}:{{ticker}}")
alertcondition(ta.crossunder(positionBetweenBands,50), title="Bearish Trend", message="Bearish Trend {{exchange}}:{{ticker}}")
2024-01-22
1362
글번호 175961
고박사122 님에 의해서 삭제되었습니다.
2024-01-22
0
글번호 175960
답변완료
수식 문의
안녕하세요?
실수값을 갖는 aa 라는 지표가 있습니다.
aa < -3 => 매수 1개 이 때의 aa값을 a1으로 기억.
aa < a1 - 3 => 매수 1개 더
-1 < aa < 1 => 다 청산하고 무포지션
aa > 3 => 매도 1개. 이 때의 aa값을 a1으로 기억.
aa > a1 + 3 => 1개 추가로 더 매도.
감사합니다.
2024-01-23
861
글번호 175959
답변완료
분할 엑시트
안녕하세요,
아래의 수식이 분봉에서는 작동하는데 틱(10또는 20)챠트에서 작동하지 않는데 부탁드립니다.
if stime == 151000 Then
{
if MarketPosition == 1 Then
ExitLong("bx1",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx1",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if stime == 151500 Then
{
if MarketPosition == 1 Then
ExitLong("bx2",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx2",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if stime == 152000 Then
{
if MarketPosition == 1 Then
ExitLong("bx3",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx3",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if stime == 152500 Then
{
if MarketPosition == 1 Then
ExitLong("bx4",AtMarket);
if MarketPosition == -1 Then
ExitShort("sx4",AtMarket);
}
2024-01-22
940
글번호 175958