커뮤니티
오류 수정부탁합니다
2003-07-08 00:00:00
4002
글번호 322
다음 간단수식 오류 수정안되어
1. 오류확인부탁드리며(오류내용 사용자함수: c - 5줄 )
2. 5분봉에 다음 수식 적용하려는데 당일중에 최초 한번만 적용되도록하는 수식 추가 부탁합니다
input:period(5),period1(10),period2(20),period3(60),period4(120);
var: price(17050);
if c > price && c(1) < price
then buy();
if crossdown(c,ma(c,period3))
then exitlong();
답변 1
리서치팀 예스스탁 답변
2003-07-09 00:00:00
안녕하세요? 예스스탁입니다...
문의하신 식을 작성하면 다음과 같습니다.....
input : period(60), price(17050);
var : 진입(0), 청산(0), 당일봉(0), 매수식(0), 매수청산식(0);
당일봉 = dayindex();
매수식 = c > price && c[1] < price;
매수청산식= crossdown(c,ma(c,period));
if 당일봉 == 0 then
{
진입 = 0;
청산 = 0;
}
if 진입 == 0 then
{
if 매수식 then
{
진입 = 1;
buy();
exitshort();
}
}
if 진입 == 1 && 청산 == 0 then
{
if 매수청산식 then
{
청산 = 1;
sell();
exitlong();
}
}
다음글
이전글