답변완료
부탁드립니다
$,안녕하세요
아래식은 옵션월물만기후 첫날부터 만기시까지 등분한식입니다,
여기에 아래조건 추가해서 도움부탁드립니다.
1, 전월물만기후 당월물 첫날의 시가,고가,저가를 당월물만기시까지 오른쪽으로
연장하여 추세선으로 그리고 싶습니다
2, 전월물 전체 고가,저가,중심가를 당월물만기시까지 오른쪽으로
연장하여 추세선으로 그리고 싶습니다
var : month(0),nday(0),week(0);
var :EX(false),HH(0),LL(0);
var : t1(0),t2(0),t3(0),t4(0),t5(0),t6(0),t7(0),t8(0),t9(0),t10(0);
month = int(date/100)-int(date/10000)*100;
nday = date - int(date/100)*100;
week = DayOfWeek(date);
#선물만기
#if Month%3 == 0 and nday >= 8 and nday <= 14 and week == 4 then
if nday >= 8 and nday <= 14 and week == 4 then#옵션만기
EX = true;
Else
EX = false;
if EX == false and EX[1] == true Then{
Condition1 = true;
HH = H;
LL = L;
}
if Condition1 == true then{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
var1 = HH;
var2 = LL;
var3 = var1-var2;
plot1(var1,"Maxi");
plot2(var2+var3*0.618,"되돌림");
plot3(var2+var3*0.500,"중심");
plot4(var2+var3*0.382,"축소");
plot5(var2,"Mini");
}
$$,고맙습니다.
2021-12-27
775
글번호 154865
지표
답변완료
지표식 내용을 수정하려고 합니다.
아래 지표식은 수식작성 Q&A에서 지지저항을 그려주는 수식으로 검색된 내용입니다.
수식의 의미에 대해서 대략 설명이 가능한가요? (변수명의 의미만이라도)
시간이 많이 걸리시면 변수명의 의미만 알려주셔도 됩니다.
오늘도 감사드립니다.
-------------------------------------------------------------------------
input : 간격(5),갯수(5);
var : T(0),cnt(0);
var : HH1(0),HI1(0),HI2(0),LL1(0),LI1(0),LI2(0);
var : LD(0),LT(0),LL(0),HD(0),HT(0),HH(0),TX(0);
Array : HTL[100](0),LTL[100](0);
if H[간격] > Highest(H,간격) and H[간격] > Highest(H,간격)[간격+1] Then
{
T = 1;
HH1 = H[간격];
Hi1 = index[간격];
Hi2 = HI1[1];
HTL[0] = TL_New(sdate[간격],stime[간격],HH1,sdate,stime,HH1);
TL_SetColor(HTL[0],RED);
TL_SetExtRight(HTL[0],true);
TX = Text_New(sdate[간격],stime[간격],HH1,"●");
Text_SetColor(TX,RED);
Text_SetStyle(TX,2,2);
for cnt = 1 to 99
{
HTL[cnt] = HTL[cnt-1][1];
}
TL_Delete(HTL[갯수]);
if t == t[1] then
{
LD = 0;
LT = 0;
LL = 0;
for cnt = index-HI1 to index-HI2
{
if LL == 0 or (LL > 0 and L[cnt] < LL) Then
{
LL = L[cnt];
LD = sdate[cnt];
LT = stime[cnt];
}
}
LTL[0] = TL_New(ld,lt,ll,sdate,stime,ll);
TL_SetColor(LTL[0],blue);
TL_SetExtRight(LTL[0],true);
TX = Text_New(LD,LT,LL,"○");
Text_SetColor(TX,BLUE);
Text_SetStyle(TX,2,2);
for cnt = 1 to 99
{
LTL[cnt] = LTL[cnt-1][1];
}
TL_Delete(LTL[갯수]);
}
}
if L[간격] < Lowest(L,간격) and L[간격] < Lowest(L,간격)[간격+1] Then
{
T = -1;
LL1 = L[간격];
LI1 = index[간격];
LI2 = LI1[1];
LTL[0] = TL_New(sdate[간격],stime[간격],LL1,sdate,stime,LL1);
TL_SetColor(LTL[0],blue);
TL_SetExtRight(LTL[0],true);
TX = Text_New(sdate[간격],stime[간격],LL1,"●");
Text_SetColor(TX,BLUE);
Text_SetStyle(TX,2,2);
for cnt = 1 to 99
{
LTL[cnt] = LTL[cnt-1][1];
}
TL_Delete(LTL[갯수]);
if t == t[1] then
{
HD = 0;
HT = 0;
HH = 0;
for cnt = index-LI1 to index-LI2
{
if HH == 0 or (HH > 0 and H[cnt] > HH) Then
{
HH = H[cnt];
HD = sdate[cnt];
HT = stime[cnt];
}
}
HTL[0] = TL_New(HD,HT,HH,sdate,stime,HH);
TL_SetColor(HTL[0],RED);
TL_SetExtRight(HTL[0],true);
TX = Text_New(HD,HT,HH,"○");
Text_SetColor(TX,RED);
Text_SetStyle(TX,2,2);
for cnt = 1 to 99
{
HTL[cnt] = HTL[cnt-1][1];
}
TL_Delete(HTL[갯수]);
}
}
2021-12-26
680
글번호 154857
지표