커뮤니티
정해진 시간에만 매매를 하고 싶은데, 수식이 어떻게 되나요?
2019-05-20 17:20:58
216
글번호 128816
정해진 시간만 매매를 하고자 합니다.
시간
09시 ~ 10시
17시 ~ 20시
22시 ~ 03시.
수식 부탁 드립니다~
수고하세요.
답변 1
예스스탁 예스스탁 답변
2019-05-21 10:18:36
안녕하세요
예스스탁입니다.
input : starttime1(090000),endtime1(100000);
input : starttime2(170000),endtime2(200000);
input : starttime3(220000),endtime3(030000);
var : Tcond(false);
if (sdate != sdate[1] and stime >= starttime1) or
(sdate == sdate[1] and stime >= starttime1 and stime[1] < starttime1) then
{
Tcond = true;
}
if (sdate != sdate[1] and stime >= endtime1) or
(sdate == sdate[1] and stime >= endtime1 and stime[1] < endtime1) then
{
Tcond = false;
}
if (sdate != sdate[1] and stime >= starttime2) or
(sdate == sdate[1] and stime >= starttime2 and stime[1] < starttime2) then
{
Tcond = true;
}
if (sdate != sdate[1] and stime >= endtime2) or
(sdate == sdate[1] and stime >= endtime2 and stime[1] < endtime2) then
{
Tcond = false;
}
if (sdate != sdate[1] and stime >= starttime3) or
(sdate == sdate[1] and stime >= starttime3 and stime[1] < starttime3) then
{
Tcond = true;
}
if (sdate != sdate[1] and stime >= endtime3) or
(sdate == sdate[1] and stime >= endtime3 and stime[1] < endtime3) then
{
Tcond = false;
}
if Tcond == true then
{
진입청산수식
}
즐거운 하루되세요
> 백두에서한라 님이 쓴 글입니다.
> 제목 : 정해진 시간에만 매매를 하고 싶은데, 수식이 어떻게 되나요?
> 정해진 시간만 매매를 하고자 합니다.
시간
09시 ~ 10시
17시 ~ 20시
22시 ~ 03시.
수식 부탁 드립니다~
수고하세요.
이전글