아래에서 수정하고자 합니다.
당일 시가 위에 있고 60분봉이 양봉일 경우에 1분봉에서 양봉발생 시 매수진입
당일 시가 아래에 있고 60분봉이 음봉일 경우에 1분봉에서 음봉발생 시 매도진입
부탁드립니다.
input : ntime(60);
var : S1(0),D1(0),TM(0),TF(0),OO(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
OO = O;
}
if MarketPosition <= 0 and OO > 0 and C > OO and C > O and C[1] < O[1] Then
Buy();
if MarketPosition >= 0 and OO > 0 and C < OO and C < O and C[1] > O[1] Then
Sell();
if MarketPosition == 1 and C < O Then
ExitLong();
if MarketPosition == -1 and C > O Then
ExitShort();
}
답변 1
예스스탁
예스스탁 답변
2023-01-10 14:38:27
안녕하세요
예스스탁입니다.
input : ntime(60);
var : S1(0),D1(0),TM(0),TF(0),OO(0),CC(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
OO = O;
}
if MarketPosition <= 0 and DayOpen(0) < C and OO < C and C > O Then
Buy();
if MarketPosition >= 0 and DayOpen(0) > C and OO > C and C < O Then
Sell();
if MarketPosition == 1 and C < O Then
ExitLong();
if MarketPosition == -1 and C > O Then
ExitShort();
}
즐거운 하루되세요
> 선물대장 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 아래에서 수정하고자 합니다.
당일 시가 위에 있고 60분봉이 양봉일 경우에 1분봉에서 양봉발생 시 매수진입
당일 시가 아래에 있고 60분봉이 음봉일 경우에 1분봉에서 음봉발생 시 매도진입
부탁드립니다.
input : ntime(60);
var : S1(0),D1(0),TM(0),TF(0),OO(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
OO = O;
}
if MarketPosition <= 0 and OO > 0 and C > OO and C > O and C[1] < O[1] Then
Buy();
if MarketPosition >= 0 and OO > 0 and C < OO and C < O and C[1] > O[1] Then
Sell();
if MarketPosition == 1 and C < O Then
ExitLong();
if MarketPosition == -1 and C > O Then
ExitShort();
}