커뮤니티
함수변환요청
2019-04-04 15:14:57
178
글번호 127632
안녕하세요?
아래의 스크립트는 시그널랭귀지로 작성된 것입니다.
함수변환 요청드립니다.
Vars : st(0), et(0), vTIME_Close(0);
V1 = Dayofweek((10000 * Year(D)) + (100 * 3) + 1);
If V1 = 0 Then Value2 = 8
Else Value2 = 15 - V1; // 3월 두번째 일요일 날짜
V2 = Dayofweek((10000 * Year(D)) + (100 * 11) + 1);
If V2 = 0 Then Value4 = 1
Else value4 = 8 - V2; // 11월 첫번째 일요일 날짜
If date > (10000 * Year(D)) + (100 * 3) + value2
And date < (10000 * Year(D)) + (100 * 11) + value4 Then
Begin
st = 070000; // 써머타임 적용 시, 장시작 시간
et = 060000; // 써머타임 적용 시, 장종료 시간
vTIME_Close = 160000;
End
Else
Begin
st = 080000; // 장 시작 시간
et = 070000; // 장 종료 시간
vTIME_close = 170000;
End;
condition1 = (IntPortion(time/10000) > IntPortion(et/10000)
And IntPortion(time[1]/10000) <= IntPortion(et/10000)) Or st <> st[1];
/////////////////////////////////////////////////////////////////
Vars : vDayOpen(0), vDayC(0);
If condition1 Then vDayOpen = O;
If TIME[1] < vTIME_Close And TIME >= vTIME_Close Then v99 = C;
Vars : TCOND(False);
IF vTIME_Close < et Then
Begin
If vTIME_close < TIME And TIME < et Then TCOND = True
Else TCOND = False;
End
Else
Begin
If vTIME_Close < TIMe Or TIME < et Then TCONd = True
Else TCOND = False;
End;
If TCOND Then
Begin
if O > C Then Sell("S", Atlimit, O);
If O < C Then Buy("B", Atlimit, O);
End;
답변 1
예스스탁 예스스탁 답변
2019-04-05 13:55:59
안녕하세요
예스스탁입니다.
Vars : st(0), et(0), vTIME_Close(0);
var : v1(0),v2(0),Year(0),v99(0);
Year = Floor(sdate/10000);
V1 = Dayofweek((10000 * Year) + (100 * 3) + 1);
If V1 == 0 Then Value2 = 8;
Else Value2 = 15 - V1; // 3월 두번째 일요일 날짜
V2 = Dayofweek((10000 * Year) + (100 * 11) + 1);
If V2 == 0 Then Value4 = 1;
Else value4 = 8 - V2; // 11월 첫번째 일요일 날짜
If sdate > (10000 * Year) + (100 * 3) + value2
And sdate < (10000 * Year) + (100 * 11) + value4 Then
Begin
st = 070000; // 써머타임 적용 시, 장시작 시간
et = 060000; // 써머타임 적용 시, 장종료 시간
vTIME_Close = 160000;
End
Else
Begin
st = 080000; // 장 시작 시간
et = 070000; // 장 종료 시간
vTIME_close = 170000;
End;
condition1 = (IntPortion(stime/10000) > IntPortion(et/10000)
And IntPortion(stime[1]/10000) <= IntPortion(et/10000)) Or st <> st[1];
/////////////////////////////////////////////////////////////////
Vars : vDayOpen(0), vDayC(0);
If condition1 Then vDayOpen = O;
If TIME[1] < vTIME_Close And TIME >= vTIME_Close Then v99 = C;
Vars : TCOND(False);
IF vTIME_Close < et Then
Begin
If vTIME_close < TIME And TIME < et Then TCOND = True;
Else TCOND = False;
End
Else
Begin
If vTIME_Close < TIMe Or TIME < et Then TCONd = True;
Else TCOND = False;
End;
If TCOND Then
Begin
if O > C Then Sell("S", Atlimit, O);
If O < C Then Buy("B", Atlimit, O);
End;
즐거운 하루되세요
> 흰둥이아빠 님이 쓴 글입니다.
> 제목 : 함수변환요청
> 안녕하세요?
아래의 스크립트는 시그널랭귀지로 작성된 것입니다.
함수변환 요청드립니다.
Vars : st(0), et(0), vTIME_Close(0);
V1 = Dayofweek((10000 * Year(D)) + (100 * 3) + 1);
If V1 = 0 Then Value2 = 8
Else Value2 = 15 - V1; // 3월 두번째 일요일 날짜
V2 = Dayofweek((10000 * Year(D)) + (100 * 11) + 1);
If V2 = 0 Then Value4 = 1
Else value4 = 8 - V2; // 11월 첫번째 일요일 날짜
If date > (10000 * Year(D)) + (100 * 3) + value2
And date < (10000 * Year(D)) + (100 * 11) + value4 Then
Begin
st = 070000; // 써머타임 적용 시, 장시작 시간
et = 060000; // 써머타임 적용 시, 장종료 시간
vTIME_Close = 160000;
End
Else
Begin
st = 080000; // 장 시작 시간
et = 070000; // 장 종료 시간
vTIME_close = 170000;
End;
condition1 = (IntPortion(time/10000) > IntPortion(et/10000)
And IntPortion(time[1]/10000) <= IntPortion(et/10000)) Or st <> st[1];
/////////////////////////////////////////////////////////////////
Vars : vDayOpen(0), vDayC(0);
If condition1 Then vDayOpen = O;
If TIME[1] < vTIME_Close And TIME >= vTIME_Close Then v99 = C;
Vars : TCOND(False);
IF vTIME_Close < et Then
Begin
If vTIME_close < TIME And TIME < et Then TCOND = True
Else TCOND = False;
End
Else
Begin
If vTIME_Close < TIMe Or TIME < et Then TCONd = True
Else TCOND = False;
End;
If TCOND Then
Begin
if O > C Then Sell("S", Atlimit, O);
If O < C Then Buy("B", Atlimit, O);
End;