커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8023
글번호 230811
답변완료
수식변환
다음수식 변환을 부탁드립니다
A=c< lowest(c(1),10);
A1=Valuewhen(1, A,(H+L)/2);
C>A1 && O<A1
감사합니다
2025-07-10
338
글번호 192389
사공하늘 님에 의해서 삭제되었습니다.
2025-07-10
88
글번호 192388
사공하늘 님에 의해서 삭제되었습니다.
2025-07-10
92
글번호 192387
답변완료
수식문의
하이킨아시차트에서
1.도지캔들
.종가와 시가차이 0.5%이하
.양봉/음봉 무관
.꼬리크기 무관
2.긴 꼬리 캔들
.윗꼬리: 종가~고가 5%이상
.아랫꼬리: 시가~저가 5%이상
.양봉
.몸통크기 무관
을 검색할 수있는 수식 요청드립니다.
2025-07-10
392
글번호 192386
답변완료
수식 의뢰 드립니다.
안녕하세요! 시스템 수식을 부탁드립니다.
아래 수식은 지난번에 만들어 주셔서 해선 매매에 활용하고 있습니다.
이해를 돕고져 첨부파일을 첨부합니다.
부탁드립니다!
#plot1만 막대로 지정하시면 됩니다.
#상승 보라, 하락 형광, 최고갱신 빨강, 최저갱신 파랑으로 표시됩니다.
#최고격차와 최저격차는 선으로 표시되고 각각 텍스트 출력됩니다.
var : diff(0,data1),hh(0,Data1),ll(0,Data1),clr(0,Data1),tx(0),Htx(0),Ltx(0);
diff = Data1(c)-Data2(c);
if Data1(Bdate != Bdate[1]) Then
{
hh = diff;
LL = diff;
if diff > diff[1] Then
clr = Magenta;
Else
clr = Cyan;
Htx = text_new_self(sDate,sTime,HH,NumToStr(HH,2));
Text_SetStyle(Htx,2,1);
Text_SetColor(Htx,Red);
Ltx = text_new_self(sDate,sTime,LL,NumToStr(LL,2));
Text_SetStyle(Ltx,2,1);
Text_SetColor(Ltx,Blue);
}
Else
{
if diff > hh Then
{
hh = diff;
clr = Red;
Text_SetString(Htx,NumToStr(HH,2));
}
else if diff < ll Then
{
ll = diff;
clr = Blue;
Text_SetString(Ltx,NumToStr(LL,2));
}
Else
{
if diff > diff[1] Then
clr = Magenta;
Else
clr = Cyan;
}
Text_SetLocation(Htx,sDate,sTime,HH);
Text_SetLocation(Ltx,sDate,sTime,LL);
}
Plot1(diff,"diff",clr);#막대
plot2(hh,"hh",Red);#선
plot3(ll,"ll",Blue);#선
tx = text_new_self(sDate,sTime,diff,NumToStr(diff,2));
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Black);
2025-07-11
512
글번호 192385
와글이 님에 의해서 삭제되었습니다.
2025-07-09
29
글번호 192384
답변완료
거래수를 줄이는 방법
더운 날씨에 수고가 많으십니다.
기본적인 질문을 드리고 싶습니다.
이동평균으로 매수타이밍을 찾다보니 너무 거래가 많아서 중간에 랜덤으로
Buy("B", OnClose,def,0 ) 이나 Sell("S", OnClose,def,0 )과 같이
계약수를 0로 해서 거래수를 줄여보려고 합니다
이렇게 해도 가능한지요?
다시 한번 감사드립니다.
2025-07-09
522
글번호 192383
답변완료
종목 검색 부탁드립니다.
1. 아래 수식을 참고하여 , 수식5 ) 가중이격도가 기준선 100 돌파시 ,
종목 검색식 부탁드려요
수식1) 기본
baseDis = (C / avg(C,Per))*100
수식2) RSI 계산
rsiUp = avg(max(C - C(1),0),rsiPer);
rsiDown = avg(max(C(1) - C ,0),rsiPer);
rsiVal = 100 - (100 / (1+rsiUp / rsiDown))
수식3) RSI 가중치
rsiWeight = if(rsiVal <= 50,
0.5 + (rsiVal * 0.01), // 50 이하일때
0.5 + ((rsiVal -50)* 0.03)) // 50 초과일때
수식4) 거래량가중치
volAvg = avg(V,volPer);
volWeight = if(volAvg! = 0,V / volAvg, 1.0
수식5) 가중이격도
rsiVolWeight = if(rsiVal < 30 and volWeight > 1.2, 0.8,
if(rsiVal > 70 and volWeight > 1.2, 1.3, 1.0));
weightedDis = baseDis * rsiWeight * volWeight * rsiVolWeight;
smoothedWeightedDis = avg(weightedDis, 3)
---------------
지표변수
Per 50
volPer 50
rsiPer 20
---------------
기준선 100
2025-07-09
434
글번호 192381
답변완료
종목검색식으로 바꿔 주세요
건강하세요 30분봉에서 사용 할깨요
input : length_low(72);
input : length_high(36);
input : refit_interval(50);
input : vol_period(20);
input : vol_smooth_len(5);
input : bull_col(BluE);
input : bear_col(red);
// ───── CCI-based Oscillator with Clipping ─────
var : raw1(0),clipped1(0),osc_low(0);
var : raw2(0),clipped2(0),osc_high(0);
raw1 = cci(length_low);
clipped1 = max(min(raw1, 100), -100);
osc_low = clipped1 / 200 + 0.5;
raw2 = cci(length_high);
clipped2 = max(min(raw2, 100), -100);
osc_high = clipped2 / 200 + 0.5;
// ───── Volatility Calculations ─────
var : returns(0),vol_current_raw(0),vol_current_smoothed(0);
returns = close / close[1] - 1;
vol_current_raw = std(returns, vol_period);
vol_current_smoothed = ma(vol_current_raw, vol_smooth_len);
// ───── Volatility History Management ─────
var : i(0),ii(0);
Array : vola[150](Nan);
if IsNan(vol_current_raw) == False Then
{
ii = 0;
For i = 149 DownTo 1
{
vola[i] = vola[i-1];
if IsNan(vola[i]) == true Then
ii = i;
}
vola[0] = vol_current_raw;
}
var : c1(Nan),c2(Nan),val(0),temp(0);
var : median(0),sum_low(0),count_low(0),sum_high(0),count_high(0);
if ii < 10 Then
{
c1 = Nan;
c2 = Nan;
}
Else
{
median = MedianArray(vola,ii);
sum_low = 0.0;
count_low = 0;
sum_high = 0.0;
count_high = 0;
for i = 0 to ii - 1
{
val = vola[i];
if val < median Then
{
sum_low = sum_low + val;
count_low = count_low + 1;
}
else
{
sum_high = sum_high + val;
count_high = count_high + 1;
}
}
c1 = iff(count_low > 0 , sum_low / count_low , Nan);
c2 = iff(count_high > 0 , sum_high / count_high , Nan);
}
// ───── Volatility Regime Variables (with type) ─────
var : cluster_1(Nan),cluster_2(Nan),last_refit_bar(Nan),vol_regime(Nan);
if index - last_refit_bar >= refit_interval and ii >= 149 Then
{
if IsNan(c1) == False and IsNan(c2) == False Then
{
cluster_1 = iff(IsNan(cluster_1) == true , c1 , cluster_1 + 0.1 * (c1 - cluster_1));
cluster_2 = iff(IsNan(cluster_2) == true , c2 , cluster_2 + 0.1 * (c2 - cluster_2));
last_refit_bar = index;
}
if cluster_1 > cluster_2 Then
{
temp = cluster_1;
cluster_1 = cluster_2;
cluster_2 = temp;
}
}
var : mid(0),relevant_osc(0),trend_regime(Nan);
if IsNan(vol_current_smoothed) == False and IsNan(cluster_1) == False and IsNan(cluster_2) == False Then
{
mid = (cluster_1 + cluster_2) / 2;
vol_regime = iff(vol_current_smoothed < mid , 0 , 1);
}
// ───── Oscillator S e l e c t i o n ─────
relevant_osc = iff(vol_regime == 1 , osc_high , osc_low);
// ───── Trend Regime Detection ─────
trend_regime = iff(relevant_osc > 0.75 , 1 , iff(relevant_osc < 0.25 , -1 , 0));
// ───── Plots ─────
PlotBaseLine1(0.5, "Mid", gray);
PlotBaseLine2(-0.2,"-0.2", Gray);
PlotBaseLine3(1.2,"1.2",Gray);
plot1(osc_low, "Slow CCI", iff(osc_low >= 0.5 , bull_col , bear_col));
plot2(osc_high, "Fast CCI", iff(osc_high >= 0.5 , bull_col , bear_col));
var : tx(0),box(0);
if trend_regime == 1 Then
{
if trend_regime[1] != 1 Then
{
tx = Text_New_Self(sDate,sTime,1.2,"▲▲▲");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,bull_col);
box = Box_New_Self(sDate,sTime,1.2,NextBarSdate,NextBarStime,-0.2);
Box_SetColor(box,bull_col);
Box_SetFill(box,true);
}
Else
Box_SetEnd(box,NextBarSdate,NextBarStime,-0.2);
}
if trend_regime == -1 Then
{
if trend_regime[1] != -1 Then
{
tx = Text_New_Self(sDate,sTime,-0.2,"▼▼▼");
Text_SetStyle(tx,2,1);
Text_SetColor(tx,bear_col);
box = Box_New_Self(sDate,sTime,1.2,NextBarSdate,NextBarStime,-0.2);
Box_SetColor(box,bear_col);
Box_SetFill(box,true);
}
Else
Box_SetEnd(box,NextBarSdate,NextBarStime,-0.2);
}
2025-07-09
610
글번호 192373