답변완료
문의
//@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)
예스로 부탁드립니다
2025-09-08
142
글번호 193818
지표
답변완료
문의 드립니다.
안녕하세요 ~
현재 가격/또는 캔들이 아래의 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)
감사합니다.
2025-09-08
102
글번호 193810
검색
답변완료
시스템식 요청드립니다.
안녕하세요 문의사항이 있어 글을 남깁니다.
아래의 시스템식을 보시면 1차 매수 후 5일 뒤 11시에 청산 하게 되어있는데
1차 매수와 2차 매수일이 다르면 제대로 작동하나
1차 매수와 2차 매수일이 동일하면 시스템식이 작동을 안합니다.
어떻게 수정해야 할까요?
--------------------------------------------------
input : Xdate1(5),Xtime1(110000);
input : 시작날짜 (20250307);
var : cnt(0),sum(0),mav(0),DD(0),entry(False),day(0);
if sDate >= 시작날짜 Then
{
if Bdate != Bdate[1] Then
{
entry = true;
day = day+1;
dd = dd+1;
Condition1 = False;
}
}
if MarketPosition == 0 and TotalTrades > TotalTrades[1] Then
Condition1 = true;
if Condition1 == False and (entry == true) and MarketPosition == 0 and L > mav Then
Buy("1차매수",AtLimit,mav,Floor(금액1/min(NextBarOpen,mav)));
# 매수 후 포지션 관리
if MarketPosition == 1 Then
{
# 5일차 11시 청산
if DD == DD[BarsSinceEntry]+Xdate1 and sTime == xtime1 Then
{
Condition1 = true;
ExitLong("매수한지5일차 청산");
}
# --- 2차 매수 ---
if MaxEntries == 1 and Condition1 == False Then
{
Buy("2차매수",AtLimit,
LatestEntryPrice(0)*(1+추가진입/100),
Floor(금액2/min(NextBarOpen,LatestEntryPrice(0)*(1+추가진입/100))));
if Condition2 == False Then
ExitLong("1차매수익절",AtLimit,avgEntryPrice*(1+익절1/100));
}
2025-09-08
117
글번호 193770
시스템