커뮤니티
문의
데이트레이딩
아래수식은 국내선물지수 거래에 사용하는 endofday 청산수식입니다.
요청 내용 : 084500~120000 이 시간대의 하이로우레인지 값을 보고 청산시간을 2개로 나누어 적용하고 싶습니다.
084500부터 120000까지 당일 하이로우레인지가 7.50 포인트 보다 작을 경우
input : 만기청산시간1(144500),만기외청산시간1(150000);
input : 만기청산시간2(151800),만기외청산시간2(153300);
084500부터 120000까지 당일 하이로우레인지가 7.50 포인트 보다 클 경우
input : 만기청산시간3(144500),만기외청산시간3(150000);
input : 만기청산시간4(142500),만기외청산시간4(142500);
아래 수식에 조건을 추가하여 주십시요
항상 고맙습니다.
*************************************************************************************************************************************************
input : 만기청산시간1(144500),만기외청산시간1(150000);
input : 만기청산시간2(151800),만기외청산시간2(153200);
var : Month(0),nday(0),week(0);
month = int(date/100)-int(date/10000)*100;
nday = date - int(date/100)*100;
Week = DayOfWeek(date);
if (nday >= 8 and nday <= 14 and
week == 4) or (sdate == 20141008) then
{
if sdate < 20160801 Then
SetStopEndofday(만기청산시간1);
Else
SetStopEndofday(만기청산시간2);
}
Else
{
if sdate < 20160801 Then
SetStopEndofday(만기외청산시간1);
Else
SetStopEndofday(만기외청산시간2);
}
답변 1
예스스탁 예스스탁 답변
2025-11-17 13:41:58