input : starttime(090000),endtime(092959);
If sTime >=093000 and sTime < 145000 and
CrossUp(C,TimeHigh(starttime,endtime)) Then
buy();
If sTime >=093000 and sTime < 145000 and
CrossUp(C,TimeLow(starttime,endtime)) Then
Sell();
if sTime == 145000 Then {
ExitLong();
ExitShort();
}
예스스탁 예제로 나온 3mbo전략으로 해외선물에 적용해봤는대요 장시작 시간과 마감 시간이 틀려서 그런지 뭔가 안맞는거 같습니다.
번거로우시겠지만 다음 조건으로 수식 작성 도움좀 부탁드립니다.
1. 매수던 매도던 1일 1회 진입으로 한정.
2. 채널 형성시간 조절 가능하게끔. (예 30분봉일 경우 채널 형성시간 0930~1030 , 40분
봉 일경우 0740~0820 등)
수식 부탁드립니다.
수고하세요!!
답변 1
예스스탁
예스스탁 답변
2020-03-10 14:56:52
안녕하세요
예스스탁입니다.
input : starttime(090000),endtime(092959),n(1);
var : t(0),hh(0),ll(0),entry(0);
if sdate != sdate[1] Then
SetStopEndofday(050000);
if bdate != bdate[1] Then
SetStopEndofday(0);
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) Then
{
T = 1;
hh = h;
ll = l;
entry = 0;
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) Then
T = 2;
if t == 1 then
{
if h > hh Then
hh = h;
if L < ll Then
ll = h;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if t == 2 and entry < n then
{
if crossup(c,hh) Then
buy();
if CrossDown(c,hh) Then
sell();
}
즐거운 하루되세요
> 머어얼 님이 쓴 글입니다.
> 제목 : 30mbo 관련 수식 질문드립니다.
> input : starttime(090000),endtime(092959);
If sTime >=093000 and sTime < 145000 and
CrossUp(C,TimeHigh(starttime,endtime)) Then
buy();
If sTime >=093000 and sTime < 145000 and
CrossUp(C,TimeLow(starttime,endtime)) Then
Sell();
if sTime == 145000 Then {
ExitLong();
ExitShort();
}
예스스탁 예제로 나온 3mbo전략으로 해외선물에 적용해봤는대요 장시작 시간과 마감 시간이 틀려서 그런지 뭔가 안맞는거 같습니다.
번거로우시겠지만 다음 조건으로 수식 작성 도움좀 부탁드립니다.
1. 매수던 매도던 1일 1회 진입으로 한정.
2. 채널 형성시간 조절 가능하게끔. (예 30분봉일 경우 채널 형성시간 0930~1030 , 40분
봉 일경우 0740~0820 등)
수식 부탁드립니다.
수고하세요!!