커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3484
글번호 230811
답변완료
부탁드립니다.
가장 굵은선(수식 매수3. 매도3선)을 뚫는 봉에 그림과 같은 세로의 색깔이 생기도록 수정 부탁드립니다.
동시에 봉에 20틱정도 길이의 3등분선(진하게 두께2정도)로 만들어 주시면 감사하겠습니다.
input : period1(10),multiplier1(3);
input : period2(20),multiplier2(2);
input : period3(30),multiplier3(3);
var : src(0);
var : AtrV1(0),upperBand1(0),lowerBand1(0), prevLowerBand1(0), prevUpperBand1(0);
var : prevSuperTrend1(0), superTrend1(C), direction1(0),alpha1(0),source1(0);
var : AtrV2(0),upperBand2(0),lowerBand2(0), prevLowerBand2(0), prevUpperBand2(0);
var : prevSuperTrend2(0), superTrend2(C), direction2(0),alpha2(0),source2(0);
var : AtrV3(0),upperBand3(0),lowerBand3(0), prevLowerBand3(0), prevUpperBand3(0);
var : prevSuperTrend3(0), superTrend3(C), direction3(0),alpha3(0),source3(0);
src = (H+L)/2;
if CurrentBar > 1 Then
{
alpha1 = 1 / period1;
source1 = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV1 = alpha1 * source1 + (1 - alpha1) * ATrV1[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand1 = src + multiplier1 * AtrV1;
lowerBand1 = src - multiplier1 * AtrV1;
prevLowerBand1 = lowerBand1[1];
prevUpperBand1 = upperBand1[1];
if lowerBand1 > prevLowerBand1 or close[1] < prevLowerBand1 Then
lowerBand1 = lowerBand1;
Else
lowerBand1 = prevLowerBand1;
if upperBand1 < prevUpperBand1 or close[1] > prevUpperBand1 Then
upperBand1 = upperBand1;
Else
upperBand1 = prevUpperBand1;
if C > UpperBand1 Then
direction1 = 1;
if C < LowerBand1 Then
direction1 = -1;
if direction1 == 1 Then
supertrend1 = lowerband1;
Else
supertrend1 = upperband1;
alpha2 = 1 / period2;
source2 = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV2 = alpha2 * source2 + (1 - alpha2) * ATrV2[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand2 = src + multiplier2 * AtrV2;
lowerBand2 = src - multiplier2 * AtrV2;
prevLowerBand2 = lowerBand2[1];
prevUpperBand2 = upperBand2[1];
if lowerBand2 > prevLowerBand2 or close[1] < prevLowerBand2 Then
lowerBand2 = lowerBand2;
Else
lowerBand2 = prevLowerBand2;
if upperBand2 < prevUpperBand2 or close[1] > prevUpperBand2 Then
upperBand2 = upperBand2;
Else
upperBand2 = prevUpperBand2;
if C > UpperBand2 Then
direction2 = 1;
if C < LowerBand2 Then
direction2 = -1;
if direction2 == 1 Then
supertrend2 = lowerband2;
Else
supertrend2 = upperband2;
alpha3 = 1 / period3;
source3 = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV3 = alpha3 * source3 + (1 - alpha3) * ATrV3[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand3 = src + multiplier3 * AtrV3;
lowerBand3 = src - multiplier3 * AtrV3;
prevLowerBand3 = lowerBand3[1];
prevUpperBand3 = upperBand3[1];
if lowerBand3 > prevLowerBand3 or close[1] < prevLowerBand3 Then
lowerBand3 = lowerBand3;
Else
lowerBand3 = prevLowerBand3;
if upperBand3 < prevUpperBand3 or close[1] > prevUpperBand3 Then
upperBand3 = upperBand3;
Else
upperBand3 = prevUpperBand3;
if C > UpperBand3 Then
direction3 = 1;
if C < LowerBand3 Then
direction3 = -1;
if direction3 == 1 Then
supertrend3 = lowerband3;
Else
supertrend3 = upperband3;
if C > superTrend1 Then
{
Plot1(superTrend1,"매수1", rgb(247, 75, 201), 0, 1);
NoPlot(2);
}
Else
{
Plot2(superTrend1,"매도1", Indigo, 0, 1);
NoPlot(1);
}
if C > superTrend2 Then
{
Plot3(superTrend2,"매수2", rgb(247, 75, 201), 0, 2);
NoPlot(4);
}
Else
{
Plot4(superTrend2,"매도2", Indigo, 0, 2);
NoPlot(3);
}
if C > superTrend3 Then
{
Plot5(superTrend3,"매수3", rgb(247, 75, 201), 0, 7);
NoPlot(6);
}
Else
{
Plot6(superTrend3,"매도3", Indigo, 0, 7);
NoPlot(5);
}
}
2025-06-18
294
글번호 191823
답변완료
조건에 도달해도 매수체결이 안됩니다
안녕하세요
도대체 안되는 이유를 모르겠어서 도움 요청합니다.
순서대로 지표적용 하고 시스템적용 매매옵션 설정하고 정상적으로 된거 같은데
조건이 충족 되었는데도 매수체결이 안되네요.
논리적 오류가 있는건지.. 도움주시면 감사하겠습니다.
파일 첨부합니다.
2025-06-17
275
글번호 191821
답변완료
검색식 부탁 드립니다._(__)_
항상 도와주심에 감사 드립니다. _(__)_
아래의 수식 종목이 5봉전에 검색이 되고 10봉전과 0봉전사이에서 2060골든크로스가 나오는 종목 검색식을 부탁ㄷ립니다. _(__)_
수식
var1 = macd(12,26);
var2 = Sar(0.02,0.2);
if var1 >= 0 and CrossUp(c,Var2) and C >= C[1]*1.03 and C > O Then
Find(1);
2025-06-17
232
글번호 191820
답변완료
지표 수정 부탁드립니다.
안녕하세요. 항상 많은 도움 주셔서 감사합니다.
아래의 수식은 예스스탁을 통해 만든 수식인데요.
input에 원하는 분을 입력하면 해당 분차트 기준으로 값이 계산되어 선으로 표시되게 하는 수식입니다.
제가 원하는 것은 여러 개의 시간을 입력할 수 있도록 동일한 수식을 합치고 싶습니다.
예를 들어 5분, 10분, 15분, 30분, 60분, 120분, 240분을 하나의 수식에 모두 입력해서
하나의 수식으로 각 분차트에서 계산된 값들이 선으로 나타나게 하고 싶습니다.
아래의 수식을 참조하여 수정 부탁드립니다. 감사합니다.
input : 분(10),LENGTH(14);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),DFact(0);
var : sum1(0),mav1(0),DPO(0),DPO1(0),DPO2(0);
var : T(0),HV(0),HH(0),LV(0),LL(0);
var : 매수선(0),매도선(0);
Array : C1[100](0),H1[100](0),L1[100](0);
DFact = (Length * 0.5) + 1;
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
{
for cnt = 99 downto 1
{
C1[cnt] = C1[cnt-1];
H1[cnt] = H1[cnt-1];
L1[cnt] = L1[cnt-1];
}
H1[0] = H;
L1[0] = L;
DPO1 = DPO[1];
DPO2 = DPO1[1];
if DPO1 > 0 and DPO2 <= 0 Then
{
T = 1;
HV = DPO1;
HH = H1[1];
매도선 = LL;
}
if DPO1 < 0 and DPO2 >= 0 Then
{
T = -1;
LV = DPO1;
LL = L1[1];
매수선 = HH;
}
if T == 1 Then
{
if DPO1 > HV Then
{
HV = DPO1;
HH = H1[1];
}
}
if T == -1 Then
{
if DPO1 < LV Then
{
LV = DPO1;
LL = L1[1];
}
}
}
C1[0] = C;
if H1[0] > 0 and H > H1[0] Then
H1[0] = H;
if L1[0] > 0 and L < L1[0] Then
L1[0] = L;
if C1[LENGTH-DFact] > 0 then
{
sum1 = 0;
for cnt = 0 to LENGTH-1
{
sum1 = sum1+C1[cnt+DFact];
}
mav1 = sum1/LENGTH;
DPO = C - mav1;
}
if 매수선 > 0 Then
Plot1(매수선,"매수선");
if 매도선 > 0 Then
Plot2(매도선,"매도선");
}
감사합니다.
2025-06-17
276
글번호 191819
답변완료
일봉
수고 많으십니다.
질문
1. 국내선물 근월물 일봉의 상장때(첫거래일)부터 현재까지의 시(작)가, 고가, 저가를 표시하는 식(참고로 현재 거래되는 근월물은 2024년 9월 13일에 첫거래가 있었습니다.)
2. 이 기간 첫거래부터 현재까지의 거래량, 거래대금을 누적시키는 수식
2025-06-17
261
글번호 191818
답변완료
시스템수식 작성 부탁드립니다.
안녕하십니까.
시스템 수식 작성 부탁드립니다.
1. 조건
현재가를 X라고 할 때,
X가 시가 위에 있고, 시가 < X < (시가+5) 범위 내로 처음 내려왔을 일 경우
(즉 현재가가 시간 위이고 시가+5포인트 범위 내에 처음 들어왔을 경우)
2. 진입
시가+1포인트 가격에서 지정가 매수 진입
3. 청산
1) 익절
진입한 가격에서 +10포인트 되었을 때 그 순간 지정가 매도(익절)
2) 손절
(1) 매수 진입한 캔들의 현재가가 시가-10포인트 이하가 되었을 때 바로 시장가 Stop매도(손절)
또는
(2) 매수 진입한 캔들의 저가가 시가-3포인트 이하가 되었을 경우, 현재가가 시가에 왔을때 시가 지정가 Stop매도(본절)
항상 많은 도움 주셔서 감사합니다.
2025-06-17
247
글번호 191817
답변완료
부탁드립니다^^
아래 지표 수식을 화면 box 강세, 약세로 변환 부탁드립니다.
input : length(50);
input : factor(1.0);
input : col_up(Red);
input : col_dn(Lime);
input : col_ul(Cyan);
var : direction(0),count_up(0),count_dn(0);
var : volatility(0),upper(0),lower(0),sig_up(False),sig_dn(False);
var : upper_band(0),lower_band(0);
var : hlc3(0),alpha(0),ATrv(0);
var : tx1(0),tx2(0);
var1 = ma(C,25);
var2 = ma(C,length);
hlc3 = (H+L+C)/3;
volatility = ma(high-low, 70) * factor;
upper = highest(var1 + volatility, int(length/2));
lower = lowest(var2 - volatility, int(length/2));
sig_up = CrossUp(hlc3, upper);
sig_dn = CrossDown(hlc3, lower);
if sig_up == true Then
direction = 1;
if sig_dn == true Then
direction = -1;
upper = iff(direction == 1 , Nan , upper);
lower = iff(direction == -1 , Nan , lower);
if direction == 1 Then
{
count_up = count_up+ 0.5;
count_dn = 0;
}
if direction == -1 Then
{
count_dn = count_dn+0.5;
count_up = 0;
}
count_up = iff(count_up > 70 , 70 , count_up);
count_dn = iff(count_dn > 70 , 70 , count_dn);
alpha = 1 / 100 ;
ATrV = IFf(IsNan(ATrV[1]) == true, ma(TrueRange,100) , alpha * TrueRange + (1 - alpha) * IFf(isnan(ATrV[1])==true,0,ATrV[1]));
upper_band = lower + ATRV*5;
lower_band = upper - ATRV*5;
if IsNaN(upper_band) == False Then
plot1(upper_band, "Upper Wave",iff(index % 2 == 0 , nan , col_ul));
Else
NoPlot(1);
if IsNaN(lower_band) == False Then
plot2(lower_band, "Lower Wave",iff(index % 2 == 0 , nan , col_ul));
Else
NoPlot(2);
if IsNaN(upper) == False Then
plot3(upper, "Upper Band",col_dn);
Else
NoPlot(3);
if IsNaN(lower) == False Then
plot4(lower, "Lower Band",col_up);
Else
NoPlot(4);
plot5(C);
if direction != direction[1] and direction == 1 Then
{
tx1 = Text_New_Self(sDate,sTime,Lower,"●");
Text_SetStyle(tx1,2,2);
Text_SetColor(tx1,col_up);
Text_setsize(Tx1,15);
tx2 = Text_New_Self(sDate,sTime,L,"▲");
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,col_up);
Text_setsize(Tx2,19);
}
if direction != direction[1] and direction == -1 Then
{
tx1 = Text_New_Self(sDate,sTime,upper,"●");
Text_SetStyle(tx1,2,2);
Text_SetColor(tx1,col_dn);
Text_setsize(Tx1,15);
tx2 = Text_New_Self(sDate,sTime,H,"▼");
Text_SetStyle(tx2,2,1);
Text_SetColor(tx2,col_dn);
Text_setsize(Tx2,19);
}
감사합니다~맛점하세요^^
2025-06-17
261
글번호 191814
답변완료
안녕하세요
데이트레이딩에서
당일 고점 또는 저점을 갱신시
매수 또는 매도 진입 하는시스템 식을 부탁드립니다.
청산은 당일 청산입니다 ^^
2025-06-17
206
글번호 191798
회원 님에 의해서 삭제되었습니다.
2025-06-17
23
글번호 191797