커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
7656
글번호 230811
지표

사공하늘 님에 의해서 삭제되었습니다.

프로필 이미지
사공하늘
2025-07-21
80
글번호 192623
검색
답변완료

문의 드립니다.

안녕하세요 항상 감사드립니다. 아래의 서식에서 추가 서식 부탁드립니다. *진입조건추가 1. 진입 수량 추가: 10계약 2. 전일 수익이 마이너스 일시 당일은 1/2로 줄여서(5계약) 진입, 당일도 마이너스이면 그 다음날도 같은 5계약(1/2)으로 진입 3. 전일 수익이 플러스 일때는 기존 계약 그대로 진입 (10계약) *전일 마이너스 수익이 나면 진입 규모를 1/2로 줄이고, 수익이 나면 기존 계약수 대로 진입하는 전략입니다. ** 진입 수량 추가가 어려우면 전일 마이너스 수익시 절반만 진입한다는 로직만 추가해주시면 됩니다. # KOSPI 선물 10분봉 input: 당일진입횟수(3); Input: chkP(3), reChkP(10), stopChk(20); var: HH(0), LL(0), BS(0), SS(0); var: dayChk(0); var : TotalCount(0),PreDay(0),DayEntry(0); TotalCount = TotalTrades; if Bdate != Bdate[1] Then PreDay = TotalCount[1]; DayEntry = (TotalCount-PreDay)+IFF(MarketPosition != 0,1,0); if BarIndex == 0 then ClearDebug(); if dayindex == chkP then { HH = Highest(Max(C,O), chkP+1); LL = Lowest(Min(C,O), chkP+1); #if date == 20240612 then messageLog("--HH %.2f, LL: %.2f", HH, LL); } #if High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then messageLog("HH %.2f, High: %.2f", HH, High); if DayIndex >= chkP # and Time < 95000 and sDate == NextBarSdate and EntryDate(0) < Date and EntryDate(1) < Date and DayEntry < 당일진입횟수 Then { Buy("B1", AtStop, HH); Sell("S1", AtStop, LL); } //if dayChk == 0 and High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then { // messageLog("HH %.2f, High: %.2f", HH, High); // dayChk = 1; //} if ExitDate(1) == Date and Time < 150000 // and LatestEntryName(1) != "B2" // and LatestEntryName(1) != "S2" // and LatestEntryName(0) != "B2" // and LatestEntryName(0) != "S2" Then { if DayIndex < reChkP Then { HH = Highest(Max(C,O), DayIndex+1); LL = Lowest(Min(C,O), DayIndex+1); } Else { HH = Highest(Max(C,O), reChkP); LL = Lowest(Min(C,O), reChkP); } if DayEntry < 당일진입횟수 Then { Buy("B2", AtStop, HH); Sell("S2", AtStop, LL); } } if (MarketPosition == 1) Then { if DayIndex < stopChk Then { BS = Lowest(Min(C,O), DayIndex+1); } Else { BS = Lowest(Min(C,O), stopChk); } ExitLong("EL", AtStop, BS); } if (MarketPosition == -1) Then { if DayIndex < stopChk Then { SS = Highest(Max(C,O), DayIndex+1); } Else { SS = Highest(Max(C,O), stopChk); } #messageLog(" SS %.2f", SS); ExitShort("ES", AtStop, SS); } var : month(0),nday(0),week(0),X(False); month = int(date/100)-int(date/10000)*100; nday = date - int(date/100)*100; Week = DayOfWeek(date); #만기일 if (month%3 == 0 and nday >= 8 and nday <= 14 and week == 4) then { X = true; SetStopEndofday(151500); } Else#만기일아닐때 { X = False; SetStopEndofday(152000); }
프로필 이미지
가자아이
2025-07-21
766
글번호 192618
지표
답변완료

수식부탁드립니다

20일선과 60일선의 골든과 데드를 기준으로 매수시 : 매수신호 캔들 최저가 라인과 수치표시 매도시 : 매도신호 캔들 최고가 라인과 수치표시
프로필 이미지
회원
2025-07-21
299
글번호 192616
시스템
답변완료

문의 드립니다.

안녕하세요 ~ 현재 가격이 아래의 강도파동 선을 돌파하는 검색식 부탁 드립니다. // 누적 거래량 계산 cumulative_buying = eavg(if(C>O, (((H-L)-(if(C>O,H-C,H-O)+if(C>O,O-L,C-L)))/(H-L) + ((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V, (((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V), cumulation_length); cumulative_selling = eavg(if(C<O, (((H-L)-(if(C>O,H-C,H-O)+if(C>O,O-L,C-L)))/(H-L) + ((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V, (((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V), cumulation_length); // 거래량 강도 파동의 EMA volume_strength = if(cumulative_buying > cumulative_selling, cumulative_buying, cumulative_selling); eavg(volume_strength, cumulation_length) 지표조건 cumulation_length 14 감사합니다.
프로필 이미지
ikksoo
2025-07-21
311
글번호 192613
검색
답변완료

시스템 부탁드립니다

1.테스트 1 - 월 1회 매수 진입 날짜(1-30일), 시간 랜덤으로해서 월 1회만 진입하도록 1회 진입이후 랜덤숫자 변경되도록 부탁드립니다. 2.테스트2 - 주 1회 매수 진입 진입 요일, 시간 랜덤으로, 1회 진입이후 랜덤숫자가 변경되도록 부탁드립니다.
프로필 이미지
소드노
2025-07-21
460
글번호 192612
시스템
답변완료

검색식 부탁합니다.

1. 전환선이 기준선을 골든크로스 할때 종목검색식 부탁드려요. 2. 전환선이 기준선 을 골든크로스 할때 (단, 0봉전~20봉전 모든종목) 검색식 부탁합니다. 3. 일봉 전환선이 주봉 20이평(단순)을 돌파할때 검색식 4. 일봉 기준선이 주봉 20이평(단순)을 돌파할때 검색식 5. 이격도 10 과 이격도 60이 1%이하로 근접하여 0기준선 돌파 할때 종목검색식 6. 이격도10 과 이격도 60이 1%이하로 근접한 종목검색식
프로필 이미지
일지매7
2025-07-21
384
글번호 192611
종목검색
답변완료

문의 드립니다.

아래 내용을 전환 가능한가요? 답변 감사합니다. src = close keyvalue = input(3, title = "Key Vaule. 'This changes the sensitivity'", step = .5) atrperiod = input(10, title="ATR Period") xATR = atr(atrperiod) nLoss = keyvalue * xATR xATRTrailingStop = 0.0 xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss), iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss), iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss))) pos = 0 pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1, iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0))) xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue plot(xATRTrailingStop, color = xcolor, title = "Trailing Stop")
프로필 이미지
alltoone
2025-07-21
441
글번호 192610
지표
답변완료

수식 부탁드립니다

지표식 부탁 드립니다. //@version=5 indicator("Cumulative Volume Delta", "CVD", format=format.volume) anchorInput = input.timeframe("1D", "Anchor period") lowerTimeframeTooltip = "The indicator scans lower timeframe data to approximate up and down volume used in the delta calculation. By default, the timeframe is chosen automatically. These inputs override this with a custom timeframe.₩n₩nHigher timeframes provide more historical data, but the data will be less precise." useCustomTimeframeInput = input.bool(false, "Use custom timeframe", tooltip = lowerTimeframeTooltip) lowerTimeframeInput = input.timeframe("1", "Timeframe") autoSwitchInput = input.bool(true, "Auto Switch Feature", tooltip="Turn on to automatically control visibility based on timeframe.") upAndDownVolume() => posVol = 0.0 negVol = 0.0 var isBuyVolume = true switch close > open => isBuyVolume := true close < open => isBuyVolume := false close > close[1] => isBuyVolume := true close < close[1] => isBuyVolume := false if isBuyVolume posVol += volume else negVol -= volume posVol + negVol var lowerTimeframe = switch useCustomTimeframeInput => lowerTimeframeInput timeframe.isseconds => "1S" timeframe.isintraday => "1" timeframe.isdaily => "5" => "60" diffVolArray = request.security_lower_tf(syminfo.tickerid, lowerTimeframe, upAndDownVolume()) getHighLow(arr) => float cumVolume = na float maxVolume = na float minVolume = na for item in arr cumVolume := nz(cumVolume) + item maxVolume := math.max(nz(maxVolume), cumVolume) minVolume := math.min(nz(minVolume), cumVolume) [maxVolume, minVolume, cumVolume] [maxVolume, minVolume, lastVolume] = getHighLow(diffVolArray) var cumulLastVolume = 0.0 anchorChange = timeframe.change(anchorInput) or (not na(lastVolume) and na(lastVolume[1])) cumulOpenVolume = anchorChange ? 0.0 : cumulLastVolume[1] cumulMaxVolume = cumulOpenVolume + maxVolume cumulMinVolume = cumulOpenVolume + minVolume cumulLastVolume := cumulOpenVolume + lastVolume var float cumVolLine = na cumVolLine := cumulLastVolume // Determine if the current timeframe is intraday or daily and above is_intraday = timeframe.isintraday // Determine what to plot based on auto switch setting plotCVD = autoSwitchInput ? is_intraday : true // Plotting with color change based on value plot(plotCVD ? cumVolLine : na, title="Cumulative Volume Delta", color=cumVolLine >= 0 ? color.green : color.red, linewidth=2) hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dotted)
프로필 이미지
사노소이
2025-07-21
973
글번호 192609
지표
답변완료

안녕하세요. 슈퍼트렌드 시스템트레이딩 부탁드립니다.

/*최근 가장 인기 있는 지표 중 하나인 SuperTrend 지표를 이용한 전략으로 종가가 SuperTrend 상단 채널을 상향돌파하면 매수하고, 종가가 SuperTrend 하단 채널을 하향이탈하면 매도하는 전략입니다. 추세추종형 전략으로 큰 추세가 잘 나오는 전략에 유용합니다.*/ input : 투자금액(1000000); input : factor(3), AtrPeriod(10); Var : 누적자산(0), 수량(0); var : src(0), AtrV(0),upperBand(0),lowerBand(0), prevLowerBand(0), prevUpperBand(0); var : prevSuperTrend(0), superTrend(C), direction(0),alpha(0),source(0); 누적자산 = 투자금액 + netprofit; 수량 = int(투자금액/Close); if CurrentBar > 1 Then { src = (H+L)/2; alpha = 1 / AtrPeriod ; source = max(high - low, abs(high - close[1]), abs(low - close[1])); ATrV = alpha * source + (1 - alpha) * ATrV[1]; //지수가중이평방식 upperBand = src + factor * AtrV; lowerBand = src - factor * AtrV; prevLowerBand = lowerBand[1]; prevUpperBand = upperBand[1]; if lowerBand > prevLowerBand or close[1] < prevLowerBand Then lowerBand = lowerBand; Else lowerBand = prevLowerBand; if upperBand < prevUpperBand or close[1] > prevUpperBand Then upperBand = upperBand; Else upperBand = prevUpperBand; if C > UpperBand Then direction = 1; if C < LowerBand Then direction = -1; if direction == 1 Then supertrend = lowerband; Else supertrend = upperband; } # 매수 if CrossUp(C, upperBand) Then Buy("Buy", OnClose, Def, 수량); # 매수청산 if CrossDown(C, lowerBand) Then ExitLong("EL"); 안녕하세요. 예스스탁 대표님께서 만들어주신 슈퍼트렌드 시스템 트레이딩 코딩인데 여기서 투자금액이랑 수량은 빼고 선물에 적용하고싶어 매수,매도 다 되는 코딩으로 만들어주시면 감사하겠습니다!
프로필 이미지
최태수
2025-07-20
1156
글번호 192608
시스템