커뮤니티
수정문의 입니다.
2015-01-21 23:09:13
151
글번호 82483
수고하십니다.
40024 수정문의 드렸습니다.
답변 1
예스스탁 예스스탁 답변
2015-01-22 13:58:56
안녕하세요
예스스탁입니다.
input : Left(3),Right(3);
var : SL(0),SH(0),T(0),cross(0),AA(0);
var : Line1(0),Line2(0),Line3(0),Line4(0);
Var:chng_rt(0),j(0),ma_val(0),rawVBE_ma(0);
Var:chng_rt1(0),j1(0),ma_val1(0),rawVBE_ma1(0);
Array:len[6](0),VBE_ma[6](0),
ma_chg[6](0),ma_cor[6](0),
fcstVBE_ma[6](0);
Array:len1[11](0),VBE_ma1[11](0),
ma_chg1[11](0),ma_cor1[11](0),
fcstVBE_ma1[11](0);
len[0] = 21;
len[1] = 17;
len[2] = 13;
len[3] = 9;
len[4] = 5;
len[5] = 2;
chng_rt = (C/C[1]-1); //가격 변동률
ma_val = ma(chng_rt,len[0]); //가격변동률의 평균
rawVBE_ma = C * (1 + ma_val); //원시VBE
for j = 0 to 5 {
VBE_ma[j] = wma(rawVBE_ma,len[j]); //원시VBE를 가중이평으로 평활화
if VBE_ma[j][1] > 0 then ma_chg[j] = (VBE_ma[j]-VBE_ma[j][1])/VBE_ma[j][1]; //VBE의 변동률
}
fcstVBE_ma[0] = VBE_ma[0];
plot1(fcstVBE_ma[0]);
len1[0] = 41;
len1[1] = 37;
len1[2] = 33;
len1[3] = 29;
len1[4] = 25;
len1[5] = 21;
len1[6] = 17;
len1[7] = 13;
len1[8] = 9;
len1[9] = 5;
len1[10] =2;
chng_rt1 = (C/C[1]-1); //가격 변동률
ma_val1 = ma(chng_rt1,len1[0]); //가격변동률의 평균
rawVBE_ma1 = C * (1 + ma_val1); //원시VBE
for j1 = 0 to 10 {
VBE_ma1[j1] = wma(rawVBE_ma1,len1[j1]); //원시VBE를 가중이평으로 평활화
if VBE_ma1[j1][1] > 0 then ma_chg1[j1] = (VBE_ma1[j1]-VBE_ma1[j1][1])/VBE_ma1[j1][1]; //VBE의 변동률
}
fcstVBE_ma1[0] = VBE_ma1[0];
plot2(fcstVBE_ma1[0]);
var1 = fcstVBE_ma[0];
var2 = fcstVBE_ma1[0];
if SwingLow(1,L,Left,Right,left+right+1) != -1 Then
SL = L[right];
if SwingHigh(1,H,Left,Right,left+right+1) != -1 Then
SH = H[right];
if crossup(var1,var2) and SL > 0 Then{
T = 1;
cross = (var1+var2)/2;
AA = abs(cross-SL);
Line1 = cross+AA*0.618;
Line2 = cross+AA*1.000;
Line3 = cross+AA*1.618;
Line4 = cross+AA*2.000;
Condition1 = false;
Condition2 = false;
Condition3 = false;
Condition4 = false;
}
if CrossDown(var1,var2) and SH > 0 Then{
T = -1;
cross = (var1+var2)/2;
AA = abs(cross-SL);
Line1 = cross-AA*0.618;
Line2 = cross-AA*1.000;
Line3 = cross-AA*1.618;
Line4 = cross-AA*2.000;
Condition1 = false;
Condition2 = false;
Condition3 = false;
Condition4 = false;
}
if T == 1 Then{
if Condition1 == False Then
plot3(Line1,"0.618");
if Condition2 == False Then
plot4(Line2,"1.000");
if Condition3 == False Then
plot5(Line3,"1.618");
if Condition4 == False Then
plot6(Line4,"2.000");
if H >= Line1 Then
Condition1 = true;
if H >= Line2 Then
Condition2 = true;
if H >= Line3 Then
Condition3 = true;
if H >= Line4 Then
Condition4 = true;
}
if T == -1 Then{
if Condition1 == False Then
plot7(Line1,"0.618");
if Condition2 == False Then
plot8(Line2,"1.000");
if Condition3 == False Then
plot9(Line3,"1.618");
if Condition4 == False Then
plot10(Line4,"2.000");
if L <= Line1 Then
Condition1 = True;
if L <= Line2 Then
Condition2 = true;
if L <= Line3 Then
Condition3 = true;
if L <= Line4 Then
Condition4 = true;
}
즐거운 하루되세요
> 뉴스타트 님이 쓴 글입니다.
> 제목 : 수정문의 입니다.
> 수고하십니다.
40024 수정문의 드렸습니다.
다음글
이전글