커뮤니티
부탁 드립니다.
2015-10-29 10:06:22
255
글번호 91849
항상 만족한 수식으로 도움 주셔셔
깊이 감사 드립니다.
저점과 저점,고점과 고점끼리 연결했을때
연장선과 끝의 현재 가격을
그림과 같이 부탁 드립니다.
미리 감사 드립니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
- 1. q123.jpg (0.14 MB)
답변 3
예스스탁 예스스탁 답변
2015-10-29 11:10:50
안녕하세요
예스스탁입니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0);
var : tx1(0),tx2(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then{
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
if turnPntArr[1][0] == "Lo" then{
TL_Delete(TL2);
TL2 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,red);
}
if turnPntArr[1][0] == "Hi" then{
TL_Delete(TL3);
TL3 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL3,true);
TL_SetColor(TL3,blue);
}
}
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
Text_Delete(tx1);
Text_Delete(tx2);
tx1 = Text_New(sdate,stime,TL_GetValue(TL2,sdate,stime),NumToStr(TL_GetValue(TL2,sdate,stime),2));
tx2 = Text_New(sdate,stime,TL_GetValue(TL3,sdate,stime),NumToStr(TL_GetValue(TL3,sdate,stime),2));
Text_SetStyle(tx1,0,2);
Text_SetStyle(tx2,0,2);
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 항상 만족한 수식으로 도움 주셔셔
깊이 감사 드립니다.
저점과 저점,고점과 고점끼리 연결했을때
연장선과 끝의 현재 가격을
그림과 같이 부탁 드립니다.
미리 감사 드립니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
yes
2015-10-29 13:51:04
수식 답변에 가슴 깊이 감사드립니다.
답변수식에서
기입되는 가격의 위치가 현재 종가 위치에서의 Y축 가격이 기입 됩니다.
이것을
그림과 같이 추세선(TL1,흑색)끝점 위치에서의 Y축 가격과
그 위치에서
수평선 2개(TL1 성장에 따라 연동) 부탁 드립니다.
미리 감사 드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁 드립니다.
> 안녕하세요
예스스탁입니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0);
var : tx1(0),tx2(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then{
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
if turnPntArr[1][0] == "Lo" then{
TL_Delete(TL2);
TL2 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,red);
}
if turnPntArr[1][0] == "Hi" then{
TL_Delete(TL3);
TL3 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL3,true);
TL_SetColor(TL3,blue);
}
}
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
Text_Delete(tx1);
Text_Delete(tx2);
tx1 = Text_New(sdate,stime,TL_GetValue(TL2,sdate,stime),NumToStr(TL_GetValue(TL2,sdate,stime),2));
tx2 = Text_New(sdate,stime,TL_GetValue(TL3,sdate,stime),NumToStr(TL_GetValue(TL3,sdate,stime),2));
Text_SetStyle(tx1,0,2);
Text_SetStyle(tx2,0,2);
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 항상 만족한 수식으로 도움 주셔셔
깊이 감사 드립니다.
저점과 저점,고점과 고점끼리 연결했을때
연장선과 끝의 현재 가격을
그림과 같이 부탁 드립니다.
미리 감사 드립니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
예스스탁 예스스탁 답변
2015-10-29 14:49:42
안녕하세요
예스스탁입니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0);
var : tx1(0),tx2(0),tl4(0),tl5(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then{
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
if turnPntArr[1][0] == "Lo" then{
TL_Delete(TL2);
TL2 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,red);
}
if turnPntArr[1][0] == "Hi" then{
TL_Delete(TL3);
TL3 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL3,true);
TL_SetColor(TL3,blue);
}
}
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Text_Delete(tx1);
Text_Delete(tx2);
tx1 = Text_New(sdate,stime,TL_GetValue(TL2,sdate,stime),NumToStr(TL_GetValue(TL2,sdate,stime),2));
tx2 = Text_New(sdate,stime,TL_GetValue(TL3,sdate,stime),NumToStr(TL_GetValue(TL3,sdate,stime),2));
Text_SetStyle(tx1,0,2);
Text_SetStyle(tx2,0,2);
TL_Delete(TL4);
TL_Delete(TL5);
TL4 = TL_New(sdate[1],stime[1],TL_GetValue(TL2,sdate,stime),sdate,stime,TL_GetValue(TL2,sdate,stime));
TL5 = TL_New(sdate[1],stime[1],TL_GetValue(TL3,sdate,stime),sdate,stime,TL_GetValue(TL3,sdate,stime));
TL_SetExtLeft(tl4,TRUE);
TL_SetExtLeft(tl5,TRUE);
TL_SetExtRight(tl4,TRUE);
TL_SetExtRight(tl5,TRUE);
TL_SetColor(TL4,RED);
TL_SetColor(TL5,blue);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : Re : Re : 수정 부탁 드립니다.
> 수식 답변에 가슴 깊이 감사드립니다.
답변수식에서
기입되는 가격의 위치가 현재 종가 위치에서의 Y축 가격이 기입 됩니다.
이것을
그림과 같이 추세선(TL1,흑색)끝점 위치에서의 Y축 가격과
그 위치에서
수평선 2개(TL1 성장에 따라 연동) 부탁 드립니다.
미리 감사 드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁 드립니다.
> 안녕하세요
예스스탁입니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0);
var : tx1(0),tx2(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then{
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
if turnPntArr[1][0] == "Lo" then{
TL_Delete(TL2);
TL2 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,red);
}
if turnPntArr[1][0] == "Hi" then{
TL_Delete(TL3);
TL3 = TL_New(sDate[barArr[4]],sTime[barArr[4]],valArr[4],sDate[barArr[2]],sTime[barArr[2]],valArr[2]);
TL_SetExtRight(TL3,true);
TL_SetColor(TL3,blue);
}
}
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
Text_Delete(tx1);
Text_Delete(tx2);
tx1 = Text_New(sdate,stime,TL_GetValue(TL2,sdate,stime),NumToStr(TL_GetValue(TL2,sdate,stime),2));
tx2 = Text_New(sdate,stime,TL_GetValue(TL3,sdate,stime),NumToStr(TL_GetValue(TL3,sdate,stime),2));
Text_SetStyle(tx1,0,2);
Text_SetStyle(tx2,0,2);
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 항상 만족한 수식으로 도움 주셔셔
깊이 감사 드립니다.
저점과 저점,고점과 고점끼리 연결했을때
연장선과 끝의 현재 가격을
그림과 같이 부탁 드립니다.
미리 감사 드립니다.
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (0.3/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (0.3/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);