수식1에서 count < n 이 작동할 수 있게
수식2에서 crossup(v1,v2) 이 작동할 수 있게
수식 수정 부탁드립니다.
현재 상태에서는 작동하지 않습니다.
************************************************************************
수식1)
input : N(1);
var : cnt(0),count(0);
Count = 0 ;
for cnt = 0 to 10 {
if EntryDate(cnt) == sdate then
Count = Count + 1;
}
input : 라인(2.50);
var1 = Floor(DayOpen/라인)*라인;
value1 = var1+라인;
Value2 = var1;
if (Bdate == Bdate[1] and C > value1) or
(Bdate == Bdate[1] and Crossup(c,Value1)) and count < n Then
Buy();
수식2)
input : 라인(2.50);
input : 이평1(8),이평2(20);
Var : v1(0),v2(0);
v1 = ma(upvol,이평1);
v2 = ma(upvol,이평2);
var1 = Floor(DayOpen/라인)*라인;
value1 = var1+라인;
Value2 = var1;
if (Bdate == Bdate[1] and C > value1) or
(Bdate == Bdate[1] and Crossup(c,Value1)) and crossup(v1,v2) Then
Buy();
답변 1
예스스탁
예스스탁 답변
2021-11-17 14:24:26
안녕하세요
예스스탁입니다.
1
조건1 or 조건2 and count < n
현재 작성하신 매수조건이 위와 같습니다. count < n 이 조건2에만 해당되게 됩니다
(조건1 or 조건2) and count < n
위와 같이 수정하셔야 2개조건이 모두 당일진입제어와 묶이게 됩니다.
input : N(1);
var : cnt(0),count(0);
Count = 0 ;
for cnt = 0 to 10
{
if EntryDate(cnt) == sdate then
Count = Count + 1;
}
input : 라인(2.50);
var1 = Floor(DayOpen/라인)*라인;
value1 = var1+라인;
Value2 = var1;
if ((Bdate == Bdate[1] and C > value1) or
(Bdate == Bdate[1] and Crossup(c,Value1))) and count < n Then
Buy();
2
매수조건의 내용이 or로 구분되어 있지만 같은 내용입니다.
당일첫봉에서는 종가가 value1보다 크면 매수하고
당일두번째 봉부터는 종가가 아래에 있다가 value1을 돌파에 올라간것을 작성하신 내용이면
아래와 같이 수정하셔야 합니다.
if ((Bdate != Bdate[1] and C > value1) or
(Bdate == Bdate[1] and Crossup(c,Value1))) and count < n Then
Buy();
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
>
수식1에서 count < n 이 작동할 수 있게
수식2에서 crossup(v1,v2) 이 작동할 수 있게
수식 수정 부탁드립니다.
현재 상태에서는 작동하지 않습니다.
************************************************************************
수식1)
input : N(1);
var : cnt(0),count(0);
Count = 0 ;
for cnt = 0 to 10 {
if EntryDate(cnt) == sdate then
Count = Count + 1;
}
input : 라인(2.50);
var1 = Floor(DayOpen/라인)*라인;
value1 = var1+라인;
Value2 = var1;
if (Bdate == Bdate[1] and C > value1) or
(Bdate == Bdate[1] and Crossup(c,Value1)) and count < n Then
Buy();
수식2)
input : 라인(2.50);
input : 이평1(8),이평2(20);
Var : v1(0),v2(0);
v1 = ma(upvol,이평1);
v2 = ma(upvol,이평2);
var1 = Floor(DayOpen/라인)*라인;
value1 = var1+라인;
Value2 = var1;
if (Bdate == Bdate[1] and C > value1) or
(Bdate == Bdate[1] and Crossup(c,Value1)) and crossup(v1,v2) Then
Buy();