커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

와우리 님에 의해서 삭제되었습니다.

프로필 이미지
와우리
2025-04-28
43
글번호 190482
시스템
답변완료

분봉 일봉 합치기...

아직 초보라 질문 드립니다... 아래 예시를 예스트레이더로 짜주실 수 있나요? (분봉, 일봉 혼합) (1) 삼성전자라는 종목을 (2) 일봉상 정배열이고, (5분봉 > 20분봉 > 60분봉) (3) 5분봉상 RSI가 30 이하일 때 (4) 매수
프로필 이미지
낭만낑깡
2025-04-28
251
글번호 190481
시스템
답변완료

안녕하세요 진입 청산 각각 부탁 드립니다 1 if CrossUP(A,B) buy("B"); 2 if CrossUP(C,D) buy("BB"); 1에 대한 청산과 2에 대한 청산 입니다
프로필 이미지
이광복
2025-04-28
250
글번호 190480
시스템
답변완료

시스템 진입신호시간과 스탑로스

input : short(12),long(26),sig(9); var : S1(0),D1(0),TM(0),EP1(0),EP2(0),EP3(0); var : macdv(0,Data1),macds(0,Data1); var : macdv1(0,Data2),macds1(0,Data2); var : macdv2(0,Data3),macds2(0,Data3); macdv = data1(macd(short,long)); macds = data1(Ema(macdv,sig)); macdv1 = data2(macd(short,long)); macds1 = data2(Ema(macdv1,sig)); macdv2 = data3(macd(short,long)); macds2 = data3(Ema(macdv2,sig)); if MarketPosition <= 0 and CrossUp(MACDV,0) and MACDV1 > 0 and MACDV2 > 0 Then Buy(); if MarketPosition >= 0 and CrossDown(MACDV,0) and MACDV1 < 0 and MACDV2 < 0 Then Sell(); if MarketPosition == 1 and CrossDown(MACDV,0) Then ExitLong(); if MarketPosition == -1 and CrossUp(MACDV,0) Then ExitShort(); input : 당일청산시간(020000),익절틱수(100),손절틱수(100),최소수익틱수(30),이익보존틱수(10); if sDate != sDate[1] Then SetStopEndofday(055000); if Bdate != Bdate[1] Then SetStopEndofday(0); if MarketPosition == 1 Then { if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*최소수익틱수 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*이익보존틱수); } if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*최소수익틱수 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*이익보존틱수); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------------------------------------------------------------------------ &&&위 시스템코딩 작성에 감사드리며 변수에보면 익절틱,손절틱,최소틱,이익보존틱 총4개로 돼있어 좀어렵습니다 트레일링스탑으로 수정이 나을것 같습니다 50틱 수익을바란다면 70틱에감시를해놓고 20틱하락이런식으로 손절틱,감시틱,되돌림틱, 현재 분봉3개혼합입니다 진입분봉 데이터분봉2개 macd 0선이상이상 일치전략입니다 데이터분봉에 매수시는 macd골든크로스 상태 매도시는 데드크로스 상태 추가요 <5분봉 0선돌파 30분봉60분봉 0선위에있으나 데드크로스진행은 비추세로보고 진입시점아님 5분봉 0선돌파 30분봉60분봉 0선위에 있고 골든크로스진행은 추세로보고 진입시점 매도는 위의 내용 반대입니다> 지금 당일청산기능과 다른주기데이터조합은 유용합니다 해외선물은 23시간 횡보낮시간에 피하고자 당일청산시간같은 진입도 시작시간 추가가 가능한지 문의드립니다 감사합니다
프로필 이미지
주꼬보이
2025-04-29
300
글번호 190479
시스템
답변완료

문의드립니다

Print( "종가.csv" , ",%.f" , C ); 명령어에서 종목이름(또는 종목번호)을 자동적으로 넣어 종가를 받을때 구분하고싶습니다 차트 분할틀 6X6 콜옵션 36개를 세팅한 다음 지표 전체 적용을 하여 한번에 종가를 받고싶습니다 감사합니다
프로필 이미지
여름가을
2025-04-28
281
글번호 190478
지표
답변완료

지표 변환 문의드립니다.

귀사의 무궁한 발전을 기원합니다 안녕하세요,수고 많으십니다 트레이딩뷰 지표 변환해 주시면 대단히 감사하겠습니다. 주석이 좀 많네요. 챠트상에 봉그리기 비쥬얼은 구현하기 힘들면 넘어가시고, 매수,매도 신호만 ▲, ▼ 이런식으로 넣어 주시면 안될까요. 글자가 깨지면 수식은 첨부화일에 있어요. +++++++++ //@version=6 indicator(title="Adaptive Trend Flow [QuantAlgo]", overlay=true, max_labels_count=500) // &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559; // // &#9553; USER-DEFINED SETTINGS &#9553; // // &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565; // // Input Groups var string trend_settings = "&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552; Trend Settings &#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;" var string visual_settings = "&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552; Visualization Settings &#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;" // Tooltips tooltip_length = "Length of the trend calculation period. Higher values create smoother signals." tooltip_smooth = "Smoothing period for volatility. Higher values reduce noise." tooltip_sens = "Multiplier for volatility bands. Higher values create wider bands." tooltip_bars = "Enable/disable bar coloring based on trend direction" tooltip_bg = "Enable/disable background gradient coloring" tooltip_signals = "Enable/disable signal markers on trend changes" // Trend Settings length = input.int(10, "Main Length", minval=2, group=trend_settings, tooltip=tooltip_length) smooth_len = input.int(14, "Smoothing Length", minval=2, group=trend_settings, tooltip=tooltip_smooth) sensitivity = input.float(2.0, "Sensitivity", step=0.1, group=trend_settings, tooltip=tooltip_sens) // Visualization Settings bullcolor = input.color(#00ffaa, "Bullish Color", group=visual_settings) bearcolor = input.color(#ff0000, "Bearish Color", group=visual_settings) showbars = input.bool(true, "Color Bars?", group=visual_settings, tooltip=tooltip_bars) showbg = input.bool(true, "Background Color?", group=visual_settings, tooltip=tooltip_bg) showsignals = input.bool(true, "Show Signals?", group=visual_settings, tooltip=tooltip_signals) // &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559; // // &#9553; TREND CALCULATIONS &#9553; // // &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565; // calculate_trend_levels() => typical = hlc3 fast_ema = ta.ema(typical, length) slow_ema = ta.ema(typical, length * 2) basis = (fast_ema + slow_ema) / 2 vol = ta.stdev(typical, length) smooth_vol = ta.ema(vol, smooth_len) upper = basis + (smooth_vol * sensitivity) lower = basis - (smooth_vol * sensitivity) [basis, upper, lower] get_trend_state(upper, lower, basis) => var float prev_level = na var int trend = 0 if na(prev_level) trend := close > basis ? 1 : -1 prev_level := trend == 1 ? lower : upper if trend == 1 if close < lower trend := -1 prev_level := upper else prev_level := lower else if close > upper trend := 1 prev_level := lower else prev_level := upper [trend, prev_level] [basis, upper, lower] = calculate_trend_levels() [trend, level] = get_trend_state(upper, lower, basis) // &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559; // // &#9553; VISUALIZATION &#9553; // // &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565; // // Signal detection long_signal = trend == 1 and trend[1] == -1 short_signal = trend == -1 and trend[1] == 1 // Plot average/basis line p2 = plot(basis, color=trend == 1 ? bullcolor : bearcolor, linewidth=2) // Plot trend line with breaks p1 = plot(level, color=close > level ? bullcolor : bearcolor, linewidth=2, style=plot.style_linebr) // Plot additional trend line plot(level, color=close > level ? bullcolor : bearcolor, linewidth=2, style=plot.style_linebr) // Add labels for crossovers if showsignals and ta.crossunder(close, level) label.new(bar_index, level, "&#119930;", color=bearcolor, textcolor=chart.fg_color, style=label.style_label_lower_right) if showsignals and ta.crossover(close, level) label.new(bar_index, level, "&#119923;", color=bullcolor, textcolor=chart.bg_color, style=label.style_label_upper_right) // Background gradient coloring var float intensity = 0.0 var int prev_trend = 0 // Reset intensity on trend change if trend != prev_trend intensity := 0.0 prev_trend := trend // Increment intensity based on trend intensity := trend == 1 ? math.min(intensity + 1, 20) : trend == -1 ? math.min(intensity + 1, 20) : intensity // Calculate gradient colors color grad_color = trend == 1 ? color.from_gradient(intensity, 0, 20, color.new(bullcolor, 95), color.new(bullcolor, 80)) : color.from_gradient(intensity, 0, 20, color.new(bearcolor, 95), color.new(bearcolor, 80)) bgcolor(showbg ? grad_color : na) // Fill between the lines fill(p1, p2, level, basis, trend == 1 ? bullcolor : bearcolor, na) fill(p1, p2, level, basis, trend == 1 ? bullcolor : bearcolor, na) // Bar Coloring barcolor(showbars ? (trend == 1 ? color.new(bullcolor, 15) : color.new(bearcolor, 15)) : na) // &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559; // // &#9553; ALERTS &#9553; // // &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565; // alertcondition(long_signal, title="Adaptive Trend Flow Long", message="Adaptive Trend Flow Long {{exchange}}:{{ticker}}") alertcondition(short_signal, title="Adaptive Trend Flow Short", message="Adaptive Trend Flow Short {{exchange}}:{{ticker}}") // &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559; // // &#9553; CREATED BY &#9553; // // &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565; //
프로필 이미지
knoll
2025-04-28
427
글번호 190477
지표
답변완료

수식작성 부탁드립니다.

안녕하세요. 운영자님 이번에 부탁드릴 사항은 매수조건 : RSI가 55 선을 상향돌파 시 매수진입하고, 55 선을 하향돌파 시 청산 매도조건 : RSI가 45 선을 하향돌파 시 매도진입하고, 45 선을 상향돌파 시 청산 수고하세요.
프로필 이미지
고박사122
2025-04-28
294
글번호 190470
시스템

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

프로필 이미지
사공하늘
2025-04-28
110
글번호 190469
검색
답변완료

수식 작성 부탁드립니다

안녕하세요 고생 많으십니다 수식 작성 부탁드립니다 다음 조건 시 매수 진입(세가지조건 모두 만족 시 시장가 매수) 1. 단순이동평균선(봉 갯수 1440) > 720 > 240 이며 2. 직전 두개 캔들에서 양봉 두개 연속 출현 or 직전 캔들에서 RSI(14)가 30 상향 돌파 3. 그리고 최근 캔들 20개 최고점 대비 30포인트 이상 하락한 상태일 것 손절 : 진입가 대비 -50포인트 1차 정산 : 매수가 대비 +20포인트(50% 청상) 2차 청산 : 1차 청산 후 최고가 대비 -30포인트 하락 시(50% 청산) 특이사항 : ㅇ 진입은 하루 2번까지만 ㅇ 미국장 개장(23:30(섬머타임 시 22:30)~07:00(섬머타임 시 6:00)) 에만 진입 가능 감사합니다.
프로필 이미지
매력의도가니
2025-04-28
280
글번호 190468
시스템