답변완료
85294 지표 문의
안녕하세요
항상 도움 주셔서 감사합니다.
아래의 일봉 지표를 분봉에 나타내려고 합니다.가능할까요?
분봉에서 일봉지표와 같이 표현 하고 싶어서 입니다.
감사합니다.
input : Periods(20);
input : Multiplier(3.0);
input : changeATR(true);
input : showsignals(true);
input : highlighting(true);
var : src(0),alpha(0),atr1(0),atr2(0),atrv(0);
var : up(0),up1(0),dn(0),dn1(0);
var : trend(0),tx(0);
src = (h+l)/2;
alpha = 1/Periods;
atr1 = iff(IsNan(atr1[1]) == true,ma(TrueRange, Periods), alpha * TrueRange + (1 - alpha) * iff(IsNan(atr1[1])==true,0,atr1[1]));
atr2 = ma(TrueRange, Periods);
atrv = iff(changeATR ==true,atr1, atr2);
up = src-(Multiplier*atrv);
up1 = iff(isnan(up[1])==true,up,up[1]);
up = iff(close[1] > up1 , max(up,up1), up);
dn = src+(Multiplier*atrv);
dn1 = iff(isnan(dn[1])==true,dn,dn[1]);
dn = iff(close[1] < dn1 , min(dn, dn1) , dn);
trend = 1;
trend = iff(isnan(trend[1])==true,trend,trend[1]);
trend = iff(trend == -1 and close > dn1 , 1 , iff(trend == 1 and close < up1 , -1 , trend));
if trend == 1 Then
{
plot1(up,"Up Trend",Red);
NoPlot(2);
}
Else
{
NoPlot(1);
plot2(dn,"Down Trend",Blue);
}
if trend == 1 and trend[1] == -1 Then
{
tx = Text_New(sDate,sTime,up,"●");
Text_SetColor(tx,Red);
Text_SetStyle(tx,2,2);
}
if trend == -1 and trend[1] == 1 Then
{
tx = Text_New(sDate,sTime,dn,"●");
Text_SetColor(tx,Blue);
Text_SetStyle(tx,2,2);
}
2024-01-09
741
글번호 175577
지표
답변완료
수식변환
종목검색 변환 부탁드립니다.
항상 감사드립니다.
B=(H+L)/2;
Ub=B+ATR(Period)*multiple;
Db=B-ATR(Period)*multiple;
UT=ValueWhen(1,Highest(Db(1),Period)<Db,Db);
DT=ValueWhen(1,Lowest(Ub(1),Period)>Ub,Ub);
라인=if(ma(C,기준이평)<C,Ut,Dt);
a=if(라인<C,라인,0);
a&&!a(1)
P(20),multiple(3),기준이평(120)
2024-01-09
713
글번호 175556
종목검색