커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1539
글번호 230811
답변완료
종목검색식 부탁드립니다.
미리, 항상 애써 주심에 심심한 감사드립니다.
아래와 같이 조건1를, 조건2(기존 종목검색식)에 추가하여 동시에 조건1 및 조건2를 만족하는 종목검색식 작성을 부탁드립니다.
조건1 : 일목균형표(반일목) 선행스팬1이 선행스팬2를 상향돌파
선행1=(highest(H, 5)+lowest(L, 5)+highest(H, 13)+lowest(L, 13))/4;
선행2=(highest(H, 26)+lowest(L, 26))/2;
CrossUp(선행1, 선행2)
조건2 : 일목균형표(정일목) 후행스팬이 볼린저밴드상단을 골든크로스(G.C)
input : Period(20),midPeriod(26);
var : BBU(0);
BBU=BollBandUp(Period,2);
if crossup(c, BBU[midPeriod-1]) Then
Find(1);
2025-06-25
337
글번호 192063
답변완료
질문드립니다
안녕하세요
청산에 관한 질문이 있어서 글을 올립니다.
저는 "Exitlong"과 "Exitshort"함수에 'Atlimit'를 사용하여 청산식을 짜는데,
문제는 진입이 이루어진 캔들 바로 다음 캔들에서는 청산 시점이 와도 청산을 안하고 진입한 이후 2번째 캔들부터 청산식이 작동합니다.
"SetStopProfittarget"사용하면 그런 현상이 없이 바로 청산이 되는데, "Exitlong"과 "Exitshort"를 사용하면서도 그렇게 할 수 없는지 궁금합니다.
"SetStopProfittarget"사용하면서도 분할청산이 가능한 방법이 있으면 그것도 알려주시면 감사하겠습니다.
2025-06-25
228
글번호 192062
답변완료
문의 듸립니다
예스트레이더 사용시 오른쪽 하단 알림창이 자주 떠
차단하고 싶은데 어떻게 하나요
예를 들어 "파생시장 상하한가 변경 예고" 같은 알림창이 뜨는데
차단할 방법 부탁합니다
2025-06-25
231
글번호 192061
답변완료
문의 드립니다.
안녕하세요
항상 감사드립니다.
아래의 조건으로 매매 시스템 서식 부탁드립니다.
*매수조건 (40분할 매수)
1. RSI(period 14) 55 이하일때 매수 (INPUT)
2. 1의 조건이 부합될때 09시10분에 매수 주문 (INPUT)
3. 1의 조건이 부합될때 매수 주문량은 전체 자금의 1/40씩 매수(INPUT)
(분할 매수가 불가능할 경우엔 매수만 해주세요)
4. 두번째 매수부터는 RSI 55 이하, 평균 단가 이하일때만 매수주문 (INPUT)
*매도 조건
1. 10% 수익 실현시 전량 매도 (INPUT)
감사합니다.
전체 자금의 1/40 매수 (불가능할경우엔
2025-06-25
231
글번호 192060
요타 님에 의해서 삭제되었습니다.
2025-06-25
23
글번호 192059
답변완료
부탁드립니다.
아래 지표에서 supertrend3 상향돌파시 분홍색으로 반대는 파랑색으로 강세약세 지표 부탁드립니다.
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-25
268
글번호 192058
답변완료
수식 부탁드립니다.
Function HullMA(price, length)
Vars: wma1(0), wma2(0), diff(0), sqrtLen(0), result(0);
wma1 = WAverage(price, length / 2);
wma2 = WAverage(price, length);
diff = 2 * wma1 - wma2;
sqrtLen = MaxList(1, SquareRoot(length));
result = WAverage(diff, sqrtLen);
HullMA = result;
End;
Inputs:
max_length(50),
accel_multiplier(5.0),
tbl_(true),
lookback_period(100),
candle(true),
collen(100),
up_col(RGB(0,255,0)),
dn_col(RGB(255,0,0)),
up_hist_col(RGB(130,255,195)),
up_hist_col_(RGB(0,255,0)),
dn_hist_col(RGB(255,0,0)),
dn_hist_col_(RGB(247,140,140)),
start_date(20200101),
timer("From start");
Vars:
counts_diff(0), max_abs_counts_diff(0), counts_diff_norm(0), dyn_length(0), dyn_ema(0),
trend(0), bullsrc(0), bearsrc(0), x1(-1), y1(0), posx(0), speed(0), cx(0), ox(0), start_time(0),
prev_counts_diff(0), delta_counts_diff(0), max_delta_counts_diff(0), accel_factor(0),
isStartTime(false), isFromStart(false), barIdx(0), bearish_change(0), bearish_t(0),
bullish_change(0), bullish_t(0), trendspeed(0),
colour(0), fillColor(0), min_speed(0), max_speed(0), normalized_speed(0), speedGradient1(0),
rma0(0), rma1(0), i(0);
// 1. 동적 길이 및 가속도 계산
counts_diff = Close;
max_abs_counts_diff = Highest(AbsValue(counts_diff), 200);
If max_abs_counts_diff <> 0 Then
counts_diff_norm = (counts_diff + max_abs_counts_diff) / (2 * max_abs_counts_diff);
Else
counts_diff_norm = 0;
dyn_length = 5 + counts_diff_norm * (max_length - 5);
prev_counts_diff = counts_diff[1];
delta_counts_diff = AbsValue(counts_diff - prev_counts_diff);
max_delta_counts_diff = Highest(delta_counts_diff, 200);
If max_delta_counts_diff = 0 Then
max_delta_counts_diff = 1;
accel_factor = delta_counts_diff / max_delta_counts_diff;
// 2. 동적 EMA (간단화: EMA 사용)
cx = EMA(Close, 10);
ox = EMA(Open, 10);
// 3. 트렌드, 시그널 소스
trend = cx; // 실제 dyn_ema를 구현하려면 별도 로직 필요
bullsrc = Close;
bearsrc = Close;
// 4. 시간 조건
start_time = DateToJulian(start_date);
isStartTime = (DateToJulian(Date) > start_time);
isFromStart = (timer = "From start");
// 5. 첫 값 할당
If (x1 = -1) and (isStartTime or isFromStart) Then
Begin
x1 = CurrentBar;
y1 = ox;
End;
barIdx = CurrentBar;
// 6. 트렌드 방향 및 스피드 계산
If (isStartTime or isFromStart) Then
Begin
If (bullsrc > trend) and (bullsrc[1] <= trend) Then
Begin
bearish_change = Lowest(speed, barIdx - x1);
bearish_t = barIdx - x1;
x1 = barIdx;
y1 = bullsrc;
posx = 1;
speed = cx - ox;
End;
If (bearsrc < trend) and (bearsrc[1] >= trend) Then
Begin
bullish_change = Highest(speed, barIdx - x1);
bullish_t = barIdx - x1;
x1 = barIdx;
y1 = bearsrc;
posx = -1;
speed = cx - ox;
End;
End;
speed = speed + cx - ox;
// 7. 트렌드 스피드 (HullMA)
trendspeed = HullMA(speed, 5);
// 8. 색상 결정
If WAverage(Close, 2) > trend Then
colour = up_col
Else
colour = dn_col;
// 9. 동적 트렌드 플롯
Plot1(trend, "Dynamic Trend", colour);
// 10. 보조 플롯 (숨김)
Plot2(XAverage((High + Low) / 2, 50), "RMA HL2");
// 11. 속도 정규화 및 그라데이션
min_speed = Lowest(speed, collen);
max_speed = Highest(speed, collen);
If (max_speed - min_speed) <> 0 Then
normalized_speed = (speed - min_speed) / (max_speed - min_speed)
Else
normalized_speed = 0;
If speed < 0 Then
speedGradient1 = dn_hist_col
Else
speedGradient1 = up_hist_col;
// 12. 트렌드 스피드 플롯
If (isStartTime or isFromStart) Then
Plot3(trendspeed, "Trend Speed", speedGradient1);
// 13. 캔들 색상 적용 (PaintBar 사용)
If candle Then
PaintBar(Open, High, Low, Close, speedGradient1);
// 14. (테이블, 통계 등은 Print로 대체 가능)
====================================================================
ai 이용해서 코드를 작성해보고 있는데
이 코드 실제 작동여부를 떠나서
첫줄에 함수명 문법에러가 나는데... 이유를 모르겠습니다. ㅠ
2025-06-25
417
글번호 192055
답변완료
부탁드립니다
수고하십니다
미니 나스닥선물 익일00:00 ~ 01:30 시간 사이에최고점과 최저점 각각두선을 수평선 수식 부탁드립니다
2025-06-24
270
글번호 192054
답변완료
문의 드립니다
if mav7200 < mav4800 and mav2400 > mav1200 and crossuP(mav80,mav300) 일때 매수진입
진입청산 식
if mav2400 < mav1200 and 일때 50캔들 진행 이후에
첫번째로 crossuP(mav80,mav300) 발생 이후에
crossDown(mav80,mav300) 진입청산 식을 표현하고자 합니다.
질문 진입청산 수식을 부탁합니다.
2025-06-24
244
글번호 192053