아래의 식을 20이평 위에서 양봉 시 매수 진입
20이평 아래에서 음봉시 매도 진입
그리고 매매를 원하는 시간(예:21시~03시)을 지정할 수 있도록 하고
마감 설정 시간에는 모든 매매 포지션 청산 완료
부탁드립니다.
if c > o Then
Buy();
if c < o Then
ExitLong();
if c < o Then
Sell();
if c > o Then
ExitShort();
답변 1
예스스탁
예스스탁 답변
2023-10-13 15:41:49
안녕하세요
예스스탁입니다.
input : StartTime(90000),EndTime(230000);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
Tcond = true;
}
var1 = ma(C,20);
if Tcond == true then
{
if c > o and C > var1 Then
Buy();
if c < o Then
ExitLong();
if c < o and C < var1 Then
Sell();
if c > o Then
ExitShort();
}
즐거운 하루되세요
> 선물대장 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 아래의 식을 20이평 위에서 양봉 시 매수 진입
20이평 아래에서 음봉시 매도 진입
그리고 매매를 원하는 시간(예:21시~03시)을 지정할 수 있도록 하고
마감 설정 시간에는 모든 매매 포지션 청산 완료
부탁드립니다.
if c > o Then
Buy();
if c < o Then
ExitLong();
if c < o Then
Sell();
if c > o Then
ExitShort();