답변완료
수식 전환 부탁드립니다
안녕하세요
항상 감사합니다
수식 전환 부탁드립니다
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © Zeiierman
//@version=5
indicator("2B Reversal Pattern (Expo)",overlay=true,max_lines_count=500)
// ~~ ToolTips {
t1 = "Set the pivot period."
t2 = "Set the maximum bars until the pattern should be completed. This means establishing a limit on the number of bars allowed for the completion of the pattern. A high value returns more signals."
t3 = "Set the minimum bars before the breakout. This means establishing a minimum number of bars that must be completed before the breakout. A low value returns more signals."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Inputs {
prd = input.int(20, title="Period",minval=1, tooltip=t1)
max = input.int(10, title="Maximum Break Length",minval=1, tooltip=t2)
min = input.int(3, title="Minimum Break Length",minval=1, tooltip=t3)
bUp = input.color(#6ce5a0,"", inline="col"), bDn = input.color(#f23645,"", inline="col"), pCol = input.color(color.new(color.aqua,0),"",inline="col")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Variables {
b = bar_index
var ph = float(na)
var pl = float(na)
var phL = int(na)
var plL = int(na)
var bo = float(na)
var boL= int(na)
breakoutup = false
breakoutdn = false
var array<line> lines = array.new<line>(0)
var active= line(na)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Pivots {
pvtHi = ta.pivothigh(high,prd,prd)
pvtLo = ta.pivotlow(low,prd,prd)
if pvtHi
ph := high[prd]
phL:= b[prd]
if pvtLo
pl := low[prd]
plL:= b[prd]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Pattern Detection {
if ta.crossover(close,ph)
bo := low
boL:= b
lines.push(line.new(phL,ph,b,ph,color=pCol,style=line.style_dashed))
ph := float(na)
if ta.crossunder(close,pl)
bo := high
boL:= b
lines.push(line.new(plL,pl,b,pl,color=pCol,style=line.style_dashed))
pl := float(na)
if ta.crossunder(close,bo) and b-boL<=max and b-boL>=min
line.delete(active)
lines.push(line.new(boL,bo,b,bo,color=bDn,style=line.style_solid,width=2))
breakoutdn := true
bo := float(na)
if ta.crossover(close,bo) and b-boL<=max and b-boL>=min
line.delete(active)
lines.push(line.new(boL,bo,b,bo,color=bUp,style=line.style_solid,width=2))
breakoutup := true
bo := float(na)
if ta.cross(close,bo)
bo := float(na)
p2 = lines.pop()
line.delete(p2)
if not na(bo)
active := line.new(boL,bo,b,bo,color=pCol,style=line.style_solid,width=2)
line.delete(active[1])
if b-boL>max
bo := float(na)
p2 = lines.pop()
line.delete(p2)
line.delete(active)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plots {
plotshape(breakoutup?low:na, title="Breakout Up", color=bUp, style=shape.triangleup,location=location.belowbar,size=size.small)
plotshape(breakoutdn?high:na, title="Breakout Down", color=bDn, style=shape.triangledown,location=location.abovebar,size=size.small)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Alerts {
alertcondition(breakoutup, 'Breakout Up', 'Breakout Up')
alertcondition(breakoutdn, 'Breakout Down', 'Breakout Down')
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
2024-04-30
1065
글번호 179076
지표
답변완료
부탁 드립니다
고점(%봉수%봉)
M=ma(C,기간);
P=if(봉수%2==0,봉수+1,봉수);
좌측L=Lowest(M(P/2+1),P/2);
우측L=Lowest(M,P/2);
조건H=M(P/2)==Highest(M,P)&&M(P-1)==좌측L&&M==우측L;
Valuewhen(1,조건H,M(P/2+1))
저점(%봉수%봉)
M=ma(C,기간);
P=if(봉수%2==0,봉수+1,봉수);
좌측H=Highest(M(P/2+1),P/2);
우측H=Highest(M,P/2);
조건L=M(P/2)==Lowest(M,P)&&M(P-1)==좌측H&&M==우측H;
Valuewhen(1,조건L,M(P/2+1))
지표조건
기간3
봉수5
지표수식 부탁드립니다(일목균형표)
.......................................................................
기간내 주가변동폭:{일]0봉전까지 5봉간 최고최저폭15%
유통주식수 대비 거래량비율[일]0봉전5%이상
[일]0봉전 <롱바디(양봉)>
파워종목 검색식 부탁드립니
2024-05-01
605
글번호 179073
지표
답변완료
수식전환
죄송합니다 다시 올립니다^^
A=CrossUp(h,BBandsUp(40,2));
B=CrossUp(macd(9,52),0);
C1=CrossUp(h,BBandsUp(40,2));
D=CrossUp(macd(9,52,26),sig1(26));
E=CrossUp(macd(9,52),0);
F=CrossUp(macd(9,52,26),sig1(26));
G=CrossUp(
StochasticsSlow(Period1,Period2),
eavg(StochasticsSlow(Period1,Period2),Period3));
H=CrossUp(macd(12,26,9),sig2(9));
((A and B) or (C1 and D) or (E and F)) and G and H
지표변수 sig1 26 ,sig2 9 period1 20 period2 12 period3 12 입니다 죄송합니다^^
2024-04-30
703
글번호 179067
강조