커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1765
글번호 230811
답변완료
수정 부탁드립니다.
77477번의 수정 요청드립니다.
원하는바를 그림으로 올려봅니다.
수고스러움에 감사드립니다.
감사합니다.
2022-06-02
991
글번호 159526
답변완료
수식 수정부탁드립니다.
안녕하십니까
더운날씨 수고많으십니다.
아래 수식 중 매수조건 일부 수정 부탁드립니다.
--------------------------------------------------------------------
var : T(0);
var1 = ma(c,5);
Var2 = ma(v,5);
if Bdate != Bdate[1] or TotalTrades > TotalTrades[1] Then
{
T = 0;
}
if MarketPosition == 0 Then
{
if var1 < var1[1] Then
T = 1;
if T == 1 and
var1 >= var1[1]*1.02 and
Var2 >= Var2[1]*1.02 and
C <= DayClose(1)*1.20 and
C >= DayClose(1)*0.80 Then
{
T = 2;
Buy("b");
}
}
#if MarketPosition == 1 Then
#{
# if var1 < var1[1] Then
# ExitLong();
#}
SetStopProfittarget(3,PercentStop);
SetStopLoss(3,PercentStop);
SetStopEndofday(151500);
현재 조건
ㅇ 매수
1. 개장 후 5일 가격 이평선 하락
1번 조건 만족 후
2. 5일 가격이평선 직전보다 2%이상 상승 AND
3. 5일 거래량이평선 직전보다 2% 이상 상승
1번 조건이 우선 만족된 후에 2,3번 조건이 만족 될때 매수
ㅇ 매도
1. 5일 가격이평선 하락 OR
2. 매수 후 3% 수익 OR
3. 손절 3% OR
4. 오후 3시 15분 전량 매도
매수 신호는 전일종가 대비 +- 20 이내에서만 발생
수정요청
뮈 매수 3번 조건을 수정 부탁드립니다.
5일 거래량 이평이 20일 거래량이평 수치 보다 20%이상 높아질 때
(예를들어 거래량이 갑자기 증가하여 20일 거래량이평 수치가 100이라고 가정하면 5일 거래량 이평 수치가 120을 넘어설때)
정리하면
1. 개장 후 5일 가격 이평선 하락
1번 조건 만족 후
2. 5일 가격이평선 직전보다 2%이상 상승 AND
3. 5일 거래량이평 수치가 20일 거래량 이평 수치보다 20% 이상 수치가 높아질때
1번 조건이 우선 만족된 후에 2,3번 조건이 만족 될때 매수
매도조건은 동일
잘 부탁드립니다.
감사합니다.
2022-06-02
1226
글번호 159515
답변완료
해외선물(나스닥100) 수식 요청드림니다.
1. 해외선물 나스닥100
2. 차트1 60분봉
매수조건
1. 3000분봉중 최고가에서 20% 하락한 조건 (고점 매매하지 않기 위해)
2. 볼린저밴드의 기간(30) 멀티D(2) 적용
(1) 볼린저밴드 우하향(직전봉 기준- 우하향 ) 일때
(2) 직전봉이 볼린저밴드 하한선보다 위에 있는 조건
(3) 현재봉이 볼린저밴드 하한선 낮을 경우 (하한돌파시 매수)
해당 1.2-1 2-2 2-3 조건을 만족할때 1주 매수
매수 청산 조건
1. 매수후 볼린저 밴드 상단 돌파 후 현재가가 볼린저 밴드 중심선을 하향 돌파시 매수 청산
2022-06-02
1519
글번호 159509
답변완료
수식 추가로 부탁드립니다
수고하십니다.
아래 사용자 함수는 첨부와 같은 에러 내용이 나오고 안됩니다..
재확인 부탁드립니다.
감사합니다.수고하세요..
//2.minhighPrice1의 사용자 함수
Input : ATRperiod1(Numeric),amplitude1(Numeric);
var : trend1(0),nexttrend1(0),maxlowPrice1(0);
var : up1(0),down1(0),atrHigh1(0),atrLow1(0),arrowup1(0),arrowdown1(0);
var : atr21(0),dev1(0),highPrice1(0),lowPrice1(0),highma1(0),lowma1(0),midma1(0),HTM1(0);
atr21 = atr(ATRperiod1) / 2 ;
dev1 = atr21 * 5.5 ;
highPrice1 = Highest(H,amplitude1*1.5);
lowPrice1 = Lowest(L,amplitude1*1.5);
highma1 = ma(high, amplitude1*1.25);
lowma1 = ma(low, amplitude1*0.75);
midma1 = (highma1+lowma1)/2 ;
if nexttrend1 == 1 Then
{
maxlowPrice1 = max(lowPrice1, maxlowPrice1);
if midma1 < maxlowPrice1 and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend1 = 1;
nexttrend1 = 0;
minhighPrice1 = highPrice1;
}
}
else
{
minhighPrice1 = min(highPrice1, minhighPrice1[1]);
if midma1 > minhighPrice1 and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend1 = 0;
nexttrend1 = 1;
maxlowPrice1 = lowPrice1;
}
}
2022-06-02
1443
글번호 159504
답변완료
수식 문의
안녕하세요. 일전에 아래와 같은 수식을 도움 받은바 있습니다.
그런데 깔아보니, 봉색깔이 하나로 밖에 나오지않습니다.
두개의 조건이면, 두개의 색깔이 나와야 할 터인데,
어찌된 영문인지 모르겠습니다.
다시 살펴봐주시면 감사하겠습니다.
input : gamma(0);
var : OSeries(0),ol0(0),ol1(0),ol2(0),ol3(0),ol(0);
var : CSeries(0),cl0(0),cl1(0),cl2(0),cl3(0),cl(0);
OSeries = Open;
IF BarIndex == 0 THEN
{
OL = OSeries;
ol0 = OSeries;
ol1 = OSeries;
ol2 = OSeries;
ol3 = OSeries;
}
ELSE
{
ol0 = (1 - gamma) * OSeries + gamma * ol0;
ol1 = -gamma * ol0 + ol0 + gamma * ol1;
ol2 = -gamma * ol1 + ol1 + gamma * ol2;
ol3 = -gamma * ol2 + ol2 + gamma * ol3;
OL = (ol0 + 2 * ol1 + 2 * ol2 + ol3) / 6;
}
CSeries = c;
IF BarIndex == 0 THEN
{
CL = CSeries;
cl0 = CSeries;
cl1 = CSeries;
cl2 = CSeries;
cl3 = CSeries;
}
ELSE
{
cl0 = (1 - gamma) * CSeries + gamma * cl0;
cl1 = -gamma * cl0 + cl0 + gamma * cl1;
cl2 = -gamma * cl1 + cl1 + gamma * cl2;
cl3 = -gamma * cl2 + cl2 + gamma * cl3;
CL = (cl0 + 2 * cl1 + 2 * cl2 + cl3) / 6;
}
PlotPaintBar(h,l,ol,cl,"강조");
2022-06-02
1266
글번호 159503
답변완료
설명을 부탁 드립니다
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
Sell("s",AtStop,C);
if NextBarOpen < C Then
Buy("b",AtStop,C);
}
---------------------
신호발생이 시가나 전일 종가에 영향을 받는다는 내용인가요 ?
2022-06-02
1346
글번호 159494
답변완료
수정 부탁드립니다
input : N(5),금액(10000000);
var : cnt(0),hh(0),ll(0);
hh = 0;
ll = 0;
For cnt = 1 to N
{
if (hh == 0 or (hh > 0 and DayHigh(cnt) > hh)) Then
hh = DayHigh(cnt);
if (ll == 0 or (ll > 0 and DayLow(cnt) < ll)) Then
ll = DayLow(cnt);
}
var1 = hh-(hh-ll)*0;
var2 = hh-(hh-ll)*0.236;
var3 = hh-(hh-ll)*0.382;
var4 = hh-(hh-ll)*0.500;
var5 = hh-(hh-ll)*0.618;
var6 = hh-(hh-ll)*0.786;
var7 = hh-(hh-ll)*1.000;
if CrossDown(C,var2) Then
Buy("b1",OnClose,DEF,Floor((금액*0.2)/C));
if CrossDown(C,var3) Then
Buy("b2",OnClose,DEF,Floor((금액*0.2)/C));
if CrossDown(C,var4) Then
Buy("b3",OnClose,DEF,Floor((금액*0.2)/C));
if CrossDown(C,var5) Then
Buy("b4",OnClose,DEF,Floor((금액*0.2)/C));
if CrossDown(C,var6) Then
Buy("b5",OnClose,DEF,Floor((금액*0.2)/C));
if MarketPosition == 1 Then
{
if CrossUp(c,var1) Then
ExitLong("bx1",OnClose,DEF,"b1");
if CrossUp(c,Var2) Then
ExitLong("bx2",OnClose,DEF,"b2");
if CrossUp(c,Var3) Then
ExitLong("bx3",OnClose,DEF,"b3");
if CrossUp(c,Var4) Then
ExitLong("bx4",OnClose,DEF,"b4");
if CrossUp(c,var5) Then
ExitLong("bx5",OnClose,DEF,"b5");
}
---------------------------
수정 부탁드립니다.
1. 익절 300틱, 손절 20틱
2. 반대도 부탁드려요~
2022-06-02
1447
글번호 159493
답변완료
트레이딩뷰 지표소스 검색식
트레이딩뷰 지표소스로 종목 검색식을 만들고 싶은데
가능할까요?
지표상 Buy 신호 종목 검색을 하고 싶습니다.
//@version=3
study(title="ATR Smoothed (By dysrupt)_BuySell version", shorttitle="ATR_SM_BuySell", overlay = true)
//Modifyed by @guikroth
////////////////////////////////////////////////////////////////////////////////INPUTS
nATRPeriod = input(21, "Period")
nATRMultip = input(6.3, "Multiplier",type=float, minval=0.5, maxval=1000, step=0.1)
/////////////////////////////////////////////////////////////////////////////////ATR
xATR = atr(nATRPeriod)
nLoss = nATRMultip * xATR
xATRTrailingStop = na
xATRTrailingStop :=
iff(close > nz(xATRTrailingStop[1], 0) and close[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), close - nLoss),
iff(close < nz(xATRTrailingStop[1], 0) and close[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), close + nLoss),
iff(close > nz(xATRTrailingStop[1], 0), close - nLoss, close + nLoss)))
pos = na
pos :=
iff(close[1] < nz(xATRTrailingStop[1], 0) and close > nz(xATRTrailingStop[1], 0), 1,
iff(close[1] > nz(xATRTrailingStop[1], 0) and close < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))
color = pos == -1 ? red: pos == 1 ? lime : blue
//patr=plot(xATRTrailingStop, color=color, linewidth=2, title="ATR Trailing Stop", transp=0)
// Deternine if we are currently LONG
isLong = false
isLong := nz(isLong[1], false)
// Determine if we are currently SHORT
isShort = false
isShort := nz(isShort[1], false)
//Trading
// Buy only if the buy signal is triggered and we are not already long
LONG = not isLong and pos == 1
// Sell only if the sell signal is triggered and we are not already short
SHORT = not isShort and pos == -1
if (LONG)
isLong := true
isShort := false
if (SHORT)
isLong := false
isShort := true
barcolor(isLong ? lime : isShort ? red : na)
// Show Break Alerts
plotshape(SHORT, title="Sell", style=shape.labeldown, location=location.abovebar, size=size.normal, text="Sell", transp=0, textcolor = white, color=red, transp=0)
plotshape(LONG, title="Buy", style=shape.labelup, location=location.belowbar, size=size.normal, text="Buy", textcolor = white, color=green, transp=0)
// === /PLOTTING ===
// Send alert to TV alarm sub-system
alertcondition(LONG,title="Sell",message="Sell")
alertcondition(SHORT,title="BuY",message="Buy")
alertcondition(SHORT,title="BuY",message="Buy")
alertcondition(SHORT,title="BuY",message="Buy")
////////////////////////////////////////////////////////////////////////////////VWMA
len2 = input(100, minval=1, title="Smooth")
src = input(close, title="Source")
out = vwma(src, len2)
avg1=avg(out, xATRTrailingStop)
plot(avg1, color=aqua, transp=0, title="ATR")
2022-06-02
2318
글번호 159492
답변완료
문의
도움 주셔서 감사드립니다.
아래 영웅문 수식 변환하여 종목검색에 활용하고자 합니다.
*수식*
a=(sum(if(C>C(1),1,0),Period)*sum(if(C>C(1),C-C(1),0),Period)/(sum(if(C>C(1),C-C(1),0),Period)+sum(if(C<C(1),C(1)-C,0),Period))-sum(if(C<C(1),1,0),Period)*sum(if(C<C(1),C(1)-C,0),Period)/(sum(if(C>C(1),C-C(1),0),Period)+sum(if(C<C(1),C(1)-C,0),Period)))/Period*100
*검색 조건*
a가 -50 이하인 종목 검색
2022-06-02
1348
글번호 159491