답변완료
수식변환 요청
현재가 전일 고가 발생 시의 저가(즉, 전일 고가 캔들의 저가)라인과 전일 고가라인 사이에서 전일고가 라인 돌파와 함께, 현재가가 전일 변동폭(50%+금일시가) 라인 돌파, 현재가가 볼린저(60,2) 상단 돌파 하는 검색식을 만들고자 합니다. 단 현재가가 전일 고가 캔들의 저가 라인 위에 있어야만 합니다.
전일고가 라인 돌파
가=highestSince(1, date!=date(1), H);
Valuewhen(1, date!=date(1), 가(1));
현재가가 전일고가캔들이 저가 라인 위 위치
가=highestSince(1, date!=date(1), H);
나=Valuewhen(1, 가==H, L); Valuewhen(1, date!=date(1), 나(1));
변동폭 라인 돌파
가=dayhigh(1)-daylow(1);
나=dayopen()+A*0.5;
볼린저 (60,2) 상단 돌파
현재가가 일목균형표 기준선 돌파(3분 기준)
거래대금 10억 이상(3분 기준)
거래량 20만주 이상(3분 기준)
RSI(11) 55 이상 또는 돌파
전일 종가 대비 시가 등락율(갭상승) 3% 이하 상승만 허용
위 모든 조건들이 당일 시가 대비 당일 종가 등락율 5% 범위 안에 만족 시 검색
3분봉 단타용으로 검색 활용하고자 하니 이를 감안하여 수식 만들어 주시면 고맙겠습니다.
답변완료
문의
//@version=2
// Created By BryceWH
// Plots London Open Killzone and New York Open KZ as overlay boxes using current daily high / lows
// Fills can be turned on and off. Created this indicator because i didnt like highlighting the whole chart background as seen in other ICT KZ indicators on tradingview and wanted something cleaner.
// If you want additional killzones such as london/new york close add the indicator to the chart twice.
// Adapted from Chris Moody's original indicator HLOC
study(title="KZ Boxes", shorttitle="KZ Boxes", overlay=true)
st = true
shl = input(true, title="Show High / Low")
londonkz = input(title="KillZone London Open", type=session, defval="0330-0545")
newyorkkz = input(title="KillZone NY Open", type=session, defval="0830-1045")
colourcheck = 1.0
boxheight = input(title="Box Height", type=float, defval=5.0)
fillcheck = input(true, title="Fill Middle")
ph = security(tickerid, 'D', high)
pl = security(tickerid, 'D', low)
dayrange = ph - pl
high2 = ph + (dayrange * 0.01 * boxheight)
low2 = pl - (dayrange * 0.01 * boxheight)
BarInSession(sess) => time(period, sess) != 0
lineColour = colourcheck == 1 ? #E1BC29 : colourcheck == 2 ? #3BB273 : na // box colour
lineColour2 = colourcheck == 2 ? #E1BC29 : colourcheck == 1 ? #3BB273 : na // box colour
lineColour3 = colourcheck == 2 and fillcheck ? #E1BC29 : colourcheck == 1 and fillcheck ? #3BB273 : white // box colour
lineColour4 = colourcheck == 1 and fillcheck ? #E1BC29 : colourcheck == 2 and fillcheck ? #3BB273 : white // box colour
//DAILY
v5=plot(shl and ph ? ph : na, title="Daily High", style=circles, linewidth=2, color=gray) // daily high low plots
v6=plot(shl and pl ? pl : na, title="Daily Low", style=circles, linewidth=2, color=gray) // daily high low plots
//LONDON
varhigh2=plot(st and ph and BarInSession(londonkz) ? high2 : na, title="Box 1 High", style=linebr, linewidth=2, color=na) // change color=na to color to make these lines visible/editable
varhigh=plot(st and ph and BarInSession(londonkz) ? ph : na, title="Box 1 Low", style=linebr, linewidth=2, color=na) // change color=na to color to make these lines visible/editable
varlow=plot(st and pl and BarInSession(londonkz) ? pl : na, title="Box 2 High", style=linebr, linewidth=2, color=na) // change color=na to color to make these lines visible/editable
varlow2=plot(st and pl and BarInSession(londonkz) ? low2 : na, title="Box 2 Low", style=linebr, linewidth=2, color=na) // change color=na to color to make these lines visible/editable
fill(varhigh,varhigh2,color=lineColour, title="Fill Box 1", transp=25) // box 1 top fill
fill(varhigh,varlow,color=lineColour4, title="Fill Middle", transp=75) // fill between first killzone boxes
fill(varlow,varlow2,color=lineColour, title="Fill Box 2", transp=25) // box 2 top fill
//NEW YORK
v1=plot(st and ph and BarInSession(newyorkkz) ? high2 : na, title="Box 3 High", style=linebr, linewidth=2, color=na)
v2=plot(st and ph and BarInSession(newyorkkz) ? ph : na, title="Box 3 Low", style=linebr, linewidth=2, color=na)
v3=plot(st and pl and BarInSession(newyorkkz) ? pl : na, title="Box 4 High", style=linebr, linewidth=2, color=na)
v4=plot(st and pl and BarInSession(newyorkkz) ? low2 : na, title="Box 4 Low", style=linebr, linewidth=2, color=na)
fill(v1,v2,color=lineColour2, title="Fill Box 1", transp=25)
fill(v2,v3,color=lineColour3, title="Fill Middle", transp=85)
fill(v3,v4,color=lineColour2, title="Fill Box 2", transp=25)
예스로 부탁드립니다
답변완료
문의 드립니다.
안녕하세요 ~
현재 가격/또는 캔들이 아래의 2개 라인을 동시에 돌파하는 종목의 검색식을 부탁 드립니다.
1.
(((highest(high,longPeriod)+lowest(low,longPeriod))/2
+BBandsDown(midPeriod,D1))/2
+daylow())/2
지표조건
shortPeriod 5
midPeriod 15
longPeriod 30
D1 2
2.
A=avg(c,17);
ATR=avg(max(max(h-L,abs(c(1)-h)),abs(c(1)-L)),17);
B=ATR*2;
D=A+B;
E=Bbandsup(17,2);
e1=crossup(E,D);
e2=crossdown(E,D);
e3=crossdown(c,E);
valuewhen(1,e1 or e2 or e3,o)
감사합니다.