커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

차트에 RSI(14) 65이상, 30미만 표시

자꾸 질의가 길어져 죄송합니다. 아래 수식으로 강조에 해봐도 첨부파일1(황금색은 65이상, 회색은 30미만) 과 같이 차트의 가격화면에 제대로 표시되지 않습니다. 예를들면 어제 2.20일 애니플러스 일봉의 RSI(14)는 77.06이었는데 색이 나오지 않았어요. 가능하다면 차트에 실제 넣어서 실증해보시면 어떨까요? 검토바랍니다. ======================================================================= input : P(14); var : R(0),Box(0); R = RSI(P); Condition1 = R >= 65; Condition2 = R <= 30; if Condition1 == true Then { if Condition1 != Condition1[1] Then { box = box_new(sDate,sTime,0,sDate,sTime,9999999); Box_SetColor(Box,Gold); Box_SetFill(Box,true); Box_SetExtFill(box,true);//하단 지표영역까지 모두 표시 } Else Box_SetEnd(box,sDate,sTime,9999999); } if Condition2 == true Then { if Condition2 != Condition2[1] Then { box = box_new(sDate,sTime,0,sDate,sTime,9999999); Box_SetColor(Box,Gray); Box_SetFill(Box,true); Box_SetExtFill(box,true);//하단 지표영역까지 모두 표시 } Else Box_SetEnd(box,sDate,sTime,9999999); }
프로필 이미지
ksks
2024-02-20
1098
글번호 176811
강조
답변완료

문의드립니다

max( avg(C,short), avg(C,mid), avg(C,long)) < min( avg(C,short), avg(C,mid), avg(C,long)) * (1+Percent/100) && HIGHEST(H, 4, 1) < C and O < C and ((C(1)*1.025 <= C) or (O*1.025 <= C)) and (C-O)*2.5 >= (H-C) and V(1)*1.2 <= V and avg(V, 5) >= 30000 and PreDayClose() >= 950 and Crossup(C,SAR(0.02, 0.2)) and CrossUp(h,BBandsUp(20, 2)) short 5 mid 20 long 60 percent 5 이 수식의 종목검색을 부탁드립니다
프로필 이미지
또리
2024-02-20
1065
글번호 176810
종목검색
답변완료

10년치의 데이터 사용 지표

안녕하세요 10년치의 데이터를 사용하는 지표를 만들고싶습니다. 일봉상 사용할거고 주식, 해선 싹 다 사용할 예정입니다. var3가 중요합니다. ------ var: var1(0), Var2(0), Var3(0), DaysVari(0); If bar_index <2560 then DaysVari = bar_index+1 else if bar_index >= 2560 then DaysVari = 2560; var1 = 볼린저밴드상단선(C, 1.78); var2 = ma(var1, 20); var3 = ma(var2, DaysVari); ------ 이렇게 하면 var3가 원하는데로 잘 출력이 되는데요, 전략을 적용하려할때 최소봉수? Maxbarsback?이라해야하나 이거 때문에 잘 안되는 것 같습니다. 즉, 전략을 적용하면 바로바로 매수 매도가 떠야하는데, 첫 봉 이후 10년 뒤부터 전략이 작동된다거나 그래요... Array에 해당 var3 데이터들을 담아서 사용하면 될 것 같기도 한데 어떻게 이 난관을 지나쳐야하는지 모르겠습니다. 도움 부탁드립니다 ㅠㅠㅠ
프로필 이미지
이만스닥
2024-02-20
1073
글번호 176809
지표
답변완료

예스트레이더 종목검색식으로 작성요청합니다.

항상감사드립니다.. 아래수식은 키움에서 작성된 수식입니다.. 예스종목검색으로 작성요청드립니다... MID=MA(C,20); MID1=MA(V,20); dev = 2 * stdev(C,20); dev1 = 2 * stdev(V,20); RNG=ATR(20); A=upperBB = MID + dev; A1=lowerBB = MID - dev; A2=VUPBB = MID1 + dev1; A3=VDNBB = MID1 - dev1; B=MID+1.5*RNG; B1=MID-1.5*RNG; A<B AND A1>B1 AND LRS(20)>0 AND O<C
프로필 이미지
서민순
2024-02-20
886
글번호 176808
종목검색
답변완료

안녕하세요 차트 수식문의드립니다.

수고하십니다. 수식문의드립니다. 일봉기준으로 특정일(예:20240220)을 변수로 입력하여 그 특정일의 시가를 차트에 표시하고 그 특정일 이후에 나온 봉중 가장 높은 고가와 가장 낮은 저가를 차트에 표시한다음 특정일의 시가대비 고가의 상승률을 특정일의 시가대비 저가의 하락률을 차트에 표시하고 싶습니다. 답변부탁드립니다. 감사합니다!
프로필 이미지
수다리
2024-02-20
1083
글번호 176807
검색
답변완료

수고하십니다

1) 0봉전 . 120봉전 중 최저가 2) 0봉전 60봉전 중 최고가 종목 검색 부탁드립니다 감사합니다
프로필 이미지
쌍둥이
2024-02-20
1210
글번호 176806
검색
답변완료

도움요청합니다

a=predayhigh(); o < a and h > a and avg(v,1)>100000 전일고가선 아래에서 위로돌파 1분거래량10만주이상 랭귀지에 사용하게 도와주새요
프로필 이미지
gksk
2024-02-20
875
글번호 176805
종목검색
답변완료

문의 드립니다

input : StartTime(80000),EndTime(40000); input : 익절틱수(400),손절틱수(200); var : Tcond(False),entry(0); Variables: Mom(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b1",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s1",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b2",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s2",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b3",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s3",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b4",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s4",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b5",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s5",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b6",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s6",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b7",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s7",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b8",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s8",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b9",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s9",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b10",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s10",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then { Buy("b11",AtStop,(highest(H,3)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 2 Then ExitShort(); if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then { Sell("s11",AtStop,(lowest(L,3)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 2 Then ExitLong(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어의 해외선물에서 4가지 변경된 수식어를 부탁 드립니다. 1. 전일잔고를 아침 7시40분 ~8시사이 업데이트 시간 이후 특정한 시간에 청산되는 변경된 수식어 2. startTime에 진입후 체결과 endTime에 잔고가 청산되는 변경된 수식어 3. 익절과 손절후 잔고가 없는 변경된 수식어 4. 익절후 매매정지
프로필 이미지
푸른
2024-02-21
1000
글번호 176804
시스템
답변완료

지표식좀 부탁합니다

안녕하세요 이미지에 보시는것 처럼 매수 매도 신호를 사용하고 있습니다 중간선을 차트에 나오게 만들고 십네요 1. 주가가 5일선 아래에서 놀다가 5일선 돌파하고 조건이 맞으면 매수가 나오고 2. 주가가 5일선 위에서 놀다가 5일선 이탈하고 조건이 맞으면 매도가 나오고 있습니다 1번 매수 나오기전 5일선 아래 저점 2번 매도 나오기전 5일선 위 고점 이 1번2번의 중간선을 차트에 나오게 했으면합니다
프로필 이미지
상영중
2024-02-20
849
글번호 176803
지표
답변완료

라운드 피겨 가격

감사합니다 가격 호가범위가 510000원 520000원 처럼 변할 때 호가의 만단위 10000, 20000, ~ 가격 호가범위가 11000윈 12000원 처럼 변할 때 호가의 천단위 1000, 2000, 3000 ~ 가격 호가범위가 3100원 3200원 처럼 변할 때 호가의 백단위 100, 200, 300 ~ 가격 호가범위가 500원 600원처럼 변할 딱 호가의 십단위 500, 600 ~ 위 처럼 각 호가 단위의 십단위, 백단위, 천단위, 만단위, 십만단위의 일명 라운드 피겨가격을 자동/수동으로 그리고 싶습니다. 호가변동과 무관하게 지표만 그려도 되고 호가가 종가상으로 라운드 피겨가격을 돌파했을 때 지표를 그려도 됩니다 라운드 피겨 가격 개념 우리가 라운드 피겨라고 부르는 단어는 사실 라운드 넘버 (Round number)로 사용되고 있습니다. 라운드 넘버의 뜻은 '주어진 자릿수에서 하나 이상의 0으로 끝나는 숫자 들을 비공식적으로 부르는 것'입니다. 713이라는 숫자보 다는 710이, 710보다는 700이 더 라운드 넘버에 가깝습 니다. 즉 100, 500, 800, 1000, 10000 같이 딱딱 떨어지 는 숫자들을 지칭합니다. 1 Round 사용자 함수를 만들고 싶습니다. 위의 개념과 유사한 트레이딩 뷰 지표를 찾아봤습니다. 변환하여 쓸 수 있으면 좋겠습니다. 인서트 영어는 쓰기금지 되어있다기에 한글로 써봅니다. 2 Round Number Levels // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; melodicfish //@version=5 indicator("Round Number Levels",overlay = true,max_labels_count = 101,max_lines_count = 101) incrementVal=input.float(defval=500, title="Unit Place Rounding Value", tooltip = "The Unit Place that a number will be rounded and distance between rounded levels. Example Value setting of 100 and a price of 225.00 would result in a line level value of 200.00; Where a price of 265.00 would result in a line level value of 300 with the same value setting of 100") lQty=input.int(defval=2,minval=1,maxval=50, title="Line Amount",tooltip = "Each Line Amount increase will add a line level above and below baseline level; Baseline = line nearest to price) ") offset=input.int(defval=50,minval=0, maxval=490,step=10, title="Line Price Horizontal Offset",inline = "a") textCol=input.color(defval = color.white,title="Price Label Text Color",tooltip = "Use Horizontal Offset to adjust the X position of the price labels. To hide price labels disable Labels on the style tab",inline = "a") belowColor=input.color(defval = color.blue,title="Line Color Below price",inline="b") aboveColor=input.color(defval = color.orange,title="Line Color Above price",inline="b") ext=input.string(defval = "To Right",options = ["To Right","Both"],title="Extend Line: ") float iv= incrementVal lQty:=lQty+1 var lines=array.new_line(lQty*2) var labels=array.new_label(lQty*2) var line baseLine=na RoundValue(value) => math.round(value / iv) * iv baseVal=RoundValue(close) if barstate.isconfirmed and baseVal!= baseVal[1] for i = 0 to (lQty*2) - 1 line.delete(array.get(lines,i)) label.delete(array.get(labels,i)) lines:=array.new_line(lQty*2) labels:=array.new_label(lQty*2) for j = 0 to lQty - 1 newLine=line.new(bar_index,baseVal+(j*iv),bar_index+1,baseVal+(j*iv),extend=ext=="Both"?extend.both:extend.right,color=close>baseVal+(j*iv)?belowColor:aboveColor) newLabel=label.new(bar_index+1+offset,baseVal+(j*iv),text=str.tostring(baseVal+(j*iv)),style= label.style_none,textcolor = textCol, textalign=text.align_right) array.인서트(lines,j,newLine) array.인서트(labels,j,newLabel) for k = 1 to lQty - 1 newLine=line.new(bar_index,baseVal-(k*iv),bar_index+1,baseVal-(k*iv),extend=ext=="Both"?extend.both:extend.right,color=belowColor) newLabel=label.new(bar_index+1+offset,baseVal-(k*iv),text=str.tostring(baseVal-(k*iv)),style= label.style_none,textcolor = textCol, textalign=text.align_right) array.인서트(lines,k+lQty,newLine) array.인서트(labels,k+lQty,newLabel) else if barstate.isconfirmed and baseVal== baseVal[1] line.set_color(array.get(lines,0),color=close>baseVal?belowColor:aboveColor) for l = 0 to (lQty*2)-1 label.set_x(array.get(labels,l),bar_index+1+offset) 3 Round Number Zones. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; trading-guide //@version=5 indicator("Round Number Zones", overlay=true) line_col = input(color.gray, title ="Line color") line_width = input.int(2, title = "Line width", minval = 1, maxval = 5) line_count = input.int(title="Line count", defval=10) line_count_2 = math.floor(line_count / 2) // Symbol 1 : EURUSD default show_sym_1 = input.bool(title="Show", defval=true, inline="2") sym_1 = input.symbol("EURUSD",title=" ", inline="2") sym_1_steps = input.float(title="+/-", defval=0.001, inline="2") sym_1_sec = request.security(sym_1,timeframe.period, close) sym_1_use_custom_price = input.bool(title="Custom Price", defval=false, inline="3") sym_1_custom_price = input.float(title="", defval=1.08, inline="3") // Symbol 2 : GOLD default show_sym_2 = input.bool(title="Show", defval=true, inline="4") sym_2 = input.symbol("GOLD",title=" ", inline="4") sym_2_steps = input.float(title="+/-", defval=5, inline="4") sym_2_sec = request.security(sym_2,timeframe.period, close) sym_2_use_custom_price = input.bool(title="Custom Price", defval=false, inline="5") sym_2_custom_price = input.float(title="", defval=1900, inline="5") // Symbol 3 : US30 default show_sym_3 = input.bool(title="Show", defval=true, inline="6") sym_3 = input.symbol("US30",title=" ", inline="6") sym_3_steps = input.float(title="+/-", defval=50, inline="6") sym_3_sec = request.security(sym_3,timeframe.period, close) sym_3_use_custom_price = input.bool(title="Custom Price", defval=false, inline="7") sym_3_custom_price = input.float(title="", defval=3500, inline="7") draw_line(sym, show, steps, custom, custom_price) => if sym == syminfo.prefix + ":" +syminfo.ticker and show for i = 0 to line_count - 1 price = custom ? custom_price : close step = math.ceil(price / steps) * steps + (i * steps) - (line_count_2 * steps) line.new(bar_index, step, bar_index - 1, step, xloc=xloc.bar_index, extend=extend.both, color=line_col, width=line_width, style=line.style_dotted) draw_line(sym_1, show_sym_1, sym_1_steps, sym_1_use_custom_price, sym_1_custom_price) draw_line(sym_2, show_sym_2, sym_2_steps, sym_2_use_custom_price, sym_2_custom_price) draw_line(sym_3, show_sym_3, sym_3_steps, sym_3_use_custom_price, sym_3_custom_price)
프로필 이미지
jdavid
2024-02-21
1199
글번호 176797
지표