두번 문의해서 답변을 받았는데요
마지막에는 파워종목검색식으로 직접 구동한 화면을 보내주어
종목검색식이 구동된는 것을 증명까지 해주셨는데요
아래 검색식을 종목검색 또는 파워종목검색식으로 일봉 주봉
최대 500봉에서 50봉까지 50봉씩 기간을 낮추어 검색을 해도
구동이 안됩니다. 답답해서 근처 피씨방에서도 했는데
마찬가지 입니다.
다시 한번 수식 수정 부탁합니다.
Input:length(8);
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 = Highest(H,length) == H and lastHiVal <> H;
Condition2 = Lowest(L,length) == L and lastLoVal <> L;
If Condition1 Then lastHiVal = H;
If Condition2 Then lastLoVal = L;
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;
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] and turnPntArr[1][0] == "Hi" Then
find(1);
}
}
답변 1
예스스탁
예스스탁 답변
2021-10-12 11:47:57
안녕하세요
예스스탁입니다.
수식을 좀더 메모리를 덜 쓰게 수정해서 드립니다.
Input:length(8);
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(0),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10](0);
For j = 0 To 8
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Highest(H,length) == H and lastHiVal <> H;
Condition2 = Lowest(L,length) == L and lastLoVal <> L;
If Condition1 Then lastHiVal = H;
If Condition2 Then lastLoVal = L;
turnPntBit = 0;
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = 3;
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = 1;
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = 2;
}
Else If Condition1 Then turnPntBit = 1;
Else If Condition2 Then turnPntBit = 2;
If turnPntBit <> 0 Then
{
If turnPntBit == 3 Then
{
if turnPntArr[1] == 1 Then
valArr[1] = H;
Else
valArr[1] = H;
barArr[1] = 0;
If turnPntArr[1] == 1 Then
turnPntBit = 2;
Else
turnPntBit = 1;
}
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 == 1 and valArr[1] < H) or
(turnPntBit == 2 and valArr[1] > L))) Then
{
if turnPntBit == 1 Then
valArr[1] = H;
Else
valArr[1] = L;
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] and turnPntArr[1][0] == 1 Then
find(1);
}
}
즐거운 하루되세요
> 미래테크 님이 쓴 글입니다.
> 제목 : 수식 수정 부탁합니다
> 두번 문의해서 답변을 받았는데요
마지막에는 파워종목검색식으로 직접 구동한 화면을 보내주어
종목검색식이 구동된는 것을 증명까지 해주셨는데요
아래 검색식을 종목검색 또는 파워종목검색식으로 일봉 주봉
최대 500봉에서 50봉까지 50봉씩 기간을 낮추어 검색을 해도
구동이 안됩니다. 답답해서 근처 피씨방에서도 했는데
마찬가지 입니다.
다시 한번 수식 수정 부탁합니다.
Input:length(8);
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 = Highest(H,length) == H and lastHiVal <> H;
Condition2 = Lowest(L,length) == L and lastLoVal <> L;
If Condition1 Then lastHiVal = H;
If Condition2 Then lastLoVal = L;
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;
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] and turnPntArr[1][0] == "Hi" Then
find(1);
}
}