11시 부터 12시 까지 하이로우 파악 [당일 하이로우 아님]
if 하이로우 고점돌파 and crossup(이평5,이평20) then
buy();
if 하이로우 저점돌파 and crossdown(이평5,이평20) then
sell();
- 주의점 : 입력한 시간 구간에서 발생한 봉들로 하이로우 계산
답변 1
예스스탁
예스스탁 답변
2021-01-14 08:49:11
안녕하세요
예스스탁입니다.
input : StartTime(110000),EndTime(120000);
var : Tcond(false),hh(0),ll(0);
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
{
Tcond = true;
hh = h;
ll = l;
}
if Tcond == true Then
{
if h > hh Then
hh = h;
if l < ll Then
ll = l;
}
var1 = ma(c,5);
Var2 = ma(C,20);
if sTime > EndTime Then
{
if CrossUp(c,hh) and CrossUp(var1,Var2) Then
Buy();
if CrossDown(c,ll) and CrossDown(var1,Var2) Then
Sell();
}
즐거운 하루 되세요
> 좌오비우오비 님이 쓴 글입니다.
> 제목 : 문의
> 11시 부터 12시 까지 하이로우 파악 [당일 하이로우 아님]
if 하이로우 고점돌파 and crossup(이평5,이평20) then
buy();
if 하이로우 저점돌파 and crossdown(이평5,이평20) then
sell();
- 주의점 : 입력한 시간 구간에서 발생한 봉들로 하이로우 계산