답변완료
지표 변환 부탁드립니다.
// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
// https://creativecommons.org/licenses/by-nc-sa/4.0/
// © BigBeluga
//@version=6
indicator("Two Poles Trend Finder MTF [BigBeluga]", overlay = true)
// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
alpha = input.float(0.10, minval=0.01, maxval=1.0, step = 0.01, title="Alpha")
source = input.source(close, "Source")
offset = 3
tf1 = input.timeframe("60", "Timeframe1")
tf2 = input.timeframe("120", "Timeframe2")
tf3 = input.timeframe("240", "Timeframe3")
tf4 = input.timeframe("720", "Timeframe4")
tf5 = input.timeframe("D", "Timeframe5")
c_up = input.color(#00b8a5, "")
c_dn = input.color(#b80090, "")
var float f = na
var float f_prev1 = na
var float f_prev2 = na
// }
// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
// Apply two-pole Gaussian filter
if bar_index >= 2
f := math.pow(alpha, 2) * source + 2 * (1 - alpha) * f_prev1 - math.pow(1 - alpha, 2) * f_prev2
else
f := source // Warm-up for first bars
// Shift state
f_prev2 := f_prev1
f_prev1 := f
tp1 = request.security("", tf1, f_prev1 > f_prev1[offset])
tp2 = request.security("", tf2, f_prev1 > f_prev1[offset])
tp3 = request.security("", tf3, f_prev1 > f_prev1[offset])
tp4 = request.security("", tf4, f_prev1 > f_prev1[offset])
tp5 = request.security("", tf5, f_prev1 > f_prev1[offset])
avg = math.avg(tp1 ? 1 : 0, tp2 ? 1 : 0, tp3 ? 1 : 0, tp4 ? 1 : 0, tp5 ? 1 : 0)
dash = table.new(position.bottom_right, 100, 100)
if barstate.islast
dash.merge_cells(0, 0, 8, 0)
dash.cell(0, 0, str.tostring(syminfo.basecurrency) + (avg > 0.5 ? " 🢁" : " 🢃"), text_color = avg > 0.5 ? c_up : c_dn, tooltip = "Average Trend")
draw_gauge(col, tf, trend)=>
if barstate.islast
s = timeframe.in_seconds(tf)
m = timeframe.in_seconds(tf) / 60
h = timeframe.in_seconds(tf) / 60 / 60
d = timeframe.in_seconds(tf) / 60 / 60 / 24
tff = h < 24 and h >= 1 ? str.tostring(h) + "H" : m >= 1440 ? str.tostring(d) + "D" : m < 60 and m > 1 ? str.tostring(m) + "M" : m < 1 ? str.tostring(s) + "S" : tf
color = trend ? c_up : c_dn
dash.cell(col, 1, "", bgcolor = color)
dash.cell(col, 2, tff, text_color = chart.fg_color, text_size = size.normal)
dash.cell(col+1, 1, "", bgcolor = color(na), width = 1)
// }
// PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
draw_gauge(0, tf1, tp1)
draw_gauge(2, tf2, tp2)
draw_gauge(4, tf3, tp3)
draw_gauge(6, tf4, tp4)
draw_gauge(8, tf5, tp5)
plot(f_prev1, "1", color = f_prev1 > f_prev1[offset] ? c_up : c_dn, linewidth = 3)
plot(f_prev1, "2", color = color.new(f_prev1 > f_prev1[offset] ? c_up : c_dn, 80), linewidth = 25)
// }
2025-08-06
228
글번호 193032
지표
답변완료
도움 부탁드립니다
안녕하세요
무더운 여름 잘 보내시길 바랍니다.
아래 지표는 커뮤니티에서 다운받은 지표인데 궁금한것이 챠트캔들위에 나타나는 삼각형의
표시가 캔들이 몇개이상 지나고 난 후에 캔들위에 표시가 되는데 궁금한것은
1. 보통 캔들이 완성된후에 생기는데 이처럼 여러개의 캔들이 지나서 나타나는 이유.
2. 후행성이 아닌 실시간 켄들에 나타나게 할 수는 없는지요.
3. 2번째 질문에 답이 안된다면 캔들 표식이 아닌 다른 방법으로도 실시간 알수는 없는지요
감사합니다.
input : len(3);
input : mult(0.6);
input : color_t_up(Lime);
var : color_t(orange);
input : color_t_dn(Red);
var : p_h(nan);
var : p_l(nan);
var : trend(False);
var : market_state(""),ph(0),pl(0),tx(0);
market_state = "Range";
if SwingHigh(1,h,len,len,len+len+1) != -1 Then
{
p_h = h[len];
tx = Text_New(sDate[len],sTime[len],p_h,"▼");
Text_SetStyle(tx,2,1);
Text_SetColor(tx,Blue);
Text_SetSize(tx,12);
}
if SwingLow(1,l,len,len,len+len+1) != -1 Then
{
p_l = l[len];
tx = Text_New(sDate[len],sTime[len],p_l,"▲");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Red);
Text_SetSize(tx,12);
}
var : avgv(0),ATrv(0),hl2(0),upper(0),lower(0),tx1(0);
avgv = (p_h+p_l)/2;
atrv = atr(200)*mult;
upper = avgv + atrv;
lower = avgv - atrv;
hl2 = (h+l)/2;
if hl2 > upper Then
{
color_t = color_t_up;
trend = true;
market_state = "Momentum Up";
}
if hl2 < lower Then
{
color_t = color_t_dn;
trend = false;
market_state = "Momentum Down";
}
// -----------------------------------}
// VISUALIZATIONS
// -----------------------------------{
plot1(avgv, "MidLine",color_t);
plot2(upper, "Upper");
plot3(lower, "Lower");
2025-08-05
171
글번호 193020
지표
답변완료
트레이닝 궁굼합니다. 가능할까요?
아래 지표설정대로 제가 지정하는 종목에(1개~다수) 대해서 일봉기준으로 매매하고 싶습니
다.
1. 매수후 중복으로 나오는 매수신호는 무시
2. 지정하는 종목(1~다수)
3. 매도신호시 청산(통합주문2101에서 해도 무방한가요?)
input : length(15);
input : show_levl(true);
var : up(0),dn(0),A(0),emaValue(0),correction(0),zlma(0);
var : signalUp(False),signalDn(False),zlma_color(0),ema_col(0);
var : TOP(0),BTM(0),box(0),tx(0),tx1(0),check_signals(False);
up = Black;
dn = Blue;
#var box1 = box(na) // Variable to store the box
a = atr(200);
emaValue = ema(close, length);
correction = close + (close - emaValue);
zlma = ema(correction, length);
signalUp = CrossUp(zlma, emaValue);
signalDn = CrossDown(zlma, emaValue);
zlma_color = iff(zlma > zlma[3] , up , iff(zlma < zlma[3] , dn , Nan));
ema_col = iff(emaValue < zlma , up , dn);
plot1(zlma, "ZLMA",zlma_color); // Plot ZLMA
plot2(emaValue,"EMA",ema_col);
if signalUp Then
{
Top = zlma;
BTM = zlma-A;
box = box_new(sDate,sTime,Top,NextBarSdate,NextBarStime,BTM);
Box_SetColor(box,up);
Box_SetFill(box,true);
var3 = (Top+BTM)/2;
tx = Text_New(NextBarSdate,NextBarStime,var3,NumToStr(C,2));
Text_SetStyle(tx,1,2);
}
else if signalDn Then
{
Top = zlma+A;
BTM = zlma;
box = box_new(sDate,sTime,Top,NextBarSdate,NextBarStime,BTM);
Box_SetColor(box,dn);
Box_SetFill(box,true);
var3 = (Top+BTM)/2;
tx = Text_New(NextBarSdate,NextBarStime,var3,NumToStr(C,2));
Text_SetStyle(tx,1,2);
}
Else
{
Box_SetEnd(box,sDate,sTime,BTM);
Text_SetLocation(tx,sDate,sTime,var3);
}
check_signals = signalUp or signalDn;
if CrossDown(high, BTM) and emaValue > zlma Then
{
tx1 = Text_New(sDate[1],sTime[1],H[1],"▼");
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,dn);
}
if CrossUp(low, Top) and emaValue < zlma Then
{
tx1 = Text_New(sDate[1],sTime[1],L[1],"▲");
Text_SetStyle(tx1,2,0);
Text_SetColor(tx1,up);
}
2025-08-05
191
글번호 193019
시스템