커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

잼스딘 님에 의해서 삭제되었습니다.

프로필 이미지
잼스딘
2025-10-26
40
글번호 227300
종목검색
답변완료

수식 부탁드립니다

지표식 부탁 드립니다. //@version=5indicator('DFT', overlay=true)import jdehorty/KernelFunctions/2 as kernel// INPUTSN = input.int(10,"Fourier Period")xval = input.source(close,"Fourier X Series",tooltip = "i.e. the source of the discrete Fourier"+ " transform (with the Y Series being the bars through time.)")highlighting = input.bool(true,"Highlighting")smoothing = input.int(10,"Kernel Smoothing")DFT(x, y, Nx, _dir) => float _arg = 0.0 float _cos = 0.0 float _sin = 0.0 float xArr_i = 0.0 float yArr_i = 0.0 xArr = array.new_float(array.size(x)) yArr = array.new_float(array.size(y)) for i = 0 to Nx - 1 by 1 xArr_i := 0.0 yArr_i := 0.0 kx = float(i) / float(Nx) _arg := -_dir * 2 * math.pi * kx for k = 0 to Nx - 1 by 1 _cos := math.cos(k * _arg) _sin := math.sin(k * _arg) xArr_i += array.get(x, k) * _cos - array.get(y, k) * _sin yArr_i += array.get(x, k) * _sin + array.get(y, k) * _cos yArr_i array.set(xArr, i, xArr_i) array.set(yArr, i, yArr_i) if _dir == 1 for i = 0 to Nx - 1 by 1 array.set(x, i, array.get(xArr, i) / float(Nx)) array.set(y, i, array.get(yArr, i) / float(Nx)) else for i = 0 to Nx - 1 by 1 array.set(x, i, array.get(xArr, i)) array.set(y, i, array.get(yArr, i))// CALCULATIONS// Fourier transformx = array.new_float(N, 0.0)y = array.new_float(N, 0.0)for i = 0 to N - 1 array.set(x, i, xval[i]) array.set(y, i, 0.0)DFT(x, y, N, 1)mag = array.new_float(N, 0.0)for i = 0 to N - 1 mag_i = math.sqrt(math.pow(array.get(x, i), 2) + math.pow(array.get(y, i), 2)) array.set(mag, i, mag_i)dft = array.get(mag,0)dfts = kernel.rationalQuadratic(dft,25,1,smoothing)// DISPLAYft = plot(dft, "DFT", color= color.white)fts = plot(dfts, "Smoothing", color = dfts > dft ? color.red : color.lime)fill(ft,fts,color = highlighting and dfts > dft ? color.new(color.red,75) : highlighting and dfts < dft ? color.new(color.lime,75) : na)
프로필 이미지
사노소이
2025-10-25
786
글번호 227298
지표
답변완료

부탁드립니다

수고하십니다아래수식을 오류 없게 수정부탁드립니다Inputs: PivotLength(10), TrendLength(50), ShowProfile(true), ColorUp(Blue), ColorDn(Red);Variables: PH(0), PL(0), HighestH(0), LowestL(0), TrendLine(0), ATRValue(0), IsTrendUp(false), PivotDetected(false), StartBar(0), TopPrice(0), BotPrice(0), Levels(0), StepSize(0), i(0), k(0), MidPrice(0), POCPrice(0), POCVolume(0), CurrentColor(0);Arrays: VolumeBins[1000](0);// ATR 계산ATRValue = Average(TrueRange, 200) * 0.1;// Pivot 감지PH = 0;PL = 0;// Pivot High 감지if High[PivotLength] = Highest(High, 2 * PivotLength + 1) then PH = High[PivotLength];// Pivot Low 감지if Low[PivotLength] = Lowest(Low, 2 * PivotLength + 1) then PL = Low[PivotLength];// 트렌드 계산HighestH = Highest(High, TrendLength);LowestL = Lowest(Low, TrendLength);TrendLine = (HighestH + LowestL) / 2;// 트렌드 방향 결정if High = HighestH then IsTrendUp = true;if Low = LowestL then IsTrendUp = false;// 색상 설정if IsTrendUp = false then CurrentColor = ColorUpelse CurrentColor = ColorDn;// Pivot 감지PivotDetected = false;if IsTrendUp = false then begin if PH > 0 then PivotDetected = true;end else begin if PL > 0 then PivotDetected = true;end;// Volume Profile 계산if CurrentBar - PivotLength - StartBar > PivotLength then begin if PivotDetected then begin StartBar = CurrentBar - PivotLength; // 경계 설정 TopPrice = High; BotPrice = Low; for i = 0 to PivotLength * 2 begin if High[i] > TopPrice then TopPrice = High[i]; if Low[i] < BotPrice then BotPrice = Low[i]; end; // 레벨 계산 Levels = (TopPrice - BotPrice) / ATRValue; StepSize = (TopPrice - BotPrice) / Levels; // Volume Bins 초기화 for k = 0 to Levels begin VolumeBins[k] = 0; end; // Volume 수집 for i = 0 to PivotLength * 2 begin for k = 0 to Levels begin MidPrice = BotPrice + StepSize * k + StepSize / 2; if AbsValue(MidPrice - Close[i]) <= StepSize * 2 then VolumeBins[k] = VolumeBins[k] + Volume[i]; end; end; // POC (Point of Control) 찾기 POCVolume = 0; POCPrice = 0; for k = 0 to Levels begin if VolumeBins[k] > POCVolume then begin POCVolume = VolumeBins[k]; POCPrice = BotPrice + StepSize * k + StepSize / 2; end; end; end;end;// 플롯Plot1(TrendLine, "Trend");if ShowProfile thenPlot2(POCPrice, "POC Level");// 색상 적용SetPlotColor(1, CurrentColor);SetPlotWidth(1, 4);if ShowProfile then begin SetPlotColor(2, CurrentColor); SetPlotWidth(2, 1);end;
프로필 이미지
파생돌이
2025-10-25
628
글번호 227297
지표

보글 님에 의해서 삭제되었습니다.

프로필 이미지
보글
2025-10-25
1
글번호 227295
지표

파생돌이 님에 의해서 삭제되었습니다.

프로필 이미지
파생돌이
2025-10-25
2
글번호 227294
지표

탱탱볼 님에 의해서 삭제되었습니다.

프로필 이미지
탱탱볼
2025-10-25
71
글번호 227293
지표
답변완료

시스템식 및 종목 검색식 3가지 질문 드립니다.

안녕하세요항상 빠른 답변 감사 드립니다 3가지 질문을 드립니다. 1번 아래 식을 피라미딩 입력값에 따라 진입이 가능하게 요청 드립니다. 퍼센트 간격은 0.5, 1, 2 ,4, 8 ,16 ~~ 투입 금액도 1, 2, 4, 8 ~~ 진입식 퍼센트 , 금액은 무한 증분 이지만 피라미딩 입력 횟수값(2회~5회)으로 사용하려고 합니다.간격 및 증분에 대한 질문에 오류가 있다면 구현 가능한 선에서 지도 편달 요청 드립니다.// 진입 input : threshold_percent(0.5); input : additional_long__percent(0.5); input : additional_short_rise_percent(0.5); var : threshold(0),addLong(0),addShortRise(0); var : longCondition(False),shortCondition(False); var : longAddCondition(False),shortAddCondition(False); var : hasLongPosition(False),hasShortPosition(False); threshold = threshold_percent / 100.0; addLong = additional_long__percent / 100.0; addShortRise = additional_short_rise_percent / 100.0; longCondition = DHL2 >= low and (CrossUp(low, var1) or CrossUp(low, var2) or CrossUp(low, var5)) and low <= DHL2 * (1 - threshold); shortCondition = DHL2 < low and (CrossDown(high, var1) or CrossDown(high, var2) or CrossDown(high, var5)) and low > DHL2 * (1 + threshold); // 추가 롱 조건: 롱 포지션 중 진입가 대비 추가 하락 시 및 롱 신호 longAddCondition = (MarketPosition > 0) and (close <= entryPrice * (1 - addLong)) and longCondition; // 추가 숏 조건: 숏 포지션 중 진입가 대비 추가 상승 시 및 숏 신호 shortAddCondition = (MarketPosition < 0) and (close >= entryPrice * (1 + addShortRise)) and shortCondition; hasLongPosition = MarketPosition > 0; hasShortPosition = MarketPosition < 0; // 포지션 없을 때만 기존 롱/숏 Condition으로 진입 if (hasLongPosition == False and longCondition) Then Buy("Long"); if (hasShortPosition == False and shortCondition) Then Sell("Short"); // 롱 포지션 보유 시 추가 롱 진입 조건만 실행 if (MarketPosition > 0 and MaxEntries == 1) Then { if (longAddCondition) then { Buy("물Long"); } } if (MarketPosition < 0 and MaxEntries == 1) Then { if (shortAddCondition) Then { Sell("불Short"); } } 2번 시스템식 시험적용시 날짜 및 시간을 입력하여 적용 날짜 및 시간을 적용 하고자 합니다. 관련 식을 요청 드립니다.3번 종목 검색에서 아래와 같이 년봉 기준으로 검색을 하고자 합니다. 년저[2] > 년저[1] < 년저Ps. 수식 작성 예제 링크 오류 수정 요청 드립니다. https://www.yesstock.com/YesTrader/YesLanguage/YesLanguage_help.html그럼 좋은 하루 되세요
프로필 이미지
느와르
2025-10-24
1448
글번호 227292
지표
답변완료

함수 요청드립니다.

안녕하세요. 피라미딩으로 여러차례 매수진입 할 때 진입시 지수의 평균을 반환하는 함수가 있을지요?avgentryprice > C 와 같이 수식에 넣어보았더니 생각했던 신호가 나오지 않는데 요,avgentryprice 대신 넣을수 있는 함수가 무엇이 있는지 궁금합니다.항상 감사드립니다.
프로필 이미지
트레이더365
2025-10-24
272
글번호 227291
시스템
답변완료

부탁드립니다

emaValue = eavg(c,length);//EMA계산 correction = C+ (C-emaValue);//보정값 zlma = eavg(correction,length);//ZLMA계산 G=Valuewhen(1,(Crossup(ZLMA,emaValue) or Crossdown(ZLMA,emaValue)),zlma ) 지표조건 length 14 G지표값 10%이상 하락했다 N일전에 하락한 지표값이 오늘까지 유지중인 검색식 부탁드립니다 예)N일전은 5일전 6일전 7일전 등등 사용 가능한 수식으로 부탁드립니다
프로필 이미지
님이랑
2025-10-24
333
글번호 227290
종목검색