예스스탁
예스스탁 답변
2022-06-29 16:07:44
안녕하세요
예스스탁입니다.
1
기본차트(data1)에 적용하는 내용이면 아래와 같습니다.
input : Period1(1), Period2(3), Period3(5), Period4(7),Period5(9), Period6(11), Period7(13);
Variables: TLen1(0),TRIma1(0),TLen2(0),TRIma2(0),TLen3(0),TRIma3(0),TLen4(0),TRIma4(0)
,TLen5(0),TRIma5(0),TLen6(0),TRIma6(0),TLen7(0),TRIma7(0);
TLen1 = Ceiling((Period1 + 1) * .5);
TRIma1 =Ema(Ema(C, TLen1), TLen1);
TLen2 = Ceiling((Period2 + 1) * .5);
TRIma2 =Ema(Ema(C, TLen2), TLen2);
TLen3 = Ceiling((Period3 + 1) * .5);
TRIma3 =Ema(Ema(C, TLen3), TLen3);
TLen4 = Ceiling((Period4 + 1) * .5);
TRIma4 =Ema(Ema(C, TLen4), TLen4);
TLen5 = Ceiling((Period5 + 1) * .5);
TRIma5 =Ema(Ema(C, TLen5), TLen5);
TLen6 = Ceiling((Period6 + 1) * .5);
TRIma6 =Ema(Ema(C, TLen6), TLen6);
TLen7 = Ceiling((Period7 + 1) * .5);
TRIma7 =Ema(Ema(C, TLen7), TLen7);
plot1(TRIma1,"1",WHITE);
plot2(TRIma2,"3",WHITE);
plot3(TRIma3,"5",WHITE);
plot4(TRIma4,"7",WHITE);
plot5(TRIma5,"9",WHITE);
plot6(TRIma6,"11",WHITE);
plot7(TRIma7,"13",WHITE);
2
기본차트자체에서 다른 분봉주기의 값을 계산하고자 하시면 아래식 이용하시면 됩니다.
Input : 분(10);
input : Period1(1), Period2(3), Period3(5), Period4(7),Period5(9), Period6(11), Period7(13);
var : S1(0),D1(0),TM(0),TF(0),idx(0);
Var : TLen1(0),TLen2(0),TLen3(0),TLen4(0),TLen5(0),TLen6(0),TLen7(0);
Var : ep1(0),ep2(0),ep3(0),ep4(0),ep5(0),ep6(0),ep7(0);
Var : x1(0),x2(0),x3(0),x4(0),x5(0),x6(0),x7(0);
Var : Prex1(0),Prex2(0),Prex3(0),Prex4(0),Prex5(0),Prex6(0),Prex7(0);
Var : Prey1(0),Prey2(0),Prey3(0),Prey4(0),Prey5(0),Prey6(0),Prey7(0);
Var : y1(0),y2(0),y3(0),y4(0),y5(0),y6(0),y7(0);
Var : TRIma1(0),TRIma2(0),TRIma3(0),TRIma4(0),TRIma5(0),TRIma6(0),TRIma7(0);
TLen1 = Ceiling((Period1 + 1) * .5);
Ep1 = 2/(TLen1+1);
TLen2 = Ceiling((Period2 + 1) * .5);
Ep2 = 2/(TLen2+1);
TLen3 = Ceiling((Period3 + 1) * .5);
Ep3 = 2/(TLen3+1);
TLen4 = Ceiling((Period4 + 1) * .5);
Ep4 = 2/(TLen4+1);
TLen5 = Ceiling((Period5 + 1) * .5);
Ep5 = 2/(TLen5+1);
TLen6 = Ceiling((Period6 + 1) * .5);
Ep6 = 2/(TLen6+1);
TLen7 = Ceiling((Period7 + 1) * .5);
Ep7 = 2/(TLen7+1);
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
{
idx = idx+1;
prex1 = x1[1];
prey1 = y1[1];
prex2 = x2[1];
prey2 = y2[1];
prex3 = x3[1];
prey3 = y3[1];
prex4 = x4[1];
prey4 = y4[1];
prex5 = x5[1];
prey5 = y5[1];
prex6 = x6[1];
prey6 = y6[1];
prex7 = x7[1];
prey7 = y7[1];
}
if idx <= 1 then
{
x1 = C;
y1 = C;
x2 = C;
y2 = C;
x3 = C;
y3 = C;
x4 = C;
y4 = C;
x5 = C;
y5 = C;
x6 = C;
y6 = C;
x7 = C;
y7 = C;
}
else{
x1 = C * EP1 + PreX1 * (1-EP1);
y1 = x1 * EP1 + PreY1 * (1-EP1);
x2 = C * EP2 + PreX2 * (1-EP2);
y2 = x2 * EP2 + PreY2 * (1-EP2);
x3 = C * EP3 + PreX3 * (1-EP3);
y3 = x3 * EP3 + PreY3 * (1-EP3);
x4 = C * EP4 + PreX4 * (1-EP4);
y4 = x4 * EP4 + PreY4 * (1-EP4);
x5 = C * EP5 + PreX5 * (1-EP5);
y5 = x5 * EP5 + PreY5 * (1-EP5);
x6 = C * EP6 + PreX6 * (1-EP6);
y6 = x6 * EP6 + PreY6 * (1-EP6);
x7 = C * EP7 + PreX7 * (1-EP7);
y7 = x7 * EP7 + PreY7 * (1-EP7);
}
plot1(y1);
plot2(y2);
plot3(y3);
plot4(y4);
plot5(y5);
plot6(y6);
plot7(y7);
}
즐거운 하루되세요
> 시그너스 님이 쓴 글입니다.
> 제목 : 감사합니다.
> 수식을 잘 몰라서 부탁 드립니다.
아래의 수식은 데이타3인데, 데이타 없이 분봉용 기본 차트에 적용할수있는 방법 부탁 드립니다.
input : Period1(1), Period2(3), Period3(5), Period4(7),Period5(9), Period6(11), Period7(13);
Variables: TLen1(0,data3),TRIma1(0,data3),TLen2(0,data3),TRIma2(0,data3),TLen3(0,data3),TRIma3(0,data3),TLen4(0,data3),TRIma4(0,data3)
,TLen5(0,data3),TRIma5(0,data3),TLen6(0,data3),TRIma6(0,data3),TLen7(0,data3),TRIma7(0,data3);
TLen1 = data3(Ceiling((Period1 + 1) * .5));
TRIma1 =data3(Ema(Ema(C, TLen1), TLen1));
TLen2 = data3(Ceiling((Period2 + 1) * .5));
TRIma2 =data3(Ema(Ema(C, TLen2), TLen2));
TLen3 = data3(Ceiling((Period3 + 1) * .5));
TRIma3 =data3(Ema(Ema(C, TLen3), TLen3));
TLen4 = data3(Ceiling((Period4 + 1) * .5));
TRIma4 =data3(Ema(Ema(C, TLen4), TLen4));
TLen5 = data3(Ceiling((Period5 + 1) * .5));
TRIma5 =data3(Ema(Ema(C, TLen5), TLen5));
TLen6 = data3(Ceiling((Period6 + 1) * .5));
TRIma6 =data3(Ema(Ema(C, TLen6), TLen6));
TLen7 = data3(Ceiling((Period7 + 1) * .5));
TRIma7 =data3(Ema(Ema(C, TLen7), TLen7));
plot1(TRIma1,"1",WHITE);
plot2(TRIma2,"3",WHITE);
plot3(TRIma3,"5",WHITE);
plot4(TRIma4,"7",WHITE);
plot5(TRIma5,"9",WHITE);
plot6(TRIma6,"11",WHITE);
plot7(TRIma7,"13",WHITE);