예스스탁
예스스탁 답변
2022-09-28 11:14:27
안녕하세요
예스스탁입니다.
input : P1(5),P2(20),P3(60);
var : month(0),nday(0),week(0);
var :EX(false),HH(0),LL(0),OO(0),CC(0),DD(0);
var : HH1(0),LL1(0),OO1(0);
var : HH2(0),LL2(0),OO2(0);
var : mav1(0),mav2(0),mav3(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;
DD = sDate;
HH = H;
LL = L;
OO = O;
CC = C;
HH1 = HH[1];
LL1 = LL[1];
OO1 = OO[1];
HH2 = HH1[1];
LL2 = LL1[1];
OO2 = OO1[1];
Var41 = Var4[1];
}
mav1 = round(ma(C,P1),2);
mav2 = round(ma(C,P2),2);
mav3 = round(ma(C,P3),2);
if Condition1 == true then
{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
var1 = HH;
var2 = LL;
var3 = var1-var2;
if HH1 > 0 and LL1 > 0 Then
{
value1 = round(LL1+(HH1-LL1)*0.50,2);
Value2 = round(LL1+(HH1-LL1)*0.60,2);
plot1(value1);
plot2(Value2);
if value1 == mav1 Then
value11 = value1;
if value1 == mav2 Then
value12 = value1;
if value1 == mav3 Then
value13 = value1;
if Value2 == mav1 Then
Value21 = Value2;
if Value2 == mav2 Then
Value22 = Value2;
if Value2 == mav3 Then
Value23 = Value2;
if value11 > 0 Then plot3(value11,"Plot1-mav1일치");
if value12 > 0 Then plot4(value12,"Plot1-mav2일치");
if value13 > 0 Then plot5(value13,"Plot1-mav3일치");
if value21 > 0 Then plot6(value21,"Plot2-mav1일치");
if value22 > 0 Then plot7(value22,"Plot2-mav2일치");
if value23 > 0 Then plot8(value23,"Plot2-mav3일치");
}
}
즐거운 하루되세요
> 유로파54 님이 쓴 글입니다.
> 제목 : 문의드립니다!
> 안녕하세요!
* 일전에 문의드린 수식(78796번)과 비슷한 부류의 수식입니다만 이것도 전과 같이 수정 부탁드립니다
즉, 아래수식의 plot1, 2선과 이평선이 동시에 만족될때(일치할때) 가로선 발생
예를들어 이평선이 (1)5일선 (2)20일선 (3)60일선이라고 하면..
1, plot1과 이평선(1), plot1과 이평선(2), plot1과 이평선(3) 이렇게 각각 동시만족하는 3개선
2, plot2와 이평선(1), plot2와 이평선(2), plot2와 이평선(3) 이렇게 각각 동시만족하는 3개선으로 총6개선이 될거같습니다
*선의 두께와 색상은 사용자지정이 가능토록 부탁드립니다
작성해주신 수식이 많은 도움이되고있습니다
다시한번 감사드립니다!!!
--------------------------------------------------------------------------------------
var : month(0),nday(0),week(0);
var :EX(false),HH(0),LL(0),OO(0),CC(0),DD(0);
var : HH1(0),LL1(0),OO1(0);
var : HH2(0),LL2(0),OO2(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;
DD = sDate;
HH = H;
LL = L;
OO = O;
CC = C;
HH1 = HH[1];
LL1 = LL[1];
OO1 = OO[1];
HH2 = HH1[1];
LL2 = LL1[1];
OO2 = OO1[1];
Var41 = Var4[1];
}
if Condition1 == true then
{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
var1 = HH;
var2 = LL;
var3 = var1-var2;
if HH1 > 0 and LL1 > 0 Then
{
plot1(LL1+(HH1-LL1)*0.50);
plot2(LL1+(HH1-LL1)*0.60);
}
}