커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1514
글번호 230811
답변완료
부탁드립니다.
변형 부탁 드립니다.
indicator("RSI Multi Length [LuxAlgo]")
max = input(20,'Maximum Length')
min = input(10,'Minimum Length')
overbought = input.float(70,step=10)
oversold = input.float(30,step=10)
src = input(close)
//----
rsi_avg_dn_css = input(#ff5d00,'Average RSI Gradient',group='Style',inline='inline1')
rsi_avg_up_css = input(#2157f3,'',group='Style',inline='inline1')
upper_css = input(#0cb51a,'Upper Level',group='Style')
lower_css = input(#ff1100,'Lower Level',group='Style')
ob_area = input(color.new(#0cb51a,70),'Overbought Area',group='Style')
os_area = input(color.new(#ff1100,70),'Oversold Area',group='Style')
//----
N = max-min+1
diff = nz(src - src[1])
var num = array.new_float(N,0)
var den = array.new_float(N,0)
//----
k = 0
overbuy = 0
oversell = 0
avg = 0.
for i = min to max
alpha = 1/i
num_rma = alpha*diff + (1-alpha)*array.get(num,k)
den_rma = alpha*math.abs(diff) + (1-alpha)*array.get(den,k)
rsi = 50*num_rma/den_rma + 50
avg += rsi
overbuy := rsi > overbought ? overbuy + 1 : overbuy
oversell := rsi < oversold ? oversell + 1 : oversell
array.set(num,k,num_rma)
array.set(den,k,den_rma)
k += 1
//----
avg_rsi = avg/N
buy_rsi_ma = 0.
sell_rsi_ma = 0.
buy_rsi_ma := nz(buy_rsi_ma[1] + overbuy/N*(avg_rsi - buy_rsi_ma[1]),avg_rsi)
sell_rsi_ma := nz(sell_rsi_ma[1] + oversell/N*(avg_rsi - sell_rsi_ma[1]),avg_rsi)
//----
var tb = table.new(position.top_right,2,2)
if barstate.islast
table.cell(tb,0,0,'Overbought',text_color=color.gray,bgcolor=na)
table.cell(tb,1,0,'Oversold',text_color=color.gray,bgcolor=na)
table.cell(tb,0,1,str.tostring(overbuy/N*100,'#.##')+' %',text_color=#26a69a,bgcolor=color.new(#26a69a,80))
table.cell(tb,1,1,str.tostring(oversell/N*100,'#.##')+' %',text_color=#ef5350,bgcolor=color.new(#ef5350,80))
//----
css = color.from_gradient(avg_rsi,sell_rsi_ma,buy_rsi_ma,rsi_avg_dn_css,rsi_avg_up_css)
plot(avg_rsi,'Average Multi Length RSI',color=css)
up = plot(buy_rsi_ma,'Upper Channel',color=upper_css)
dn = plot(sell_rsi_ma,'Lower Channel',color=lower_css)
per_over = plot(overbuy/N*100,'Overbought Area',color=color.new(ob_area,100),editable=false)
per_under = plot(100 - oversell/N*100,'Oversold Area',color=color.new(os_area,100),editable=false)
upper = plot(100,color=na,editable=false,display=display.none)
lower = plot(0,color=na,editable=false,display=display.none)
fill(per_over,lower,ob_area)
fill(upper,per_under,os_area)
fill(up,dn,color.new(css,90))
hline(50,color=color.new(color.gray,50))
2023-08-13
961
글번호 171470
답변완료
분봉에서 MACD-월봉 참조문의 입니다.
분봉에서 MACD-월봉 참조문의 입니다.
분봉에서 월봉 참조차트를 만들고 거기서 MACD를 불러오는데 전월 값이 들어옵니다.
당월 실시간 월봉MACD를 불러오고 싶은데 지도하여 주시면 고맙겠습니다.
예스트레이더 늘 유용하게 사용하고있습니다. 감사합니다~
2023-08-13
1032
글번호 171469
회원 님에 의해서 삭제되었습니다.
2023-08-18
43
글번호 171468
답변완료
atr청산문의
항상 감사드립니다
data1에서 진입한 후, 청산은 data2 atr 조건충족시 신호발생 시키는식 좀 부탁드립니다
if MarketPosition==1 Then{
ExitLong("ex",atstop,highest(High,barsSinceEntry)-atr(20)*mul);
}
에서 highest(High,barsSinceEntry)-atr*mul 부분을 data2에서 조건만족시 data1에 신호발생
시키는 식 작성입니다. 무식하게 data2(highest(High,barsSinceEntry)-atr(20)*mul) 는 아닌거 같습니다. barsSinceEntry를 못 읽겠지요
2023-08-13
633
글번호 171467
정구지 님에 의해서 삭제되었습니다.
2023-08-13
51
글번호 171466
답변완료
부탁드립니다
var : sd(0),st(0),ed(0),et(0),hh(0),ll(0),mm(0);
var : tt1(0),tt2(0),tt3(0),tt4(0),tt5(0),tt6(0),tt7(0),tt8(0),tt9(0),tt10(0);
var : xx1(0),xx2(0),xx3(0),xx4(0),xx5(0),xx6(0),xx7(0),xx8(0),xx9(0),xx10(0);
if T != T[1] then
{
if 고점[1,2] < 저점[1,2] then
{
sd = sdate[index-고점[1,2]];
st = stime[index-고점[1,2]];
ed = sdate[index-저점[1,2]];
et = stime[index-저점[1,2]];
hh = 고점[1,1];
ll = 저점[1,1];
mm = hh-ll;
}
if 고점[1,2] > 저점[1,2] then
{
sd = sdate[index-저점[1,2]];
st = stime[index-저점[1,2]];
ed = sdate[index-고점[1,2]];
et = stime[index-고점[1,2]];
hh = 고점[1,1];
ll = 저점[1,1];
mm = hh-ll;
}
}
항상 패턴이 완성된 봉을 기준으로 잡습니다.(1번//시가 2번//최고가 3번//최고가)
1= 1번 자리에서 패턴 완성후 횡보 또는 조정후 1번봉의 시가(기준봉)를 3% 이상 돌파하는
양봉이 나오거나 or
2= 앞전 패턴이 완성된 2번 자리의 고점을 0봉이 돌파 하거나 (양봉조건) or
3= 2번 자리의 고점을 3%이내로 근접하는 양봉이 나올때
1 or 2 or 3
주말 마무리 잘하시고 항상 감사 드립니다.
2023-08-13
1131
글번호 171465
답변완료
부탁드립니다.
볼린저밴드 상단을 돌파후 이탈하여 일정기간 횡보한 다음 볼린저밴드 상단을 재 돌파하는 수식을 구하고자 합니다. 예시 사진을 첨부하였습니다.
(1) 0봉전 기준 60봉이내에서 BollBandUp(120,1)돌파
(2) 돌파이후 BollBandUp(120,1) 이탈
(BollBandUp(120,1)이탈후 저가가 120이평선과 BollBandUp(120,1) 이내에 존재하는 조건
이면 더 좋겠습니다.)
(3) 0봉전 BollBandUp(1200,1) 돌파 검색식을 구하고자 합니다.
항상 고맙습니다.
2023-08-13
1198
글번호 171464
답변완료
수식 부탁드립니다.
파라볼릭지표와 엘더박사의 safe zone을 이용한 수식을 부탁드립니다.
#.진입 기준 ; 파라볼릭 종가 지표의 추세 반전.
#.청산 기준 ; 엘더박사의 safe zone
1.매수진입01; 종가기준의 파라볼릭지표가 하락하다가 상승 추세로 전환하면 그때 종가로 매수진입.
1)매수분 청산01; safe zone의 plot1을 상회한 후,하락반전하여 종가가 plot1선을 뚫고 내려오면 그때 종가에 청산.
2)매수분 청산02; plot1선을 넘지 못한 상태에서 plot2선을 뚫고 내려가면 그때 종가에 청산.
3)매수 재진입02 ; 청산01을 한 후, 청산2조건(plot2선 뚫고 하락)이 오지 않은 상태에서 청산01조건에 해당되는 봉의 고가를 넘으면 long 재진입.
2.매도진입01 ; 종가기준인 파라볼릭지표가 상승하다가 하락 추세로 전환하면 그때 종가로 매도진입.
1)매도분 청산01; safe zone의 plot2을 하회한 후,상승반전하여 종가가 plot2선을 뚫고 올라오면 그때 종가에 청산.
2)매도분 청산02; plot2선을 넘지 못한 상태에서 plot1선을 뚫고 올라가면 그때 종가에 청산.
3)매도 재진입02 ; 청산01을 한 후, 청산2조건(plot선 뚫고 상승)이 오지 않은 상태에서 청산01조건에 해당되는 봉의 저가를 하회하여 하락하면 short 재진입.
*혹시라도 매수재진입이나 매도재진입 수식이 불가하면 재진입부분의 수식은 제외해도 되고요.
- 아래 -
#. 지표 내역
1)파라볼릭 (종가기준)
Input : af(0.02), maxAF(0.2);
var1 = CSar(af,maxAF);
if var1 > C Then
Plot1(var1, "CSAR",BLACK);
Else
Plot1(var1, "CSAR",rgb(205, 92 ,92));
---------------------------------------------
2)엘더박사의 safe zone 내역 (gambler님 것)
input : lookbackLength(10), coeff(4);
var : count1(0), diff1(0), totalCount1(0), totalSum1(0), penAvg1(0), Safety1(0), finalSafety1(0);
var : count2(0), diff2(0), totalCount2(0), totalSum2(0), penAvg2(0), Safety2(0), finalSafety2(0);
//DownTrend Stop
if high > high[1] then
count1 = 1;
else
count1 = 0;
if high > high[1] then
diff1 = high - high[1];
else
diff1 = 0;
totalCount1 = accumN(count1, lookbackLength);
totalSum1 = accumN(diff1, lookbackLength);
penAvg1 = (totalSum1 / totalCount1);
safety1 = high[1] + (penAvg1[1] * coeff);
finalSafety1 = Min(safety1, safety1[1], safety1[2], safety1[3], safety1[4], safety1[5]);
//UpTrend Stop
if low < low[1] then
count2 = 1;
else
count2 = 0;
if low < low[1] then
diff2 = low[1] - low;
else
diff2 = 0;
totalCount2 = accumN(count2, lookbackLength);
totalSum2 = accumN(diff2, lookbackLength);
penAvg2 = (totalSum2 / totalCount2);
safety2 = low[1] - (penAvg2[1] * coeff);
finalSafety2 = Max(safety2, safety2[1], safety2[2], safety2[3], safety2[4], safety2[5]);
plot1(finalsafety1);
plot2(finalsafety2);
감사합니다.
2023-08-13
980
글번호 171463
답변완료
하루에 1번만 진입하는 진입제어 함수 문의
조건이 충족될때 하루에 1번만 진입하는 진입제어 함수는 무엇인가요?
SetMaxEntriesPerDay(1);
이것은 선언되지 않은 함수라고 yes trader에서 거부합니다.
2023-08-13
926
글번호 171462