커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1484
글번호 230811
답변완료
지표 확인 좀 부탁 드립니다.
* 지표(강조) 중에 Percentr is loss than 지표가 있는데 화면에 창이 계속 뜸니다.
Inputs: Length(5), x(5);
If PercentR(Length) < x Then Begin
PlotPaintBar(High, Low, "%R<x");
Alert("PercentR is less than " + NumToStr(x,0));
End
Else Begin
NoPlot(1);
NoPlot(2);
End;
* 안뜨케 할수 있나요?
아니면 창 뜨는 위치를 우측 하단이 아닌 중앙 으로 바꿀수 있나요?
* 수고하셨습니다.
2023-11-09
796
글번호 173860
트라이 님에 의해서 삭제되었습니다.
2023-11-08
4
글번호 173853
답변완료
지표수식 전환 부탁드립니다
안녕하세요
항상 감사드립니다
트레이딩뷰수식 전환 부탁드립니다
short_l1 = input(5 , title="Short - L1")
short_l2 = input(20, title="Short - L2")
short_l3 = input(15, title="Short - L3")
long_l1 = input(20, title="Long - L1")
long_l2 = input(15, title="Long - L2")
shortTermXtrender = rsi(ema(close, short_l1) - ema(close, short_l2), short_l3 ) - 50
longTermXtrender = rsi( ema(close, long_l1), long_l2 ) - 50
shortXtrenderCol = shortTermXtrender > 0 ? shortTermXtrender > shortTermXtrender[1] ? color.lime : #228B22 : shortTermXtrender > shortTermXtrender[1] ? color.red : #8B0000
plot(shortTermXtrender, color=shortXtrenderCol, style=plot.style_columns, linewidth=1, title="B-Xtrender Osc. - Histogram", transp = 50)
t3(src, len)=>
xe1_1 = ema(src, len)
xe2_1 = ema(xe1_1, len)
xe3_1 = ema(xe2_1, len)
xe4_1 = ema(xe3_1, len)
xe5_1 = ema(xe4_1, len)
xe6_1 = ema(xe5_1, len)
b_1 = 0.7
c1_1 = -b_1*b_1*b_1
c2_1 = 3*b_1*b_1+3*b_1*b_1*b_1
c3_1 = -6*b_1*b_1-3*b_1-3*b_1*b_1*b_1
c4_1 = 1+3*b_1+b_1*b_1*b_1+3*b_1*b_1
nT3Average_1 = c1_1 * xe6_1 + c2_1 * xe5_1 + c3_1 * xe4_1 + c4_1 * xe3_1
maShortTermXtrender = t3( shortTermXtrender , 5 )
colShortTermXtrender = maShortTermXtrender > maShortTermXtrender[1] ? color.lime : color.red
plot(maShortTermXtrender, color=#000000 , style=plot.style_line, linewidth=5, title="B-Xtrender Shadow")
plot(maShortTermXtrender, color=colShortTermXtrender, style=plot.style_line, linewidth=3, title="B-Xtrender Color ")
plotshape(maShortTermXtrender > maShortTermXtrender[1] and maShortTermXtrender[1] < maShortTermXtrender[2] ? maShortTermXtrender : na, location=location.absolute, style=shape.circle, color=color.lime, size=size.tiny, transp=10)
plotshape(maShortTermXtrender < maShortTermXtrender[1] and maShortTermXtrender[1] > maShortTermXtrender[2] ? maShortTermXtrender : na, location=location.absolute, style=shape.circle, color=color.red , size=size.tiny, transp=10)
longXtrenderCol = longTermXtrender> 0 ? longTermXtrender > longTermXtrender[1] ? color.lime : #228B22 : longTermXtrender > longTermXtrender[1] ? color.red : #8B0000
macollongXtrenderCol = longTermXtrender > longTermXtrender[1] ? color.lime : color.red
plot(longTermXtrender , color=longXtrenderCol, style=plot.style_histogram, linewidth=2, title="B-Xtrender Trend - Histogram", transp = 80)
plot(longTermXtrender , color=#000000 , style=plot.style_line, linewidth=5, title="B-Xtrender Trend - Line", transp = 80)
plot(longTermXtrender , color=macollongXtrenderCol, style=plot.style_line, linewidth=3, title="B-Xtrender Trend - Line", transp = 80)
2023-11-08
872
글번호 173850
답변완료
종목추가관련
챠트 구성에서
코스피200선물챠트를 종목선택으로 하고
옵션챠트를 종목추가하여 보조지표 자리에 배치하였습니다
여기서 지표적용을 하여 오늘의 고가저가를 표시하고자 하여 적용하니
추가한 옵션챠트에는 지표가 적용되지 않는것 같습니다
종목추가한 챠트에도 지표가 적용될 수 있게하려면 어떻게 하여야 하는지요?
챠트창속성에 최고가/최저가 표시가 있으나 이것은 금일분이 아닌 전일 등 화면에 보이는 전체에서 표시되고 추가한 종목이 여러개가 같은 범위에(y축표시방법-다음항목과 공유선택) 배치시 1개만 표시됩니다 모두 표시될 수 있도록 작성하여 주세요
감사합니다
2023-11-08
992
글번호 173849
답변완료
수식 질문합니다.
안녕하세요.
1. 달이 바뀌고부터(같은 달 내에서) 신고거래량을 갱신하는 종목
2. 당일 거래량이 전 달의 최고 거래봉을 돌파하는 종목
3. 이전 달이 전봉거래량대비 500%이상, 양봉(N%이상:초기값 20)일 때
전봉 몸통(시가-종가)의 중심을 음봉의 저가 또는 종가가 이탈하는 종목
을 검색하고 싶습니다.
감사합니다.
2023-11-08
1326
글번호 173848
답변완료
수식 질문합니다.
안녕하세요. 아래는 지난 번 알려주신 비율거래선 골드 수식인데요.
input : P1(200),P2(500);
var: AP(0), AV(0), RV1(0),RV2(0);
AP= (H+L+C)/3;
AV=AP*V;
RV1=AccumN(AV,P1)/AccumN(V,P1);
RV2=AccumN(AV,P2)/AccumN(V,P2);
If Crossup(RV1,RV2) then
find(1);
골드 조건에 양봉이고 종가가 200선(RV1) 보다 5% 이상(변수설정) 조건을 추가한 다음
골드 조건이 만족한 이후 최소 N봉이 지난 후(N의 초기값은 10)
처음으로 음봉의 저가 또는 종가가 200선(RV1)을 이탈하는 종목을
검색하고 싶습니다.
감사합니다.
2023-11-08
1355
글번호 173847
답변완료
문의 드립니다
input : StartTime(143000),EndTime(53000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
var1 = ma(C,1);
Var2 = ma(C,5);
if Tcond == true Then
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b1",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s1",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b2",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s2",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
위 수식어는
1,5 이동평균선 역배열에 매수 진입금지
1,5 이동평균선 정배열에 매도 진입금지 입니다.
수식어 변경 사안은 아래입니다.
1,5 이동평균선 역배열에 매도신호후 1,5 이동평균선 골든코로스에 손절
1,5 이동평균선 정배열에 매수신호후 1,5 이동평균선 데드크로스에 손절
--------------------------
수식어 추가입니다.
1.
매매시간 10:00~ 익일05:00
캔들 100개 고점 저점의 50% 매수후 해당된 캔들 100개의 고점에 청산
캔들 100개 고점 저점의 50% 매도후 해당된 캔들 100개의 저점에 청산
2.
매매시간 10:00~ 익일05:00
캔들 100개 고점 저점의 아래 20% 매수후 해당된 캔들 100개의 고점에 청산
캔들 100개 고점 저점의 위 20% 매도후 해당된 캔들 100개의 저점에 청산
2023-11-09
1033
글번호 173846
답변완료
문의드립니다.
키움수식인거 같습니다.
제가 내용의 의미를 몰라서 ;;;;
이것을 예스용으로 수식변경부탁드립니다.
A = ((predayhigh() + predaylow() + predayclose()/3) +
(predayclose() - predaylow())
(C,(A*1.07))
(C,(A*1.07)) 는 어떤 뜻인가요???
수고하세요~!!
2023-11-08
856
글번호 173845
답변완료
문의드립니다~
예수금잔액 = GetUnclearedDeposits("1111-1111-11");
if time<080000 and time<=080500 then
{value10=예수금잔액;}
if MarketPosition == 1
and 예수금잔액<value10/2 //예수금이 당일시작 예수금의 절반미만일때
Then
ExitLong("롱손절이");
if MarketPosition == -1
and 예수금잔액<value10/2 //예수금이 당일시작 예수금의 절반미만일때
Then
ExitShort("숏손절이");
///////
1.오늘장이 열리고 나서
당일시초가 시점의 예수금이
당일시초가 이후에 진입하고나서 절반미만으로 실시간으로 떨어질때 청산한다.
이게 위 식이 맞는건가요?
2.그리고 시뮬레이션으로 돌려볼때
예수금을 1억원으로 시작한다는걸 설정해서
시뮬레이션이 가능한지 문의 드립니다.
자금관리로 수익이 나는지 시뮬레이션 해보려구요~
3.스토rsi식 수정 부탁드립니다
아래는 트레이딩뷰 소스코드이구요.
//@version=5
indicator(title="Stochastic RSI", shorttitle="Stoch RSI", format=format.price, precision=2, timeframe="", timeframe_gaps=true)
smoothK = input.int(3, "K", minval=1)
smoothD = input.int(3, "D", minval=1)
lengthRSI = input.int(14, "RSI Length", minval=1)
lengthStoch = input.int(14, "Stochastic Length", minval=1)
src = input(close, title="RSI Source")
rsi1 = ta.rsi(src, lengthRSI)
k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = ta.sma(k, smoothD)
plot(k, "K", color=#2962FF)
plot(d, "D", color=#FF6D00)
h0 = hline(80, "Upper Band", color=#787B86)
hline(50, "Middle Band", color=color.new(#787B86, 50))
h1 = hline(20, "Lower Band", color=#787B86)
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Background")
아래는 다른분이 답변받은 스토rsi식입니다.
적용해보니깐 조금 차이가 있어서요. 트뷰에서는 변수를
14,14,3,3을 넣는데 어떤차이인지를 모르겠습니다;
input: period(14), period1(3), period2(3);
Var: K선(0), D선(0);
K선 = ema(((RSI(period) - Lowest(RSI(period),period)) / ((Highest(RSI(period),period)) - Lowest(RSI(period),period))),period1)*100 ;
D선 = ema(ema(((RSI(period) - Lowest(RSI(period),period)) / ((Highest(RSI(period),period)) - Lowest(RSI (period),period))),period1),period2)*100 ;
4.시간봉에서 진입후에 손절을 40틱으로 설정했을때에
다음봉 완성봉에서 손절이 나가는데요. 시간봉에서 진입후에 다음봉 완성전에
실시간으로 손절40틱을 날릴 수 있는 방법이 있는지 궁금합니다~
2023-11-08
941
글번호 173844