커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식작성 부탁드립니다.

안녕하세요. 운영자님 이번에 꼭좀 부탁드릴 사항은 다음의 트레이딩뷰 지표를 예스트레이더로 변환을 해주십사합니다. //@version=4 study(title="Twin Range Filter", overlay=true) source = input(defval=close, title="Source") // Smooth Average Range per1 = input(defval=27, minval=1, title="Fast period") mult1 = input(defval=1.6, minval=0.1, title="Fast range") per2 = input(defval=55, minval=1, title="Slow period") mult2 = input(defval=2, minval=0.1, title="Slow range") smoothrng(x, t, m) => wper = t * 2 - 1 avrng = ema(abs(x - x[1]), t) smoothrng = ema(avrng, wper) * m smoothrng smrng1 = smoothrng(source, per1, mult1) smrng2 = smoothrng(source, per2, mult2) smrng = (smrng1 + smrng2) / 2 // Range Filter rngfilt(x, r) => rngfilt = x rngfilt := x > nz(rngfilt[1]) ? x - r < nz(rngfilt[1]) ? nz(rngfilt[1]) : x - r : x + r > nz(rngfilt[1]) ? nz(rngfilt[1]) : x + r rngfilt filt = rngfilt(source, smrng) upward = 0.0 upward := filt > filt[1] ? nz(upward[1]) + 1 : filt < filt[1] ? 0 : nz(upward[1]) downward = 0.0 downward := filt < filt[1] ? nz(downward[1]) + 1 : filt > filt[1] ? 0 : nz(downward[1]) hband = filt + smrng lband = filt - smrng longCond = bool(na) shortCond = bool(na) longCond := source > filt and source > source[1] and upward > 0 or source > filt and source < source[1] and upward > 0 shortCond := source < filt and source < source[1] and downward > 0 or source < filt and source > source[1] and downward > 0 CondIni = 0 CondIni := longCond ? 1 : shortCond ? -1 : CondIni[1] long = longCond and CondIni[1] == -1 short = shortCond and CondIni[1] == 1 // Plotting plotshape(long, title="Long", text="Long", style=shape.labelup, textcolor=color.black, size=size.tiny, location=location.belowbar, color=color.lime, transp=0) plotshape(short, title="Short", text="Short", style=shape.labeldown, textcolor=color.white, size=size.tiny, location=location.abovebar, color=color.red, transp=0) // Alerts alertcondition(long, title="Long", message="Long") alertcondition(short, title="Short", message="Short")
프로필 이미지
고박사122
2024-01-22
1355
글번호 175962
지표
답변완료

수식작성 부탁드립니다.

안녕하세요. 운영자님 이번에 꼭좀 부탁드릴 사항은 다음의 트레이딩뷰 지표를 예스트레이더로 변환을 해주십사합니다. Bollinger Bands Percentile + Stdev Channels (BBPct) [AlgoAlpha] //@version=5 indicator(shorttitle="&#9709; BBPCT% [AlgoAlpha]", title="&#9709; Bollinger Bands Percent", overlay=false) //Symmetrical Standard Deviation Channels neon = input.bool(title = 'Neon Color Theme', defval = true) upper1 = close + 0.05 * close lower1 = close - 0.05 * close stdL = close > lower1 stdS = close < upper1 //BBPCT length = input.int(20, minval=1, group='Bollinger Band') src = input(close, title="Source", group='Bollinger Band') mult = input.float(2.0, minval=0.001, maxval=50, title="Multiplier", group='Bollinger Band') lookback = 750 showStdev = input.bool(false, title='Show Bollinger Band Stdev %', group='Settings') var stdevArray = array.new_float(lookback,0.0) basis = ta.sma(src, length) dev = mult * ta.stdev(src, length) upper = basis + dev lower = basis - dev positionBetweenBands = 100 * (src - lower)/(upper - lower) array.push(stdevArray, dev/close) if array.size(stdevArray)>=lookback array.remove(stdevArray, 0) rank = array.percentrank(stdevArray, lookback-1) hist = 100*dev/close bullcolor = neon ? #00ffbb : #00b712 bearcolor = neon ? #ff1100 : #c30010 //PLOTS plot1 = plot(positionBetweenBands, color = color.new(color.white, 100)) obupper = plot(130, color = color.new(bearcolor, 0), display = display.none) oblower = plot(110, color = color.new(bearcolor, 0), display = display.none) obmid = plot(95, display = display.none) osupper = plot(-10, color = color.new(bullcolor, 30), display = display.none) oslower = plot(-30, color = color.new(bullcolor, 30), display = display.none) osmid = plot(5, color = color.new(bullcolor, 70), display = display.none) hline(50) z = plot(positionBetweenBands, "Z", positionBetweenBands > 50 ? bullcolor : bearcolor) mid = plot(50, display = display.none, editable = false) fill(z, mid, positionBetweenBands > 50 ? positionBetweenBands : 50, positionBetweenBands > 50 ? 50 : positionBetweenBands, positionBetweenBands > 50 ? bullcolor : #00000000, positionBetweenBands > 50 ? #00000000 : bearcolor) fill(obupper, oblower, color.new(bearcolor, 80)) fill (oblower, obmid, color.new(bearcolor, 87)) fill(osupper, oslower, color.new(bullcolor, 87)) fill(osupper, osmid, color.new(bullcolor, 93)) plotshape(ta.crossover(positionBetweenBands,-8) and stdL, style = shape.triangleup, color = bullcolor, location = location.bottom, size = size.tiny) plotshape(ta.crossunder(positionBetweenBands,108) and stdS, style = shape.triangledown, color = bearcolor, location = location.top, size = size.tiny) plot(showStdev ? hist : na, style=plot.style_columns, color=(hist[1] < hist ? #26A69A : #B2DFDB) , title='Stdev %') //Alerts alertcondition(ta.crossover(positionBetweenBands,-10), title="Bullish Reversal", message="Bullish Reversal {{exchange}}:{{ticker}}") alertcondition(ta.crossunder(positionBetweenBands,110), title="Bearish Reversal", message="Bearish Reversal {{exchange}}:{{ticker}}") alertcondition(ta.crossover(positionBetweenBands,50), title="Bullish Trend", message="Bullish Trend {{exchange}}:{{ticker}}") alertcondition(ta.crossunder(positionBetweenBands,50), title="Bearish Trend", message="Bearish Trend {{exchange}}:{{ticker}}")
프로필 이미지
고박사122
2024-01-22
1681
글번호 175961
지표

고박사122 님에 의해서 삭제되었습니다.

프로필 이미지
고박사122
2024-01-22
0
글번호 175960
지표
답변완료

수식 문의

안녕하세요? 실수값을 갖는 aa 라는 지표가 있습니다. aa < -3 => 매수 1개 이 때의 aa값을 a1으로 기억. aa < a1 - 3 => 매수 1개 더 -1 < aa < 1 => 다 청산하고 무포지션 aa > 3 => 매도 1개. 이 때의 aa값을 a1으로 기억. aa > a1 + 3 => 1개 추가로 더 매도. 감사합니다.
프로필 이미지
에구머니
2024-01-23
952
글번호 175959
시스템
답변완료

분할 엑시트

안녕하세요, 아래의 수식이 분봉에서는 작동하는데 틱(10또는 20)챠트에서 작동하지 않는데 부탁드립니다. if stime == 151000 Then { if MarketPosition == 1 Then ExitLong("bx1",AtMarket,def,"",Floor(MaxContracts*0.25),1); if MarketPosition == -1 Then ExitShort("sx1",AtMarket,def,"",Floor(MaxContracts*0.25),1); } if stime == 151500 Then { if MarketPosition == 1 Then ExitLong("bx2",AtMarket,def,"",Floor(MaxContracts*0.25),1); if MarketPosition == -1 Then ExitShort("sx2",AtMarket,def,"",Floor(MaxContracts*0.25),1); } if stime == 152000 Then { if MarketPosition == 1 Then ExitLong("bx3",AtMarket,def,"",Floor(MaxContracts*0.25),1); if MarketPosition == -1 Then ExitShort("sx3",AtMarket,def,"",Floor(MaxContracts*0.25),1); } if stime == 152500 Then { if MarketPosition == 1 Then ExitLong("bx4",AtMarket); if MarketPosition == -1 Then ExitShort("sx4",AtMarket); }
프로필 이미지
huhboo99
2024-01-22
1095
글번호 175958
시스템
답변완료

해외선물 만기보정 차트

해외선물 만기보정 차트를 볼 수 있을까요? 만기 보정된 종가 데이터가 필요한데 따로 차트 설정 창에서는 해당 옵션을 확인할 수가 없습니다. ㅠㅠ 지표로라도 만기 보정된 종가 데이터 나타나게 할 수 없을까요?
프로필 이미지
이만스닥
2024-01-22
1257
글번호 175957
지표
답변완료

85334번 관련 부탁드립니다 ~^^

수식 고맙습니다. 만들어 주신 수식에 아래 사항을 변수로 만들어 입력 할 수 있게 부탁 드립니다. C(1) : 기준이 되는 고점 종가의 날짜 설정(C(1)의 경우 변수=1) C(3) : 기준이 되는 저점 종가의 날짜 설정(C(3)의 경우 변수‘=3) 진입 시 5틱 : 하락 후 저점 대비 상승 틱 수 설정 익절 청산 시 5틱 : 상승 후 고점 대비 하락 틱 수 설정 손절 청산 시 5틱 : 지정값 대비 하락 틱 수 설정 3십만원 : 1차 매수 금액(또는 수량) 설정 6십만원 : 2차 매수 금액(또는 수량) 설정 감사합니다~^^ > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁드립니다 ~^^ > 안녕하세요 예스스탁입니다. 올려주신 내용은 차트가 일봉이면 구현이 불가능합니다. 하나의 봉 봉미완성시에 특정값까지 하락후 상승하는 것은 체크를 하지 못합니다. 분봉차트에 일봉값 체크해서 신호발생하게 구현하셔야 합니다. var : ll(0),hh(0); if DayClose(1) > DayClose(3) Then { var1 = DayClose(1) - (DayClose(1) - DayClose(3))*1/4; var2 = DayClose(1) - (DayClose(1) - DayClose(3))*2/4; var3 = DayClose(1) - (DayClose(1) - DayClose(3))*3/4; if MarketPosition == 0 and DayLow <= var1 then Buy("b",AtStop,DayLow+PriceScale*5,Floor(300000/max(NextBarOpen,DayLow+PriceScale*5))); } if MarketPosition == 1 Then { if MarketPosition[1] != 1 Then { value1 = var1; Value2 = Var2; Value3 = Var3; Value4 = DayClose(1); ll = l; hh = h; } if h > hh Then hh = h; if l < ll Then ll = l; if MaxEntries == 1 and ll <= var2 then Buy("bb",AtStop,ll+PriceScale*5,Floor(500000/max(NextBarOpen,DayLow+PriceScale*5))); ExitLong("bx",AtStop,Value3-PriceScale*5); if hh > value4 Then ExitLong("bx2",AtStop,hh-PriceScale*5); } 즐거운 하루되세요 > 개성상인 님이 쓴 글입니다. > 제목 : 부탁드립니다 ~^^ > 항상 도움 주셔서 감사합니다. 종목 : 주식(종목 사용자 선택) 차트 : 일봉 아래 조건에 맞는 시스템식 부탁드립니다. // C(1) : 전일 종가, C(3) : 3일전 종가 1. C(1) - (C(1) - C(3))*1/4 이하 하락 후 저점 대비 5틱 이상 상승 시 3십만원 1차 시장가 매수 2. C(1) - (C(1) - C(3))*2/4 이하 하락 후 저점 대비 5틱 이상 상승 시 6십만원 2차 시장가 매수 3. C(1) - (C(1) - C(3))*3/4 대비 5틱 이상 하락 시 보유수량 전부 시장가 매도 손절 청산 후 추가 진입금지 4. C(1) 이상 상승 후 고점 대비 5틱 이상 하락 시 보유수량 전부 시장가 매도 익절 청산 후 추가 진입금지 5. 날짜가 바뀌어도 처음 세팅 된 값 유지. # 1차 매수 후 2차 매수 지점까지 하락하지 않고 C(1)까지 상승하여 전부 매도 청산되면 2차 매수하지 않고 추가 진입금지. 감사합니다.
프로필 이미지
개성상인
2024-01-22
1462
글번호 175956
시스템
답변완료

한번만 거래를 하고 싶습니다

안녕하십니까? 항상 감사드립니다. 다음과 같은 매도 거래를 한 번만 하고 끝내려면 어떻게 하면 될까요? Input : A(0), n(1),loss(1.5); if CrossDown(c,A) Then Sell("S", OnClose,def,n ); if CrossUp(c,A+loss) Then ExitShort("SX", OnClose); 너무 간단한 초보적인 질문 드려서 죄송합니다. ^^;;
프로필 이미지
hunter33
2024-01-22
1136
글번호 175955
시스템
답변완료

문의드립니다

당일상승하거나하락을 나타낼때는 전일대비종가에서당일종가까지를 % 로나타내잖아요? 이방법말고 1, 당일 하락일땐 당일고점에서 저점까지-%를 지표로 나타내려고한다면 어케해야할까요? 2, 당일 상승일땐 당일저점에서 고점까지 %를 지표로 나타내려고한다면 어케해야할까요?9 3, 최근20봉중에 전일거래량보다1.5배이상 거래된날이 연속적으로 나오지 않더라도 최하2회이상 나온종목을 찾고싶습니다
프로필 이미지
처음처럼22
2024-01-23
1009
글번호 175954
지표