커뮤니티
해석 문의
2018-10-29 11:15:45
157
글번호 123136
지식 부족으로 혼자 해석이 잘안돼서 문의 합니다.
아래 수식이 어떤 경우에 매수 매도 하는 것인지 해석 좀 부탁드립니다.
감사합니다
================
inputs: iTime(40), ChRange(0.3);
var: cH(0), cL(0), s1time(0), vtime(0), e1time(0), Firstord(false);
if s1time == 0 then begin
s1time = MinutesToTime(TimeToMinutes(90000)+iTime);
vtime = MinutesToTime(TimeToMinutes(90000) + (2*iTime));
e1time = MinutesToTime(TimeToMinutes(151500) - (2*iTime));
end;
if Date > date[1] then begin
Firstord = true;
cH = high;
cL = low;
vtime = MinutesToTime(TimeToMinutes(90000) + (2*iTime));
end
else
if stime <= s1time then begin
if ch < high then
ch = high;
if cl > low then
cl = low;
end;
if stime >= vtime and stime < e1time then begin
if close >= cH + CHRange and close > close[1] then begin
buy ("JBBO Buy");
end;
if close <= cL - CHRange and close < close[1] then begin
sell ("JBBO Sell");
end;
end;
if MarketPosition(0) <> 0 and stime >= 150000 then begin
ExitLong ("Exit 1");
ExitShort ("Exit 2");
end;
답변 1
예스스탁 예스스탁 답변
2018-10-29 15:59:01
안녕하세요
예스스탁입니다.
9시~9시40분 사이의 최고가와 최저가를 계산하고
10시20분~13시55분 사이에
해당 최고가+0.3 이상이면 매수
해당 최저가-0.3 이하이면 매도
하고 15시 이후에 청산하는 내용입니다.
inputs: iTime(40), ChRange(0.3);
var: cH(0), cL(0), s1time(0), vtime(0), e1time(0), Firstord(false);
if s1time == 0 then
begin
s1time = MinutesToTime(TimeToMinutes(90000)+iTime);#9시40분 (9시+40분)
vtime = MinutesToTime(TimeToMinutes(90000) + (2*iTime)); #10시 20분 (9시+80분)
e1time = MinutesToTime(TimeToMinutes(151500) - (2*iTime)); #13시 55분 (15시15분-80분)
end;
#날짜 변경 후부터 9시 40분 이전까지 최고가와 최저가 계간
if Date > date[1] then begin
Firstord = true;
cH = high;
cL = low;
vtime = MinutesToTime(TimeToMinutes(90000) + (2*iTime));
end
else if stime <= s1time then begin
if ch < high then
ch = high;
if cl > low then
cl = low;
end;
#10시20분부터 13시 55분사이에
if stime >= vtime and stime < e1time then
begin
#종가가 9시~9시40분사이 최고가+0.3보다 크고 종가가 상승했으면 매수
if close >= cH + CHRange and close > close[1] then
begin
buy ("JBBO Buy");
end;
#종가가 9시~9시40분사이 최저가-0.3보다 작고 종가가 하락했으면 매도
if close <= cL - CHRange and close < close[1] then begin
sell ("JBBO Sell");
end;
end;
#15시 이후에 모두 청산
if MarketPosition(0) <> 0 and stime >= 150000 then begin
ExitLong ("Exit 1");
ExitShort ("Exit 2");
end;
즐거운 하루되세요
> theogo66 님이 쓴 글입니다.
> 제목 : 해석 문의
> 지식 부족으로 혼자 해석이 잘안돼서 문의 합니다.
아래 수식이 어떤 경우에 매수 매도 하는 것인지 해석 좀 부탁드립니다.
감사합니다
================
inputs: iTime(40), ChRange(0.3);
var: cH(0), cL(0), s1time(0), vtime(0), e1time(0), Firstord(false);
if s1time == 0 then begin
s1time = MinutesToTime(TimeToMinutes(90000)+iTime);
vtime = MinutesToTime(TimeToMinutes(90000) + (2*iTime));
e1time = MinutesToTime(TimeToMinutes(151500) - (2*iTime));
end;
if Date > date[1] then begin
Firstord = true;
cH = high;
cL = low;
vtime = MinutesToTime(TimeToMinutes(90000) + (2*iTime));
end
else
if stime <= s1time then begin
if ch < high then
ch = high;
if cl > low then
cl = low;
end;
if stime >= vtime and stime < e1time then begin
if close >= cH + CHRange and close > close[1] then begin
buy ("JBBO Buy");
end;
if close <= cL - CHRange and close < close[1] then begin
sell ("JBBO Sell");
end;
end;
if MarketPosition(0) <> 0 and stime >= 150000 then begin
ExitLong ("Exit 1");
ExitShort ("Exit 2");
end;
다음글
이전글