커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식의뢰

study("RSI Bands [LazyBear]", shorttitle="RSIBANDS_LB", overlay=true) obLevel = input(70, title="RSI Overbought") osLevel = input(30, title="RSI Oversold") length = input(14, title="RSI Length") src=close ep = 2 * length - 1 auc = ema( max( src - src[1], 0 ), ep ) adc = ema( max( src[1] - src, 0 ), ep ) x1 = (length - 1) * ( adc * obLevel / (100-obLevel) - auc) ub = iff( x1 >= 0, src + x1, src + x1 * (100-obLevel)/obLevel ) x2 = (length - 1) * ( adc * osLevel / (100-osLevel) - auc) lb = iff( x2 >= 0, src + x2, src + x2 * (100-osLevel)/osLevel ) plot( ub, title="Resistance", color=red, linewidth=2) plot( lb, title="Support", color=green, linewidth=2) plot( avg(ub, lb), title="RSI Midline", color=gray, linewidth=1) 트레이딩뷰에 있는 RSI Bands 라는 지표입니다 예스랭귀지로 구현해주세요 그리고 해당 지표 밴드의 하단선 근처에 온 종목을 찾는 검색기를 만들어주세요
프로필 이미지
누댕
2023-12-10
1254
글번호 174715
지표

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

프로필 이미지
JTH
2023-12-10
5
글번호 174714
시스템

러블리 님에 의해서 삭제되었습니다.

프로필 이미지
러블리
2023-12-10
0
글번호 174713
지표
답변완료

문의 드립니다.~~~~

안녕하세요 아래식으로 cme clude oil 온종일(8시에서 5시)거래시 11시에서 14시 사이와 20시에서 23시 사이에는 잔고에 대한 청산은 되고 진입은 안되는 것으로 하려면 어떻게 해야하나요? input : ntime(60),N(4),N1(120),A1(3); input : 익절틱수(0),손절틱수(0); input : StartTime(80000),EndTime(50000); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),SumSqrt(0),Stdv(0); var : sum(0),BBmd(0),Bbup(0),BBdn(0); Array : CC[100](0); var : Tcond(false); if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Tcond = true; S1 = TimeToMinutes(NextBarStime); D1 = NextBarSdate; } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; TF = TM%ntime; if NextBarSdate != sdate or (NextBarSdate == sdate and ntime > 1 and TF < TF[1]) or (NextBarSdate == sdate and ntime > 1 and TM >= TM[1]+ntime) or (NextBarSdate == sdate and ntime == 1 and TM > TM[1]) Then { var1 = NextBarOpen; } if Tcond == true and MarketPosition <= 0 Then if Bdate == Bdate[n-1] and C>O Then Buy(); if Bdate == Bdate[n-1] and C<0 Then Sell(); } IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(50000); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { IF Endtime <= starttime Then { SetStopEndofday(0); } }
프로필 이미지
예스요
2023-12-10
990
글번호 174712
시스템
답변완료

확인요청 드립니다. 83933글

좋은 한주 되십시요. [ 요청1 ] Input : Period(15),Upsim(50); var1 = Simrido(Period); if var1 >= Upsim Then PlotPaintBar(High, Low, "투자심리선",MAGENTA,Def,7); else NoPlot(1); 상기 강조 지표에서 첫신호가 발생하고 10개봉(변수)중에 5개(변수) 이상이면 PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); 소리가 날수 있도록 수식 좀 요청 드립니다. [ 요청2] 아래글 재 확인 요청 드립니다. 83933글 즉 신호가 발생하면 다음신호에 의해서 수평선이 짧게(점수준) 됨니다. 이 점수준 수평선을 다음신호가 발생 해도 기본으로 Index <= var1 + 5 까지는 수평선이 그어지도록 요청 드립니다. ############################################################ 83933글 ############################################################ "기본 5봉 까지 수평 추세선을 그리고 5봉 보다 크면 다음신호가 발생할때 까지 계속 추세선을 그린다" 수정 좀 부탁 드립니다. ▶ 아래 수식 var : TX(0); input : P(5),n(8),틱(3); var : cnt(0),LL(0),HH(0); Array : LTL[10](0),HTL[10](0); var : LTL1(0),LTL2(0),LTL3(0),LTL4(0),LTL5(0),LTL6(0); var : HTL1(0),HTL2(0),HTL3(0),HTL4(0),HTL5(0),HTL6(0); if L < Lowest(L,P)[1] and (LL == 0 or (LL > 0 and abs(L-LL) >= PriceScale*틱)) Then { LL = L; For cnt = 9 DownTo 1 { LTL[cnt] = LTL[cnt-1]; } LTL[0] = TL_new(sDate,sTime,LL,NextBarSdate,NextBarStime,LL); TL_SetColor(LTL[0],Black); TL_Delete(LTL[n]); TL_SetSize(LTL[0],2); } Else { TL_SetEnd(LTL[0],sDate,sTime,LL); } if H > highest(H,P)[1] and (HH == 0 or (HH > 0 and abs(H-HH) >= PriceScale*틱)) Then { HH = H; For cnt = 9 DownTo 1 { HTL[cnt] = HTL[cnt-1]; } HTL[0] = TL_new(sDate,sTime,HH,NextBarSdate,NextBarStime,HH); TL_SetColor(HTL[0],Magenta); TL_SetSize(HTL[0],2); TL_Delete(HTL[n]); } Else { TL_SetEnd(HTL[0],sDate,sTime,HH); } #######################################################################33 수고하십시요.
프로필 이미지
요타
2023-12-10
966
글번호 174711
검색
답변완료

문의 드립니다

안녕하세요 키움수식 변환입니다 키움bwi 지표(볼밴 보조지표입니다) (수식 1) bwi(4,2) (수식 2) bwi(20,2) 입니다 감사합니다
프로필 이미지
만강
2023-12-09
888
글번호 174710
지표

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

프로필 이미지
만강
2023-12-09
0
글번호 174709
지표
답변완료

수정 부탁드립니다.

안녕하세요? 담당자님, 친절하고 자세한 설명 매우큰 도움 되어서 감사함을 표시합니다. 정말 감사합니다. 아래의 수식에서 봉이 마감후 진입할수있게 진입을 변경하고싶습니다. 진입신호가나온후 봉마감할때 진입할수있게 해주시면 감사하겠습니다~ inputs: Length(10), Pval(0.05),당일청산(153000); input : 익절틱수(10), 손절틱수(10), 진입횟수(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1 ; if entry < 진입횟수 then Sell("CBI", AtStop, Lowest(Low, Length) - Pval); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopEndofday(당일청산);
프로필 이미지
대구어린울프
2023-12-09
984
글번호 174708
시스템
답변완료

부탁드립니다.

변환 부탁 드립니다. 감기조심하세요 선형회귀 관련 캔들입니다. study("Linear Regression Channel", overlay = true, max_bars_back = 1000, max_lines_count = 300) src = input(defval = close, title = "Source") len = input(defval = 100, title = "Length", minval = 10) devlen = input(defval = 2., title = "Deviation", minval = 0.1, step = 0.1) extendit = input(defval = true, title = "Extend Lines") showfibo = input(defval = false, title = "Show Fibonacci Levels") showbroken = input(defval = true, title = "Show Broken Channel", inline = "brk") brokencol = input(defval = color.blue, title = "", inline = "brk") upcol = input(defval = color.lime, title = "Up/Down Trend Colors", inline = "trcols") dncol = input(defval = color.red, title = "", inline = "trcols") widt = input(defval = 2, title = "Line Width") var fibo_ratios = array.new_float(0) var colors = array.new_color(2) if barstate.isfirst array.unshift(colors, upcol) array.unshift(colors, dncol) array.push(fibo_ratios, 0.236) array.push(fibo_ratios, 0.382) array.push(fibo_ratios, 0.618) array.push(fibo_ratios, 0.786) get_channel(src, len)=> mid = sum(src, len) / len slope = linreg(src, len, 0) - linreg(src, len, 1) intercept = mid - slope * floor(len / 2) + ((1 - (len % 2)) / 2) * slope endy = intercept + slope * (len - 1) dev = 0.0 for x = 0 to len - 1 dev := dev + pow(src[x] - (slope * (len - x) + intercept), 2) dev := sqrt(dev/len) [intercept, endy, dev, slope] [y1_, y2_, dev, slope] = get_channel(src, len) outofchannel = (slope > 0 and close < y2_ - dev * devlen) ? 0 : (slope < 0 and close > y2_ + dev * devlen) ? 2 : -1 var reglines = array.new_line(3) var fibolines = array.new_line(4) for x = 0 to 2 if not showbroken or outofchannel != x or nz(outofchannel[1], -1) != -1 line.delete(array.get(reglines, x)) else line.set_color(array.get(reglines, x), color = brokencol) line.set_width(array.get(reglines, x), width = 2) line.set_style(array.get(reglines, x), style = line.style_dotted) line.set_extend(array.get(reglines, x), extend = extend.none) array.set(reglines, x, line.new(x1 = bar_index - (len - 1), y1 = y1_ + dev * devlen * (x - 1), x2 = bar_index, y2 = y2_ + dev * devlen * (x - 1), color = array.get(colors, round(max(sign(slope), 0))), style = x % 2 == 1 ? line.style_solid : line.style_dashed, width = widt, extend = extendit ? extend.right : extend.none)) if showfibo for x = 0 to 3 line.delete(array.get(fibolines, x)) array.set(fibolines, x, line.new(x1 = bar_index - (len - 1), y1 = y1_ - dev * devlen + dev * devlen * 2 * array.get(fibo_ratios, x), x2 = bar_index, y2 = y2_ - dev * devlen + dev * devlen * 2 * array.get(fibo_ratios, x), color = array.get(colors, round(max(sign(slope), 0))), style = line.style_dotted, width = widt, extend = extendit ? extend.right : extend.none)) var label sidelab = label.new(x = bar_index - (len - 1), y = y1_, text = "S", size = size.large) txt = slope > 0 ? slope > slope[1] ? "&#8657;" : "&#8663;" : slope < 0 ? slope < slope[1] ? "&#8659;" : "&#8664;" : "⇒" stl = slope > 0 ? slope > slope[1] ? label.style_label_up : label.style_label_upper_right : slope < 0 ? slope < slope[1] ? label.style_label_down : label.style_label_lower_right : label.style_label_right label.set_style(sidelab, stl) label.set_text(sidelab, txt) label.set_x(sidelab, bar_index - (len - 1)) label.set_y(sidelab, slope > 0 ? y1_ - dev * devlen : slope < 0 ? y1_ + dev * devlen : y1_) label.set_color(sidelab, slope > 0 ? upcol : slope < 0 ? dncol : color.blue) alertcondition(outofchannel, title='Channel Broken', message='Channel Broken') // direction trendisup = sign(slope) != sign(slope[1]) and slope > 0 trendisdown = sign(slope) != sign(slope[1]) and slope < 0 alertcondition(trendisup, title='Up trend', message='Up trend') alertcondition(trendisdown, title='Down trend', message='Down trend')
프로필 이미지
다올
2023-12-09
1168
글번호 174707
지표
답변완료

볼밴돌파수식

84895번에 답변에 대한 후속문의 있읍니다. =================================================== 이건 다른건데요, 아래 수식은 종전에 60봉간 좁은 볼밴폭 유지 후 볼밴상한선 돌파하는 봉을 검색하는 것이었는데, 거의 나오지 않아 다음과 같이 단순화하고 싶어 수식수정바랍니다. .동일 볼밴 이용(120,1) .종가가 120봉간 볼밴상한선 미만(120봉간 한번도 상한선돌파하는 종가가 없음) .상/하 볼밴의 폭은 무시 .0봉에 볼밴상한선 돌파 간단한거 같아 시도해봐도 안되어서 할 수 없이 문의드립니다. ==================================================== input : Period(120),dv(1); input : N(60),Per1(10),Per2(5); var : BBup(0),BBdn(0),Emav(0),R(0); BBup = BollBandUp(Period,dv); BBdn = BollBandDown(Period,dv); Emav = Ema(c,Period); R = (Emav-Emav[N])/Emav[N]*100; value1 = highest(BBup,Period); value2 = lowest(BBdn,Period); if CrossUp(c,bbup) and CountIf(H > bbup,N)[1] < 1 and value1[1] <= Value2[1]*(1+Per1/100) and R <= Per2 and R >= -Per2 Then Find(1);
프로필 이미지
ksks
2023-12-11
1183
글번호 174706
종목검색