예스스탁
예스스탁 답변
2020-10-07 10:54:00
안녕하세요
예스스탁입니다.
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), efRatio(0),Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),sum(0),mav(0),idx(0),AdaptMA1(0);
Array : C1[100](0),diff[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%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
idx = idx+1;
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
diff[cnt] = diff[cnt-1][1];
}
AdaptMA1 = AdaptMA[1];
}
C1[0] = C;
if idx <= Period Then
AdaptMA = C1[0];
Else
{
Signal = AbsValue(C1[0] - C1[Period]);
Noise = 0;
For cnt = 0 to Period-1
{
Noise = Noise + abs(C1[cnt]-C1[cnt+1]);
}
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA1 + Smooth * (c - AdaptMA1);
}
diff[0] = C-AdaptMA;
if idx >= Period+sig Then
{
sum = 0;
For cnt = 0 to sig-1
{
sum = sum + diff[cnt];
}
mav = sum/sig;
}
Plot1(mav);
}
즐거운 하루되세요
> 뮬리 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 도움에 늘 깊이 감사 드립니다.
원본수식을 타주기(분봉용)으로 작성 해본 것입니다.
그러나 미숙한 지식탓에 어딘가에 정상적이지 않아 보여
수정 부탁 드리고자 합니다.
미리 경배로 감사 인사 올립니다.
원본수식).
Inputs : Period(60),sig(5);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0),
Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
Diff = AbsValue(c - c[1]);
IF CurrentBar <= Period Then
AdaptMA = c;
IF CurrentBar > Period Then Begin
Signal = AbsValue(c - c[Period]);
Noise = accumN(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (c - AdaptMA[1]);
End;
var1=c-adaptma;
var2=ma(var1,sig);
*타주기(분봉용) 수식
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0),
Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),sum(0),mav(0);
Array : C1[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%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
}
}
C1[0] = C;
Diff = AbsValue(C1[0] - c1[1]);
IF CurrentBar <= Period Then
AdaptMA = C1[0];
IF CurrentBar > Period Then Begin
Signal = AbsValue(C1[0] - c1[Period]);
Noise = accumN(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (C1[0] - AdaptMA[1]);
End;
var1=C1[0]-adaptma;
var2=ma(var1,sig);}
번거롭게 해서 송구 스럽습니다.
타주기
1)분봉에서 일봉지표
2)일봉에서 주봉지표
추가로 부탁 드립니다.
미리 경배로 인사 올립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁 드립니다.
>
안녕하세요
예스스탁입니다.
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), efRatio(0),Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),sum(0),mav(0),idx(0),AdaptMA1(0);
Array : C1[100](0),diff[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%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
idx = idx+1;
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
diff[cnt] = diff[cnt-1][1];
}
AdaptMA1 = AdaptMA[1];
}
C1[0] = C;
if idx <= Period Then
AdaptMA = C1[0];
Else
{
Signal = AbsValue(C1[0] - C1[Period]);
Noise = 0;
For cnt = 0 to Period-1
{
Noise = Noise + abs(C1[cnt]-C1[cnt+1]);
}
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA1 + Smooth * (c - AdaptMA1);
}
diff[0] = C-AdaptMA;
if idx >= Period+sig Then
{
sum = 0;
For cnt = 0 to sig-1
{
sum = sum + diff[cnt];
}
mav = sum/sig;
}
Plot1(mav);
}
즐거운 하루되세요
> 뮬리 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 도움에 늘 깊이 감사 드립니다.
원본수식을 타주기(분봉용)으로 작성 해본 것입니다.
그러나 미숙한 지식탓에 어딘가에 정상적이지 않아 보여
수정 부탁 드리고자 합니다.
미리 경배로 감사 인사 올립니다.
원본수식).
Inputs : Period(60),sig(5);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0),
Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
Diff = AbsValue(c - c[1]);
IF CurrentBar <= Period Then
AdaptMA = c;
IF CurrentBar > Period Then Begin
Signal = AbsValue(c - c[Period]);
Noise = accumN(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (c - AdaptMA[1]);
End;
var1=c-adaptma;
var2=ma(var1,sig);
*타주기(분봉용) 수식
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0),
Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),sum(0),mav(0);
Array : C1[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%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
}
}
C1[0] = C;
Diff = AbsValue(C1[0] - c1[1]);
IF CurrentBar <= Period Then
AdaptMA = C1[0];
IF CurrentBar > Period Then Begin
Signal = AbsValue(C1[0] - c1[Period]);
Noise = accumN(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (C1[0] - AdaptMA[1]);
End;
var1=C1[0]-adaptma;
var2=ma(var1,sig);}
예스스탁
예스스탁 답변
2020-10-07 11:46:44
안녕하세요
예스스탁입니다.
1 일봉
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), efRatio(0),Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : cnt(0),sum(0),mav(0),idx(0),AdaptMA1(0);
Array : C1[100](0),diff[100](0);
if Bdate != Bdate[1] Then
{
idx = idx+1;
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
diff[cnt] = diff[cnt-1][1];
}
AdaptMA1 = AdaptMA[1];
}
C1[0] = C;
if idx <= Period Then
AdaptMA = C1[0];
Else
{
Signal = AbsValue(C1[0] - C1[Period]);
Noise = 0;
For cnt = 0 to Period-1
{
Noise = Noise + abs(C1[cnt]-C1[cnt+1]);
}
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA1 + Smooth * (c - AdaptMA1);
}
diff[0] = C-AdaptMA;
if idx >= Period+sig Then
{
sum = 0;
For cnt = 0 to sig-1
{
sum = sum + diff[cnt];
}
mav = sum/sig;
}
Plot1(mav);
2 주봉
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), efRatio(0),Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : cnt(0),sum(0),mav(0),idx(0),AdaptMA1(0);
Array : C1[100](0),diff[100](0);
if dayofweek(Bdate) < DayOfWeek(Bdate[1]) Then
{
idx = idx+1;
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
diff[cnt] = diff[cnt-1][1];
}
AdaptMA1 = AdaptMA[1];
}
C1[0] = C;
if idx <= Period Then
AdaptMA = C1[0];
Else
{
Signal = AbsValue(C1[0] - C1[Period]);
Noise = 0;
For cnt = 0 to Period-1
{
Noise = Noise + abs(C1[cnt]-C1[cnt+1]);
}
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA1 + Smooth * (c - AdaptMA1);
}
diff[0] = C-AdaptMA;
if idx >= Period+sig Then
{
sum = 0;
For cnt = 0 to sig-1
{
sum = sum + diff[cnt];
}
mav = sum/sig;
}
Plot1(mav);
즐거운 하루되세요
> 뮬리 님이 쓴 글입니다.
> 제목 : Re : Re : 부탁 드립니다.
> 번거롭게 해서 송구 스럽습니다.
타주기
1)분봉에서 일봉지표
2)일봉에서 주봉지표
추가로 부탁 드립니다.
미리 경배로 인사 올립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁 드립니다.
>
안녕하세요
예스스탁입니다.
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), efRatio(0),Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),sum(0),mav(0),idx(0),AdaptMA1(0);
Array : C1[100](0),diff[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%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
idx = idx+1;
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
diff[cnt] = diff[cnt-1][1];
}
AdaptMA1 = AdaptMA[1];
}
C1[0] = C;
if idx <= Period Then
AdaptMA = C1[0];
Else
{
Signal = AbsValue(C1[0] - C1[Period]);
Noise = 0;
For cnt = 0 to Period-1
{
Noise = Noise + abs(C1[cnt]-C1[cnt+1]);
}
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA1 + Smooth * (c - AdaptMA1);
}
diff[0] = C-AdaptMA;
if idx >= Period+sig Then
{
sum = 0;
For cnt = 0 to sig-1
{
sum = sum + diff[cnt];
}
mav = sum/sig;
}
Plot1(mav);
}
즐거운 하루되세요
> 뮬리 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 도움에 늘 깊이 감사 드립니다.
원본수식을 타주기(분봉용)으로 작성 해본 것입니다.
그러나 미숙한 지식탓에 어딘가에 정상적이지 않아 보여
수정 부탁 드리고자 합니다.
미리 경배로 감사 인사 올립니다.
원본수식).
Inputs : Period(60),sig(5);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0),
Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
Diff = AbsValue(c - c[1]);
IF CurrentBar <= Period Then
AdaptMA = c;
IF CurrentBar > Period Then Begin
Signal = AbsValue(c - c[Period]);
Noise = accumN(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (c - AdaptMA[1]);
End;
var1=c-adaptma;
var2=ma(var1,sig);
*타주기(분봉용) 수식
input : ntime(30),Period(60),sig(5);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0),
Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),sum(0),mav(0);
Array : C1[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%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
}
}
C1[0] = C;
Diff = AbsValue(C1[0] - c1[1]);
IF CurrentBar <= Period Then
AdaptMA = C1[0];
IF CurrentBar > Period Then Begin
Signal = AbsValue(C1[0] - c1[Period]);
Noise = accumN(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (C1[0] - AdaptMA[1]);
End;
var1=C1[0]-adaptma;
var2=ma(var1,sig);}