커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3357
글번호 230811
답변완료
분할 진입 및 분할 청산
안녕하세요 항상 예스스탁 팀에 감사드리고 있습니다.
분할 진입 및 분할 청산에 관련하여 질문드렸었는데, 생각대로 잘 되지 않아 재문의 드립니다.
X라는 변수에 맞춰 계약수 (또는 주식 수)를 관리하고 싶다고 말씀드렸었습니다.
당시, 아래와 같이 답변 주셨는데, 잘 되지 않습니다.
-----
var : x(0);
if MarketPosition <= 0 and x > 0 Then
Buy("b",OnClose,Def,x);
if MarketPosition >= 0 and x < 0 Then
Sell("s",OnClose,Def,abs(x));
if MarketPosition == 1 Then
{
if x >= 0 Then
{
if x > CurrentContracts Then
Buy("bb",OnClose,Def,x-CurrentContracts);
if x < CurrentContracts Then
ExitLong("bx",OnClose,Def,"",CurrentContracts-x,1);
}
}
if MarketPosition == -1 Then
{
if x <= 0 Then
{
if abs(x) > CurrentContracts Then
Sell("ss",OnClose,Def,abs(x)-CurrentContracts);
if abs(x) < CurrentContracts Then
ExitShort("sx",OnClose,Def,"",CurrentContracts-abs(x),1);
}
}
---------
어떤 부분에서 안되냐면,
if MarketPosition <= 0 and x > 0 Then
Buy("b",OnClose,Def,x);
if MarketPosition >= 0 and x < 0 Then
Sell("s",OnClose,Def,abs(x));
이렇게 천 진입은 제대로 되는데, 그 이후가 제대로 되지 않습니다.
특히 추가 주문 및 중간 청산 부분이 잘 되지 않습니다.
if MarketPosition == 1 Then
{
if x >= 0 Then
{
if x > CurrentContracts Then
Buy("bb",OnClose,Def,x-CurrentContracts);
if x < CurrentContracts Then
ExitLong("bx",OnClose,Def,"",CurrentContracts-x,1);
}
}
^^^이 부분입니다.
현재 예스트레이더 코인으로 돌리고 있구요, 왜 안되는지 저도 잘 모르겠습니다. 수식만 보면 완벽한것같은데...
피라미딩은 '모든 진입 신호 허용'으로 해놨고, 주문수량도 100000000으로 늘려놨고 진입 횟수도 1000으로 늘려놨는데요 중간에 불타기 또는 부분 청산이 잘 되지 않습니다.
어떤 종목은 잘 되고 어떤 종목은 안됩니다 ㅠㅠㅠㅠ
도와주십쇼 ㅠㅠ
2024-03-11
771
글번호 177380
아트정 님에 의해서 삭제되었습니다.
2024-03-11
26
글번호 177369
창동개미 님에 의해서 삭제되었습니다.
2024-03-11
26
글번호 177368
답변완료
수식변환 문의
수고가 많으십니다.
트레이딩뷰의 지표인 Nadaraya" Watson Envelope
예스로 변환해 주시면 좋겠습니다.
=================
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo
//@version=5
indicator("Nadaraya-Watson Envelope [LuxAlgo]", "LuxAlgo - Nadaraya-Watson Envelope", overlay = true, max_lines_count = 500, max_labels_count = 500, max_bars_back=500)
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
h = input.float(8.,'Bandwidth', minval = 0)
mult = input.float(3., minval = 0)
src = input(close, 'Source')
repaint = input(true, 'Repainting Smoothing', tooltip = 'Repainting is an effect where the indicators historical output is subject to change over time. Disabling repainting will cause the indicator to output the endpoints of the calculations')
//Style
upCss = input.color(color.teal, 'Colors', inline = 'inline1', group = 'Style')
dnCss = input.color(color.red, '', inline = 'inline1', group = 'Style')
//-----------------------------------------------------------------------------}
//Functions
//-----------------------------------------------------------------------------{
//Gaussian window
gauss(x, h) => math.exp(-(math.pow(x, 2)/(h * h * 2)))
//-----------------------------------------------------------------------------}
//Append lines
//-----------------------------------------------------------------------------{
n = bar_index
var ln = array.new_line(0)
if barstate.isfirst and repaint
for i = 0 to 499
array.push(ln,line.new(na,na,na,na))
//-----------------------------------------------------------------------------}
//End point method
//-----------------------------------------------------------------------------{
var coefs = array.new_float(0)
var den = 0.
if barstate.isfirst and not repaint
for i = 0 to 499
w = gauss(i, h)
coefs.push(w)
den := coefs.sum()
out = 0.
if not repaint
for i = 0 to 499
out += src[i] * coefs.get(i)
out /= den
mae = ta.sma(math.abs(src - out), 499) * mult
upper = out + mae
lower = out - mae
//-----------------------------------------------------------------------------}
//Compute and display NWE
//-----------------------------------------------------------------------------{
float y2 = na
float y1 = na
nwe = array.new<float>(0)
if barstate.islast and repaint
sae = 0.
//Compute and set NWE point
for i = 0 to math.min(499,n - 1)
sum = 0.
sumw = 0.
//Compute weighted mean
for j = 0 to math.min(499,n - 1)
w = gauss(i - j, h)
sum += src[j] * w
sumw += w
y2 := sum / sumw
sae += math.abs(src[i] - y2)
nwe.push(y2)
sae := sae / math.min(499,n - 1) * mult
for i = 0 to math.min(499,n - 1)
if i%2
line.new(n-i+1, y1 + sae, n-i, nwe.get(i) + sae, color = upCss)
line.new(n-i+1, y1 - sae, n-i, nwe.get(i) - sae, color = dnCss)
if src[i] > nwe.get(i) + sae and src[i+1] < nwe.get(i) + sae
label.new(n-i, src[i], '▼', color = color(na), style = label.style_label_down, textcolor = dnCss, textalign = text.align_center)
if src[i] < nwe.get(i) - sae and src[i+1] > nwe.get(i) - sae
label.new(n-i, src[i], '▲', color = color(na), style = label.style_label_up, textcolor = upCss, textalign = text.align_center)
y1 := nwe.get(i)
//-----------------------------------------------------------------------------}
//Dashboard
//-----------------------------------------------------------------------------{
var tb = table.new(position.top_right, 1, 1
, bgcolor = #1e222d
, border_color = #373a46
, border_width = 1
, frame_color = #373a46
, frame_width = 1)
if repaint
tb.cell(0, 0, 'Repainting Mode Enabled', text_color = color.white, text_size = size.small)
//-----------------------------------------------------------------------------}
//Plot
//-----------------------------------------------------------------------------}
plot(repaint ? na : out + mae, 'Upper', upCss)
plot(repaint ? na : out - mae, 'Lower', dnCss)
//Crossing Arrows
plotshape(ta.crossunder(close, out - mae) ? low : na, "Crossunder", shape.labelup, location.absolute, color(na), 0 , text = '▲', textcolor = upCss, size = size.tiny)
plotshape(ta.crossover(close, out + mae) ? high : na, "Crossover", shape.labeldown, location.absolute, color(na), 0 , text = '▼', textcolor = dnCss, size = size.tiny)
//-----------------------------------------------------------------------------}
2024-03-11
788
글번호 177365
답변완료
수식
안녕하세요.
시스템 수익 부탁드립니다.
1. 당일 선물 미결이 -10,000 이하로 줄어들면 진입 금지
2. 당일 선물 미결이 -10,000 이하로 줄어들면 청산
감사합니다.
2024-03-11
596
글번호 177362
창동개미 님에 의해서 삭제되었습니다.
2024-03-11
0
글번호 177354
답변완료
수식변환요청드립니다
수고많습니다 수식변환부탁드립니다
hv=highestsince(1,date(1)!=date,v);
a=valuewhen(1,hv==v && c>o,h);
b=valuewhen(1,hv==v && c>o,l);
aa=(a-b)*3/4+b;
a1=eavg(c,기간1);
b1=eavg(c,기간2);
x=(a1-b1);
조건=a1>b1 && x>x(1) &&
aa>l && h(1)>h && l(1)<l;
조건 && !조건(1)
2024-03-11
690
글번호 177353
답변완료
[83383 타주기 지표식 _hma 상승
아래지표식을 타주기 지표식으로 변환 부탁드립니다
그리고 A1 , A2 해석부탁드립니다
<HMA 추세 - 상승추세>
var : A1(0),A2(0),조건(False),조건1(False);
var: T60(0);
A1=WMa(2 * WMa(C, 60 / 2) - WMa(C, 60), floor(sqrt(60)));
A2=sar(0.02, 0.2);
조건=A1[2]>A1[1] && A1>A1[1] && C>=A2 && C>O;
조건1=A1[2]<A1[1] && A1<A1[1] && C<=A2 && C<O;
IF 조건 && !조건[1] TheN
t60 = 1 ;
IF 조건1 && !조건1[1] TheN
t60 = -1;
if T60 == 1 Then
plot1(1,"직선라인",RED,def,0.5);
if T60 == -1 Then
plot1(-1,"직선라인",BLUE,def,0.5);
2024-03-11
624
글번호 177352
답변완료
종목검색식 수정요청 드립니다.
당일 종목검색이 잘 안됩니다. 1봉전, 2봉전 종목검색은 잘 되는데 당일 종목 검색이 잘 안되네요 도움 부탁드립니다.^^ 다른 검색기로 전환했다 다시 이 검색기로 돌아오면 검색이 안되고 그대로네요 무슨 문제일까요 ㅠㅠ
var : Period(14),EPeriod(5),EPeriod1(20);
var : R(0),E(0),F(0);
R = RSI(Period);
E = Ema(C,EPeriod);
F = Ema(C,EPeriod1);
if R < 30 Then
var1 = H;
if var1 > 0 and
CountIf(C>=C[1]*1.15, 15) >= 1 and
CrossUp(C,var1) and CrossUp(C,Min(E,F)) Then
Find(1);
2024-03-11
761
글번호 177350