커뮤니티
문의합니다
2013-05-31 13:33:37
388
글번호 63849
input:left(5),right(5),구분(1);
var:j(0),prehv(0),prelv(0),prehb(0),prelb(0),tmpv(0),tmpb(0),
ovr(0),반등(1),반락(-1);
array:hv[10](0),lv[10](0),hb[10](0),lb[10](0),
r[8](0),fr[8](0);
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
#==============================================================================#
# 변곡점 계산
#==============================================================================#
//파동선 작성 설명은 자주 했으므로 생략
if highest(h[1],left) <= h then {
prehv = h;
prehb = 0;
}
else
prehb = prehb + 1;
if lowest(l[1],left) >= l then {
prelv = l;
prelb = 0;
}
else
prelb = prelb + 1;
for j = 1 to 9 begin
hb[j] = hb[j] + 1;
lb[j] = lb[j] + 1;
end;
if prehb == right and highest(h,right) <= h[right] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
hv[1] = prehv;
hb[1] = prehb;
if lb[1] > hb[2] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
tmpv = 0;
for j = hb[1] + 1 to hb[2] - 1 {
if tmpv > l[j] or tmpv ==0 then {
tmpv = l[j];
tmpb = j;
}
}
lv[1] = tmpv;
lb[1] = tmpb;
}
}
if prelb == right and lowest(l,right) >= l[right] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
lv[1] = prelv;
lb[1] = prelb;
if hb[1] > lb[2] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
tmpv = 0;
for j = lb[1] + 1 to lb[2] - 1 {
if tmpv < h[j] or tmpv ==0 then {
tmpv = h[j];
tmpb = j;
}
}
hv[1] = tmpv;
hb[1] = tmpb;
}
}
#==============================================================================#
# Fibonacci Retracements 계산
#==============================================================================#
//반등과 반락을 모두 표시하게 되면 복잡해지므로 한 방향만 표시하는 것이 옳음
if 구분 == 반등 then {
if crossup(lb[1],hb[1]) then
{
for j = 0 to 7 begin
fr[j] = hv[1] - (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if 구분 == 반락 then {
if crossup(hb[1],lb[1]) then
{
for j = 0 to 7 begin
fr[j] = lv[1] + (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
#==============================================================================#
# 지표출력
#==============================================================================#
if hb[1]==right then plot1(hv[1],"파동선",GREEN);
if lb[1]==right then plot1(lv[1],"파동선",GREEN);
plot2(fr[0],"0%",BLUE);
plot3(fr[1],"23.6%",RED);
plot4(fr[2],"38.2%",MAGENTA);
plot5(fr[3],"50%",GRAY);
plot6(fr[4],"61.8%",LBLUE);
plot7(fr[5],"76.4%",LGREEN);
plot8(fr[6],"100%",PINK);
if ovr then plot9(fr[7],"161.8%",LMAGENTA); //점 그래프로 표시
위에식중에서
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
이부분을 빼고 아래의 식을 넣고싶습니다
그리고 선색깔은 12가지색을 집어넣기가 힘드니 (빨강)(파랑)(노랑) 이3색만 번갈아가며 나오게 해주십시요
j에 1 할당 --> f2( 0) , f1( 0) , f( 1)
j에 2 할당 --> f2( 0) , f1( 1) , f( 1)
j에 3 할당 --> f2( 1) , f1( 1) , f( 2)
j에 4 할당 --> f2( 1) , f1( 2) , f( 3)
j에 5 할당 --> f2( 2) , f1( 3) , f( 5)
j에 6 할당 --> f2( 3) , f1( 5) , f( 8)
j에 7 할당 --> f2( 5) , f1( 8) , f( 13)
j에 8 할당 --> f2( 8) , f1(13) , f( 21)
j에 9 할당 --> f2(13) , f1(21) , f( 34)
j에 10 할당 --> f2(21) , f1(34) , f( 55)
j에 11 할당 --> f2(34) , f1(55) , f( 89)
j에 12 할당 --> f2(55), f1(89) , f(144)
답변 2
예스스탁 예스스탁 답변
2013-06-03 09:46:58
안녕하세요
예스스탁입니다.
1.색 번갈아 출력되는 식은 아래와 같습니다.
input:left(5),right(5),구분(1);
var:j(0),prehv(0),prelv(0),prehb(0),prelb(0),tmpv(0),tmpb(0),
ovr(0),반등(1),반락(-1),color(0);
array:hv[10](0),lv[10](0),hb[10](0),lb[10](0),r[8](0),fr[8](0);
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
#==============================================================================#
# 변곡점 계산
#==============================================================================#
//파동선 작성 설명은 자주 했으므로 생략
if highest(h[1],left) <= h then {
prehv = h;
prehb = 0;
}
else
prehb = prehb + 1;
if lowest(l[1],left) >= l then {
prelv = l;
prelb = 0;
}
else
prelb = prelb + 1;
for j = 1 to 9 begin
hb[j] = hb[j] + 1;
lb[j] = lb[j] + 1;
end;
if prehb == right and highest(h,right) <= h[right] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
hv[1] = prehv;
hb[1] = prehb;
if lb[1] > hb[2] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
tmpv = 0;
for j = hb[1] + 1 to hb[2] - 1 {
if tmpv > l[j] or tmpv ==0 then {
tmpv = l[j];
tmpb = j;
}
}
lv[1] = tmpv;
lb[1] = tmpb;
}
}
if prelb == right and lowest(l,right) >= l[right] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
lv[1] = prelv;
lb[1] = prelb;
if hb[1] > lb[2] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
tmpv = 0;
for j = lb[1] + 1 to lb[2] - 1 {
if tmpv < h[j] or tmpv ==0 then {
tmpv = h[j];
tmpb = j;
}
}
hv[1] = tmpv;
hb[1] = tmpb;
}
}
#==============================================================================#
# Fibonacci Retracements 계산
#==============================================================================#
//반등과 반락을 모두 표시하게 되면 복잡해지므로 한 방향만 표시하는 것이 옳음
if 구분 == 반등 then {
if crossup(lb[1],hb[1]) then
{
for j = 0 to 7 begin
fr[j] = hv[1] - (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if 구분 == 반락 then {
if crossup(hb[1],lb[1]) then
{
for j = 0 to 7 begin
fr[j] = lv[1] + (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if fr[0] != fr[0][1] Then
var1 = var1+1;
#==============================================================================#
# 지표출력
#==============================================================================#
if var1%3 == 0 Then
color = RED;
if var1%3 == 1 Then
color = BLUE;
if var1%3 == 2 Then
color = YELLOW;
if hb[1]==right then plot1(hv[1],"파동선",color);
if lb[1]==right then plot1(lv[1],"파동선",color);
plot2(fr[0],"0%",color);
plot3(fr[1],"23.6%",color);
plot4(fr[2],"38.2%",color);
plot5(fr[3],"50%",color);
plot6(fr[4],"61.8%",color);
plot7(fr[5],"76.4%",color);
plot8(fr[6],"100%",color);
if ovr then plot9(fr[7],"161.8%",color); //점 그래프로 표시
2.
아래식으로 교체하시면 됩니다.
ar : f2(0),f1(0),f(0);
if j == 1 Then{
f2 = 0; f1 = 0; f = 1;
}
if j == 2 Then{
f2 = 0; f1 = 1; f = 1;
}
if j == 3 Then{
f2 = 1; f1 = 1; f = 2;
}
if j == 4 Then{
f2 = 1; f1 = 2; f = 3;
}
if j == 5 Then{
f2 = 2; f1 = 3; f = 4;
}
if j == 6 Then{
f2 = 3; f1 = 5; f = 8;
}
if j == 7 Then{
f2 = 5; f1 = 8; f = 13;
}
if j == 8 Then{
f2 = 8; f1 = 13; f = 21;
}
if j == 9 Then{
f2 = 13; f1 = 21; f = 34;
}
if j == 10 Then{
f2 = 21; f1 = 34; f = 55;
}
if j == 11 Then{
f2 = 34; f1 = 55; f = 89;
}
if j == 12 Then{
f2 = 55; f1 = 89; f = 144;
}
즐거운 하루되세요
> zmffhqj 님이 쓴 글입니다.
> 제목 : 문의합니다
>
input:left(5),right(5),구분(1);
var:j(0),prehv(0),prelv(0),prehb(0),prelb(0),tmpv(0),tmpb(0),
ovr(0),반등(1),반락(-1);
array:hv[10](0),lv[10](0),hb[10](0),lb[10](0),
r[8](0),fr[8](0);
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
#==============================================================================#
# 변곡점 계산
#==============================================================================#
//파동선 작성 설명은 자주 했으므로 생략
if highest(h[1],left) <= h then {
prehv = h;
prehb = 0;
}
else
prehb = prehb + 1;
if lowest(l[1],left) >= l then {
prelv = l;
prelb = 0;
}
else
prelb = prelb + 1;
for j = 1 to 9 begin
hb[j] = hb[j] + 1;
lb[j] = lb[j] + 1;
end;
if prehb == right and highest(h,right) <= h[right] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
hv[1] = prehv;
hb[1] = prehb;
if lb[1] > hb[2] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
tmpv = 0;
for j = hb[1] + 1 to hb[2] - 1 {
if tmpv > l[j] or tmpv ==0 then {
tmpv = l[j];
tmpb = j;
}
}
lv[1] = tmpv;
lb[1] = tmpb;
}
}
if prelb == right and lowest(l,right) >= l[right] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
lv[1] = prelv;
lb[1] = prelb;
if hb[1] > lb[2] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
tmpv = 0;
for j = lb[1] + 1 to lb[2] - 1 {
if tmpv < h[j] or tmpv ==0 then {
tmpv = h[j];
tmpb = j;
}
}
hv[1] = tmpv;
hb[1] = tmpb;
}
}
#==============================================================================#
# Fibonacci Retracements 계산
#==============================================================================#
//반등과 반락을 모두 표시하게 되면 복잡해지므로 한 방향만 표시하는 것이 옳음
if 구분 == 반등 then {
if crossup(lb[1],hb[1]) then
{
for j = 0 to 7 begin
fr[j] = hv[1] - (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if 구분 == 반락 then {
if crossup(hb[1],lb[1]) then
{
for j = 0 to 7 begin
fr[j] = lv[1] + (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
#==============================================================================#
# 지표출력
#==============================================================================#
if hb[1]==right then plot1(hv[1],"파동선",GREEN);
if lb[1]==right then plot1(lv[1],"파동선",GREEN);
plot2(fr[0],"0%",BLUE);
plot3(fr[1],"23.6%",RED);
plot4(fr[2],"38.2%",MAGENTA);
plot5(fr[3],"50%",GRAY);
plot6(fr[4],"61.8%",LBLUE);
plot7(fr[5],"76.4%",LGREEN);
plot8(fr[6],"100%",PINK);
if ovr then plot9(fr[7],"161.8%",LMAGENTA); //점 그래프로 표시
위에식중에서
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
이부분을 빼고 아래의 식을 넣고싶습니다
그리고 선색깔은 12가지색을 집어넣기가 힘드니 (빨강)(파랑)(노랑) 이3색만 번갈아가며 나오게 해주십시요
j에 1 할당 --> f2( 0) , f1( 0) , f( 1)
j에 2 할당 --> f2( 0) , f1( 1) , f( 1)
j에 3 할당 --> f2( 1) , f1( 1) , f( 2)
j에 4 할당 --> f2( 1) , f1( 2) , f( 3)
j에 5 할당 --> f2( 2) , f1( 3) , f( 5)
j에 6 할당 --> f2( 3) , f1( 5) , f( 8)
j에 7 할당 --> f2( 5) , f1( 8) , f( 13)
j에 8 할당 --> f2( 8) , f1(13) , f( 21)
j에 9 할당 --> f2(13) , f1(21) , f( 34)
j에 10 할당 --> f2(21) , f1(34) , f( 55)
j에 11 할당 --> f2(34) , f1(55) , f( 89)
j에 12 할당 --> f2(55), f1(89) , f(144)
예스스탁 예스스탁 답변
2013-06-03 10:53:24
안녕하세요
예스스탁입니다.
12개까지 비율선이 그려지도록 수정했습니다.
input:left(5),right(5),구분(1);
var:j(0),prehv(0),prelv(0),prehb(0),prelb(0),tmpv(0),tmpb(0),
ovr(0),반등(1),반락(-1),color(0);
array:hv[10](0),lv[10](0),hb[10](0),lb[10](0),r[12](0),fr[12](0);
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.200;
r[8] = 1.400;
r[9] = 1.600;
r[10] = 1.800;
r[11] = 2.000;
#==============================================================================#
# 변곡점 계산
#==============================================================================#
//파동선 작성 설명은 자주 했으므로 생략
if highest(h[1],left) <= h then {
prehv = h;
prehb = 0;
}
else
prehb = prehb + 1;
if lowest(l[1],left) >= l then {
prelv = l;
prelb = 0;
}
else
prelb = prelb + 1;
for j = 1 to 9 begin
hb[j] = hb[j] + 1;
lb[j] = lb[j] + 1;
end;
if prehb == right and highest(h,right) <= h[right] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
hv[1] = prehv;
hb[1] = prehb;
if lb[1] > hb[2] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
tmpv = 0;
for j = hb[1] + 1 to hb[2] - 1 {
if tmpv > l[j] or tmpv ==0 then {
tmpv = l[j];
tmpb = j;
}
}
lv[1] = tmpv;
lb[1] = tmpb;
}
}
if prelb == right and lowest(l,right) >= l[right] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
lv[1] = prelv;
lb[1] = prelb;
if hb[1] > lb[2] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
tmpv = 0;
for j = lb[1] + 1 to lb[2] - 1 {
if tmpv < h[j] or tmpv ==0 then {
tmpv = h[j];
tmpb = j;
}
}
hv[1] = tmpv;
hb[1] = tmpb;
}
}
#==============================================================================#
# Fibonacci Retracements 계산
#==============================================================================#
//반등과 반락을 모두 표시하게 되면 복잡해지므로 한 방향만 표시하는 것이 옳음
if 구분 == 반등 then {
if crossup(lb[1],hb[1]) then
{
for j = 0 to 11 begin
fr[j] = hv[1] - (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if 구분 == 반락 then {
if crossup(hb[1],lb[1]) then
{
for j = 0 to 11 begin
fr[j] = lv[1] + (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[10]>l then ovr = 1;
}
if fr[0] != fr[0][1] Then
var1 = var1+1;
#==============================================================================#
# 지표출력
#==============================================================================#
if var1%3 == 0 Then
color = RED;
if var1%3 == 1 Then
color = BLUE;
if var1%3 == 2 Then
color = YELLOW;
if hb[1]==right then plot1(hv[1],"파동선",color);
if lb[1]==right then plot1(lv[1],"파동선",color);
plot2(fr[0],"0%",color);
plot3(fr[1],"23.6%",color);
plot4(fr[2],"38.2%",color);
plot5(fr[3],"50%",color);
plot6(fr[4],"61.8%",color);
plot7(fr[5],"76.4%",color);
plot8(fr[6],"100%",color);
plot9(fr[7],"100%",color);
plot10(fr[8],"100%",color);
plot11(fr[9],"100%",color);
plot12(fr[10],"100%",color);
if ovr then plot13(fr[11],"161.8%",color); //점 그래프로 표시
즐거운 하루되세요
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의합니다
> 안녕하세요
예스스탁입니다.
1.색 번갈아 출력되는 식은 아래와 같습니다.
input:left(5),right(5),구분(1);
var:j(0),prehv(0),prelv(0),prehb(0),prelb(0),tmpv(0),tmpb(0),
ovr(0),반등(1),반락(-1),color(0);
array:hv[10](0),lv[10](0),hb[10](0),lb[10](0),r[8](0),fr[8](0);
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
#==============================================================================#
# 변곡점 계산
#==============================================================================#
//파동선 작성 설명은 자주 했으므로 생략
if highest(h[1],left) <= h then {
prehv = h;
prehb = 0;
}
else
prehb = prehb + 1;
if lowest(l[1],left) >= l then {
prelv = l;
prelb = 0;
}
else
prelb = prelb + 1;
for j = 1 to 9 begin
hb[j] = hb[j] + 1;
lb[j] = lb[j] + 1;
end;
if prehb == right and highest(h,right) <= h[right] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
hv[1] = prehv;
hb[1] = prehb;
if lb[1] > hb[2] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
tmpv = 0;
for j = hb[1] + 1 to hb[2] - 1 {
if tmpv > l[j] or tmpv ==0 then {
tmpv = l[j];
tmpb = j;
}
}
lv[1] = tmpv;
lb[1] = tmpb;
}
}
if prelb == right and lowest(l,right) >= l[right] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
lv[1] = prelv;
lb[1] = prelb;
if hb[1] > lb[2] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
tmpv = 0;
for j = lb[1] + 1 to lb[2] - 1 {
if tmpv < h[j] or tmpv ==0 then {
tmpv = h[j];
tmpb = j;
}
}
hv[1] = tmpv;
hb[1] = tmpb;
}
}
#==============================================================================#
# Fibonacci Retracements 계산
#==============================================================================#
//반등과 반락을 모두 표시하게 되면 복잡해지므로 한 방향만 표시하는 것이 옳음
if 구분 == 반등 then {
if crossup(lb[1],hb[1]) then
{
for j = 0 to 7 begin
fr[j] = hv[1] - (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if 구분 == 반락 then {
if crossup(hb[1],lb[1]) then
{
for j = 0 to 7 begin
fr[j] = lv[1] + (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if fr[0] != fr[0][1] Then
var1 = var1+1;
#==============================================================================#
# 지표출력
#==============================================================================#
if var1%3 == 0 Then
color = RED;
if var1%3 == 1 Then
color = BLUE;
if var1%3 == 2 Then
color = YELLOW;
if hb[1]==right then plot1(hv[1],"파동선",color);
if lb[1]==right then plot1(lv[1],"파동선",color);
plot2(fr[0],"0%",color);
plot3(fr[1],"23.6%",color);
plot4(fr[2],"38.2%",color);
plot5(fr[3],"50%",color);
plot6(fr[4],"61.8%",color);
plot7(fr[5],"76.4%",color);
plot8(fr[6],"100%",color);
if ovr then plot9(fr[7],"161.8%",color); //점 그래프로 표시
2.
아래식으로 교체하시면 됩니다.
ar : f2(0),f1(0),f(0);
if j == 1 Then{
f2 = 0; f1 = 0; f = 1;
}
if j == 2 Then{
f2 = 0; f1 = 1; f = 1;
}
if j == 3 Then{
f2 = 1; f1 = 1; f = 2;
}
if j == 4 Then{
f2 = 1; f1 = 2; f = 3;
}
if j == 5 Then{
f2 = 2; f1 = 3; f = 4;
}
if j == 6 Then{
f2 = 3; f1 = 5; f = 8;
}
if j == 7 Then{
f2 = 5; f1 = 8; f = 13;
}
if j == 8 Then{
f2 = 8; f1 = 13; f = 21;
}
if j == 9 Then{
f2 = 13; f1 = 21; f = 34;
}
if j == 10 Then{
f2 = 21; f1 = 34; f = 55;
}
if j == 11 Then{
f2 = 34; f1 = 55; f = 89;
}
if j == 12 Then{
f2 = 55; f1 = 89; f = 144;
}
즐거운 하루되세요
> zmffhqj 님이 쓴 글입니다.
> 제목 : 문의합니다
>
input:left(5),right(5),구분(1);
var:j(0),prehv(0),prelv(0),prehb(0),prelb(0),tmpv(0),tmpb(0),
ovr(0),반등(1),반락(-1);
array:hv[10](0),lv[10](0),hb[10](0),lb[10](0),
r[8](0),fr[8](0);
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
#==============================================================================#
# 변곡점 계산
#==============================================================================#
//파동선 작성 설명은 자주 했으므로 생략
if highest(h[1],left) <= h then {
prehv = h;
prehb = 0;
}
else
prehb = prehb + 1;
if lowest(l[1],left) >= l then {
prelv = l;
prelb = 0;
}
else
prelb = prelb + 1;
for j = 1 to 9 begin
hb[j] = hb[j] + 1;
lb[j] = lb[j] + 1;
end;
if prehb == right and highest(h,right) <= h[right] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
hv[1] = prehv;
hb[1] = prehb;
if lb[1] > hb[2] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
tmpv = 0;
for j = hb[1] + 1 to hb[2] - 1 {
if tmpv > l[j] or tmpv ==0 then {
tmpv = l[j];
tmpb = j;
}
}
lv[1] = tmpv;
lb[1] = tmpb;
}
}
if prelb == right and lowest(l,right) >= l[right] then {
for j = 9 downto 2 {
lv[j] = lv[j-1];
lb[j] = lb[j-1];
}
lv[1] = prelv;
lb[1] = prelb;
if hb[1] > lb[2] then {
for j = 9 downto 2 {
hv[j] = hv[j-1];
hb[j] = hb[j-1];
}
tmpv = 0;
for j = lb[1] + 1 to lb[2] - 1 {
if tmpv < h[j] or tmpv ==0 then {
tmpv = h[j];
tmpb = j;
}
}
hv[1] = tmpv;
hb[1] = tmpb;
}
}
#==============================================================================#
# Fibonacci Retracements 계산
#==============================================================================#
//반등과 반락을 모두 표시하게 되면 복잡해지므로 한 방향만 표시하는 것이 옳음
if 구분 == 반등 then {
if crossup(lb[1],hb[1]) then
{
for j = 0 to 7 begin
fr[j] = hv[1] - (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
if 구분 == 반락 then {
if crossup(hb[1],lb[1]) then
{
for j = 0 to 7 begin
fr[j] = lv[1] + (hv[1] - lv[1]) * r[j];
end;
ovr = 0;
}
if fr[6]>l then ovr = 1;
}
#==============================================================================#
# 지표출력
#==============================================================================#
if hb[1]==right then plot1(hv[1],"파동선",GREEN);
if lb[1]==right then plot1(lv[1],"파동선",GREEN);
plot2(fr[0],"0%",BLUE);
plot3(fr[1],"23.6%",RED);
plot4(fr[2],"38.2%",MAGENTA);
plot5(fr[3],"50%",GRAY);
plot6(fr[4],"61.8%",LBLUE);
plot7(fr[5],"76.4%",LGREEN);
plot8(fr[6],"100%",PINK);
if ovr then plot9(fr[7],"161.8%",LMAGENTA); //점 그래프로 표시
위에식중에서
r[0] = 0;
r[1] = 0.236;
r[2] = 0.382;
r[3] = 0.50;
r[4] = 0.618;
r[5] = 0.764;
r[6] = 1;
r[7] = 1.618;
이부분을 빼고 아래의 식을 넣고싶습니다
그리고 선색깔은 12가지색을 집어넣기가 힘드니 (빨강)(파랑)(노랑) 이3색만 번갈아가며 나오게 해주십시요
j에 1 할당 --> f2( 0) , f1( 0) , f( 1)
j에 2 할당 --> f2( 0) , f1( 1) , f( 1)
j에 3 할당 --> f2( 1) , f1( 1) , f( 2)
j에 4 할당 --> f2( 1) , f1( 2) , f( 3)
j에 5 할당 --> f2( 2) , f1( 3) , f( 5)
j에 6 할당 --> f2( 3) , f1( 5) , f( 8)
j에 7 할당 --> f2( 5) , f1( 8) , f( 13)
j에 8 할당 --> f2( 8) , f1(13) , f( 21)
j에 9 할당 --> f2(13) , f1(21) , f( 34)
j에 10 할당 --> f2(21) , f1(34) , f( 55)
j에 11 할당 --> f2(34) , f1(55) , f( 89)
j에 12 할당 --> f2(55), f1(89) , f(144)
다음글
이전글