커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1335
글번호 230811
답변완료
검색식 부탁 드립니다
A1 = ma(c,2);
A2 = ma(c,120);
A3 = ma(c,240);
이격율 = A2 / A3 * 100 - 100;
조건 =
H > C(1) *1.15 &&
C > C(1)*1.1 &&
거래대금 >= 20000 &&
RSI(14) >= 70;
조건 &&
crossup(c, A2) && crossup(c, A3) &&
crossup(A1, A2) && crossup(A1, A3) &&
이격율 > -7 && 이격율 < 7;
S=sum(1);
M5=ma(c,기간1,지수);
M2=ma(c,기간2);
상전=M5>M5(1) && M5(1)<M5(2);
DC=valuewhen(1, crossdown(M5,M2), S);
상1=valuewhen(1, 상전, S);
상2=valuewhen(2, 상전, S);
상3=valuewhen(3, 상전, S);
GC=valuewhen(1, crossup(M5,M2),S);
조건W=상3<Dc && Dc<상2 && 상2<상1 && 상1<Gc &&
조건W && !조건W(1);
매집1=Crossup(h,BBandsUp(40,2));
매집2=CrossUP(MACD(9,52),0);
매집3=Crossup(MACD(9,52),eavg(MACD(9,52),26));
cs1=Crossup(Stochasticsslow(20,12),
eavg(Stochasticsslow(20,12),12));
cs2=crossup(cci(20),0);
최종=
매집1+매집2+매집3 >=2 or cs1+cs2 >=2 and
H > C(1)*1.30;
최종(-1)
2025-03-03
620
글번호 188712
답변완료
부탁드립니다.
1. 매시간마다 전시간대 최고가와 최저가를 기준으로 3등분(또는 4등분, 5등분할 수 있도록 조정가능하게끔)하여 우측추세선으로 나타나도록 구현해 주세요
2. 매일 전일 최고가와 최저가를 기준으로 3등분(또는 4등분, 5등분할 수 있도록 조정가능하게끔)하여 우측추세선으로 나타나도록 구현해 주세요
3. 매월 전월 최고가와 최저가를 기준으로 3등분(또는 4등분, 5등분할 수 있도록 조정가능하게끔)하여 우측추세선으로 나타나도록 구현해 주세요
고맙습니다.
2025-03-03
383
글번호 188711
답변완료
수식문의입니다
어떤 신호가 예를들어 종가상 5이평선골드발생신호가 월시작후 영업일기준 5일이내에 발생하거나 15일이후(월말이전 5일이내)에 발생되는 경우로 한정하고 싶은데 조건설정수식을 어케 추가해야하나요?
2025-03-03
370
글번호 188710
와우리 님에 의해서 삭제되었습니다.
2025-03-03
128
글번호 188709
답변완료
수식 문의 드립니다.
안녕하세요.
일봉이평선 사이의 차를 차트상 표시 가능한가요?
예를 들면 전일 5일선이 15000
당일 5일선이 14500
차 500
전일시가 13000 일 때
전일시가+차(500)=13500을 차트 표시가능한가요?
가능하다면 주봉이평선의 수식도 부탁드립니다.
2025-03-03
398
글번호 188708
답변완료
수식 변환 부탁드립니다
다음 TradingView 수식 중
O1= barssince(buySignal)
O2= barssince(sellSignal)
O3= barssince(buyExit)
O4= barssince(sellExit)
E1= barssince(buySignal[1])
E2= barssince(sellSignal[1])
E3= barssince(buyExit[1])
E4= barssince(sellExit[1])
부분을 예스트레이더로 변환하는 데 어려움이 있습니다. barssince(조건식)을 예스트레이더로 수행하는 함수를 부탁합니다.
================================================================================
study(title="Turtle Trade Channels Indicator", shorttitle="TuTCI@q", overlay=true, resolution="")
length = input(20,"Entry Length", minval=1)
len2=input(10, "Exit Length", minval=1)
showsignals = input(title="Show Entry/Exit Signals ?", type=input.bool, defval=true)
highlighting = input(title="Highlighter On/Off ?", type=input.bool, defval=true)
lower = lowest(low, length)
upper = highest(high, length)
u = plot(upper, "Upper", color=#0094FF)
l = plot(lower, "Lower", color=#ff0000)
up=highest(high,length)
down=lowest(low,length)
sup=highest(high,len2)
sdown=lowest(low,len2)
K1=barssince(high>=up[1])<=barssince(low<=down[1]) ? down : up
K2=iff(barssince(high>=up[1])<=barssince(low<=down[1]),sdown,sup)
K3=iff(close>K1,down,na)
K4=iff(close<K1,up,na)
plot(K1, title="Trend Line", color=color.red, linewidth=2)
e=plot(K2, title="Exit Line", color=color.blue, linewidth=1, style=6)
buySignal=high==upper[1] or crossover(high,upper[1])
sellSignal = low==lower[1] or crossover(lower[1],low)
buyExit=low==sdown[1] or crossover(sdown[1],low)
sellExit = high==sup[1] or crossover(high,sup[1])
O1= barssince(buySignal)
O2= barssince(sellSignal)
O3= barssince(buyExit)
O4= barssince(sellExit)
E1= barssince(buySignal[1])
E2= barssince(sellSignal[1])
E3= barssince(buyExit[1])
E4= barssince(sellExit[1])
plotshape(buySignal and O3<O1[1] ? down : na, title="Long Entry", location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.red, 0))
plotshape(buySignal and showsignals and O3<O1[1] ? down : na, title="Long", text="Long Entry", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.green, textcolor=color.new(color.white,0))
plotshape(sellSignal and O4<O2[1] ? up : na, title="Short Entry", location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.green, 0))
plotshape(sellSignal and showsignals and O4<O2[1] ? up : na, title="Short", text="Short Entry", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.red, textcolor=color.new(color.white,0))
plotshape(buyExit and O1<O3[1] ? up : na, title="Long Exit", location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.blue,0))
plotshape(buyExit and showsignals and O1<O3[1] ? up : na, title="Long Exit", text="Exit Long", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.blue, textcolor=color.new(color.white,0))
plotshape(sellExit and O2<O4[1] ? down : na, title="Short Exit", location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.blue,0))
plotshape(sellExit and showsignals and O2<O4[1] ? down : na, title="Short", text="Exit Short", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.blue, textcolor=color.new(color.white,0))
color1= highlighting and min(O1,O2,O3)==O1 ? color.green : na
color2= highlighting and min(O1,O2,O4)==O2 ? color.red : na
fill(u, e, color=color1, title="Background")
fill(l, e, color=color2, title="Background")
2025-03-04
455
글번호 188707
답변완료
수식문의드립니다.
안녕하세요,
아래 분할 청산 수식에 더해서
if marketposition == 1 and c > DayOpen and c > o Then {
if Value6 > 0.02 Then Buy("S1_upb");
}
이걸 추가하고 싶은데, 이때 Buy 수량을 분할청산으로 나간 수량 만큼만 매수하고 싶습니다.
수식 부탁드립니다.
input : txratio(0.3),txa(3),txam(5),txb(8),txn(2);
var : trXcond1(false),trXcond2(false),trXcond3(false),ii(0);
if MarketPosition == 1 Then
{
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "trx1" Then
trXcond1 = true;
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "trx2" Then
trXcond2 = true;
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "trx3" Then
trXcond3 = true;
var1 = highest(H,BarsSinceEntry);
if trXcond1 == false and var1 >= EntryPrice*(txa/100+1) and var1 < EntryPrice*(((txa+txam)/100)+1) Then
{
ExitLong("trx1",AtStop,var1*(1-txn/100),"",currentContracts*txratio,1);
}
if trXcond2 == false and var1 >= EntryPrice*(txb/100+1) and var1 < EntryPrice*(((txb+txam)/100)+1) Then
ExitLong("trx2",AtStop,var1*(1-txn/100),"",currentContracts*txratio,1);
#청산발생하면 ii는 0
if CurrentContracts < CurrentContracts[1] Then
ii = 0;
else
{ #청산발생 후 1씩 증가
if ii >= 0 Then
ii = ii +1;
}
if (ii > 96) and trXcond3 == false and var1 >= EntryPrice*(txa/100+1) and var1 < EntryPrice*(((txa+txam)/100)+1) Then
{
ExitLong("trx3",AtStop,var1*(1-(txn+1)/100),"",currentContracts*txratio,1);
}
}
Else
{
#매수포지션이 아니면 -1로 초기화
ii = -1;
trXcond1 = false;
trXcond2 = false;
trXcond3 = false;
}
2025-03-03
351
글번호 188706
답변완료
수식 변환 좀 부탁드립니다
안녕하세요 종목검색식 작성 부탁드립니다
A
input : N(9),MM(14);
var1 = iff((ma(iff(c<c[n],(c[n]-c),0),mm))<=0,100,
(100-(100/(1+((ma(iff(c>c[n],(c-c[n]),0),mm))/
(ma(iff(c<c[n],(c[n]-c),0),mm)))))));
plot1(var1);
B
Input : Period(9);
var : Relative(0);
Relative = RSI(Period);
Plot1(Relative, "RSI");
PlotBaseLine1(30, "기준선 30");
PlotBaseLine2(70, "기준선 70");
B가 A를 골든크로스시 검색식 부탁드립니다
2025-03-04
419
글번호 188705
답변완료
TradingView의 수식을 yestrader로 변환을 했는데 수정을 부탁합니다
첨부와 같이 변환을 했는데 만족스럽지 못합니다.
수정을 부탁합니다.
// © BigBeluga
//@version=6
indicator('Range Breakout [BigBeluga]', overlay = true, max_lines_count = 4, max_labels_count = 500)
// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
int length = 100 // Length of the line extension
float multi = input.float(4, 'Channel Width', step = 0.1) // Multiplier for channel width
bool show_x = input.bool(false, "Show X signals")
bool filter_sig = input.bool(false, "Filter Signals by Trends", "If True indicator filters ▲▼ based on channels breakout condition. If channel is bullish with green circle only ▲ displayed if bearish with red only ▼ signals displayed")
color color1 = input.color(#ffff00, "", inline = "col", group = "OB/OS")
color color3 = input.color(color.lime, "", inline = "col", group = "OB/OS")
bool gradient = input.bool(true, "Gradient", inline = "ll", group = "OB/OS")
int transp = input.int(80, "", inline = "ll", group = "OB/OS")
color color2 = chart.fg_color // Mid line color
// Initialize Variables
var float value = na
var float value_upper = na
var float value_lower = na
var float value_upper_mid = na
var float value_lower_mid = na
var bool trend = false
var count = 0
// }
// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
float atr = ta.sma(ta.atr(200), 100) * multi // ATR-based channel width
// Initialize channel values
if bar_index == 301
value := hl2
value_upper := hl2 + atr
value_lower := hl2 - atr
value_upper_mid := math.avg(value, value_upper)
value_lower_mid := math.avg(value, value_lower)
value_lower_mid
// Check for crossovers
bool cross_upper = ta.crossover(low, value_upper) and barstate.isconfirmed
bool cross_lower = ta.crossunder(high, value_lower) and barstate.isconfirmed
// Count bars outside the channel
if low > value_upper or high < value_lower
count := count + 1
count
// Reset channel values on crossover or after 100 bars
if cross_upper or cross_lower or count == 100
count := 0
value := hl2
value_upper := hl2 + atr
value_lower := hl2 - atr
value_upper_mid := math.avg(value, value_upper)
value_lower_mid := math.avg(value, value_lower)
value_lower_mid
bool chage = not(value != value[1])
bool buy_ = ta.crossover(low, value_lower_mid) and low[10] > value_lower_mid and barstate.isconfirmed and chage
bool sell_ = ta.crossunder(high, value_upper_mid) and high[10] < value_upper_mid and barstate.isconfirmed and chage
bool fakeout_up = ta.crossunder(high, value_upper) and barstate.isconfirmed and chage
bool fakeout_dn = ta.crossover(low, value_lower) and barstate.isconfirmed and chage
// }
// PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
// Plot and fill lines
p1 = plot(value_upper != value_upper[1] ? na : value_upper, color = color1, linewidth = 1, style = plot.style_linebr)
p0 = plot(bar_index % 2 == 0 ? value : na, color = color2, style = plot.style_linebr)
p2 = plot(value_lower != value_lower[1] ? na : value_lower, color = color3, linewidth = 1, style = plot.style_linebr)
upper_mid = math.avg(value_upper, value)
lower_mid = math.avg(value_lower, value)
p01 = plot(upper_mid != upper_mid[1] ? na : upper_mid, color = color.new(color2, 50), style = plot.style_linebr)
p02 = plot(lower_mid != lower_mid[1] ? na : lower_mid, color = color.new(color2, 50), style = plot.style_linebr)
fill(p1, p01, value_upper, value, color.new(value_upper != value_upper[1] ? na : color1, transp), color.new(value_upper != value_upper[1] ? na : color1, gradient ? 100 : transp))
fill(p2, p02, value, value_lower, color.new(value_upper != value_upper[1] ? na : color3, gradient ? 100 : transp), color.new(value_upper != value_upper[1] ? na : color3, transp))
// Plot cross signals
if cross_upper
trend := true
label.new(bar_index - 1, value_upper[1], text = '▲', textcolor = color1, style = label.style_label_center, color = color(na), size = size.large, tooltip = "Bullish Break")
if cross_lower
trend := false
label.new(bar_index - 1, value_lower[1], text = '▼', textcolor = color3, style = label.style_label_center, color = color(na), size = size.large, tooltip = "Bearish Break")
if buy_ and (filter_sig ? trend : true)
label.new(bar_index - 1, low[1], text = '▲', textcolor = color1, style = label.style_label_up, color = color(na), size = size.normal)
if sell_ and (filter_sig ? not trend : true)
label.new(bar_index - 1, high[1], text = '▼', textcolor = color3, style = label.style_label_down, color = color(na), size = size.normal)
if fakeout_up and show_x
label.new(bar_index - 1, high[1], text = 'X', textcolor = color3, style = label.style_label_down, color = color(na), size = size.normal)
if fakeout_dn and show_x
label.new(bar_index - 1, low[1], text = 'X', textcolor = color1, style = label.style_label_up, color = color(na), size = size.normal)
// }
2025-03-02
562
글번호 188704