커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8034
글번호 230811
답변완료
지표 문의 드립니다.
// ~~ Tooltips
t1 = "Defines the lookback period for the oscillator and Bollinger Bands calculation. Increasing this value will consider a longer history, potentially smoothing out the oscillator and making the Bollinger Bands wider, leading to fewer signals. Decreasing this value will make the oscillator more sensitive to recent price changes, and the Bollinger Bands will become narrower, possibly increasing the number of signals."
t2 = "Determines how much the oscillator's calculation is smoothed. A higher smoothing factor reduces noise and makes the oscillator's line smoother, which may help in identifying the dominant trend more clearly but can delay signal generation. A lower smoothing factor makes the oscillator more responsive to recent price movements, which can be beneficial for short-term trading strategies but may increase the risk of false signals."
// ~~ Inputs
length = input.int(33, "Length", minval=1, group="Dynamic Price Oscillator", tooltip=t1)
smoothFactor = input.int(5, "Smoothing Factor", minval=1, group="Dynamic Price Oscillator", tooltip=t2)
// ~~ Function to calculate True Range
trueRange(high, low, close) =>
tr1 = high - low
tr2 = math.abs(high - close[1])
tr3 = math.abs(low - close[1])
math.max(tr1, tr2, tr3)
// ~~ Function to calculate Bollinger Bands
bollingerBands(src, length, mult) =>
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev
[upper, lower]
// ~~ Adjusted Price based on True Range
volAdjPrice = ta.ema(trueRange(high, low, close), length)
// ~~ Price calculation
priceChange = close - close[length]
priceDelta = close - volAdjPrice
oscillator = ta.ema(math.avg(priceDelta, priceChange), smoothFactor)
// ~~ Bollinger Bands on Oscillator
[bbHigh, bbLow] = bollingerBands(oscillator, length * 5, 1)
[bbHighExp, bbLowExp] = bollingerBands(oscillator, length * 5, 2)
mean = math.avg(bbHighExp, bbLowExp)
// ~~ Middle Lines
middleHighMean = (bbHigh + mean) / 2
middleMeanLow = (mean + bbLow) / 2
// ~~ Plot
p1 = plot(oscillator, "Dynamic Price Oscillator", color=color.rgb(227, 161, 54))
plot(mean, "Dynamic Mean", color=color.new(#f7cb85, 0))
p2 = plot(bbHigh, "Bollinger High", color=color.new(#089981, 60))
p3 = plot(bbHighExp, "Expanded Bollinger High", color=color.new(#089981, 0))
p4 = plot(bbLow, "Bollinger Low", color=color.new(#f23645, 60))
p5 = plot(bbLowExp, "Expanded Bollinger Low", color=color.new(#f23645, 0))
plot(middleHighMean, "Middle High-Mean", color=color.new(#0099cc, 40))
plot(middleMeanLow, "Middle Mean-Low", color=color.new(#cc9900, 40))
fill(p1, p2, oscillator > bbHigh ? color.new(#089981, 80) : na, "Oscillator Above Bollinger High")
fill(p1, p3, oscillator > bbHighExp ? color.new(#089981, 80) : na, "Oscillator Above Expanded Bollinger High")
fill(p1, p4, oscillator < bbLow ? color.new(#f23645, 80) : na, "Oscillator Below Bollinger Low")
fill(p1, p5, oscillator < bbLowExp ? color.new(#f23645, 80) : na, "Oscillator Below Expanded Bollinger Low")
트레이딩뷰 지표인데 예스로 좀 바꿔주세요.
2025-04-13
973
글번호 190070
답변완료
프린트 수식 부탁 드립니다
노고에 감사 드립니다
자동매수와 STOP주문 실행으로 4종목을 사고 팔았는데 Exell화일로 저장하고
싶은데 잘안되어서 부탁드립니다
아래와 같이 하고 싶고 가능 하다면 수익률이 0보다 크면 (2번 3번) 줄
한줄을 연한 분홍, 0보다 작으면 (1번 4번)연한 파랑으로 색칠 하고 싶습니다
그리고 숫자 1000단위에 컴마찍는것도 가능 할런지요.
부탁드리겠읍니다
A B C D E F G
순 거래일자 종목명 매수시각 매도시각 매매구분 수량
1 2025/03/31 엠오티 9:07:14 9:07:14 매도청산 104
2 2025/03/31 모비데이즈 9:40:06 9:40:06 매도청산 465
3 2025/03/31 케이씨피드 11:19:00 15:18:00 당일청산 336
4 2025/03/31 유라클 12:19:53 15:18:53 당일청산 74
H I J K L M
매입가격 매도가격 수익률 수익금액 일손익계 비고
9,450 9,260 -2.19% -21,484 -21,484
2,100 2,145 1.96% 19,149 -2,335
2,920 2,980 1.87% 18,369 16,034
13,370 13,100 -2.20% -21,714 -5,680
감사 드립니다
2025-04-13
1482
글번호 190069
답변완료
수식부탁드립니다.
항상 감사드립니다.
분봉 10분봉 과 30분봉에서 검색될수있게
종목검색식으로 부탁드립니다.
a=valuewhen(1,dayclose()>predayclose()*p,dayhigh());
b=valuewhen(1,dayclose()>predayclose()*p,predayclose());
X=a-((a-b)*1.975);
CrossUp(C,X)
조건
P는 5.20 입니다.
감사드립니다.
2025-04-13
416
글번호 190068
답변완료
문의
indicator("HTF Trend Tracker [BigBeluga]", overlay = true, max_lines_count = 500, max_labels_count = 500)
// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
tf = input.timeframe("D", "Timeframe")
bull_col = input.color(color.rgb(12, 193, 142), "✓", inline = "col")
bear_col = input.color(color.red, "✕", inline = "col")
mid_col = input.color(color.rgb(121, 121, 121), "-", inline = "col")
var line_1 = line(na)
var line_2 = line(na)
var color_trend = color(na)
var trend = bool(na)
// }
// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
draw_line(x1, x2, y, txt, color)=>
l = line.new(x1, y, x2, y, color = color, style = line.style_dashed)
label.delete(label.new(x1, y, txt, color = color(na), style = label.style_label_right)[1])
l
var h = float(na)
var l = float(na)
var count = 0
if not timeframe.change(tf)
count +=1
h := ta.highest(count)
l := ta.lowest(count)
if timeframe.change(tf)
count := 0
line_1 := draw_line(bar_index, bar_index, h[1], tf + " High", bear_col)
line_2 := draw_line(bar_index, bar_index, l[1], tf + " Low", bull_col)
line_1.set_x2(bar_index)
line_2.set_x2(bar_index)
if barstate.islast
line.delete(line.new(line_1.get_x1(), line_1.get_y1(), bar_index+15, line_1.get_y1(), color = bear_col, style = line.style_arrow_right)[1])
line.delete(line.new(line_2.get_x1(), line_2.get_y1(), bar_index+15, line_2.get_y1(), color = bull_col, style = line.style_arrow_right)[1])
mid = math.avg(line_1.get_y1(),line_2.get_y1())
if ta.crossover(close, line_1.get_y1()) and barstate.isconfirmed
color_trend := bull_col
trend := true
if ta.crossunder(close, line_2.get_y1()) and barstate.isconfirmed
color_trend := bear_col
trend := false
// }
// PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
if trend and trend != trend[1]
label.new(bar_index, low - ta.sma(high-low, 100), "✓", style = label.style_label_up, size = size.tiny, color = bull_col)
if not trend and trend != trend[1]
label.new(bar_index, high + ta.sma(high-low, 100), "✕", style = label.style_label_down, size = size.tiny, color = bear_col)
high_sdv = (high- mid)
low_sdv = (mid - low)
color_bars =
trend
? color.from_gradient(high_sdv, 0, ta.highest(high_sdv, 100), mid_col, bull_col)
: color.from_gradient(low_sdv, 0, ta.highest(low_sdv,100), mid_col, bear_col)
plotcandle(open, high, low, close, title ='Candles', color = color_bars, wickcolor=color_bars, bordercolor = color_bars)
plot(mid, "Trend", color = color_trend, linewidth = 2)
// }
예스식으로 부탁드립니다
2025-04-13
608
글번호 190067
답변완료
신호 기호 굵게 표현하는 방법없나요?
안녕하세요. 수고가 많으십니다.
# 매도
If CrossDown(value3, value4) Then
{
tx = Text_New(sdate,sTime,H,"♣");
Text_SetStyle(tx,2,1);#좌우상하정렬
Text_SetColor(tx,BLUE);#색상
Text_SetSize(tx,25);#크기
}
제가 사용하는 신호의 일부분입니다.
♣ 이 표시를 굵게표현(볼드체)하는 방법이 없을까요? -- 크기 조절한 것 말고요.진하게 표현하는 방법을 문의합니다.
감사합니다.
2025-04-13
531
글번호 190066
요타 님에 의해서 삭제되었습니다.
2025-04-12
18
글번호 190065
답변완료
부틱드립니다
수고하십니다
아래수식은 제가 이것저것 갖다 붙인수식인데요 이상한선들이 나타나내요 수식수정 부탁드립니다
input : 타주기분(5);
var : S1(0),D1(0),TM(0),TF(0),box(0),dd(0),tt(0);
var : oo(0),hh(0),ll(0),cc(0),TL1(0),TL2(0),TL3(0),clr(0),ii(0),TL(0),TL4(0);
var : box1(0),box2(0),box3(0),box4(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%타주기분;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or
(Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then
{
dd = sDate;
tt = sTime;
oo = O;
hh = H;
ll = L;
//cc = C;
box = Box_New(sDate,sTime,oo,NextBarSdate,NextBarStime,c);
//------------------------------------------------------------------
TL1 = TL_New(sDate,sTime,max(C,oo),sDate,sTime,hh);
TL2 = TL_New(sDate,sTime,min(C,oo),sDate,sTime,ll);
box1 = box[1];
box2 = box1[1];
box3 = box2[1];
box4 = box3[1];
Box_Delete(Box4);
ii = 1;
}
Else
{
ii = ii +1;
if h > hh Then
hh = h;
if l < ll Then
ll = l;
var1 = Round(ii/2,1);
Box_SetEnd(box,sDate,sTime,C);
//-------------------------------------------------------
TL_SetBegin(TL1,sDate[var1],sTime[var1],max(c,oo));
TL_SetEnd(TL1,sDate[var1],sTime[var1],hh);
TL_SetBegin(TL2,sDate[var1],sTime[var1],min(c,oo));
TL_SetEnd(TL2,sDate[var1],sTime[var1],ll);
TL = TL_New(dd,tt,c,sDate,sTime,c);
TL_SetExtRight(TL,true);
TL_SetColor(TL,Green);
TL_SetSize(TL,1);
TL1 = TL[1];
TL2 = TL1[1];
TL3 = TL2[1];
TL4 = TL3[1];
TL_Delete(TL4);
TL_SetBegin(TL,dd,tt,c);
TL_SetEnd(TL,sDate,sTime,c);
}
if C > oo Then
clr = DarkRed;
else if C < oo Then
clr = Green;
Else
clr = White;
Box_SetColor(box,clr);
Box_SetSize(box,5);
Box_SetFill(box,True,60);//내부채움
TL_SetColor(tl1,Yellow);
TL_SetColor(tl2,Yellow);
TL_SetColor(tl3,clr);
TL_SetColor(tl,clr);
TL_SetSize(TL1,5);
TL_SetSize(TL2,5);
}
2025-04-13
513
글번호 190064
답변완료
92304번 재질문
안녕하세요?
아래 글번호 92304번 재질문입니다.
주가지수 일봉에 전략을 적용하면 신호가 다릅니다.
"진입 후 7번째 봉이 완성되고
8번째봉의 시가가 진입가보다 크거나 같으면 8번째봉 시가에 청산
아니면 8번째 봉의 시가에 매도로 스위칭"
상기의 논리라면 진입 후 8번째 봉 후에서는 청산이 발생되어야 하니
그렇지 않습니다.
#b2으로 진입 후 7번째 봉이 완성되고
if IsEntryName("b2",0) == true and BarsSinceEntry == 7 Then
{
#8번째봉의 시가가 진입가보다 크거나 같으면 8번째봉 시가에 청산
if NextBarOpen >= EntryPrice Then
ExitLong("bx2",AtMarket);
Else #아니면 8번째 봉의 시가에 매도로 스위칭
Sell("s4",AtMarket);
}
주석주신대로 신호가 생성되도록 수정 부탁드립니다.
2025-04-12
475
글번호 190063
답변완료
예스종목검색으로 요청합니다^^*
아래수식을 예스종목검색으로 변환부탁드립니다..
variables: LowestLo( 0 ) ;
if CurrentBar == 1 then{
LowestLo = Low;
}
else if Low < LowestLo then {
Plot1( Low, "NewLo-Ch" ) ;
LowestLo = Low ;
}
2025-04-12
465
글번호 190062