커뮤니티
부탁드립니다.
2015-09-23 06:17:20
242
글번호 90623
늘 만족한 답변에 감사드립니다.
수식 상단부분의
smoothHP = (HP + 2*HP[1] + 3*HP[2] + 3*HP[3] + 2*HP[4] + HP[5]) / 12;
을
SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 4*HP[3] + 5*HP[4] + 6*HP[5] + 7*HP[6] +8* HP[7] + 8*HP[8] + 7*HP[9] + 6*HP[10] + 5*HP[11] + 4*HP[12] + 3*HP[13] + 2*HP[14]+ HP[15] ) / 72;
로 변경하면
그외 다른 부분을 어떻게 변경하는것이 타당한지요?
(적용:해선)
미리감사 드립니다.
/* Corona Chart Trend Vigor
written by John F. Ehlers copyright(c) 2008
Once the dominant cycle period is known, the instantaneous trend
is just the momentum across the full cycle period. This measurement
is invariant with the position within the cycle. The trend slope
is the same whether measured from cycle peak to cycle peak or cycle
valley to cycle valley. The trend slope is normalized to the amplitude
of the dominant cycle. A value of +2 means the trend slope is twice the
dominant cycle amplitude, and therefore cautions you not to trade against
the upslope. Similarly, a value of -2 means the trend slope is down and
therefore cautions you not to buy against the downslope.
*/
Vars:Price(0),delta(0.1),gamma(0),alpha(0),beta(0),N(0),Period(0),MaxAmpl(0),Num(0),Denom(0),DC(0),DomCyc(0),Color1(0),Color2(0),Color3(0),alpha1(0),HP(0),SmoothHP(0),delta1(.1),gamma1(0),alpha2(0),beta1(0),IP(0),Q1(0),Ampl2(0),Trend(0),Ratio(0),TV(0),Width(0),tv20(0);;
Arrays:II[60](0),OldI[60](0),OlderI[60](0),Q[60](0),OldQ[60](0),OlderQ[60](0),Real[60](0),OldReal[60](0),OlderReal[60](0),Imag[60](0),OldImag[60](0),OlderImag[60](0),Ampl[60](0),OldAmpl[60](0),DB[60](0),OldDB[60](0),Raster[50](0),OldRaster[50](0);
if CurrentBar > 1 then {
price = (H+L)/2;
alpha1 = (1 - Sine (360 / 30)) / Cosine(360 / 30);
HP = .5*(1 + alpha1)*(Price - Price[1]) + alpha1*HP[1];
//SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 3*HP[3] + 2*HP[4] + HP[5]) / 12;
//변경한 부분
//변경한 부분
//변경한 부분
SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 4*HP[3] + 5*HP[4] + 6*HP[5] + 7*HP[6] +8* HP[7] + 8*HP[8] + 7*HP[9] + 6*HP[10] + 5*HP[11] + 4*HP[12] + 3*HP[13] + 2*HP[14]+ HP[15] ) / 72;
IF CurrentBar < 7 Then SmoothHP = Price - Price[1];
IF CurrentBar == 1 THEN SmoothHP = 0;
}
delta = -.015*CurrentBar + .5;
If delta < .1 then delta = .1;
If CurrentBar > 12 Then Begin
For N = 12 to 60 Begin
beta = Cosine(720 / N);
gamma = 1 / Cosine(1440*delta / N);
alpha = gamma - SquareRoot(gamma*gamma - 1);
Q[N] = (.5*N / 6.28318)*(SmoothHP - SmoothHP[1]);
II[N] = SmoothHP;
Real[N] = .5*(1 - alpha)*(II[N] - OlderI[N]) + beta*(1 + alpha)*OldReal[N] - alpha*OlderReal[N];
Imag[N] = .5*(1 - alpha)*(Q[N] - OlderQ[N]) + beta*(1 + alpha)*OldImag[N] - alpha*OlderImag[N];
Ampl[N] = (Real[N]*Real[N] + Imag[N]*Imag[N]);
End;
End;
For N = 12 to 60 Begin
OlderI[N] = OldI[N];
OldI[N] = II[N];
OlderQ[N] = OldQ[N];
OldQ[N] = Q[N];
OlderReal[N] = OldReal[N];
OldReal[N] = Real[N];
OlderImag[N] = OldImag[N];
OldImag[N] = Imag[N];
OldAmpl[N] = Ampl[N];
OldDB[N] = DB[N];
End;
For N = 1 to 50 Begin
OldRaster[N] = Raster[N];
End;
MaxAmpl = Ampl[12];
For N = 12 to 60 Begin
If Ampl[N] > MaxAmpl then MaxAmpl = Ampl[N];
End;
For N = 12 to 60 Begin
If MaxAmpl <> 0 AND (Ampl[N] / MaxAmpl) > 0 Then DB[N] = -10*Log(.01 / (1 - .99*Ampl[N] / MaxAmpl)) / Log(10);
DB[N] = .33*DB[N] + .67*OldDB[N];
If DB[N] > 20 then DB[N] = 20;
End;
Num = 0;
Denom = 0;
For N = 12 to 60 Begin
If DB[N] <= 6 Then Begin
Num = Num + N*(20 - DB[N]);
Denom = Denom + (20 - DB[N]);
End;
If Denom <> 0 Then DC = .5*Num / Denom;
End;
DomCyc = Median(DC, 5);
If DomCyc < 6 Then DomCyc = 6;
if Currentbar > 1 then {
//Filter Bandpass component
beta1 = Cosine(360 / DomCyc);
gamma1 = 1 / Cosine(720*delta1 / DomCyc);
alpha2 = gamma1 - SquareRoot(gamma1*gamma1 - 1);
IP = .5*(1 - alpha2)*(Price - Price[2]) + beta1*(1 + alpha2)*IP[1] - alpha2*IP[2];
//Quadrature component is derivative of InPhase component divided by omega
Q1 = (Domcyc / 6.28318)*(IP - IP[1]);
//Pythagorean theorem to establish cycle amplitude
Ampl2 = SquareRoot(IP*IP + Q1*Q1);
//Trend amplitude taken over the cycle period
Trend = Price - Price[DomCyc - 1];
If Trend <> 0 and Ampl2 <> 0 Then Ratio = .33*Trend / Ampl2 + .67*Ratio[1];
If Ratio > 10 then Ratio = 10;
If Ratio < -10 then Ratio = -10;
TV = .05*(Ratio + 10);
}
If TV < .3 or TV > .7 Then Width = .01;
If TV >= .3 and TV < .5 Then Width = TV - .3;
If TV > .5 and TV <= .7 Then Width = -TV + .7;
For N = 1 to 50 Begin
Raster[N] = 20;
If N < Round(50*TV,0) Then Raster[N] = .8*(Power((20*TV - .4*N)/ Width, .85) + .2*OldRaster[N]);
If N > Round(50*TV,0) Then Raster[N] = .8*(Power((-20*TV + .4*N)/ Width, .85) + .2*OldRaster[N]) ;
If N == Round(50*TV,0) Then Raster[N] = 0 + .5*OldRaster[N];
If Raster[N] < 0 Then Raster[N] = 0;
If Raster[N] > 20 Or TV < .3 Or TV > .7 Then Raster[N] = 20;
End;
tv20=20*TV-10;
Plot51(TV20, "vigor");
PlotBaseLine1(10,"10");
PlotBaseLine2(-10,"-10");
답변 2
예스스탁 예스스탁 답변
2015-09-23 10:17:36
안녕하세요
예스스탁입니다.
식 내용을 정확히 파악은 못하겠지만
따로 변경할 부분은 없어 보입니다.
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 늘 만족한 답변에 감사드립니다.
수식 상단부분의
smoothHP = (HP + 2*HP[1] + 3*HP[2] + 3*HP[3] + 2*HP[4] + HP[5]) / 12;
을
SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 4*HP[3] + 5*HP[4] + 6*HP[5] + 7*HP[6] +8* HP[7] + 8*HP[8] + 7*HP[9] + 6*HP[10] + 5*HP[11] + 4*HP[12] + 3*HP[13] + 2*HP[14]+ HP[15] ) / 72;
로 변경하면
그외 다른 부분을 어떻게 변경하는것이 타당한지요?
(적용:해선)
미리감사 드립니다.
/* Corona Chart Trend Vigor
written by John F. Ehlers copyright(c) 2008
Once the dominant cycle period is known, the instantaneous trend
is just the momentum across the full cycle period. This measurement
is invariant with the position within the cycle. The trend slope
is the same whether measured from cycle peak to cycle peak or cycle
valley to cycle valley. The trend slope is normalized to the amplitude
of the dominant cycle. A value of +2 means the trend slope is twice the
dominant cycle amplitude, and therefore cautions you not to trade against
the upslope. Similarly, a value of -2 means the trend slope is down and
therefore cautions you not to buy against the downslope.
*/
Vars:Price(0),delta(0.1),gamma(0),alpha(0),beta(0),N(0),Period(0),MaxAmpl(0),Num(0),Denom(0),DC(0),DomCyc(0),Color1(0),Color2(0),Color3(0),alpha1(0),HP(0),SmoothHP(0),delta1(.1),gamma1(0),alpha2(0),beta1(0),IP(0),Q1(0),Ampl2(0),Trend(0),Ratio(0),TV(0),Width(0),tv20(0);;
Arrays:II[60](0),OldI[60](0),OlderI[60](0),Q[60](0),OldQ[60](0),OlderQ[60](0),Real[60](0),OldReal[60](0),OlderReal[60](0),Imag[60](0),OldImag[60](0),OlderImag[60](0),Ampl[60](0),OldAmpl[60](0),DB[60](0),OldDB[60](0),Raster[50](0),OldRaster[50](0);
if CurrentBar > 1 then {
price = (H+L)/2;
alpha1 = (1 - Sine (360 / 30)) / Cosine(360 / 30);
HP = .5*(1 + alpha1)*(Price - Price[1]) + alpha1*HP[1];
//SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 3*HP[3] + 2*HP[4] + HP[5]) / 12;
//변경한 부분
//변경한 부분
//변경한 부분
SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 4*HP[3] + 5*HP[4] + 6*HP[5] + 7*HP[6] +8* HP[7] + 8*HP[8] + 7*HP[9] + 6*HP[10] + 5*HP[11] + 4*HP[12] + 3*HP[13] + 2*HP[14]+ HP[15] ) / 72;
IF CurrentBar < 7 Then SmoothHP = Price - Price[1];
IF CurrentBar == 1 THEN SmoothHP = 0;
}
delta = -.015*CurrentBar + .5;
If delta < .1 then delta = .1;
If CurrentBar > 12 Then Begin
For N = 12 to 60 Begin
beta = Cosine(720 / N);
gamma = 1 / Cosine(1440*delta / N);
alpha = gamma - SquareRoot(gamma*gamma - 1);
Q[N] = (.5*N / 6.28318)*(SmoothHP - SmoothHP[1]);
II[N] = SmoothHP;
Real[N] = .5*(1 - alpha)*(II[N] - OlderI[N]) + beta*(1 + alpha)*OldReal[N] - alpha*OlderReal[N];
Imag[N] = .5*(1 - alpha)*(Q[N] - OlderQ[N]) + beta*(1 + alpha)*OldImag[N] - alpha*OlderImag[N];
Ampl[N] = (Real[N]*Real[N] + Imag[N]*Imag[N]);
End;
End;
For N = 12 to 60 Begin
OlderI[N] = OldI[N];
OldI[N] = II[N];
OlderQ[N] = OldQ[N];
OldQ[N] = Q[N];
OlderReal[N] = OldReal[N];
OldReal[N] = Real[N];
OlderImag[N] = OldImag[N];
OldImag[N] = Imag[N];
OldAmpl[N] = Ampl[N];
OldDB[N] = DB[N];
End;
For N = 1 to 50 Begin
OldRaster[N] = Raster[N];
End;
MaxAmpl = Ampl[12];
For N = 12 to 60 Begin
If Ampl[N] > MaxAmpl then MaxAmpl = Ampl[N];
End;
For N = 12 to 60 Begin
If MaxAmpl <> 0 AND (Ampl[N] / MaxAmpl) > 0 Then DB[N] = -10*Log(.01 / (1 - .99*Ampl[N] / MaxAmpl)) / Log(10);
DB[N] = .33*DB[N] + .67*OldDB[N];
If DB[N] > 20 then DB[N] = 20;
End;
Num = 0;
Denom = 0;
For N = 12 to 60 Begin
If DB[N] <= 6 Then Begin
Num = Num + N*(20 - DB[N]);
Denom = Denom + (20 - DB[N]);
End;
If Denom <> 0 Then DC = .5*Num / Denom;
End;
DomCyc = Median(DC, 5);
If DomCyc < 6 Then DomCyc = 6;
if Currentbar > 1 then {
//Filter Bandpass component
beta1 = Cosine(360 / DomCyc);
gamma1 = 1 / Cosine(720*delta1 / DomCyc);
alpha2 = gamma1 - SquareRoot(gamma1*gamma1 - 1);
IP = .5*(1 - alpha2)*(Price - Price[2]) + beta1*(1 + alpha2)*IP[1] - alpha2*IP[2];
//Quadrature component is derivative of InPhase component divided by omega
Q1 = (Domcyc / 6.28318)*(IP - IP[1]);
//Pythagorean theorem to establish cycle amplitude
Ampl2 = SquareRoot(IP*IP + Q1*Q1);
//Trend amplitude taken over the cycle period
Trend = Price - Price[DomCyc - 1];
If Trend <> 0 and Ampl2 <> 0 Then Ratio = .33*Trend / Ampl2 + .67*Ratio[1];
If Ratio > 10 then Ratio = 10;
If Ratio < -10 then Ratio = -10;
TV = .05*(Ratio + 10);
}
If TV < .3 or TV > .7 Then Width = .01;
If TV >= .3 and TV < .5 Then Width = TV - .3;
If TV > .5 and TV <= .7 Then Width = -TV + .7;
For N = 1 to 50 Begin
Raster[N] = 20;
If N < Round(50*TV,0) Then Raster[N] = .8*(Power((20*TV - .4*N)/ Width, .85) + .2*OldRaster[N]);
If N > Round(50*TV,0) Then Raster[N] = .8*(Power((-20*TV + .4*N)/ Width, .85) + .2*OldRaster[N]) ;
If N == Round(50*TV,0) Then Raster[N] = 0 + .5*OldRaster[N];
If Raster[N] < 0 Then Raster[N] = 0;
If Raster[N] > 20 Or TV < .3 Or TV > .7 Then Raster[N] = 20;
End;
tv20=20*TV-10;
Plot51(TV20, "vigor");
PlotBaseLine1(10,"10");
PlotBaseLine2(-10,"-10");
yes
2015-09-23 11:23:39
죄송 합니다.
이리저리 변수나 숫자를 변경 해보면 결과식이 다르게 나타 납니다.
어느 수치가 적합한지요?
다시 한번
검토 부탁 드려도 될런지요?
예를 들면
1)60->? 50->?
Arrays:II[60](0),OldI[60](0),OlderI[60](0),Q[60](0),OldQ[60](0),OlderQ[60](0),Real[60](0),OldReal[60](0),OlderReal[60](0),Imag[60](0),OldImag[60](0),OlderImag[60](0),Ampl[60](0),OldAmpl[60](0),DB[60](0),OldDB[60](0),Raster[50](0),OldRaster[50](0);
2)7->?
IF CurrentBar < 7 Then SmoothHP = Price - Price[1];
3)12 & 60 ->?
If CurrentBar > 12 Then Begin
For N = 12 to 60 Begin
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁드립니다.
> 안녕하세요
예스스탁입니다.
식 내용을 정확히 파악은 못하겠지만
따로 변경할 부분은 없어 보입니다.
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 늘 만족한 답변에 감사드립니다.
수식 상단부분의
smoothHP = (HP + 2*HP[1] + 3*HP[2] + 3*HP[3] + 2*HP[4] + HP[5]) / 12;
을
SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 4*HP[3] + 5*HP[4] + 6*HP[5] + 7*HP[6] +8* HP[7] + 8*HP[8] + 7*HP[9] + 6*HP[10] + 5*HP[11] + 4*HP[12] + 3*HP[13] + 2*HP[14]+ HP[15] ) / 72;
로 변경하면
그외 다른 부분을 어떻게 변경하는것이 타당한지요?
(적용:해선)
미리감사 드립니다.
/* Corona Chart Trend Vigor
written by John F. Ehlers copyright(c) 2008
Once the dominant cycle period is known, the instantaneous trend
is just the momentum across the full cycle period. This measurement
is invariant with the position within the cycle. The trend slope
is the same whether measured from cycle peak to cycle peak or cycle
valley to cycle valley. The trend slope is normalized to the amplitude
of the dominant cycle. A value of +2 means the trend slope is twice the
dominant cycle amplitude, and therefore cautions you not to trade against
the upslope. Similarly, a value of -2 means the trend slope is down and
therefore cautions you not to buy against the downslope.
*/
Vars:Price(0),delta(0.1),gamma(0),alpha(0),beta(0),N(0),Period(0),MaxAmpl(0),Num(0),Denom(0),DC(0),DomCyc(0),Color1(0),Color2(0),Color3(0),alpha1(0),HP(0),SmoothHP(0),delta1(.1),gamma1(0),alpha2(0),beta1(0),IP(0),Q1(0),Ampl2(0),Trend(0),Ratio(0),TV(0),Width(0),tv20(0);;
Arrays:II[60](0),OldI[60](0),OlderI[60](0),Q[60](0),OldQ[60](0),OlderQ[60](0),Real[60](0),OldReal[60](0),OlderReal[60](0),Imag[60](0),OldImag[60](0),OlderImag[60](0),Ampl[60](0),OldAmpl[60](0),DB[60](0),OldDB[60](0),Raster[50](0),OldRaster[50](0);
if CurrentBar > 1 then {
price = (H+L)/2;
alpha1 = (1 - Sine (360 / 30)) / Cosine(360 / 30);
HP = .5*(1 + alpha1)*(Price - Price[1]) + alpha1*HP[1];
//SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 3*HP[3] + 2*HP[4] + HP[5]) / 12;
//변경한 부분
//변경한 부분
//변경한 부분
SmoothHP = (HP + 2*HP[1] + 3*HP[2] + 4*HP[3] + 5*HP[4] + 6*HP[5] + 7*HP[6] +8* HP[7] + 8*HP[8] + 7*HP[9] + 6*HP[10] + 5*HP[11] + 4*HP[12] + 3*HP[13] + 2*HP[14]+ HP[15] ) / 72;
IF CurrentBar < 7 Then SmoothHP = Price - Price[1];
IF CurrentBar == 1 THEN SmoothHP = 0;
}
delta = -.015*CurrentBar + .5;
If delta < .1 then delta = .1;
If CurrentBar > 12 Then Begin
For N = 12 to 60 Begin
beta = Cosine(720 / N);
gamma = 1 / Cosine(1440*delta / N);
alpha = gamma - SquareRoot(gamma*gamma - 1);
Q[N] = (.5*N / 6.28318)*(SmoothHP - SmoothHP[1]);
II[N] = SmoothHP;
Real[N] = .5*(1 - alpha)*(II[N] - OlderI[N]) + beta*(1 + alpha)*OldReal[N] - alpha*OlderReal[N];
Imag[N] = .5*(1 - alpha)*(Q[N] - OlderQ[N]) + beta*(1 + alpha)*OldImag[N] - alpha*OlderImag[N];
Ampl[N] = (Real[N]*Real[N] + Imag[N]*Imag[N]);
End;
End;
For N = 12 to 60 Begin
OlderI[N] = OldI[N];
OldI[N] = II[N];
OlderQ[N] = OldQ[N];
OldQ[N] = Q[N];
OlderReal[N] = OldReal[N];
OldReal[N] = Real[N];
OlderImag[N] = OldImag[N];
OldImag[N] = Imag[N];
OldAmpl[N] = Ampl[N];
OldDB[N] = DB[N];
End;
For N = 1 to 50 Begin
OldRaster[N] = Raster[N];
End;
MaxAmpl = Ampl[12];
For N = 12 to 60 Begin
If Ampl[N] > MaxAmpl then MaxAmpl = Ampl[N];
End;
For N = 12 to 60 Begin
If MaxAmpl <> 0 AND (Ampl[N] / MaxAmpl) > 0 Then DB[N] = -10*Log(.01 / (1 - .99*Ampl[N] / MaxAmpl)) / Log(10);
DB[N] = .33*DB[N] + .67*OldDB[N];
If DB[N] > 20 then DB[N] = 20;
End;
Num = 0;
Denom = 0;
For N = 12 to 60 Begin
If DB[N] <= 6 Then Begin
Num = Num + N*(20 - DB[N]);
Denom = Denom + (20 - DB[N]);
End;
If Denom <> 0 Then DC = .5*Num / Denom;
End;
DomCyc = Median(DC, 5);
If DomCyc < 6 Then DomCyc = 6;
if Currentbar > 1 then {
//Filter Bandpass component
beta1 = Cosine(360 / DomCyc);
gamma1 = 1 / Cosine(720*delta1 / DomCyc);
alpha2 = gamma1 - SquareRoot(gamma1*gamma1 - 1);
IP = .5*(1 - alpha2)*(Price - Price[2]) + beta1*(1 + alpha2)*IP[1] - alpha2*IP[2];
//Quadrature component is derivative of InPhase component divided by omega
Q1 = (Domcyc / 6.28318)*(IP - IP[1]);
//Pythagorean theorem to establish cycle amplitude
Ampl2 = SquareRoot(IP*IP + Q1*Q1);
//Trend amplitude taken over the cycle period
Trend = Price - Price[DomCyc - 1];
If Trend <> 0 and Ampl2 <> 0 Then Ratio = .33*Trend / Ampl2 + .67*Ratio[1];
If Ratio > 10 then Ratio = 10;
If Ratio < -10 then Ratio = -10;
TV = .05*(Ratio + 10);
}
If TV < .3 or TV > .7 Then Width = .01;
If TV >= .3 and TV < .5 Then Width = TV - .3;
If TV > .5 and TV <= .7 Then Width = -TV + .7;
For N = 1 to 50 Begin
Raster[N] = 20;
If N < Round(50*TV,0) Then Raster[N] = .8*(Power((20*TV - .4*N)/ Width, .85) + .2*OldRaster[N]);
If N > Round(50*TV,0) Then Raster[N] = .8*(Power((-20*TV + .4*N)/ Width, .85) + .2*OldRaster[N]) ;
If N == Round(50*TV,0) Then Raster[N] = 0 + .5*OldRaster[N];
If Raster[N] < 0 Then Raster[N] = 0;
If Raster[N] > 20 Or TV < .3 Or TV > .7 Then Raster[N] = 20;
End;
tv20=20*TV-10;
Plot51(TV20, "vigor");
PlotBaseLine1(10,"10");
PlotBaseLine2(-10,"-10");