커뮤니티

예스랭귀지 Q&A

글쓰기

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

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

수식 문의 드립니다.

첨부 파일은 문의 후 제가 수정하여 작성한 것인데 주봉 60이평선 이상 부터는 차트에 표시되지 않습니다. 확인 후 수정해 주세요
프로필 이미지
부활
2025-03-07
426
글번호 188899
지표
답변완료

분챠트에 일봉 이평선 글자 크기 조정 수식 추가 부탁드립니다

input : P1(20),색(DarkBrown),굵기(5); var : count(0),sumV1(0),mav1(0),TL1(0),Tx1(0); sumV1 = 0; for count = 0 to P1-1 { sumV1 = sumV1+DayClose(count); } maV1 = sumV1 / P1; TL_Delete(TL1); TL1 = TL_New(sdate[1],stime[1],mav1,sdate,stime,mav1); TL_SetExtLeft(TL1,true); TL_SetColor(TL1,색); TL_SetSize(TL1,굵기); Text_Delete(tx1); tx1 = Text_New(sdate,stime,mav1,NumToStr(P1,0)+"일선"); 챠트에 표시되는 20일선 글자의 크기를 더 크게 표시할 수 있게 수정 부탁 드립니다. 글자가 작아서 잘 안보이네요.
프로필 이미지
중방
2025-03-07
393
글번호 188898
지표
답변완료

수식 수정 부탁 드립니다.

귀하의 수고에 항상 감사 드립니다. 아래 수식에서 신호 발생 메시지에 발생시점의 지수도 함께 표시되도록 하고 싶습니다. (참고로 해외/국내 선물차트에 적용 중임니다.) -------------아 래 ------------- If Var3>=Var5 Then { Tx = Text_New(sDate,sTime,H,"▲"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Black); 시 = int(Time/10000); 분 = int(FracPortion(Time/10000)*100); 초 = int(FracPortion(Time/100)*100); 시분초 = NumToStr(시,0)+":"+NumToStr(분,0)+":"+NumToStr(초,0); Alert("매수 %s",시분초); PlaySound("C:₩LSYesTrader₩data₩workgroup₩SELL_RECEIPT.WAV"); ----------------------------------------------------
프로필 이미지
졸던
2025-03-07
485
글번호 188897
지표
답변완료

검색식 부탁드립니다. _(_ _)_

항상 도와주심에 감사드립니다. _(_ _)_ 엔벨로프(20,10)지지선과 아래의 수식라인이 3프로이내 중첩시 동시 돌파하는 종목검색식을 부탁드립니다. _(__)_ 수식 var : 당월시가(0),전월시가(0); var : 당월종가(0),전월종가(0); if sDate > sDate[1]+30 Then { 당월시가 = O; 전월시가 = 당월시가[1]; 전월종가 = 당월종가[1]; } 당월종가 = C; if 전월시가 > 0 Then { var1 = ((전월시가+전월종가)/2 + 당월시가)/2; if CrossUp(C,var1) Then Find(1); }
프로필 이미지
한칼부르스
2025-03-07
446
글번호 188896
종목검색
답변완료

수식문의입니다

<지표수식> 1. 가. 전일종가대비 종가가 상승한 캔들 발생시 적색으로 거래량을 표시하되 상승이 연속 지속되면 거래량을 누적표시 되게 하는 수식 나. 전일종가대비 종가가 하락한 캔들 발생시 청색으로 거래량을 표시하되 하락이 연속 지속되면 거래량을 누적표시 되게 하는 수식 누적이 되는 것은 동일한 양봉이 연속나오거나 연속음봉이 나오거나 할때에만 누적되 는 것이고요 양봉 한번 나오고 바로 음봉나오거나 음봉후 바로 양봉이 나오면 거래량 은 누적되지 않고 그 캔들의 거래량만 표현되어야 합니다 가와 나의 수식을 결합하여 한개의 하단지표로 사용할수 있게 하고, 색상표시는 외부변수로 처리요망 2. 전일거래량대비 3000%이상 거래량이 상승한 양봉캔들의 첫번째 거래량을 기준거래량 이라 설정하고 이 기준거래량의 50%를 표시하는 라인수식(A)과 이 기준거래량 발생이후 전일종가대비 종가가 하락한 음봉발생시에 거래량라인(B)을 표시하고, 기준거래량 발생 이후 10봉까지만 전일종가대비 종가가 하락한 음봉캔들 발생시마다 그 거래량을 누적 표시되게 하는 수식(SUM-B) 추가 부연하면 일정율 3000%이상의 거래량이 발생할 때에 즉 기준거래량이 발생할 때만 라인이 표시되기 시작하는 것이고, 이 라인도 10봉까지만 표시되고 더 이상 표시되지 않다가 다시 기준거래량이 발생하면 다시 라인표시되게 하여야 합니다 또한 기준거래량 발생후 전일종가대비 종가가 하락한 음봉발생시에 음봉거래량 라인이 표시되고, 이후 10봉까지 이내에서 전일종가대비 종가가 하락한 음봉발생한다면 누적된 라인을 표시되게 하여야 합니다. <신호검색수식> 1. 2번에서 SUM-B(음봉누적거래량)가 A(기준거래량)를 돌파할때의 신호검색 수식 2. 1번에서 가의 누적거래량이 나의 누적거래량을 돌파할 때의 신호검색 수식
프로필 이미지
해피오
2025-03-10
465
글번호 188895
지표

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

프로필 이미지
didhddk
2025-03-08
36
글번호 188894
시스템
답변완료

좋은 주말 되십시요^^

* 주말인데 죄송하게 시스템 수식 하나만 요청 드립니다. * 기준 ㅇ 5일 이평선이 20일 이평선을 크로스업 하면 매수(1계약) - 수익이 50틱이면 청산 - 매수후 손실이면서 하이킨 아시 색상이 바뀌면 추가매수(1차 추가매수 2계약) (매매 진입시 색상 기준 으로 바뀌는 기준임) - 1차 추가 매수후 손실이면서 하이킨 아시 색상이 바뀌면 2차추가매수(4계약) - 2차 추가 매수후 손실이면서 하이킨 아시 색상이 바뀌면 3차추가매수(8계약) - 3차 추가 매수후 손실이면서 하이킨 아시 색상이 바뀌면 4차추가매수(16계약) - 끝 혹시 이런 매매수식이 가능 할런지요 수식요청 좀 드림니다. ## 하이킨 아시 사용 수식 input : len(20),len2(20); var : oo(0),cc(0),hh(0),ll(0),col(0); var : haclose(0),haopen(0),hahigh(0),halow(0); var : o2(0),h2(0),l2(0),c2(0); oo=ema(open,len); cc=ema(close,len); hh=ema(high,len); ll=ema(low,len); haclose = (oo+hh+ll+cc)/4; haopen = iff(IsNaN(haopen[1]) == true, (oo + cc)/2 , (haopen[1] + haclose[1]) / 2); hahigh = max (hh, max(haopen,haclose)); halow = min (ll, min(haopen,haclose)); o2=ema(haopen, len2); c2=ema(haclose, len2); h2=ema(hahigh, len2); l2=ema(halow, len2); col=iff(o2>c2 , red , lime); //PlotPaintBar(h2, l2,o2,c2, "heikin smoothed", col); ##============================================================================================================ ##============================================================================================================ input : StartTime(080000),EndTime(220000); var : Tcond(False); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } ##============================================================================================================ ##============================================================================================================ { ##============================================================================================================ ## 매수식 If MarketPosition <= 0 and sDate >= 20230101 and Tcond == true and stime >= 082000 and stime <= 220000 and 수식요청 Then { Buy( "수"); PlaySound("C:KiwoomGlobalsoundsound1.wav"); } ##============================================================================================================ ##============================================================================================================ ## 매도식 If MarketPosition <= 0 and sDate >= 20230101 and Tcond == true and stime >= 082000 and stime <= 220000 and 수식요청 Then { Sell( "도"); PlaySound("C:KiwoomGlobalsoundsound1.wav"); } ##============================================================================================================ ##============================================================================================================ } ##============================================================================================================ ##============================================================================================================ ## 매수 청산식 if MarketPosition == 1 then { ExitLong("수수익",AtLimit,EntryPrice+PriceScale*50); ExitLong("수손절",AtStop,EntryPrice-PriceScale*60); Exitlong("수80청",AtStop,highest(H,BarsSinceEntry)-PriceScale*80); //if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*0 Then Exitlong("수0프청",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*7.9); //if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then Exitlong("수2프청",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*1.0); //if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*40 Then Exitlong("수4프청",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*0.9); //if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 Then Exitlong("수5프청",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*0.7); //if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*70 Then Exitlong("수7프청",AtStop,highest(H,BarsSinceEntry)-abs(highest(H,BarsSinceEntry)-EntryPrice)*0.3); } ##============================================================================================================ ##============================================================================================================ ## 매도 청산식 if MarketPosition == -1 then { ExitShort("도수익",AtLimit,EntryPrice-PriceScale*50); ExitShort("도손절",AtStop,EntryPrice+PriceScale*60); ExitShort("도80청",AtStop,highest(H,BarsSinceEntry)-PriceScale*80); //if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*0 Then ExitShort("도0프청",AtStop,lowest(L,BarsSinceEntry)+abs(lowest(L,BarsSinceEntry)-EntryPrice)*7.9); //if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then ExitShort("도2프청",AtStop,lowest(L,BarsSinceEntry)+abs(lowest(L,BarsSinceEntry)-EntryPrice)*1.0); //if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*40 Then ExitShort("도4프청",AtStop,lowest(L,BarsSinceEntry)+abs(lowest(L,BarsSinceEntry)-EntryPrice)*0.5); //if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 Then ExitShort("도5프청",AtStop,lowest(L,BarsSinceEntry)+abs(lowest(L,BarsSinceEntry)-EntryPrice)*0.5); //if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*70 Then ExitShort("도7프청",AtStop,lowest(L,BarsSinceEntry)+abs(lowest(L,BarsSinceEntry)-EntryPrice)*0.3); } ##============================================================================================================ ##============================================================================================================ SetStopEndofday(230000); ##============================================================================================================ ##============================================================================================================ ㅇ 좋은 주말되십시요^^ 항상 많은 도움에 고맙습니다.
프로필 이미지
요타
2025-03-10
420
글번호 188893
시스템
답변완료

수식변환

항상 수고 많으십니다. 트레이딩뷰에 있는 수식을 이용할수있도록 도움받고자 글 남깁니다. 변환 부탁드립니다. ************ study(title="CCI Divergences", format=format.price) len = input(title="CCI Period", minval=1, defval=14) src = input(title="CCI Source", defval=close) lbR = input(title="Pivot Lookback Right", defval=5) lbL = input(title="Pivot Lookback Left", defval=5) rangeUpper = input(title="Max of Lookback Range", defval=60) rangeLower = input(title="Min of Lookback Range", defval=5) plotBull = input(title="Plot Bullish", defval=true) plotHiddenBull = input(title="Plot Hidden Bullish", defval=false) plotBear = input(title="Plot Bearish", defval=true) plotHiddenBear = input(title="Plot Hidden Bearish", defval=false) bearColor = color.red bullColor = color.green hiddenBullColor = color.green hiddenBearColor = color.red textColor = color.white noneColor = color.new(color.white, 100) osc = cci(src, len) plot(osc, title="CCI", linewidth=2, color=color.yellow) obLevel = hline(100, title="Overbought", linestyle=hline.style_dotted) osLevel = hline(-100, title="Oversold", linestyle=hline.style_dotted) fill(obLevel, osLevel, title="Background", color=color.gray, transp=80) plFound = na(pivotlow(osc, lbL, lbR)) ? false : true phFound = na(pivothigh(osc, lbL, lbR)) ? false : true _inRange(cond) => bars = barssince(cond == true) rangeLower <= bars and bars <= rangeUpper alertcondition(osc[1] > 100.0 and osc[2] < 100.0, title="CCI value crosses over 100.0", message="Check charts for a CCI cross over 100.0") alertcondition(osc[1] < 100.0 and osc[2] > 100.0, title="CCI value crosses under 100.0", message="Check charts for a CCI cross under 100.0") alertcondition(osc[1] > -100. and osc[2] < -100.0, title="CCI value crosses over -100.0", message="Check charts for a CCI cross over -100.0") alertcondition(osc[1] < -100.0 and osc[2] > -100.0, title="CCI value crosses under -100.0", message="Check charts for a CCI cross under -100.0") //------------------------------------------------------------------------------ // Regular Bullish // Osc: Higher Low oscHL = osc[lbR] > valuewhen(plFound, osc[lbR], 1) and _inRange(plFound[1]) // Price: Lower Low priceLL = low[lbR] < valuewhen(plFound, low[lbR], 1) bullCond = plotBull and priceLL and oscHL and plFound plot( plFound ? osc[lbR] : na, offset=-lbR, title="Regular Bullish", linewidth=2, color=(bullCond ? bullColor : noneColor), transp=0 ) plotshape( bullCond ? osc[lbR] : na, offset=-lbR, title="Regular Bullish Label", text=" Bull ", style=shape.labelup, location=location.absolute, color=bullColor, textcolor=textColor, transp=0 ) alertcondition(bullCond, title="Regular bullish divergence in CCI found", message="Check charts for a regular bullish divergence found with CCI") //------------------------------------------------------------------------------ // Hidden Bullish // Osc: Lower Low oscLL = osc[lbR] < valuewhen(plFound, osc[lbR], 1) and _inRange(plFound[1]) // Price: Higher Low priceHL = low[lbR] > valuewhen(plFound, low[lbR], 1) hiddenBullCond = plotHiddenBull and priceHL and oscLL and plFound plot( plFound ? osc[lbR] : na, offset=-lbR, title="Hidden Bullish", linewidth=2, color=(hiddenBullCond ? hiddenBullColor : noneColor), transp=0 ) plotshape( hiddenBullCond ? osc[lbR] : na, offset=-lbR, title="Hidden Bullish Label", text=" H Bull ", style=shape.labelup, location=location.absolute, color=bullColor, textcolor=textColor, transp=0 ) alertcondition(hiddenBullCond, title="Hidden bullish divergence in CCI found", message="Check charts for a hidden bullish divergence found with CCI") //------------------------------------------------------------------------------ // Regular Bearish // Osc: Lower High oscLH = osc[lbR] < valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1]) // Price: Higher High priceHH = high[lbR] > valuewhen(phFound, high[lbR], 1) bearCond = plotBear and priceHH and oscLH and phFound plot( phFound ? osc[lbR] : na, offset=-lbR, title="Regular Bearish", linewidth=2, color=(bearCond ? bearColor : noneColor), transp=0 ) plotshape( bearCond ? osc[lbR] : na, offset=-lbR, title="Regular Bearish Label", text=" Bear ", style=shape.labeldown, location=location.absolute, color=bearColor, textcolor=textColor, transp=0 ) alertcondition(bearCond, title="Regular bearish divergence in CCI found", message="Check charts for a regular bearish divergence found with CCI") //------------------------------------------------------------------------------ // Hidden Bearish // Osc: Higher High oscHH = osc[lbR] > valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1]) // Price: Lower High priceLH = high[lbR] < valuewhen(phFound, high[lbR], 1) hiddenBearCond = plotHiddenBear and priceLH and oscHH and phFound plot( phFound ? osc[lbR] : na, offset=-lbR, title="Hidden Bearish", linewidth=2, color=(hiddenBearCond ? hiddenBearColor : noneColor), transp=0 ) plotshape( hiddenBearCond ? osc[lbR] : na, offset=-lbR, title="Hidden Bearish Label", text=" H Bear ", style=shape.labeldown, location=location.absolute, color=bearColor, textcolor=textColor, transp=0 ) alertcondition(hiddenBearCond, title="Hidden bearish divergence in CCI found", message="Check charts for a hidden bearish divergence found with CCI")
프로필 이미지
이글루
2025-03-07
469
글번호 188892
지표

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

프로필 이미지
볼라레
2025-03-07
0
글번호 188891
사용자 함수