예스스탁
예스스탁 답변
2025-05-20 13:07:10
안녕하세요
예스스탁입니다.
Input: P(0), length(10);
Var: j(0), lastHiVal(0), lastLoVal(0), sBar(0), eBar(0), TL1(0), TL2(0),
Text1(0), 처리구분(""), T(0), TL3(0), TL4(0), TL5(0), color(0),
waveCount(0), waveText(0);
Array: 고점[20,3](0), 저점[20,3](0); // 가격, 위치
// 처리구분 결정
처리구분 = "";
If Highest(H, length) == H and lastHiVal <> H and
Lowest(L, length) == L and lastLoVal <> L Then
Begin
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
End
Else If Highest(H, length) == H and lastHiVal <> H Then
처리구분 = "고점처리";
Else If Lowest(L, length) == L and lastLoVal <> L Then
처리구분 = "저점처리";
// 고점 처리
If 처리구분 == "고점처리" Then
Begin
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
Begin
For j = 10 Downto 2
Begin
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
End;
End;
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
Begin
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL_Delete(TL5);
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
Begin
TL_Delete(TL1);
Text_Delete(Text1);
End;
TL1 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1], sDate[eBar], sTime[eBar], 고점[1,1]);
TL2 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1], sDate[eBar], sTime[eBar], 저점[1,1]);
TL3 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.382, sDate[eBar], sTime[eBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.382);
TL4 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.500, sDate[eBar], sTime[eBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.500);
TL5 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.618, sDate[eBar], sTime[eBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.618);
Text1 = Text_New(sDate[eBar], sTime[eBar], 고점[1,1], NumToStr(고점[1,1], P));
Text_SetStyle(Text1, 2, 1);
Text_SetColor(Text1, Blue);
color = -1;
waveCount = waveCount+ 1;
waveText = Text_New(sDate[eBar], sTime[eBar], 고점[1,1], "Wave " + NumToStr(waveCount, 0) + "");
Text_SetStyle(waveText, 1, 0);
Text_SetColor(waveText, Blue);
End;
End;
// 저점 처리
If 처리구분 == "저점처리" Then
Begin
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
Begin
For j = 10 Downto 2
Begin
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
End;
End;
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
Begin
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL_Delete(TL5);
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
Begin
TL_Delete(TL1);
Text_Delete(Text1);
End;
TL1 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1], sDate[eBar], sTime[eBar], 저점[1,1]);
TL2 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1], sDate[eBar], sTime[eBar], 고점[1,1]);
TL3 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.382, sDate[eBar], sTime[eBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.382);
TL4 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.500, sDate[eBar], sTime[eBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.500);
TL5 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.618, sDate[eBar], sTime[eBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.618);
Text1 = Text_New(sDate[eBar], sTime[eBar], 저점[1,1], NumToStr(저점[1,1], P));
Text_SetStyle(Text1, 2, 8);
Text_SetColor(Text1, Red);
color = 1;
waveCount = waveCount+1;
waveText = Text_New(sDate[eBar], sTime[eBar], 저점[1,1], "Wave " + NumToStr(waveCount, 0) + " ");
Text_SetStyle(waveText, 1, 0);
Text_SetColor(waveText, Red);
End;
End;
TL_SetSize(TL1, 0);
TL_SetColor(TL1, GRAY);
Plot1(color);
즐거운 하루되세요
> 윤호석 님이 쓴 글입니다.
> 제목 : 부탁드립니다 항상 감사합니다
> Input: P(0), length(10);
Var: j(0), lastHiVal(0), lastLoVal(0), sBar(0), eBar(0), TL1(0), TL2(0),
Text1(0), 처리구분(""), T(0), TL3(0), TL4(0), TL5(0), color(0),
waveCount(0), waveText(0);
Array: 고점 , 저점 ; // 가격, 위치
// 처리구분 결정
처리구분 = "";
If Highest(H, length) == H and lastHiVal <> H and
Lowest(L, length) == L and lastLoVal <> L Then
Begin
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
End
Else If Highest(H, length) == H and lastHiVal <> H Then
처리구분 = "고점처리";
Else If Lowest(L, length) == L and lastLoVal <> L Then
처리구분 = "저점처리";
// 고점 처리
If 처리구분 == "고점처리" Then
Begin
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
Begin
For j = 10 Downto 2
Begin
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
End;
End;
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
Begin
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL_Delete(TL5);
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
Begin
TL_Delete(TL1);
Text_Delete(Text1);
End;
TL1 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1], sDate[eBar], sTime[eBar], 고점[1,1]);
TL2 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1], sDate[eBar], sTime[eBar], 저점[1,1]);
TL3 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.382, sDate[eBar], sTime[eBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.382);
TL4 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.500, sDate[eBar], sTime[eBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.500);
TL5 = TL_New(sDate[sBar], sTime[sBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.618, sDate[eBar], sTime[eBar], 저점[1,1]+(고점[1,1]-저점[1,1])*0.618);
Text1 = Text_New(sDate[eBar], sTime[eBar], 고점[1,1], NumToStr(고점[1,1], P));
Text_SetStyle(Text1, 2, 1);
Text_SetColor(Text1, Blue);
color = -1;
waveCount += 1;
waveText = Text_New(sDate[eBar], sTime[eBar], 고점[1,1], ""Wave " + NumToStr(waveCount, 0) + """);
Text_SetStyle(waveText, 1, 0);
Text_SetColor(waveText, Blue);
End;
End;
// 저점 처리
If 처리구분 == "저점처리" Then
Begin
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
Begin
For j = 10 Downto 2
Begin
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
End;
End;
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
Begin
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL_Delete(TL5);
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
Begin
TL_Delete(TL1);
Text_Delete(Text1);
End;
TL1 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1], sDate[eBar], sTime[eBar], 저점[1,1]);
TL2 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1], sDate[eBar], sTime[eBar], 고점[1,1]);
TL3 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.382, sDate[eBar], sTime[eBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.382);
TL4 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.500, sDate[eBar], sTime[eBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.500);
TL5 = TL_New(sDate[sBar], sTime[sBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.618, sDate[eBar], sTime[eBar], 고점[1,1]-(고점[1,1]-저점[1,1])*0.618);
Text1 = Text_New(sDate[eBar], sTime[eBar], 저점[1,1], NumToStr(저점[1,1], P));
Text_SetStyle(Text1, 2, 8);
Text_SetColor(Text1, Red);
color = 1;
waveCount += 1;
waveText = Text_New(sDate[eBar], sTime[eBar], 저점[1,1], ""Wave " + NumToStr(waveCount, 0) + """);
Text_SetStyle(waveText, 1, 0);
Text_SetColor(waveText, Red);
End;
End;
TL_SetSize(TL1, 0);
TL_SetColor(TL1, GRAY);
Plot1(color);
마찬가지로 오류가 나서요 예스트레이더
차트에 구현될수있게 수정 부탁드립니다 오늘도 화이팅이십니다