커뮤니티
부탁드립니다.
2015-06-29 09:09:01
115
글번호 87729
아래 수식에서 매매시간을 오전 8~10시, 오후 3~새벽2시 만 매매하고 종료하되 진입된 계약이 있으면 신호가 끝날때 매매종료가 되도록 부탁드립니다.
input : Length1(26),Length2(50),Length3(2),P(5);
var : SMIv(0),mav(0),T(0);
mav = ma(c,P);
SMIv = SMI(Length1,Length2,Length3);
if SMIv > SMIv[1] Then
T = 1;
if SMIv < SMIv[1] Then
T = -1;
if T == 1 and mav > mav[1] and countif(SMIv > SMIv[1],3) >=1 Then
buy();
if T == -1 and mav < mav[1] and countif(SMIv < SMIv[1],3) >=1 Then
sell();
답변 1
예스스탁 예스스탁 답변
2015-06-29 16:06:04
안녕하세요
예스스탁입니다.
input : Length1(26),Length2(50),Length3(2),P(5);
var : SMIv(0),mav(0),T(0);
mav = ma(c,P);
SMIv = SMI(Length1,Length2,Length3);
if SMIv > SMIv[1] Then
T = 1;
if SMIv < SMIv[1] Then
T = -1;
if (stime >= 080000 and stime < 100000) or (stime >= 150000 or stime < 020000) then{
if T == 1 and mav > mav[1] and countif(SMIv > SMIv[1],3) >=1 Then
buy();
if T == -1 and mav < mav[1] and countif(SMIv < SMIv[1],3) >=1 Then
sell();
}
if (stime == 100000 or (stime > 100000 and stime[1] < 100000)) or
(stime == 020000 or (stime > 020000 and stime[1] < 020000)) Then{
exitlong();
ExitShort();
}
즐거운 하루되세요
> 매일상승 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 아래 수식에서 매매시간을 오전 8~10시, 오후 3~새벽2시 만 매매하고 종료하되 진입된 계약이 있으면 신호가 끝날때 매매종료가 되도록 부탁드립니다.
input : Length1(26),Length2(50),Length3(2),P(5);
var : SMIv(0),mav(0),T(0);
mav = ma(c,P);
SMIv = SMI(Length1,Length2,Length3);
if SMIv > SMIv[1] Then
T = 1;
if SMIv < SMIv[1] Then
T = -1;
if T == 1 and mav > mav[1] and countif(SMIv > SMIv[1],3) >=1 Then
buy();
if T == -1 and mav < mav[1] and countif(SMIv < SMIv[1],3) >=1 Then
sell();