60분상의 50이동평균선을 5분봉에 가져와서 볼 수 있도록 지표수식 부탁합니다.
또한 60분봉상의 price channel를 5분봉에 가져와서 볼 수 있도록 수식 부탁드립니다.
답변 1
예스스탁
예스스탁 답변
2022-05-12 15:44:03
안녕하세요
예스스탁입니다.
1
input : 분(60),Period(50);
var : S1(0),D1(0),TM(0),TF(0);
var : cnt(0),sum(0),mav(0);
Array : CC[100](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 = 99 downto 1
{
CC[cnt] = CC[cnt-1];
}
}
CC[0] = C;
if CC[Period-1] > 0 then
{
sum = 0;
for cnt = 0 to Period-1
{
sum = sum+CC[cnt];
}
mav = sum/Period;
plot1(mav,"이평");
}
}
2
input : 분(60),LENGTH(10);
var : S1(0),D1(0),TM(0),TF(0);
var : cnt(0),TCHAN(0),BCHAN(0);
Array : HH[100](0),LL[100](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 = 99 downto 1
{
HH[cnt] = HH[cnt-1];
LL[cnt] = LL[cnt-1];
}
HH[0] = h;
LL[0] = l;
}
if H > HH[0] Then
HH[0] = h;
if L < LL[0] Then
LL[0] = l;
if HH[LENGTH] > 0 and LL[LENGTH] > 0 then
{
TCHAN = 0;
BCHAN = 0;
for cnt = 1 to LENGTH
{
if TCHAN == 0 or (TCHAN > 0 and HH[cnt] > TCHAN) Then
TCHAN = HH[cnt];
if BCHAN == 0 or (BCHAN > 0 and LL[cnt] < BCHAN) Then
BCHAN = LL[cnt];
}
PLOT1(TCHAN, "TOP");
PLOT2(BCHAN, "BOT");
}
}
즐거운 하루되세요
> kalpa 님이 쓴 글입니다.
> 제목 : 수식문의
> 60분상의 50이동평균선을 5분봉에 가져와서 볼 수 있도록 지표수식 부탁합니다.
또한 60분봉상의 price channel를 5분봉에 가져와서 볼 수 있도록 수식 부탁드립니다.