답변완료
수식수정 부탁드립니다
키움증권의 수식입니다
음봉=C<O;
A55=SUM(if(음봉,1,0),봉수5)>=봉수5; 5
A65=SUM(if(음봉,1,0),봉수6)>=봉수5; 6
A33=SUM(if(음봉,1,0),봉수3)>=봉수3; 3
전음봉=abs(C-O)*꼬리율<=(Min(C,O)-L); 꼬리율 0.3
저가L=Lowest(L,L1)==L or Lowest(L,L2)=L; L1(60)/L2(20)
시동=(O==L) or (O<=L*(1+시저율/100)); 시저율 0.5
아꼬양봉=(Min(C,O)-L)>0 && C>O;
조건1=A55(1) && 전음봉(1) && C>O;
조건2=A65(1) && 저가L && 아꼬양봉 && C>O;
조건3=A33(1) && 시동 && C>O;
조건4=조건1 or 조건2 or 조건3; //캔들매수신호(주봉)
조건5=ValueWhen(1, 조건4, 저장가격); //저장가격 C
신호수식1> 조건4
신호수식2>
SUM(조건4(1),검토봉수)>=1 && 조건4 //검토봉수5
&& 조건5 >= O && C >= O
++++++++++++++++++++++++++++++++++++++++++
상기 수식을 예스랭귀지로 변환한 수식입니다
input : 봉수5(5),봉수6(6),봉수3(3), L1(60), L2(20),아래꼬리율(0.3),시저가율(0.5) ;
var : 음봉(False),A55(False),A65(False),A33(False),전음봉(False),저가L(False),시저가동(False),아래꼬양봉(False) ;
음봉 = C<O;
A55 = CountIf(음봉,봉수5) >= 봉수5 ; #최근 5봉중 음봉의 수가 5봉이상이어야 하는 조건
A65 = CountIf(음봉,봉수6) >= 봉수5 ; #최근 6봉중 음봉의 수가 5봉이상이어야 하는 조건
A33 = CountIf(음봉,봉수3) >= 봉수3 ; #최근 3봉중 음봉의 수가 3봉이상이어야 하는 조건
전음봉 = abs(C-O)*아래꼬리율 <= (Min(C,O)-L) ;
저가L = ( Lowest(L,L1) == L ) or ( Lowest(L,L2) == L ) ;
시저가동 = (O == L) or (O <= L*(1+시저가율/100)) ;
아래꼬양봉 = (Min(C,O)-L)>0 and C>O ;
Condition1 = A55[1] and 전음봉[1] and C > O ;
Condition2 = A65[1] and 저가L and 아래꼬양봉 && C > O ;
Condition3 = A33[1] and 시저가동 and C > O ;
Condition4 = Condition1 == true or Condition2 == true or Condition3 == true ;
===================================================================================
if Condition4 == true Then //조건5=ValueWhen(1, 조건4, 저장가격);
{
Var1 = C ;
}
#==매수신호검색======================================================================================================================================
Input : 표시가격1(L/1.0255),표시가격2(L/1.0255);
input : 검토봉수(5) ;
if Condition1 == true or Condition2 == true or Condition3 == true Then
Plot1(표시가격1,"신호1");
if CountIf(Condition4[1] == true,검토봉수) >= 1 and Condition4 == true and Var1 >= O and C >= O Then
Plot2(표시가격2,"신호2");
#A55 = AccumN(iff(음봉, 1, 0),봉수5) >= 봉수5 ;적용해도 동일함 ???
키움의 신호수식1는 Plot1로, 신호수식2는 Plot2로로 변환시켜 본건데
Plot1는 키움신호발생숫자보다 반이하로 나오고, Plot2는 거의 발생이 안되고 있음
수식변환의 문제인지 검토후 수정해주세요
2025-09-09
149
글번호 193824
검색
답변완료
수식변환 요청
현재가 전일 고가 발생 시의 저가(즉, 전일 고가 캔들의 저가)라인과 전일 고가라인 사이에서 전일고가 라인 돌파와 함께, 현재가가 전일 변동폭(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분봉 단타용으로 검색 활용하고자 하니 이를 감안하여 수식 만들어 주시면 고맙겠습니다.
2025-09-09
186
글번호 193823
종목검색
답변완료
문의
//@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
187
글번호 193818
지표