커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
5495
글번호 230811
답변완료
92641 다시 확인해주세요
92641 전체적으로 오류가 나네요.
다시 확인 부탁드립니다
2025-05-13
342
글번호 190763
회원 님에 의해서 삭제되었습니다.
2025-05-13
1
글번호 190762
답변완료
종목검색식 요청드립니다.
아래 키움신호가 발생한 종목검색식을 만들고 싶습니다. 도움 부탁드리며 항상 감사합니다.
*키움신호 (이평1-5, 이평2-20, 이평3-60)
M5=Ma(c,이평1,가중);
M20=Ma(c,이평2,가중);
M60=Ma(c,이평3,가중);
조건=crossup(M5,M20);
조건1=crossup(M5,M60);
A=Valuewhen(1,조건,M5);
B=Valuewhen(1,조건1,M60);
A=B and Crossup(C,A) and crossup(C,B) and C>M20
2025-05-13
339
글번호 190761
답변완료
수식 질문입니다
1
M[0] > M[1]
M[0] > M[2]
M[0] > M[3]
M[0] > M[4]
M[0] > M[5]
5가지(or 여러) 조건중 하나만 만족해도 진입하는
매수식을 만들고 싶습니다
2
주식 1분봉 차트에서
dayclose(1)을 그렸을때
KRX 차트 와 통합 차트
다르게 나오는거 맞나요?
3
1분봉 통합차트에서
dayclose(1) 를
K 시세로 나타내고 싶습니다
감사합니다
2025-05-13
616
글번호 190760
답변완료
오류 체크
안녕하세요?
종목 검색을 요즘 하기 시작했는데, 해보니까, ma 에서는 별 문제가 없는데, LRL이나 ema 함수를 쓰면 문제가 생기는 것 같습니다.
간단한 ema 정배열된 종목을 제가 모아둔 관심종목 내에서 찾는데, 많은 경우는 정배열된 종목들이 나오는데, 문제는 그렇지 않은 종목들도 덩달아 같이 검색되어 나옵니다.
이 문제 좀 체크해 보시기 바랍니다.
input: p1(5), p2(20), p3(75);
var1 = Ema(C,p1);
var2 = Ema(C,p2);
var3 = Ema(C,p3);
if var1 > Var2 && Var2 > Var3 Then Find(1);
이렇게 정배열 검색식을 작성했는데, 일봉 기준으로
(K) CJ 대한통운
(K) CJ 제일제당
(K) SK
(K) PI 첨단소재
등도 같이 검색됩니다.
무엇이 문제인지가 궁금합니다.
감사합니다.
2025-05-13
433
글번호 190759
답변완료
수식 부탁드립니다
매번 도와주셔서 감사합니다. 지표식 부탁드립니다.
//@version=4
study(title="Gaussian Channel [DW]", shorttitle="GC [DW]", overlay=true)
// This study is an experiment utilizing the Ehlers Gaussian Filter technique combined with lag reduction techniques and true range to analyze trend activity.
// Gaussian filters, as Ehlers explains it, are simply exponential moving averages applied multiple times.
// First, beta and alpha are calculated based on the sampling period and number of poles specified. The maximum number of poles available in this 스크립트 is 9.
// Next, the data being analyzed is given a truncation option for reduced lag, which can be enabled with "Reduced Lag Mode".
// Then the alpha and source values are used to calculate the filter and filtered true range of the dataset.
// Filtered true range with a specified multiplier is then added to and subtracted from the filter, generating a channel.
// Lastly, a one pole filter with a N pole alpha is averaged with the filter to generate a faster filter, which can be enabled with "Fast Response Mode".
//Custom bar colors are included.
//Note: Both the sampling period and number of poles directly affect how much lag the indicator has, and how smooth the output is.
// Larger inputs will result in smoother outputs with increased lag, and smaller inputs will have noisier outputs with reduced lag.
// For the best results, I recommend not setting the sampling period any lower than the number of poles + 1. Going lower trun_cates the equation.
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//업데이트:
// Huge shoutout to @e2e4mfck for taking the time to improve the calculation method!
// -> migrated to v4
// -> pi is now calculated using trig identities rather than being explicitly defined.
// -> The filter calculations are now organized into functions rather than being individually defined.
// -> Revamped color scheme.
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Functions - courtesy of @e2e4mfck
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Filter function
f_filt9x (_a, _s, _i) =>
int _m2 = 0, int _m3 = 0, int _m4 = 0, int _m5 = 0, int _m6 = 0,
int _m7 = 0, int _m8 = 0, int _m9 = 0, float _f = .0, _x = (1 - _a)
// Weights.
// Initial weight _m1 is a pole number and equal to _i
_m2 := _i == 9 ? 36 : _i == 8 ? 28 : _i == 7 ? 21 : _i == 6 ? 15 : _i == 5 ? 10 : _i == 4 ? 6 : _i == 3 ? 3 : _i == 2 ? 1 : 0
_m3 := _i == 9 ? 84 : _i == 8 ? 56 : _i == 7 ? 35 : _i == 6 ? 20 : _i == 5 ? 10 : _i == 4 ? 4 : _i == 3 ? 1 : 0
_m4 := _i == 9 ? 126 : _i == 8 ? 70 : _i == 7 ? 35 : _i == 6 ? 15 : _i == 5 ? 5 : _i == 4 ? 1 : 0
_m5 := _i == 9 ? 126 : _i == 8 ? 56 : _i == 7 ? 21 : _i == 6 ? 6 : _i == 5 ? 1 : 0
_m6 := _i == 9 ? 84 : _i == 8 ? 28 : _i == 7 ? 7 : _i == 6 ? 1 : 0
_m7 := _i == 9 ? 36 : _i == 8 ? 8 : _i == 7 ? 1 : 0
_m8 := _i == 9 ? 9 : _i == 8 ? 1 : 0
_m9 := _i == 9 ? 1 : 0
// filter
_f := pow(_a, _i) * nz(_s) +
_i * _x * nz(_f[1]) - (_i >= 2 ?
_m2 * pow(_x, 2) * nz(_f[2]) : 0) + (_i >= 3 ?
_m3 * pow(_x, 3) * nz(_f[3]) : 0) - (_i >= 4 ?
_m4 * pow(_x, 4) * nz(_f[4]) : 0) + (_i >= 5 ?
_m5 * pow(_x, 5) * nz(_f[5]) : 0) - (_i >= 6 ?
_m6 * pow(_x, 6) * nz(_f[6]) : 0) + (_i >= 7 ?
_m7 * pow(_x, 7) * nz(_f[7]) : 0) - (_i >= 8 ?
_m8 * pow(_x, 8) * nz(_f[8]) : 0) + (_i == 9 ?
_m9 * pow(_x, 9) * nz(_f[9]) : 0)
//9 var declaration fun
f_pole (_a, _s, _i) =>
_f1 = f_filt9x(_a, _s, 1), _f2 = (_i >= 2 ? f_filt9x(_a, _s, 2) : 0), _f3 = (_i >= 3 ? f_filt9x(_a, _s, 3) : 0)
_f4 = (_i >= 4 ? f_filt9x(_a, _s, 4) : 0), _f5 = (_i >= 5 ? f_filt9x(_a, _s, 5) : 0), _f6 = (_i >= 6 ? f_filt9x(_a, _s, 6) : 0)
_f7 = (_i >= 2 ? f_filt9x(_a, _s, 7) : 0), _f8 = (_i >= 8 ? f_filt9x(_a, _s, 8) : 0), _f9 = (_i == 9 ? f_filt9x(_a, _s, 9) : 0)
_fn = _i == 1 ? _f1 : _i == 2 ? _f2 : _i == 3 ? _f3 :
_i == 4 ? _f4 : _i == 5 ? _f5 : _i == 6 ? _f6 :
_i == 7 ? _f7 : _i == 8 ? _f8 : _i == 9 ? _f9 : na
[_fn, _f1]
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Inputs
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Source
src = input(defval=hlc3, title="Source")
//Poles
int N = input(defval=4, title="Poles", minval=1, maxval=9)
//Period
int per = input(defval=144, title="Sampling Period", minval=2)
//True Range Multiplier
float mult = input(defval=1.414, title="Filtered True Range Multiplier", minval=0)
//Lag Reduction
bool modeLag = input(defval=false, title="Reduced Lag Mode")
bool modeFast = input(defval=false, title="Fast Response Mode")
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Definitions
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Beta and Alpha Components
beta = (1 - cos(4*asin(1)/per)) / (pow(1.414, 2/N) - 1)
alpha = - beta + sqrt(pow(beta, 2) + 2*beta)
//Lag
lag = (per - 1)/(2*N)
//Data
srcdata = modeLag ? src + (src - src[lag]) : src
trdata = modeLag ? tr(true) + (tr(true) - tr(true)[lag]) : tr(true)
//Filtered Values
[filtn, filt1] = f_pole(alpha, srcdata, N)
[filtntr, filt1tr] = f_pole(alpha, trdata, N)
//Lag Reduction
filt = modeFast ? (filtn + filt1)/2 : filtn
filttr = modeFast ? (filtntr + filt1tr)/2 : filtntr
//Bands
hband = filt + filttr*mult
lband = filt - filttr*mult
// Colors
color1 = #0aff68
color2 = #00752d
color3 = #ff0a5a
color4 = #990032
fcolor = filt > filt[1] ? #0aff68 : filt < filt[1] ? #ff0a5a : #cccccc
barcolor = (src > src[1]) and (src > filt) and (src < hband) ? #0aff68 : (src > src[1]) and (src >= hband) ? #0aff1b : (src <= src[1]) and (src > filt) ? #00752d :
(src < src[1]) and (src < filt) and (src > lband) ? #ff0a5a : (src < src[1]) and (src <= lband) ? #ff0a11 : (src >= src[1]) and (src < filt) ? #990032 : #cccccc
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Outputs
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Filter Plot
filtplot = plot(filt, title="Filter", color=fcolor, linewidth=3)
//Band Plots
hbandplot = plot(hband, title="Filtered True Range High Band", color=fcolor)
lbandplot = plot(lband, title="Filtered True Range Low Band", color=fcolor)
//Channel Fill
fill(hbandplot, lbandplot, title="Channel Fill", color=fcolor, transp=80)
//Bar Color
barcolor(barcolor)
2025-05-13
1383
글번호 190758
yamu 님에 의해서 삭제되었습니다.
2025-05-13
5
글번호 190757
답변완료
수식 문의 드립니다.
안녕하세요.
아래 수식은 분봉고가갱신 시 다음봉의 시가를 선으로 표시한것인데
수정부탁드립니다.
[ 첨부파일 1번의 그림처럼 장기분봉 고가갱신 시 단기분봉의 시가를
표시할수 있게 바랍니다.
파일좌측의 1,2번처럼 15분봉 고가갱신시
우측의 1,2번 5분봉 시가를 선으로 표시해 주세요.
그리고 시가표시는 당일한정으로 부탁드립니다].
수식
input : 분(10),n(10);
var : S1(0),D1(0),TM(0),TF(0),HH(0),LL(0),cnt(0),hcnt(0),lcnt(0),bar(0);
Array : HTL[100](0),HTLV[100](0),LTL[100](0),LTLV[100](0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
HH = H;
LL = L;
Condition1 = true;
Condition2 = true;
bar = 0;
hcnt = 0;
lcnt = 0;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%분;
if (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
{
bar = bar+1;
Condition1 = False;
Condition2 = False;
Condition3 = true;
if Condition1[1] == true Then
{
HTLV[hcnt] = Open;
HTL[hcnt] = TL_New(Sdate,Stime,HTLV[hcnt],NextBarSdate,NextBarStime,HTLV[hcnt]);
TL_SetColor(HTL[hcnt],Red);
hcnt = Hcnt+1;
}
}
if H > HH then
{
HH = H;
Condition1 = true;
}
if bar >= 1 Then
{
for cnt = 0 to Hcnt
{
TL_SetEnd(HTL[cnt],NextBarSdate,NextBarStime,HTLV[cnt]);
}
if Hcnt >= n Then
TL_Delete(HTL[n]);
}
}
2025-05-12
387
글번호 190756
회원 님에 의해서 삭제되었습니다.
2025-05-13
16
글번호 190755