커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6184
글번호 230811
답변완료
TS코드 예스변환부탁드립니다.
TS코드 예스변환부탁드립니다.
Input:
Length(7),price((o+c)/2),mult(0.0005),
DrawHLines(true);
{ drawing related variable inputs }
Input: longDiverColor(green), longRSIColor(darkgreen), longRevDiverColor(cyan);
Input: shortDiverColor(red), shortRSIColor(darkred), shortRevDiverColor(yellow);
var:
k_15(15), k_50(50),
RSIWAvg(0),
lastRSIAtPivotLo(0),lastPriceAtPivotLo(0),lastLoAtPivotLo(0),
lastRSIAtPivotHi(0),lastPriceAtPivotHi(0),lastHiAtPivotHi(0);
{ figure out long/short threshold }
var:
idx(0), RSIAvg(0),
longThreshold(0),shrtThreshold(0),
_RSI(0);
var:
alertTextID(-1);
if barnumber = 1 then begin
alertTextID = Text_New(date,time,0,"RSI");
end;
_RSI = RSI(Price,Length);
RSIAvg = Average(_RSI,k_50);
longThreshold = 60 - (100-RSIAvg)/1.68;
shrtThreshold = 40 + (RSIAvg)/1.68;
RSIWAvg = WAverage(RSI(Price,Length),3);
{ long signal }
if RSIWAvg[1] < RSIWAvg and
RSIWAvg[1] < RSIWAvg[2] and
RSIWAvg[2] < RSIWAvg[3] and
RSIWAvg[3] < RSIWAvg[4] then begin { last bar was a RSI pivot low }
if RSIWAvg[1] < (longThreshold + k_15) and { RSI was "low enough" }
{ RSI low enough for a pivot low, look for divergence }
Price < lastPriceAtPivotLo and { price was higher in last RSI pivot low, but }
lastRSIAtPivotLo < _RSI then { RSI was lower => divergence } begin
{ plot a "significant" long signal }
Plot1(L-L*mult,"long",longDiverColor);
if Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI diver long");
end;
end
else if RSIWAvg[1] < longThreshold then begin
{ no divergence, but RSI very low, and so it's worth noting }
{ plot a normal long signal }
Plot1(L-L*mult,"long",longRSIColor);
if Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI long");
end;
end
else if RSIWAvg[1] > (shrtThreshold - k_15) { RSI was "high enough" }
{ a pivot low while RSI reading is high, look for rev divergence }
and Price > lastPriceAtPivotLo { price was higher in last RSI pivot low, but }
and lastRSIAtPivotLo < _RSI then { RSI was lower => rev divergence } begin
Plot1(L-L*mult,"long",longRevDiverColor);
if Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI rev diver long");
end;
end;
lastPriceAtPivotLo = Price;
lastLoAtPivotLo = L;
lastRSIAtPivotLo = _RSI;
end;
if DrawHLines and lastLoAtPivotLo <> 0 then begin
plot3(lastLoAtPivotLo,"lastL@pivotL");
if lastLoAtPivotLo <> lastLoAtPivotLo[1]
and Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI support");
end;
end;
if DrawHLines and lastHiAtPivotHi <> 0 then begin
plot4(lastHiAtPivotHi,"lastH@pivotH");
if lastHiAtPivotHi <> lastHiAtPivotHi[1]
and Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI resistance");
end;
end;
{ short signal }
if RSIWAvg[1] > RSIWAvg and
RSIWAvg[1] > RSIWAvg[2] and
RSIWAvg[2] > RSIWAvg[3] and
RSIWAvg[3] > RSIWAvg[4] then begin { last bar was a RSI pivot high }
if RSIWAvg[1] > (shrtThreshold - k_15) and { RSI was "high enough" }
{ RSI high enough for a pivot high, look for divergence }
Price > lastPriceAtPivotHi and { price was higher in last RSI pivot high, but }
lastRSIAtPivotHi > _RSI then { RSI was higher => divergence } begin
{ plot a "significant" short signal }
Plot2(H+H*mult,"short",shortDiverColor);
if Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI diver short");
end;
end
else begin
if RSIWAvg[1] > shrtThreshold then begin
{ no divergence, but RSI very high, and so it's worth noting }
{ plot a normal short signal }
Plot2(H+H*mult,"short",shortRSIColor);
if Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI short");
end;
end;
end;
if RSIWAvg[1] < (longThreshold + k_15) and { RSI was "low enough" }
{ a pivot high while RSI reading is low, look for rev divergence }
Price < lastPriceAtPivotHi and { price was lower in last RSI pivot high, but }
lastRSIAtPivotHi > _RSI then { RSI was higher => rev divergence } begin
Plot2(H+H*mult,"short",shortRevDiverColor);
if Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
alert("RSI rev diver short");
end;
end;
lastPriceAtPivotHi = Price;
lastHiAtPivotHi = H;
lastRSIAtPivotHi = _RSI;
end;
{
the original code follows:
}
{
Input:Length(7);
Vars: Condition99(FALSE),
Value8(15),
Value3(50);
Value1 = WAverage(RSI(Close,Length),3);
Value2 = 0;
For Value7 = 0 to Value3
Begin
Value2 = Value2 + RSI(Close,Length)[Value7];
End;
Value4 = Value2/(Value3-1);
Value5 = 100 - (100-Value4)/1.68;
Value6 = Value5 - 40;
If Value1[1] < Value1 and Value1[1] < Value1[2] and Value1[2] < Value1[3]
and Value1[3] < Value1[4] then
Begin
If Value1[1] < (Value6 + Value8) and Value9 > (Open + Close)/2 and Value10 < RSI(Close,Length) then
Begin
Plot1(L-C*0.001,"Pivot-sB");
Condition99 = FALSE;
Value9 = (Open + Close)/2;
Value10 = RSI(Close,Length);
End
Else
Begin
If Value1[1] < Value6 then
Begin
Plot2(L-C*0.001,"Pivot-B");
Condition99 = TRUE;
Value9 = (Open + Close)/2;
Value10 = RSI(Close,Length);
End;
End;
End;
}
2017-12-23
272
글번호 115235
답변완료
10분봉 차트에 특정시간대를 표시하는방법을 알고싶습니다
10분봉 차트에 3시 형성되는 봉에 화살표를 표시하는등의 방법으로
특정시간대를 표시할수있는 수식부탁드립니다
구체적으로는 2시반과 3시를 표시할수있는수식이 필요합니다
감사합니다
2017-12-23
227
글번호 115234
답변완료
부탁 드립니다,
변환 부탁 드립니다.
미리 감사 드립니다.
수식1)
LT=LOWEST(L,P1);
HT=HIGHEST(H,P1);
BOX1=LOWEST(L,P1-2)>LOWEST(L,P1-1);
TOP2=VALUEWHEN(1,BARSSINCE(L<LT(1))==(P1-2) AND BOX1,HT);
수식2)
UP=CROSSUP(C,LOWEST(C,7,1)+ATR(7,1)*3);
BUYY=VALUEWHEN(1,UP(1),OPEN);
수식3)
TC=C-C(1);
SUM(IF(TC>EAVG(TC,7) &&TC>0,C+V,
IF(TC<EAVG(TC,7) &&TC<0,-ABS(C+V),0)))
2017-12-23
204
글번호 115233
대치아재 님에 의해서 삭제되었습니다.
2017-12-23
0
글번호 115232
지지저항 님에 의해서 삭제되었습니다.
2017-12-22
4
글번호 115231
답변완료
스토캐스틱 매매 수식 부탁드립니다.
아래 수식을 수정하고 싶습니다. 부탁드려도 될까요??
매수조건
- 스토캐스틱 정배열 상태 and 거래량 60이평의 5배 거래량 발생
매도조건
- 스토캐스틱 역배열 상태 and 거래량 60이평의 5배 거래량 발생
- 평단가대비 20%이상 수익이며 거랭량 60이평의 20배 거래량 발생
부탁 드립니다. ~~^^
- 아 래 -
input : 날짜(20170101),금액(1000000),sto1(10),sto2(6),sto3(6);
var1 = StochasticsK(sto1,sto2);
var2 = StochasticsD(sto1,sto2,sto3);
if crossup(var1,var2) and 거래량조건 Then
Buy("매수",OnClose,def,Floor(금액/C));
if MarketPosition == 1 then{
if CrossDown(var1,var2) and 거래량조건 Then
ExitLong("매도");
if C >= AvgEntryPrice*1.2 and 거래량조건 Then
ExitLong("고점매도");
}
2017-12-25
217
글번호 115230
답변완료
부탁드립니다
input : ST(170000),ET(230000);
if stime == ST or (stime > ST and stime[1] < ST) then
Condition1 = true;
if stime == ET or (stime > ET and stime[1] < ET) then
Condition1 = false;
if Condition1 == true Then{
plot1(max(C,O));
plot2(min(C,O));
}
위 수식에서 지정시간까지의 최고가의 몸통 종가 최저가의 몸통종가에 선을 긋고 싶습니다
부탁드립니다(위 수식은 계속적인 몸통 고가저가인거같습니다)
2017-12-22
202
글번호 115229
답변완료
수식
안녕하세요.
오전 9시30분에 챠트에 수직선이 생기도록 부탁드립니다.
시간 및 수직선 색상,두께 변경 가능하도록 부탁드립니다.
감사합니다.
2017-12-22
200
글번호 115228
답변완료
지표식 문의드립니다
연속된 4개의 캔들이 양봉-양봉-양봉-양봉/ 양봉-음봉-양봉-양봉/ 양봉-양봉-음봉-양봉
음봉-음봉-음봉-음봉/ 음봉-양봉-음봉-음봉/ 음봉-음봉-양봉-음봉
같은 패턴의 4개의 캔들이 발생하면 첨부파일 그림처럼 첫번재 캔들의 시가 와 4번째 캔들 종가 따라 선이 선이 그어지는 지표 수식 부탁드립니다
2017-12-22
244
글번호 115225