커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3498
글번호 230811
답변완료
시스템 식 질문 드립니다.
안녕하세요?
시스템식 여쭤 봅니다~
1분봉에서 매매 예정입니다.
일봉상 전일 상한가
매수는
1차매수 오늘 시초가 에 30%
2차매수는 시초가 -2% 에 30%
3차매수는 시초가 -4% 에 40%
매수가 일어나는 시간은 오전 9시부터 오후1시 사이
매도는
매수시점부터 10분후 현재남은 물량의 30% 매도
15분후 현재남은 물량의 50% 매도
20분후 현재남은 물량의 50% 매도
25분후 현재남은 물량의 50% 매도
30분후 현재남은 물량 전부 매도
매수후 5% 상승시 현재물량의 50% 매도
매수후 10% 상승시 남은 전체 매도
매수후 5% 상승했다가 2% 까지 떨어지면 전체매도
손절은!
매수후 -10% 남은 물량의 50% 매도
매수후 -15% 전체 손절
청산은!
당일 15시10분 전부 매도
이상입니다.
감사합니다~
2021-02-25
651
글번호 146660
답변완료
문의드립니다.
아래수식을 예스로 부탁합니다.
amplitude = input(title="Amplitude", defval=2)
channelDeviation = input(title="Channel Deviation", defval=2)
showArrows = input(title="Show Arrows", defval=true)
showChannels = input(title="Show Channels", defval=true)
var int trend = 0
var int nextTrend = 0
var float maxLowPrice = nz(low[1], low)
var float minHighPrice = nz(high[1], high)
var float up = 0.0
var float down = 0.0
float atrHigh = 0.0
float atrLow = 0.0
float arrowUp = na
float arrowDown = na
atr2 = atr(100) / 2
dev = channelDeviation * atr2
highPrice = high[abs(highestbars(amplitude))]
lowPrice = low[abs(lowestbars(amplitude))]
highma = sma(high, amplitude)
lowma = sma(low, amplitude)
if nextTrend == 1
maxLowPrice := max(lowPrice, maxLowPrice)
if highma < maxLowPrice and close < nz(low[1], low)
trend := 1
nextTrend := 0
minHighPrice := highPrice
else
minHighPrice := min(highPrice, minHighPrice)
if lowma > minHighPrice and close > nz(high[1], high)
trend := 0
nextTrend := 1
maxLowPrice := lowPrice
if trend == 0
if not na(trend[1]) and trend[1] != 0
up := na(down[1]) ? down : down[1]
arrowUp := up - atr2
else
up := na(up[1]) ? maxLowPrice : max(maxLowPrice, up[1])
atrHigh := up + dev
atrLow := up - dev
else
if not na(trend[1]) and trend[1] != 1
down := na(up[1]) ? up : up[1]
arrowDown := down + atr2
else
down := na(down[1]) ? minHighPrice : min(minHighPrice, down[1])
atrHigh := down + dev
atrLow := down - dev
ht = trend == 0 ? up : down
var color buyColor = color.blue
var color sellColor = color.red
htColor = trend == 0 ? buyColor : sellColor
htPlot = plot(ht, title="HalfTrend", linewidth=2, color=htColor)
atrHighPlot = plot(showChannels ? atrHigh : na, title="ATR High", style=plot.style_circles, color=sellColor)
atrLowPlot = plot(showChannels ? atrLow : na, title="ATR Low", style=plot.style_circles, color=buyColor)
fill(htPlot, atrHighPlot, title="ATR High Ribbon", color=sellColor)
fill(htPlot, atrLowPlot, title="ATR Low Ribbon", color=buyColor)
buySignal = not na(arrowUp) and (trend == 0 and trend[1] == 1)
sellSignal = not na(arrowDown) and (trend == 1 and trend[1] == 0)
plotshape(showArrows and buySignal ? atrLow : na, title="Arrow Up", style=shape.triangleup, location=location.absolute, size=size.tiny, color=buyColor)
plotshape(showArrows and sellSignal ? atrHigh : na, title="Arrow Down", style=shape.triangledown, location=location.absolute, size=size.tiny, color=sellColor)
alertcondition(buySignal, title="Alert: HalfTrend Buy", message="HalfTrend Buy")
alertcondition(sellSignal, title="Alert: HalfTrend Sell", message="HalfTrend Sell")
2021-02-25
726
글번호 146659
답변완료
참조데이터
또...
감사합니다.
선물 분봉(틱)챠트에서
1. 참조데이터(프로그램 순매수금액)을 기준선 0을 기준으로 막대그래프로 나타내고자합니다.
기준선 0 위에는 붉은색, 0선아래엔 파란색
2. 참조데이터(선물외국인 순매수량)을 기준선 0을 기준으로 막대그래프로 나타내고자합니다.
기준선 0 위에는 붉은색, 0선아래엔 파란색
행복한 주말 보내세요.
2021-02-25
665
글번호 146658
크라켄 님에 의해서 삭제되었습니다.
2021-02-26
12
글번호 146656
dunhill 님에 의해서 삭제되었습니다.
2021-02-25
5
글번호 146654
답변완료
N일간 N거래대금 이상인 거래일이 N회 이상인 종목
감사합니다
전일기준
N일간
N거래대금 이상인 거래일이
N회 이상인 종목
예)
전일기준
60일간 거래대금이
백억이상이었던 날이 3회 이상인 종목을 찾는 검색식을 부탁합니다
2021-02-25
811
글번호 146649
답변완료
감사합니다....복받으실꺼에요~~~
안녕하세요?
늘 감사합니다.
문의 드립니다.
1.
아래 수식중 진입신호에 의해 진입된후
청산식에서
다음봉이 진행중일 때 강제 청산처럼 바로 해당비율로 청산되는 식으로 변경 부탁드립니다.
지금상태는 진입후 다음봉이 완성되고, 다음 봉에서 청산됩니다. 해서 수익이 발생해도 봉이 완성되지 않아 손실로 마무리 되는 경우가 있습니다.
고맙습니다.
2.
1일 1회로 진입제한이 되어 있는데,
전략에 보여지는 봉수(300) 안에 24일날 진입청산이 되어 있으면 25일 진입을 하지 않습니다.
그렇다고 전략의 봉의 갯수를 줄이면 전일 종가가 전략에 표시되지않아 다른곳에서 진입을 합니다.
해결 방법이 없을까요?
var: T1(0),ENTRY(0);
if Bdate != Bdate[1]Then
T1 = TotalTrades[1];
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = TotalTrades-T1+1;
////////////////////////////////////////////
Input : shortPeriod(5), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
if DayOpen >= DayClose(1) and Value1 < c Then
{
if entry < 1 Then
Buy("매수");
Else ExitShort();
}
# 매도청산
If CrossDown(c , value1) Then
{
if entry < 1 Then
Sell("매도");
Else ExitLong();
}
if MarketPosition == 1 Then
{
ExitLong("bx1",AtStop,EntryPrice*1.03,"",Floor(MaxContracts*0.25),1);
ExitLong("bx2",AtStop,EntryPrice*1.04,"",Floor(MaxContracts*0.25),1);
ExitLong("bx3",AtStop,EntryPrice*1.05,"",Floor(MaxContracts*0.25),1);
ExitLong("bx4",AtStop,EntryPrice*1.06,"",Floor(MaxContracts*0.25),1);
ExitLong("bx5",AtStop,EntryPrice*1.07);
if Highest(H,BarsSinceEntry) >= EntryPrice*1.01 Then
ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)*0.96);
}
2021-02-25
977
글번호 146648
답변완료
지표 질문입니다
바닥 포함 7캔들 고가를 그린다
천정 포함 7캔들 저가를 그린다
7캔들내 음봉 고가 가운데 2번째 높은 음봉 고가를 그린다
7캔들내 천정 포함 우측으로 3번째 음봉 고가를 그린다
7캔들내 양봉 저가 가운데 2번째 낮은 양봉 저가를 그린다
7캔들내 바닥 포함 우측으로 3번째 양봉 저가를 그린다
감사합니다
2021-02-25
841
글번호 146642
답변완료
문의 2가지
첫번째)
kospi선물
if 미결제 이동평균선 5 crosss up 미결제 이동평균선 10 and
거래량 이동평균선 5 crosss up 거래량 이동평균선 10 then
buy();
두번째)
첨부파일은 아래수식으로 시뮬레이션한 결과입니다.
리버스 거래를 원해서 조합해보았는데
buy는 피라미딩이 3개가 되는데
sell 진입은 피라미딩이 되지 않습니다.
동일한 컨셉의 리버스 거래를 원합니다.
수식 살펴주세요.
input : 일(0.30),이(0.30),삼(0.30);
input : 사(0.30),오(0.30),육(0.30);
var : b1(0,Data2),b2(0,data3),gap1(0,Data2);
b1 = Data2((C-CloseD(1))/CloseD(1)*100);
b2 = Data3((C-CloseD(1))/CloseD(1)*100);
gap1 = b1-b2;
if MarketPosition == 0 and gap1 > 일 then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then
buy("b2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then
buy("b3");
if MarketPosition == 0 and gap1 < 사 then
Sell("s1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 < 오 then
Sell("s2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 < 육 then
Sell("s3");
2021-02-25
750
글번호 146641