커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

문의드립니다.

매번 감사합니다. 1. 시뮬레이션 차트에서 되는 코드 변환 부탁드립니다. inputs: OverBoughtLevel( 80 ), OverSoldLevel( 20 ), EnhanceResolution( false ) ; variables: AvgLength( 3 ), M( 0 ), N( 0 ), X( 0 ), Y( 0 ), alpha1( 0 ), HP( 0 ), a1( 0 ),b1( 0 ), c1( 0 ), c2( 0 ), c3( 0 ), Filt( 0 ), Lag( 0 ), count( 0 ), Sx( 0 ), Sy( 0 ), Sxx( 0 ), Syy( 0 ), Sxy( 0 ), Period( 0 ), Sp( 0 ), Spx( 0 ), MaxPwr( 0 ), PeakPwr( 0 ), DominantCycle( 0 ), CCIValue( 0 ) ; arrays: Corr[70]( 0 ), CosinePart[70]( 0 ), SinePart[70]( 0 ),SqSum[70]( 0 ), R[70, 2]( 0 ), Pwr[70]( 0 ) ; //Highpass Filter and SuperSmoother //Filter together form a Roofng Filter //Highpass Filter alpha1 = ( 1 - Sine ( 360 / 48 ) ) / Cosine( 360 / 48 ) ; HP = .5 * ( 1 + alpha1 ) * ( Close - Close[1] ) + alpha1 * HP[1] ; //Smooth with a SuperSmoother Filter a1 = ExpValue( -1.414 * 3.14159 / 8 ) ; b1 = 2 * a1 * Cosine( 1.414 * 180 / 8 ) ; c2 = b1 ; c3 = -a1 * a1 ; c1 = 1 - c2 - c3 ; Filt = c1 * ( HP + HP[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2] ; //Pearson correlation for each value of lag for Lag = 0 to 48 begin //Set the averaging length as M M = AvgLength ; If AvgLength = 0 then M = Lag ; Sx = 0 ; Sy = 0 ; Sxx = 0 ; Syy = 0 ; Sxy = 0 ; for count = 0 to M - 1 begin X = Filt[count] ; Y = Filt[Lag + count] ; Sx = Sx + X ; Sy = Sy + Y ; Sxx = Sxx + X * X ; Sxy = Sxy + X * Y ; Syy = Syy + Y * Y ; end ; if ( M * Sxx - Sx * Sx ) * ( M * Syy - Sy * Sy ) > 0 then Corr[Lag] = ( M * Sxy - Sx * Sy ) / SquareRoot( ( M * Sxx - Sx * Sx ) * ( M * Syy - Sy * Sy ) ) ; end ; //Compute the Fourier Transform for each Correlation for Period = 8 to 48 begin CosinePart[Period] = 0; SinePart[Period] = 0; For N = 3 to 48 Begin CosinePart[Period] = CosinePart[Period] + Corr[N]*Cosine(360*N / Period); SinePart[Period] = SinePart[Period] + Corr[N]*Sine(360*N / Period); End; SqSum[Period] = CosinePart[Period]*CosinePart[Period] + SinePart[Period]*SinePart[Period]; End ; For Period = 8 to 48 Begin R[Period, 2] = R[Period, 1]; R[Period, 1] = .2*SqSum[Period]*SqSum[Period] + .8*R[Period,2]; End; //Find Maximum Power Level for Normalization MaxPwr = 0; For Period = 8 to 48 begin If R[Period, 1] > MaxPwr then MaxPwr = R[Period, 1]; End; For Period = 8 to 48 Begin Pwr[Period] = R[Period, 1] / MaxPwr; End; //Optionally increase Display Resolution //by raising the NormPwr to a higher //mathematically power (since the maximum //amplitude is unity, cubing all //amplitudes further reduces the smaller ones). If EnhanceResolution = True then Begin For Period = 8 to 48 Begin Pwr[Period] = Power(Pwr[Period], 3); End; End; //Compute the dominant cycle using //the CG of the spectrum DominantCycle = 0; PeakPwr = 0; For Period = 8 to 48 Begin If Pwr[Period] > PeakPwr then PeakPwr = Pwr[Period]; End; Spx = 0; Sp = 0; For Period = 8 to 48 Begin If PeakPwr >= .25 and Pwr[Period] >= .25 then Begin Spx = Spx + Period*Pwr[Period]; Sp = Sp + Pwr[Period]; End; End; If Sp <> 0 then DominantCycle = Spx / Sp; If Sp < .25 then DominantCycle = DominantCycle[1]; if DominantCycle < 1 then DominantCycle = 1 ; CCIValue = CCI( Ceiling( DominantCycle ) ); if CCIValue crosses under OverBoughtLevel then Buy next bar at Market else if CCIValue crosses over OverSoldLevel then SellShort next bar at Market ; Print( Bardatetime.ToString(), " | ", Ceiling( DominantCycle ) ) ;
프로필 이미지
잡다백수
2018-02-20
293
글번호 116747
시스템
답변완료

MACD line

안녕하세요? MACD 지표인데요 라인을 상방향 붉은색 하락방향 파란색으로 표기하고 싶습니다. 먼저 감사드립니다. Input : shortPeriod(12), longPeriod(26), Period(9); Var : value(0) , macdosc(0) ; value = MACD(shortPeriod, longPeriod); macdosc = value-ema(value,Period); Plot1(value, "MACD"); Plot2(ema(value,Period), "MACDSignal"); PlotBaseLine1(0, "기준선1");
프로필 이미지
포보스
2018-02-20
171
글번호 116741
지표

영구없다 님에 의해서 삭제되었습니다.

프로필 이미지
영구없다
2018-02-20
3
글번호 116737
시스템
답변완료

수식 부탁 드립니다.

안녕하세요. 15분봉에서 피보나치 조정대를 표시 하려고 합니다. 피보나치 비율은 50.00, 61.80 두개만 표시되면 됩니다. 피보나치의 저점부터 고점까지의 표시는 아래 구간에만 표시되면 좋겠습니다. --저점 StartDate : [일봉]에서 거래량이 500,000주 이상 발생 StartTime : StartDate의 0900 이후 저점 --고점 EndtDate : [15분봉]에서 볼벤상단20,2 가 볼벤상단30,2를 데드크로스 EndTime : EndtDate의 장종료까지 고점 감사합니다.
프로필 이미지
올페
2018-02-20
171
글번호 116735
종목검색
답변완료

수식 문의 드립니다.

재 문의 드립니다.. 그러면 시가 가 20일선 위에 있고 1틱아래 저가가 발생하면 그 1틱아래저가에서 매도...생기지 않으면 다음봉들중 20일선 위에서 저가가 생기는 봉의 1틱 아래 저가에서 매도는 가능할지요? ...
프로필 이미지
고구미
2018-02-20
154
글번호 116730
시스템
답변완료

에러 수정 부탁드립니다.

385줄에서 에러가 나는데 이유를 못 찾겠습니다. if MarketPosition == -1 and EntryPrice-3.1>c and data2-data3>700 and data4-data5>100 and data6-data7>150 and data2>200 and data3<-200 and data6>100 and data7<100 Then ExitShort();
프로필 이미지
몸통공격
2018-02-20
174
글번호 116721
시스템
답변완료

문의드립니다.

도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 기타 코딩 문의드립니다. 당일 리버스진입을 생각해보니 경우의 수가 상당히 많더라구요. 아래 제 질문을 비롯해서 몇가지 것들 검색해서 정리해봤는데도 잘 이해는 가지 않습니다. PositionProfit(1) ( 직전거래 손익액이)0보다 크다로 이전 거래 손실인 지 이익인 지 나누는 건 알겠는데요. 직전 거래가 매수로 이익인 지 매도로 이익인지는 뭘로 나누는 지요. 매수 손익시 매수진입가능 매도진입가능 매수 손익시 매수진입불가 매도진입가능 매수 손익시 매수진입가능 매도진입불가 etc..... /질문들 input : entryCount(2); var : count(0),Bcond(false),Scond(false) ; #진입회수제한 Count = 0 ; for Value1 = 0 to 10 { if EntryDate( Value1 ) == sdate then Count = Count + 1; } Bcond = MarketPosition == 0 and ExitDate(1) == sdate and PositionProfit(1) > 0 and MarketPosition(1) == -1; Scond = MarketPosition == 0 and ExitDate(1) == sdate and PositionProfit(1) > 0 and MarketPosition(1) == -1; if Count < entryCount then { if 매수조건 and Bcond == false Then buy(); if 매도조건 and Scond == false Then sell(); } 안녕하세요 예스스탁입니다. var : Bcnt(0),Scnt(0),Bcond(false),Scond(False); if Bdate != bdate[1] Then{ Bcnt = 0; Scnt = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] Then Bcnt = Bcnt+1; if MarketPosition == -1 and MarketPosition != MarketPosition[1] Then Scnt = Scnt+1; Bcond = MarketPosition == 0 and ExitDate(1) == sdate and PositionProfit(1) < 0 and MarketPosition(1) == -1; Scond = MarketPosition == 0 and ExitDate(1) == sdate and PositionProfit(1) < 0 and MarketPosition(1) == -1; if 매수조건 and Bcnt < 2 and Bcond == false Then buy(); if 매도조건 and Scnt < 2 and Scond == false Then sell(); /
프로필 이미지
잡다백수
2018-02-20
180
글번호 116720
시스템
답변완료

부탁드립니다

현상태의 그물망차트에서 최고값 최저값 1/4(25%), 2/4(50%),3/4(75%)에 줄을 긋고 싶습니다 부탁드립니다.
프로필 이미지
마르뚝
2018-02-20
162
글번호 116714
지표

회원 님에 의해서 삭제되었습니다.

프로필 이미지
회원
2018-02-20
28
글번호 116713
강조