커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

부탁드립니다

수고하십니다 예스로 부탁드립니다 // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // Credits to the original s c ript - Range Filter DonovanWall https://www.tradingview.com/s c ript/lut7sBgG-Range-Filter-DW/ // This version is the old version of the Range Filter with less settings to tinker with //@version=4 study(title="Range Filter - B&S Signals", shorttitle="RF - B&S Signals", overlay=true) //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Functions //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Range Size Function rng_size(x, qty, n)=> // AC = Cond_EMA(abs(x - x[1]), 1, n) wper = (n*2) - 1 avrng = ema(abs(x - x[1]), n) AC = ema(avrng, wper)*qty rng_size = AC //Range Filter Function rng_filt(x, rng_, n)=> r = rng_ var rfilt = array.new_float(2, x) array.set(rfilt, 1, array.get(rfilt, 0)) if x - r > array.get(rfilt, 1) array.set(rfilt, 0, x - r) if x + r < array.get(rfilt, 1) array.set(rfilt, 0, x + r) rng_filt1 = array.get(rfilt, 0) hi_band = rng_filt1 + r lo_band = rng_filt1 - r rng_filt = rng_filt1 [hi_band, lo_band, rng_filt] //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Inputs //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Range Source rng_src = input(defval=close, type=input.source, title="Swing Source") //Range Period rng_per = input(defval=20, minval=1, title="Swing Period") //Range Size Inputs rng_qty = input(defval=3.5, minval=0.0000001, title="Swing Multiplier") //Bar Colors use_barcolor = input(defval=false, type=input.bool, title="Bar Colors On/Off") //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Definitions //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Range Filter Values [h_band, l_band, filt] = rng_filt(rng_src, rng_size(rng_src, rng_qty, rng_per), rng_per) //Direction Conditions var fdir = 0.0 fdir := filt > filt[1] ? 1 : filt < filt[1] ? -1 : fdir upward = fdir==1 ? 1 : 0 downward = fdir==-1 ? 1 : 0 //Trading Condition longCond = rng_src > filt and rng_src > rng_src[1] and upward > 0 or rng_src > filt and rng_src < rng_src[1] and upward > 0 shortCond = rng_src < filt and rng_src < rng_src[1] and downward > 0 or rng_src < filt and rng_src > rng_src[1] and downward > 0 CondIni = 0 CondIni := longCond ? 1 : shortCond ? -1 : CondIni[1] longCondition = longCond and CondIni[1] == -1 shortCondition = shortCond and CondIni[1] == 1 //Colors filt_color = upward ? #05ff9b : downward ? #ff0583 : #cccccc bar_color = upward and (rng_src > filt) ? (rng_src > rng_src[1] ? #05ff9b : #00b36b) : downward and (rng_src < filt) ? (rng_src < rng_src[1] ? #ff0583 : #b8005d) : #cccccc //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Outputs //----------------------------------------------------------------------------------------------------------------------------------------------------------------- //Filter Plot filt_plot = plot(filt, color=filt_color, transp=67, linewidth=3, title="Filter") //Band Plots h_band_plot = plot(h_band, color=color.new(#05ff9b, 100), title="High Band") l_band_plot = plot(l_band, color=color.new(#ff0583, 100), title="Low Band") //Band Fills fill(h_band_plot, filt_plot, color=color.new(#00b36b, 92), title="High Band Fill") fill(l_band_plot, filt_plot, color=color.new(#b8005d, 92), title="Low Band Fill") //Bar Color barcolor(use_barcolor ? bar_color : na) //Plot Buy and Sell Labels plotshape(longCondition, title = "Buy Signal", text ="BUY", textcolor = color.white, style=shape.labelup, size = size.normal, location=location.belowbar, color = color.new(color.green, 0)) plotshape(shortCondition, title = "Sell Signal", text ="SELL", textcolor = color.white, style=shape.labeldown, size = size.normal, location=location.abovebar, color = color.new(color.red, 0)) //Alerts alertcondition(longCondition, title="Buy Alert", message = "BUY") alertcondition(shortCondition, title="Sell Alert", message = "SELL")
프로필 이미지
파생돌이
58
글번호 194379
지표
답변완료

수식좀 부탁합니다

우선 늘 감사합니다 오전 11시 기준 총 계약수 3개약 매매입니다 이평선 60 100 사용합니다 매수가 한번 들어가면 다른 매수 들어가지 않습니다 손절 익절이 있어야 다음 매수든 매도든 들어갑니다 매수1 -- 2봉의 고가를 현재봉이 돌파로 완성하면 매수 단(현재봉의 2/1 이상이 2봉의 고가 위에 있어야 합니다) 매수2 -- 60 이평선 돌파시 매수(봉 완전히(지가 시가 종가 고가) 돌파시 매도1 -- 매수1의 반대 매도2 -- 매수2의 반대 매수손절1 -- 첫봉의 저가 이탈수 손절 단(현재봉의 2/1 이상이 저가 아래 있어야 합니다) 매수손절2 -- 100 이평선 이탈시 손절 (봉 완전히(지가 시가 종가 고가) 이탈시 매도손절1 -- 매수1손절의 반대 매도손절2 -- 매수2손절의 반대 익절 -- 100틱에 1계약 정리 200틱에 1계약 정리 300틱에 1계약 정리 각 줄 주석좀 부탁합니다
프로필 이미지
kjdkdh
41
글번호 194378
시스템
답변완료

다시 문의 드립니다.

예스_스탁(250928) - 94452 안녕하십니까? 수식 부탁 드립니다 ------------------------------------------- 보내주신 수식에는 1.상단선의 고점과 저점만 표시 됨니다 [ 추가 ] 1. 하단선의 고점과 저점 2. 중심선의 고점과 저점 3. 상단고점. 상단저점 4. 하단고점. 하단저점 5. 중심고점. 중심저점 으로 표시해 주십시요 추가 하여주시면 감사 하겠읍니다 항상 감사 합니다 명절 잘 보내 십시요 ----------------------------------------- 예스_스탁(250928) - 94452 안녕하십니까? 수식 부탁 드립니다 1.상단선 AA = atr(a_period); A = eavg(가격 + AA*ratio, 기간); 2. 하단선 AA = atr(a_period); B = eavg(가격 - AA*ratio, 기간); 3.중심 (A + B)/2 4. 상단선_고점 AA = atr(a_period); A = eavg(가격 + AA*ratio, 기간); Valuewhen(1, A > A(1), A) 5. 하단선_저점 AA = atr(a_period); A = eavg(가격 - AA*ratio, 기간); Valuewhen(1, A < A(1), A) ------------------------------------- A_period = 10 ratio = 1 가격 = (H+L)/2 기간 = 5 =========================
프로필 이미지
s1017051
58
글번호 194372
지표
답변완료

30분봉참조

5분봉챠트 수식에서 30분챠트의 분봉 시가가 60평 이격할때 참조하는 수식 부탁드립니다
프로필 이미지
변일구
49
글번호 194357
시스템
답변완료

강조 수식 질문

예스스탁이 처음입니다. Var: gap1(0), gap2(0), tx(0); Input: Th(3); gap1 = (Ma(Close, 1) - Close) / Close * 100; gap2 = (Ma(Close, 2) - Close) / Close * 100; If (gap1 - gap2) > Th Then { tx = Text_New(sDate, sTime, Low, "▲"); Text_SetColor(tx, Green); Text_SetSize(tx, 15); } 위처럼 강조를 짜봤는데요. 화살표가 캔들의 가운데에 안오고 좌측에 붙어 나옵니다. 혹시 가운데 정렬처럼 가운데 오게 할 수 있을까요????
프로필 이미지
thskan
43
글번호 194356
강조
답변완료

안녕하세요

3202 파워종목에서 거래대금 상위 30개 + 제가 만든 종목검색 수식을 적용하여 분봉에서 조건에 충족하는 종목을 영웅문 0156 조건검색실시간 화면같이 실시간으로 종목 검색이 가능하도록 확인이 가능한지 궁금합니다. 혹시 가능하다면 방법 문의드리고자 합니다. 감사합니다.
프로필 이미지
로즈버드
47
글번호 194355
종목검색
답변완료

청산 조건식 부탁드립니다.

매수 후 한번이라도 이동평균선(5,10,20일)이 정배열 되었다면 매도조건이 충족되는 조건식을 부탁드립니다.
프로필 이미지
eel
45
글번호 194354
시스템
답변완료

키움 수식을 검색식으로 변환 부탁 드립니다.

수고가 많으십니다. 아래의 3가지 수식을 검색식으로 부탁드립니다. 감사합니다. 1. A=eavg(if(C>avg(c,20),V,if(C<avg(C,20),-V,0)),9); B=ma(A,9); Crossup(A,B) && C>O 2. Period: 20 signal: 10; A=avg(abs(이전종가()-C),Period); B=ma(avg(abs(이전종가()-C),Period),signal); Crossup(A,B) && C>O 3. 지표변수: con1(10), con2(5),con3(10); x1=avg(c,5)<avg(c,200) && avg(c,10)<avg(c,200) && avg(c,20)<avg(c,200) && avg(c,60)< avg(c,200); x2=c(10)<avg(c,200,10) && c(30)<avg(c,200,30) && c(60)<avg(c,200,60); x3=abs(avg(c,5,1) / avg(c,10,1)-1) *100<=con1; x4=abs(avg(c,10,1) / avg(c,20,1)-1) *100<=con1; x5=abs(avg(c,20,1) / avg(c,60,1)-1) *100<=con1; x6=avg(c,5)>avg(c,10) && avg(c,10)>avg(c,20); x7=(c/o-1)*100>=con2; x8=(c(1)/o(3)-1)*100<=con3; x9=v>avg(v,20)*2; x1 && x2 && x3 && x4 && x5 && x6 && x7 && x8 && x9;
프로필 이미지
작은소망1
58
글번호 194353
종목검색
답변완료

문의

선물 총잔량에서 매수총잔량이 더 클때 차트바탕화면에 노랑색으로 표시될수 있게 해주셔요
프로필 이미지
엉덩공주
47
글번호 194352
지표
답변완료

종목 검색 부탁드립니다.

1. 아래수식을 참조하여,일봉기준 수식4) 가 현재 기준선0 위에 있는 종목중 전일보다 상승한 종목 (기준선0을 돌파한 종목 포함) 검색식 부탁드려요 ----------아래-------------------- 수식1) // 캔들 구성 요소 계산 upper_wick = if(C>O, H-C, H-O); lower_wick = if(C>O, O-L, C-L); spread = H-L; body_length = spread - (upper_wick + lower_wick); // 비율 계산 percent_upper_wick = upper_wick/spread; percent_lower_wick = lower_wick/spread; percent_body_length = body_length/spread; // 매수 거래량 buying_volume = if(C>O, (percent_body_length + (percent_upper_wick + percent_lower_wick)/2)*V, ((percent_upper_wick + percent_lower_wick)/2)*V); // 누적 매수 거래량 eavg(buying_volume, cumulation_length) 수식2) // 기본 계산 (수식1과 동일) upper_wick = if(C>O, H-C, H-O); lower_wick = if(C>O, O-L, C-L); spread = H-L; body_length = spread - (upper_wick + lower_wick); percent_upper_wick = upper_wick/spread; percent_lower_wick = lower_wick/spread; percent_body_length = body_length/spread; // 매도 거래량 selling_volume = if(C<O, (percent_body_length + (percent_upper_wick + percent_lower_wick)/2)*V, ((percent_upper_wick + percent_lower_wick)/2)*V); // 누적 매도 거래량 eavg(selling_volume, cumulation_length) 수식3) // 누적 거래량 계산 cumulative_buying = eavg(if(C>O, (((H-L)-(if(C>O,H-C,H-O)+if(C>O,O-L,C-L)))/(H-L) + ((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V, (((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V), cumulation_length); cumulative_selling = eavg(if(C<O, (((H-L)-(if(C>O,H-C,H-O)+if(C>O,O-L,C-L)))/(H-L) + ((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V, (((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V), cumulation_length); // 거래량 강도 파동의 EMA volume_strength = if(cumulative_buying > cumulative_selling, cumulative_buying, cumulative_selling); eavg(volume_strength, cumulation_length) 수식4) // 매수/매도 거래량 재계산 buying_vol = eavg(if(C>O, (((H-L)-(if(C>O,H-C,H-O)+if(C>O,O-L,C-L)))/(H-L) + ((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V, (((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V), cumulation_length); selling_vol = eavg(if(C<O, (((H-L)-(if(C>O,H-C,H-O)+if(C>O,O-L,C-L)))/(H-L) + ((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V, (((if(C>O,H-C,H-O)+if(C>O,O-L,C-L))/2)/(H-L))*V), cumulation_length); // 델타 계산 buying_vol - selling_vol ------- 지표조건 cumulation_leng 28 ------- 기준선 0
프로필 이미지
일지매7
56
글번호 194351
종목검색