커뮤니티
문의
2019-06-19 08:16:04
287
글번호 129561
아래내용 수식 부탁드립니다.
100000 부터 120000 까지 누적봉갯수가 100개 이상이고 양봉수>음봉수 이면 buy
input : 시간1(100000), 시간2(120000),누적봉갯수(100);
항상 고맙습니다.
답변 1
예스스탁 예스스탁 답변
2019-06-19 13:32:33
안녕하세요
예스스탁입니다.
input : 시간1(100000), 시간2(120000),누적봉갯수(100);
var : bars(0),sum1(0),sum2(0),Tcond(false);
if (sdate != sdate[1] and stime >= 시간1) or
(sdate == sdate[1] and stime >= 시간1 and stime[1] < 시간1) Then
{
Tcond = true;
bars = 0;
sum1 = 0;
sum2 = 0;
}
if (sdate != sdate[1] and stime >= 시간2) or
(sdate == sdate[1] and stime >= 시간2 and stime[1] < 시간2) Then
{
Tcond = false;
}
if Tcond == true then
{
bars = bars+1;
if C > O Then
sum1 = sum1 + 1;
if C < O Then
sum2 = sum2 + 1;
if bars >= 누적봉갯수 and sum1 > sum2 Then
buy();
}
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 아래내용 수식 부탁드립니다.
100000 부터 120000 까지 누적봉갯수가 100개 이상이고 양봉수>음봉수 이면 buy
input : 시간1(100000), 시간2(120000),누적봉갯수(100);
항상 고맙습니다.