예스스탁
예스스탁 답변
2020-11-17 15:23:22
안녕하세요
예스스탁입니다.
1
var1 = DayClose(1)+PriceScale*500;
var2 = DayClose(1)-PriceScale*500;
var3 = var1-var2;
plot1(var1-var3*0.236);
plot2(var1-var3*0.50);
plot3(var1-var3*0.764);
2
시가보다 크면 1, 작으면 -1이 그려지게 작성해 드립니다.
지표로 보고자 하시면 어떤 값을 보고자 하시는지 알려주셔야 식작성이 가능합니다.
Plot1(0);
if C >= dayopen+PriceScale*1 Then
Plot1(1);
if C <= dayopen-PriceScale*1 Then
Plot1(-1);
3
해당 수평선은 현재 진행중인 고점값/저점값을 기준으로 그려지는 선입니다.
현재 고점진행 중이면 고점값을 기준으로 +40틱
현재 저점진행 중이면 저점값을 기준으로 -40틱으로 표시됩니다
그러므로 고점이나 저점이 갱신되면 같이 갱신이 됩니다.
해당 선을 고정하려면 다른 값을 기준으로 고정시켜야 하는데
어떤 값으로 고정해 드려야 할지 모르겠습니다.
고점진행중에는 직전에 확정된 최종저점을 기준으로
저점진행중에는 직전에 확정된 최종고점을 기준으로 40틱 80틱 12틱선이 그려지게 작성해 드립니다.
Input:length(5);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Tl4(0),TL5(0),Text1(0),처리구분(""),
TL_Val1(0),TL_Val2(0);
Var:TL11(0),TL12(0),TL13(0),TL14(0),TL15(0),TL16(0),TL17(0),TL18(0),TL19(0),TL20(0);
Var:TL21(0),TL22(0),TL23(0),TL24(0),TL25(0),TL26(0),TL27(0),TL28(0),TL29(0),TL30(0),mav(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;
TL_Delete(TL1);
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
{
Text_Delete(Text1);
If 고점[3,1][1] < 고점[2,1][1] and 고점[2,1][1] > 고점[1,1][1]and 저점[2,1][1] < 저점[1,1][1] Then
{
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL_Delete(TL5);
}
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*1,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*1);
TL3 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]+ PriceScale*40,sDate[eBar],sTime[eBar],저점[1,1]+PriceScale*40);
TL4 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]+ PriceScale*80,sDate[eBar],sTime[eBar],저점[1,1]+PriceScale*80);
TL5 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]+ PriceScale*120,sDate[eBar],sTime[eBar],저점[1,1]+PriceScale*120);
TL_SetExtRight(Tl2,true);
TL_SetColor(Tl2,CYAN);
TL_SetSize(TL2,2);
TL_SetExtRight(Tl3,true);
TL_SetColor(Tl3,CYAN);
TL_SetSize(TL3,2);
TL_SetExtRight(Tl4,true);
TL_SetColor(Tl4,CYAN);
TL_SetSize(TL4,2);
TL_SetExtRight(Tl5,true);
TL_SetColor(Tl5,CYAN);
TL_SetSize(TL5,2);
TL_SetColor(TL1,BLACK);
TL_SetSize(TL1,0);
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;
TL_Delete(TL1);
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
{
Text_Delete(Text1);
If 저점[2,1][1] < 저점[1,1][1] and 저점[2,1][1] < 저점[3,1][1] and 고점[2,1][1] > 고점[1,1][1] Then
{
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL_Delete(TL5);
}
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]- PriceScale*1,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*1);
TL3 = TL_New(sDate[eBar+1],sTime[eBar+1], 고점[1,1]- PriceScale*40,sDate[eBar],sTime[eBar],고점[1,1]-PriceScale*40);
TL4 = TL_New(sDate[eBar+1],sTime[eBar+1], 고점[1,1]- PriceScale*80,sDate[eBar],sTime[eBar],고점[1,1]-PriceScale*80);
TL5 = TL_New(sDate[eBar+1],sTime[eBar+1], 고점[1,1]- PriceScale*120,sDate[eBar],sTime[eBar],고점[1,1]-PriceScale*120);
TL_SetExtRight(Tl2,true);
TL_SetColor(Tl2,RED);
TL_SetSize(TL2,2);
TL_SetExtRight(Tl3,true);
TL_SetColor(Tl3,RED);
TL_SetSize(TL3,2);
TL_SetExtRight(Tl4,true);
TL_SetColor(Tl4,RED);
TL_SetSize(TL4,2);
TL_SetExtRight(Tl5,true);
TL_SetColor(Tl4,RED);
TL_SetSize(TL4,2);
TL_SetColor(TL1,BLACK);
TL_SetSize(TL1,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];
}
}
}
mav = ma(C,20);
즐거운 하루되세요
> 장군 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 1)틱수를 가지고 피보나치처럼 표현을 해볼까 하는데가능할지 .. 전일종가기준으로해서 + 500틱을고점으로잡고-500틱을저점으로 잡고해서 +250틱이중심선이되고-250틱이중심선이되고
+중심선으로표현 -중심선으로표현 해서 50프로만 수평선으로위.아래두개선이 나오게 하고십습니다 ,
var1 = dayhigh;
var2 = daylow;
var3 = var1-var2;
plot1(var1-var3*0.236);
plot2(var1-var3*0.50);
plot3(var1-var3*0.764);
위수식을 응용하여 가능하다면 부탁드리겠습니다~항상감사드립니다
2)if C >= dayopen+PriceScale*1 Then
PlotPaintBar(H,L,"강조",RED);
if C <= dayopen-PriceScale*1 Then
PlotPaintBar(H,L,"강조",LMAGENTA);
시가기준강조를 지표식으로 수정부탁합니다~~
3)Input:length(5);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""),
TL_Val1(0),TL_Val2(0);
Var:TL11(0),TL12(0),TL13(0),TL14(0),TL15(0),TL16(0),TL17(0),TL18(0),TL19(0),TL20(0);
Var:TL21(0),TL22(0),TL23(0),TL24(0),TL25(0),TL26(0),TL27(0),TL28(0),TL29(0),TL30(0),mav(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
{
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;
TL_Delete(TL1);
TL_Delete(TL2);
TL_Delete(TL3);
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
Text_Delete(Text1);
If 고점[3,1][1] < 고점[2,1][1] and 고점[2,1][1] > 고점[1,1][1]and 저점[2,1][1] < 저점[1,1][1] Then
{
TL_Delete(TL2);
TL_Delete(TL3);
}
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*1,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*1);
TL3 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*40,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*40);
TL_SetExtRight(Tl2,true);
TL_SetColor(Tl2,CYAN);
TL_SetSize(TL2,2);
TL_SetExtRight(Tl3,true);
TL_SetColor(Tl3,CYAN);
TL_SetSize(TL3,2);
TL_SetColor(TL1,BLACK);
TL_SetSize(TL1,0);
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
{
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;
TL_Delete(TL1);
TL_Delete(TL2);
TL_Delete(TL3);
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
Text_Delete(Text1);
If 저점[2,1][1] < 저점[1,1][1] and 저점[2,1][1] < 저점[3,1][1] and 고점[2,1][1] > 고점[1,1][1] Then
{
TL_Delete(TL2);
TL_Delete(TL3);
}
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]- PriceScale*1,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*1);
TL3 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]- PriceScale*40,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*40);
TL_SetExtRight(Tl2,true);
TL_SetColor(Tl2,RED);
TL_SetSize(TL2,2);
TL_SetExtRight(Tl3,true);
TL_SetColor(Tl3,RED);
TL_SetSize(TL3,2);
TL_SetColor(TL1,BLACK);
TL_SetSize(TL1,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];
}
}
}
mav = ma(C,20);
지그재그고점과저점을찍을때+40틱씩위아래로 나타나는데 문재는 고점과저점을 조금이라도 돌파하면 거기서추가한만큼 다시+-40틱씩이추가되니까 어려움이 있습니다~~(예를들어 가격이계속상승하여서 40틱수평선을 1틱2틱10틱30틱 즉돌파한틱수가40틱미만이라면 첫번째 수평선은변하지않고계속유지되게끔 그러니까첫번째수평선으로부터 80틱이상이되어야 변하게끔~~80틱미만이라면 첫번쨰수평선은 계속유지되는거죠, 수정부탁드립니다~`항상감사드립니다