커뮤니티
부탁드립니다 !!
2019-02-22 22:15:27
185
글번호 126483
안녕하세요!
어쩌다보니 요즘 제가 너무 자주 부탁을 드리게되네요
여러가지 지표를 활용해서 저만의 챠트를 완성하려다보니 본의아니게...
이해해주시면 감사하겠습니다 ㅎ
1, 밑에 61451번 님의 글을보고 저에게도 활용가치가 있는것같아서 아래와같이 수정 부탁드립니다
(* 수식은 하단 참조바랍니다)
(1), 이 수식에서 파동선과 텍스트는 삭제
(2), 가로선의 두께는 조정할수있으면 좋겠구요
(3), 가로선이 한번 발생시 끝까지 계속 이어지는것같은데 선 발생후 10개봉 정도까지만
이어지고 이후론 사라졌으면 합니다
(4), 가로선의 발생지점이 해당봉의 고점이나 저점에서 발생되는데..
이 고저점에서 1틱정도 위아래에서 이선이 발생되었으면 합니다
즉, 상단 빨간선의 경우에는 1틱위에, 하단 파란선의 경우에는 1틱 아래에서 선이 발생
* 기설치된 지표와 겹치는 현상을 방지하기위함입니다
2, 그리고 지난 2월 21일자로 제가 문의드린 아래 "61430번"에 대한 답변수식에 관한것입니다만..
실전에 적용해보니 선물챠트에 표시되는 지점이 약 0.2~0.3P 정도 오차가 생기네요
이것이 선물과 옵션간의 차이에서 오는 어쩔수없는 현상인지?
혹은 수정이 가능한건지 수고스럽겠지만 한번더 검토 부탁드립니다
항상 감사드립니다 ^^*
=======================================================================================
Input:length(12);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
}
if T == -1 and T != T[1] then
{
var2 = var2+1;
if var2 == 1 and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
}
답변 3
예스스탁 예스스탁 답변
2019-02-25 10:03:02
안녕하세요
예스스탁입니다.
1
모든 선이 후행적으로 그려지므로
고점과 저점에 대한 수평선이 최초 그려지는 지점이
이미 고점과 저점봉보다 10봉이후일 경우가 있습니다.
고점과 저점봉과 현재봉과의 차이가 아닌 최초 그려진봉을 기준으로
10개봉 연장후 지워지게 작성해 드립니다.
Input:length(12),굵기(3);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
//TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
//Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
//TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
//Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
value1 = index;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1]-PriceScale*1,sdate,stime,저점[1,1]-PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,굵기);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1]-PriceScale*1,sdate,stime,저점[1,1]-PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,굵기);
}
}
if T == 1 then
{
if index <= value1+10 Then
{
TL_SetEnd(TL2,sdate,stime,저점[1,1]-PriceScale*1);
}
}
if index > value1+10 Then
TL_Delete(TL2);
if T == -1 and T != T[1] then
{
var2 = var2+1;
value2 = index;
if var2 == 1 and CurrentDate == sdate Then
{
TL3 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1]+PriceScale*1,sdate,stime,고점[1,1]+PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,굵기);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL3 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1]+PriceScale*1,sdate,stime,고점[1,1]+PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,굵기);
}
}
if T == -1 then{
if index <= value2+10 Then
{
TL_SetEnd(TL3,sdate,stime,고점[1,1]+PriceScale*1);
}
}
if index > value2+10 Then
TL_Delete(TL3);
2
해당 수식은 data2나 data3의 종가가 특정가격을 상향/하향 돌파시 기본차트의 가격을 그리는 지표입니다. 수식내 특별히 수정할 만한 부분이 보이지 않습니다.
즐거운 하루되세요
> 유로파54 님이 쓴 글입니다.
> 제목 : 부탁드립니다 !!
> 안녕하세요!
어쩌다보니 요즘 제가 너무 자주 부탁을 드리게되네요
여러가지 지표를 활용해서 저만의 챠트를 완성하려다보니 본의아니게...
이해해주시면 감사하겠습니다 ㅎ
1, 밑에 61451번 님의 글을보고 저에게도 활용가치가 있는것같아서 아래와같이 수정 부탁드립니다
(* 수식은 하단 참조바랍니다)
(1), 이 수식에서 파동선과 텍스트는 삭제
(2), 가로선의 두께는 조정할수있으면 좋겠구요
(3), 가로선이 한번 발생시 끝까지 계속 이어지는것같은데 선 발생후 10개봉 정도까지만
이어지고 이후론 사라졌으면 합니다
(4), 가로선의 발생지점이 해당봉의 고점이나 저점에서 발생되는데..
이 고저점에서 1틱정도 위아래에서 이선이 발생되었으면 합니다
즉, 상단 빨간선의 경우에는 1틱위에, 하단 파란선의 경우에는 1틱 아래에서 선이 발생
* 기설치된 지표와 겹치는 현상을 방지하기위함입니다
2, 그리고 지난 2월 21일자로 제가 문의드린 아래 "61430번"에 대한 답변수식에 관한것입니다만..
실전에 적용해보니 선물챠트에 표시되는 지점이 약 0.2~0.3P 정도 오차가 생기네요
이것이 선물과 옵션간의 차이에서 오는 어쩔수없는 현상인지?
혹은 수정이 가능한건지 수고스럽겠지만 한번더 검토 부탁드립니다
항상 감사드립니다 ^^*
=======================================================================================
Input:length(12);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
}
if T == -1 and T != T[1] then
{
var2 = var2+1;
if var2 == 1 and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
}
유로파54
2019-02-25 11:03:31
답변 감사합니다 ^^*
헌데 수식 적용해보니 아무런 선도 나타나지않네요
혹시 최고저점에서 +,- 1틱 적용하는것이 문제가 된다면 그냥 최고저점 자리에서 선이
발생이되도 상관없습니다
* 10틱이 진행된 이후에 선이 발생된다면 이 10틱을 1틱으로할경우 좀더 빠르게 선의 발생
을 확인할수있을것 같은데 ...
제생각이 맞다면 1틱으로 수정부탁드립니다
* 참고로 저는 틱챠트에 이 수식을 적용하고있습니다
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁드립니다 !!
>
안녕하세요
예스스탁입니다.
1
모든 선이 후행적으로 그려지므로
고점과 저점에 대한 수평선이 최초 그려지는 지점이
이미 고점과 저점봉보다 10봉이후일 경우가 있습니다.
고점과 저점봉과 현재봉과의 차이가 아닌 최초 그려진봉을 기준으로
10개봉 연장후 지워지게 작성해 드립니다.
Input:length(12),굵기(3);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
//TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
//Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
//TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
//Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
value1 = index;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1]-PriceScale*1,sdate,stime,저점[1,1]-PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,굵기);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1]-PriceScale*1,sdate,stime,저점[1,1]-PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,굵기);
}
}
if T == 1 then
{
if index <= value1+10 Then
{
TL_SetEnd(TL2,sdate,stime,저점[1,1]-PriceScale*1);
}
}
if index > value1+10 Then
TL_Delete(TL2);
if T == -1 and T != T[1] then
{
var2 = var2+1;
value2 = index;
if var2 == 1 and CurrentDate == sdate Then
{
TL3 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1]+PriceScale*1,sdate,stime,고점[1,1]+PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,굵기);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL3 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1]+PriceScale*1,sdate,stime,고점[1,1]+PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,굵기);
}
}
if T == -1 then{
if index <= value2+10 Then
{
TL_SetEnd(TL3,sdate,stime,고점[1,1]+PriceScale*1);
}
}
if index > value2+10 Then
TL_Delete(TL3);
2
해당 수식은 data2나 data3의 종가가 특정가격을 상향/하향 돌파시 기본차트의 가격을 그리는 지표입니다. 수식내 특별히 수정할 만한 부분이 보이지 않습니다.
즐거운 하루되세요
> 유로파54 님이 쓴 글입니다.
> 제목 : 부탁드립니다 !!
> 안녕하세요!
어쩌다보니 요즘 제가 너무 자주 부탁을 드리게되네요
여러가지 지표를 활용해서 저만의 챠트를 완성하려다보니 본의아니게...
이해해주시면 감사하겠습니다 ㅎ
1, 밑에 61451번 님의 글을보고 저에게도 활용가치가 있는것같아서 아래와같이 수정 부탁드립니다
(* 수식은 하단 참조바랍니다)
(1), 이 수식에서 파동선과 텍스트는 삭제
(2), 가로선의 두께는 조정할수있으면 좋겠구요
(3), 가로선이 한번 발생시 끝까지 계속 이어지는것같은데 선 발생후 10개봉 정도까지만
이어지고 이후론 사라졌으면 합니다
(4), 가로선의 발생지점이 해당봉의 고점이나 저점에서 발생되는데..
이 고저점에서 1틱정도 위아래에서 이선이 발생되었으면 합니다
즉, 상단 빨간선의 경우에는 1틱위에, 하단 파란선의 경우에는 1틱 아래에서 선이 발생
* 기설치된 지표와 겹치는 현상을 방지하기위함입니다
2, 그리고 지난 2월 21일자로 제가 문의드린 아래 "61430번"에 대한 답변수식에 관한것입니다만..
실전에 적용해보니 선물챠트에 표시되는 지점이 약 0.2~0.3P 정도 오차가 생기네요
이것이 선물과 옵션간의 차이에서 오는 어쩔수없는 현상인지?
혹은 수정이 가능한건지 수고스럽겠지만 한번더 검토 부탁드립니다
항상 감사드립니다 ^^*
=======================================================================================
Input:length(12);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
}
if T == -1 and T != T[1] then
{
var2 = var2+1;
if var2 == 1 and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
}
예스스탁 예스스탁 답변
2019-02-25 11:49:58
안녕하세요
예스스탁입니다.
적용 결과 이상이 없습니다.
해당 수식이 당일에만 그려지고 고점이나 저점발생이후에 10개보 경과후에는 삭제됩니다.
당일의 판단은 차트봉과 컴퓨터의 날짜가 같은날입니다.
수식 내용 독해하셔서 이후 내용은 직접 수정보완하시기 바랍니다.
즐거운 하루되세요
> 유로파54 님이 쓴 글입니다.
> 제목 : 한번더 봐주세요
> 답변 감사합니다 ^^*
헌데 수식 적용해보니 아무런 선도 나타나지않네요
혹시 최고저점에서 +,- 1틱 적용하는것이 문제가 된다면 그냥 최고저점 자리에서 선이
발생이되도 상관없습니다
* 10틱이 진행된 이후에 선이 발생된다면 이 10틱을 1틱으로할경우 좀더 빠르게 선의 발생
을 확인할수있을것 같은데 ...
제생각이 맞다면 1틱으로 수정부탁드립니다
* 참고로 저는 틱챠트에 이 수식을 적용하고있습니다
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁드립니다 !!
>
안녕하세요
예스스탁입니다.
1
모든 선이 후행적으로 그려지므로
고점과 저점에 대한 수평선이 최초 그려지는 지점이
이미 고점과 저점봉보다 10봉이후일 경우가 있습니다.
고점과 저점봉과 현재봉과의 차이가 아닌 최초 그려진봉을 기준으로
10개봉 연장후 지워지게 작성해 드립니다.
Input:length(12),굵기(3);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
//TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
//Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
//TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
//Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
value1 = index;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1]-PriceScale*1,sdate,stime,저점[1,1]-PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,굵기);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1]-PriceScale*1,sdate,stime,저점[1,1]-PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,굵기);
}
}
if T == 1 then
{
if index <= value1+10 Then
{
TL_SetEnd(TL2,sdate,stime,저점[1,1]-PriceScale*1);
}
}
if index > value1+10 Then
TL_Delete(TL2);
if T == -1 and T != T[1] then
{
var2 = var2+1;
value2 = index;
if var2 == 1 and CurrentDate == sdate Then
{
TL3 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1]+PriceScale*1,sdate,stime,고점[1,1]+PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,굵기);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL3 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1]+PriceScale*1,sdate,stime,고점[1,1]+PriceScale*1);
//TL_SetExtRight(TL2,true);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,굵기);
}
}
if T == -1 then{
if index <= value2+10 Then
{
TL_SetEnd(TL3,sdate,stime,고점[1,1]+PriceScale*1);
}
}
if index > value2+10 Then
TL_Delete(TL3);
2
해당 수식은 data2나 data3의 종가가 특정가격을 상향/하향 돌파시 기본차트의 가격을 그리는 지표입니다. 수식내 특별히 수정할 만한 부분이 보이지 않습니다.
즐거운 하루되세요
> 유로파54 님이 쓴 글입니다.
> 제목 : 부탁드립니다 !!
> 안녕하세요!
어쩌다보니 요즘 제가 너무 자주 부탁을 드리게되네요
여러가지 지표를 활용해서 저만의 챠트를 완성하려다보니 본의아니게...
이해해주시면 감사하겠습니다 ㅎ
1, 밑에 61451번 님의 글을보고 저에게도 활용가치가 있는것같아서 아래와같이 수정 부탁드립니다
(* 수식은 하단 참조바랍니다)
(1), 이 수식에서 파동선과 텍스트는 삭제
(2), 가로선의 두께는 조정할수있으면 좋겠구요
(3), 가로선이 한번 발생시 끝까지 계속 이어지는것같은데 선 발생후 10개봉 정도까지만
이어지고 이후론 사라졌으면 합니다
(4), 가로선의 발생지점이 해당봉의 고점이나 저점에서 발생되는데..
이 고저점에서 1틱정도 위아래에서 이선이 발생되었으면 합니다
즉, 상단 빨간선의 경우에는 1틱위에, 하단 파란선의 경우에는 1틱 아래에서 선이 발생
* 기설치된 지표와 겹치는 현상을 방지하기위함입니다
2, 그리고 지난 2월 21일자로 제가 문의드린 아래 "61430번"에 대한 답변수식에 관한것입니다만..
실전에 적용해보니 선물챠트에 표시되는 지점이 약 0.2~0.3P 정도 오차가 생기네요
이것이 선물과 옵션간의 차이에서 오는 어쩔수없는 현상인지?
혹은 수정이 가능한건지 수고스럽겠지만 한번더 검토 부탁드립니다
항상 감사드립니다 ^^*
=======================================================================================
Input:length(12);
Var : j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0);
var : TL1(0),TL2(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0),T(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
if bdate != bdate[1] Then
{
var1 = 0;
var2 = 0;
}
if T == 1 and T != T[1] Then
{
var1 = var1+1;
if var1 == 1 and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
if var1 >= 2 and 저점[1,1] < 저점[2,1] and CurrentDate == sdate then
{
TL2 = TL_New(sdate[index-저점[1,2]],stime[index-저점[1,2]],저점[1,1],sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,3);
}
}
if T == -1 and T != T[1] then
{
var2 = var2+1;
if var2 == 1 and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
if var2 >= 2 and 고점[1,1] > 고점[2,1] and CurrentDate == sdate Then
{
TL2 = TL_New(sdate[index-고점[1,2]],stime[index-고점[1,2]],고점[1,1],sdate,stime,고점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetColor(TL2,RED);
TL_SetSize(TL2,3);
}
}
다음글
이전글