Input : Period(3),ntime(110000);
var : value1(0,data2),value2(0,data3),Value3(0),Value5(0);
value1 = ma(data2("c"),Period);
value2 = ma(data3("C"),Period);
value3 = value1 - value2; // 차
Value5 = data2("C")/data3("C")*100; // 비율
if Data2(Bdate != Bdate[1]) Then
{
Condition1 = False;
Condition2 = False;
}
if Value5 >= 100 Then
Condition1 = true;
if Value5 < 100 Then
Condition2 = true;
if Condition1 == False and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
Buy();
if Condition2 == False and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
Sell();
안녕하세요
value5 값이 10분봉에서 9시10분부터 현재봉까지 계속 모든봉에서 100 이상일경우 11시에 매수하고
value5 값이 9시10분부터 현재봉까지 계속 모든봉에서 100 이하일경우 11시에
매도하려 합니다
수식부탁 드립니다 감사합니다
답변 1
예스스탁
예스스탁 답변
2021-12-03 16:57:06
안녕하세요
예스스탁입니다.
Input : Period(3),atime(91000),ntime(110000);
var : value1(0,data2),value2(0,data3),Value3(0),Value5(0);
value1 = ma(data2("c"),Period);
value2 = ma(data3("C"),Period);
value3 = value1 - value2; // 차
Value5 = data2("C")/data3("C")*100; // 비율
if Data2(Bdate != Bdate[1]) Then
{
Condition1 = False;
Condition2 = False;
}
if sTime >= atime and Value5 >= 100 Then
Condition1 = true;
if sTime >= atime and Value5 < 100 Then
Condition2 = true;
if Condition1 == False and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
Buy();
if Condition2 == False and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
Sell();
즐거운 하루되세요
> 비상8 님이 쓴 글입니다.
> 제목 : 수식문의 드립니다
> Input : Period(3),ntime(110000);
var : value1(0,data2),value2(0,data3),Value3(0),Value5(0);
value1 = ma(data2("c"),Period);
value2 = ma(data3("C"),Period);
value3 = value1 - value2; // 차
Value5 = data2("C")/data3("C")*100; // 비율
if Data2(Bdate != Bdate[1]) Then
{
Condition1 = False;
Condition2 = False;
}
if Value5 >= 100 Then
Condition1 = true;
if Value5 < 100 Then
Condition2 = true;
if Condition1 == False and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
Buy();
if Condition2 == False and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
Sell();
안녕하세요
value5 값이 10분봉에서 9시10분부터 현재봉까지 계속 모든봉에서 100 이상일경우 11시에 매수하고
value5 값이 9시10분부터 현재봉까지 계속 모든봉에서 100 이하일경우 11시에
매도하려 합니다
수식부탁 드립니다 감사합니다