Input : Period(120), Percent(2);
var : center(0),UPline(0),DNline(0);
center = ma(C, Period);
UPline = EnvelopeUp(Period, Percent) ;
Dnline = EnvelopeDown(Period, Percent);
Plot1(center, "중앙선");
Plot2(UPline, "상");
Plot3(Dnline, "하");
120분봉 데이타를 그대로 10분봉에 적용하고 싶습니다.
답변 1
예스스탁
예스스탁 답변
2021-11-29 16:11:21
안녕하세요
예스스탁입니다.
차트에 120분봉의 120이평을 계산할만큼 데이타가 충분히 있어야 지표가 그려질 수 있습니다.
input : 분(120),Period(120),percent(2);
var : S1(0),D1(0),TM(0),TF(0),cnt(0);
var : sum(0),center(0),UPline(0),Dnline(0);
Array : CC[200](0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%분;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and 분 > 1 and TM >= TM[1]+분) or
(Bdate == Bdate[1] and 분 == 1 and TM > TM[1]) Then
{
for cnt = 1 to 199
{
CC[cnt] = CC[cnt-1][1];
}
}
CC[0] = C;
if CC[Period-1] > 0 then
{
sum = 0;
for cnt = 0 to Period-1
{
sum = sum + CC[cnt];
}
center = sum/Period;
UPline = center*(1+percent/100) ;
Dnline = center*(1-percent/100);
Plot1(center, "중앙선");
Plot2(UPline, "상");
Plot3(Dnline, "하");
}
}
즐거운 하루되세요
> 유로만 님이 쓴 글입니다.
> 제목 : 지표 문의
> Input : Period(120), Percent(2);
var : center(0),UPline(0),DNline(0);
center = ma(C, Period);
UPline = EnvelopeUp(Period, Percent) ;
Dnline = EnvelopeDown(Period, Percent);
Plot1(center, "중앙선");
Plot2(UPline, "상");
Plot3(Dnline, "하");
120분봉 데이타를 그대로 10분봉에 적용하고 싶습니다.