답변완료
수식 변환을 부탁드려요
다음 TradingView 수식을 YesTrader로 부탁드립니다.
// © BigBeluga
//@version=6
indicator("Peak Reaction Zones [BigBeluga]", overlay = true, max_labels_count = 500, max_bars_back = 500)
var high_i = int(na)
var high_v = float(na)
var low_i = int(na)
var low_v = float(na)
// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
lookback = input(72)
multiplier = input.float(1, "Zones Width", step = 0.1, inline = "h/l")
high_col = input.color(color.red, "", inline = "h/l")
low_col = input.color(color.lime, "", inline = "h/l")
// }
// CALCULATIONS――――――――――{
highest = ta.highest(lookback)
lowest = ta.lowest(lookback)
atr = ta.atr(200) * multiplier
if high[1] == highest[1] and high < highest
high_i := bar_index-1
high_v := high[1]
if low[1] == lowest[1] and low > lowest
low_i := bar_index-1
low_v := low[1]
draw_zone(x, y, h_l, color)=>
dist = h_l ? -atr : atr
line.delete(line.new(x, y, bar_index, y, color = color, style = line.style_solid, width = 2)[1])
line.delete(line.new(x+3, y+dist, bar_index, y+dist, color = color, style = line.style_dashed)[1])
label.delete(label.new(bar_index, y, str.tostring(y, "#,###.####"), color = color(na), style = label.style_label_left, textcolor = color)[1])
// }
// PLOT // CALCULATIONS――――――――――{
if barstate.islast
size = bar_index - (high_i > low_i ? low_i : high_i)
draw_zone(high_i, high_v, true, high_col)
draw_zone(low_i, low_v, false, low_col)
mid = math.avg(high_v, low_v)
mid_index = bar_index - size/2
line.delete(line.new(mid_index, mid, bar_index, mid, color = chart.fg_color, style = line.style_dashed)[1])
label.delete(label.new(bar_index, mid, str.tostring(mid, "#,###.####"), color = color(na), style = label.style_label_left, textcolor = chart.fg_color)[1])
for i = 0 to size
index = bar_index-i-2
if low[i+3] > low_v+atr and low[i+2] < low_v+atr and high[i+1] > low_v+atr and index > low_i
label.new(index, low[i+2], "", style = label.style_label_up, color = low_col, size = size.tiny)
if high[i+3] < high_v-atr and high[i+2] > high_v-atr and low[i+1] < high_v-atr and index > high_i
label.new(index, high[i+2], "", style = label.style_label_down, color = high_col, size = size.tiny)
// }
2025-03-18
404
글번호 189307
지표
답변완료
돌파 조건 검색식 부탁 합니다
A=ATR(A_period);
UPT=eavg(가격+A*ratio,기간);
dnt=eavg(가격-A*ratio,기간);
CC=CCi(period);
turn=
if(CC>=0&&dnt>dnt(1),1,
if(CC<0&&upt<upt(1),-1,0));
라인=if(turn==-1,upt,dnt);
D=valuewhen(1,turn==1 OR turn==-1,라인)
지표조건
A_period 26
period 20
ratio 1
가격 (H+L)/2
기간 5
S=avg((highest(high,기간)),기간)
지표 조건
기간 240
2차저항(predayhigh()+predaylow()+predayclose())/3 +predayhigh()-predaylow()
분봉에서 D가 S OR 2차저항 돌파 검색식 부탁 드립니다
2025-03-18
290
글번호 189290
종목검색