커뮤니티

예스랭귀지 Q&A

글쓰기

종목검색식 부탁드림니다.

항상 노고에 감사드림니다. 아래의 수식을 종목검색식으로 부탁드림니다. 선행1=shift((highest(high,5)+lowest(low,5)+highest(high,20)+lowest(low,20))/4,20-1); 선행2=shift((highest(high,60)+lowest(low,60))/2,20-1); 이동120=ma(C,120); 라인=Valuewhen(1,Crossup(선행1,선행2) or Crossdown(선행1,선행2),min(L,L(1))); Crossup(C, 라인) && Crossup(C, 이동120) && V(1) * 2 <= V && C>O
프로필 이미지
존슨비치
2024-11-05
630
글번호 184998
종목검색
답변완료

전환추세 동시

Input : 전환(0.8); Var:j(0),jj(0),HH(0),LL(0),hiBar(0),loBar(0),최종꼭지점(""),처리구분(""); Array:고[10,4](0),저[10,4](0); var :box(0), TL(0), TL1(0),T(0),Tx(0),Tx2(0); Plot1(c); HH = H; LL = L; If Index == 0 Then { 고[1,1] = HH; 고[1,2] = 0; 고[1,3] = sDate; 고[1,4] = sTime; 저[1,1] = LL; 저[1,2] = 0; 저[1,3] = sDate; 저[1,4] = sTime; } If Index > 0 Then { hiBar = hiBar + 1; loBar = loBar + 1; } If HH[hiBar] < HH Then hiBar = 0; If LL[loBar] > LL Then loBar = 0; Condition1 = 저[1,1]+전환 <= HH and hiBar == 0; Condition2 = 고[1,1]-전환 >= LL and loBar == 0; 처리구분 = ""; If Condition1 and Condition2 Then { If 최종꼭지점 == "저점" Then { If 저[1,1] > LL Then 처리구분 = "저점처리"; Else 처리구분 = "고점처리"; } Else If 최종꼭지점 == "고점" Then { If 고[1,1] < HH Then 처리구분 = "고점처리"; Else 처리구분 = "저점처리"; } } Else If Condition1 Then 처리구분 = "고점처리"; Else If Condition2 Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { t = 1; If 최종꼭지점 == "저점" Then { For j = 10 DownTo 2 { For jj = 1 To 4 { 고[j,jj] = 고[j-1,jj]; } } 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar = -1; loBar = -1; TX = Text_New(고[1,3],고[1,4],고[1,1],NumToStr(고[1,1]-저[1,1],2)); Text_SetSize(tx,25); Text_SetColor(tx,Red); Text_SetStyle(tx,1,1); Text_SetBold(tx,1); TL = TL_New(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); TL_SetSize(TL,1); TL_SetColor(TL,RED); Condition8 = False; } If 고[1,1] < HH[hiBar] Then { 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar = -1; loBar = -1; if Condition8 == False and 저[1,1] <= 고[1,1]-0.8 Then { Condition8 = true; TL1= TL_New(sDate,sTime,0,sDate,sTime,999); TL_SetColor(TL1,Blue); } TL_SetEnd(TL,고[1,3],고[1,4],고[1,1]); Text_SetString(TX,NumToStr(고[1,1]-저[1,1],2)); Text_SetLocation(TX,고[1,3],고[1,4],고[1,1]); } 최종꼭지점 = "고점"; } If 처리구분 == "저점처리" Then { t = -1; If 최종꼭지점 == "고점" Then { For j = 10 DownTo 2 { For jj = 1 To 4 { 저[j,jj] = 저[j-1,jj]; } } 저[1,1] = LL[loBar]; 저[1,2] = Index - loBar; 저[1,3] = sDate[loBar]; 저[1,4] = sTime[loBar]; hiBar = -1; loBar = -1; TX = Text_New(저[1,3],저[1,4],저[1,1],NumToStr(고[1,1]-저[1,1],2)); Text_SetSize(tx,25); Text_SetColor(tx,Blue); Text_SetStyle(tx,1,0); Text_SetBold(tx,1); TL = TL_New(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); TL_SetSize(TL,1); TL_SetColor(TL,Green); Condition4 = False; } If 저[1,1] > LL[loBar] Then { 저[1,1] = LL[loBar]; 저[1,2] = Index - loBar; 저[1,3] = sDate[loBar]; 저[1,4] = sTime[loBar]; hiBar = -1; loBar = -1; if Condition4 == False and 저[1,1] <= 고[1,1]-0.8 Then { Condition4 = true; TL1= TL_New(sDate,sTime,0,sDate,sTime,999); TL_SetColor(TL1,Red); } TL_SetEnd(TL,저[1,3],저[1,4],저[1,1]); Text_SetString(TX,NumToStr(고[1,1]-저[1,1],2)); Text_SetLocation(TX,저[1,3],저[1,4],저[1,1]); } 최종꼭지점 = "저점"; } 지난번에 알려주신 수식을, 여기에 응용해봤는데 잘 안맞네요. 전환조건 0.8과 추세 크기 0.8일 때 세로선 표시를, 같은 크기로 설정하면, (30틱 차트) 해당 첫봉에 세로선 표시가 안되고, 다음 해당봉에 표시가 됩니다. 수정 부탁드립니다.
프로필 이미지
고성
2024-11-05
582
글번호 184997
지표
답변완료

확인 좀 부탁 드립니다.

그림에서 처럼 매수신호에 진입하였으나 손절신호가 나왔으나 손절청산 주문이 안나왔습니다. 원인이 무엇인지 알 수 있나요? (프로그램사용법에 문의했으나 답이 없어 수식작성란에 문의합니다.)
프로필 이미지
산수유
2024-11-05
603
글번호 184990
시스템
답변완료

종목검색식 요청드립니다.

아래 키움수식신호가 3분봉에서 n봉 이내에 발생했던 모든 종목을 검색하는 검색식을 만들고 싶습니다. 도움 부탁드립니다. (키움수식1 신호발생검색식과 키움수식2 신호발생검색식 각각 부탁드리겠습니다. 감사합니다.) * 키움신호수식1 바닥=ma(C,120); 종목=(바닥+avgif(c-바닥,-1,0.0)-2*stdevif(c-바닥,-1,0.0)); 잡기=(종목*1); crossup(c,잡기) && crossup(c,bbandsdown(95,2)) *키움수식2 A=(predayhigh()+predaylow()+predayclose())/3+predayhigh()-predaylow(); CrossUp(C, A)
프로필 이미지
onlypsn
2024-11-05
631
글번호 184989
종목검색

살빼고싶다 님에 의해서 삭제되었습니다.

프로필 이미지
살빼고싶다
2024-11-05
46
글번호 184988
검색
답변완료

추가로 하나 부탁드립니다

전 질문에서 분봉에서 일봉MA 간의 크로스 를 여쭤봤었는데요 분봉에서 분봉MA가 일봉 MA 를 크로스 업 /다운 하는 수식과 함수도 여쭤보고싶습니다 *예를들어 분봉 120봉에서 60선이 일봉 20봉을 크로스업 사용자 함수로 MDAYCROSS(분봉기간1, 일봉기간2, UP 혹은 DOWN 선택) 지난 질문에서 사용자 함수 식을 알려주셨는데 일반 지표식으로 쓰려면 예시: 분봉에서 일봉 5MA 가 20MA 크로스 아래식으로 사용하면 되는걸까요?? short=5; long=20; sum11 = 0; sum12 = 0; sum21 = 0; sum22 = 0; For cnt = 0 to max(short,long) { if cnt < short Then { sum11 = sum11 + DayClose(cnt); sum12 = sum12 + DayClose(cnt+1); } if cnt < long Then { sum21 = sum21 + DayClose(cnt); sum22 = sum22 + DayClose(cnt+1); } } m11 = sum11/short; m12 = sum12/short; m21 = sum21/long; m21 = sum21/long; if m11 > m21 and m12 <= m22 Then ~ 이 부분이 업 if m11 < m21 and m12 >= m22 Then ~ 이 부분이 다운 번거로우시겠지만 이 질문에서도 일반 지표/ 사용자 함수 따로 알려주시면 감사하겠습니다 *예시: 분봉 120봉에서 60선이 일봉 20봉을 크로스업 감사드립니다
프로필 이미지
yamu
2024-11-05
617
글번호 184984
지표
답변완료

검색식 부탁 드려요

문의 드립니다 -일목균형표 반드시 음운구름을 돌파하는(선행스팬2) 양봉캔들을 검색하고자 합니다. 검색식 부탁드립니다. 수고하세요
프로필 이미지
일지매7
2024-11-05
598
글번호 184983
종목검색
답변완료

검색식 부탁드립니다.

늘 감사드립니다. input : mm(1.12); var :a(0); a = ma(v,20); if a[1] * 10 <=v and m >=100000000000 and c > o *mm Then PlotPaintBar(H,L,"강조",Magenta); 일봉상 검색식 부탁드립니다. 수고하십시요.
프로필 이미지
잔차
2024-11-05
739
글번호 184977
종목검색
답변완료

검색식 부탁드립니다.

안녕하세요? M5=ma(C, 5); M20=ma(C, 20); M60=ma(C, 60); M20>M5 && M5>M60 && abs(C-O)/(H-L)*100<도지비율 설정 도지비율 10 위식이 검색될 수 있도록 예스검색식 부탁드립니다.
프로필 이미지
매일대박
2024-11-05
598
글번호 184976
종목검색
답변완료

수고하십니다

항상 수고에 감사드리며 변환 부탁드립니다 //@version=5 indicator("Z-Score Heikin Ashi Transformed", "[&#581;] - &#120353; &#120335;-&#120328;", false) type bar float o = open float h = high float l = low float c = close type alerts bool s = na bool b = na bool u = na bool d = na bool p = na bool n = na bool x = na bool y = na type prompt string s = '' bool c = false method notify(prompt p) => if p.c alert(p.s, alert.freq_once_per_bar_close) method any(alerts a) => string s = switch a.s => 'OB Signal' a.b => 'OS Signal' a.u => 'Bullish Trend' a.d => 'Bearish Trend' a.p => 'Heikin-Ashi Uptrend ' a.n => 'Heikin-Ashi Downtrend' a.x => 'MACD Bullish Cross' a.y => 'MACD Bearish Cross' => na prompt.new(s, not na(s)) method src(bar b, simple string src) => float x = switch src 'oc2' => math.avg(b.o, b.c ) 'hl2' => math.avg(b.h, b.l ) 'hlc3' => math.avg(b.h, b.l, b.c ) 'ohlc4' => math.avg(b.o, b.h, b.l, b.c) 'hlcc4' => math.avg(b.h, b.l, b.c, b.c) x method ha(bar b, simple bool p = true) => var bar x = bar.new( ) x.c := b .src('ohlc4') x := bar.new( na(x.o[1]) ? b.src('oc2') : nz(x.src('oc2')[1]), math.max(b.h, math.max(x.o, x.c)) , math.min(b.l, math.min(x.o, x.c)) , x.c ) p ? x : b f_z(float src, simple int len) => (src - ta.sma(src, len)) / ta.stdev(src, len) method z(bar b, simple int len) => bar x = bar.new( f_z(b.o, len), f_z(b.h, len), f_z(b.l, len), f_z(b.c, len)) x const string gz = "Z-Score", const string ge = "EMAs" len = input.int (21 , "Z Period" , group = gz) revs = input.bool (true , "Reversions" , inline = '0', group = gz) revt = input.int (2 , "Threshold" , [1, 2, 3], inline = '0', group = gz) hol = input.bool (true , "Hollow Candles", group = gz) ma1 = input.bool (true , "EMA |" , inline = '1', group = ge) len1 = input.int (20 , "Length" , inline = '1', group = ge) ma2 = input.bool (false , "EMA |" , inline = '2', group = ge) len2 = input.int (50 , "Length" , inline = '2', group = ge) col1 = input.color(#FFD6E8, "" , inline = '3', group = ge) col2 = input.color(#9a9adf, "" , inline = '3', group = ge) bar score = bar.new().ha().z(len) var color colup = chart.fg_color const color coldn = #6fa8dc color haColor = switch score.c > score.o => colup score.c < score.o => coldn plotcandle(score.o, score.h, score.l, score.c, "&#120346;&#120356;&#120368;&#120371;&#120358;", hol ? score.c < score.o ? haColor : na : haColor, haColor, bordercolor = haColor) m = hline(0 , "Mid Line", chart.fg_color, hline.style_solid) min = hline(-4 , display = display.none ) ll = hline(-3 , display = display.none ) hl = hline(-2 , display = display.none ) max = hline(+4 , display = display.none ) hh = hline(+3 , display = display.none ) lh = hline(+2 , display = display.none ) e1 = plot (ma1 ? ta.ema(score.c, len1) : na, "&#120332;&#120340;&#120328; 1" , col1 ) e2 = plot (ma2 ? ta.ema(score.c, len2) : na, "&#120332;&#120340;&#120328; 2" , col2 ) fill(lh, hh , color = #9a9adf2a) fill(hh, max, color = #9a9adf4d) fill(ll, hl , color = #ffd6e83b) fill(ll, min, color = #ffd6e85e) alerts a = alerts.new( ta.crossunder(score.c, score.o) and (score.h > revt), ta.crossover (score.c, score.o) and (score.l < -revt), ta.crossover (score.c, 0) , ta.crossunder(score.c, 0) , ta.crossunder(score.c, score.o) and not (score.h > revt), ta.crossover (score.c, score.o) and not (score.l < -revt), ta.crossover (score.c, ta.ema(score.c, len1)) , ta.crossunder(score.c, ta.ema(score.c, len1)) ) plotshape(revs ? a.s ? score.h + 0.75 : na : na, "OB", shape.triangledown, location.absolute, col1, size = size.tiny) plotshape(revs ? a.b ? score.l - 0.75 : na : na, "OS", shape.triangleup , location.absolute, col2, size = size.tiny) alertcondition(a.s, "Overbought" , 'OB Signal' ) alertcondition(a.b, "Oversold " , 'OS Signal' ) alertcondition(a.u, "Midline Crossover " , 'Bullish Trend' ) alertcondition(a.d, "Midline Crossunder" , 'Bearish Trend' ) alertcondition(a.p, "Positive Heikin-Ashi", 'Heikin-Ashi Uptrend ') alertcondition(a.n, "Negative Heikin-Ashi", 'Heikin-Ashi Downtrend') alertcondition(a.x, "EMA Bull Cross" , 'EMA Bullish Cross' ) alertcondition(a.y, "EMA Bear Cross" , 'EMA Bearish Cross' ) a.any().notify() //Source Construction For Indicator₩Strategy Exports plot(score.o , "open" , editable = false, display = display.none) plot(score.h , "high" , editable = false, display = display.none) plot(score.l , "low" , editable = false, display = display.none) plot(score.c , "close", editable = false, display = display.none) plot(score.src('hl2' ), "hl2" , editable = false, display = display.none) plot(score.src('hlc3' ), "hlc3" , editable = false, display = display.none) plot(score.src('ohlc4'), "ohlc4", editable = false, display = display.none) plot(score.src('hlcc4'), "hlcc4", editable = false, display = display.none)
프로필 이미지
비듬싸순
2024-11-05
843
글번호 184975
지표