커뮤니티
코스피 업종 종합챠트 이용한 수식도 가능한가요?
2008-10-17 08:14:44
791
글번호 17572
가능하다면
밑에 식에다가
=======================
코스피 업종 종합챠트 의 일봉챠트 현재가
>=
코스피 업종 종합챠트 의 일봉챠트 의 실시간 (17)ma *0.98 //괄호부분은 제가 조정할수 있게끔 해주세요//
일때 매수청산
=======================
을 하나 더해주세요
밑의 식에는 이미 매수청산이 있는데요
이미 있는 매수청산 or 위의 매수청산 만족하면 매수청산 되도록 해주세요
감사합니다
input : P(6),startdate(20080923);
var : sum(0),mav(0),cnt(0),BuyP(0),count(0);
sum = 0;
for cnt = 0 to P-1{
sum = sum+dayclose(cnt);
}
mav = sum/P;
if sdate >= startdate and
dayindex() == 0 and
dayopen() < mav*0.953 and
dayclose(1)*1.05 > dayopen() and dayopen() > dayclose(1)*0.97 and count < 1 Then{
buy("매수");
buyP = C;
count = 1;
}
if MarketPosition() == 1 and
C <= Buyp*0.94 Then{
buy("추가매수");
BuyP = C;
}
if MarketPosition() == 1 and
C >= mav*0.99 Then{
exitlong("청산");
count = 0;
}
답변 1
예스스탁 예스스탁 답변
2008-10-17 08:55:59
안녕하세요
예스스탁입니다.
다른종목의 값을 사용하려면 참조종목으로 해당종목을 넣어야 하는데
아시는 바와 같이 참조종목의 값은 항상 최근 완성된 봉만을 사용합니다.
그러므로 주종목이 완성시 최근 완성된 봉값까지만 계산되며
현재 진행중인 봉의 값은 참조할 수 없습니다.
input : P(6),startdate(20080923),PP(17);
var : sum(0),mav(0),cnt(0),BuyP(0),count(0);
sum = 0;
for cnt = 0 to P-1{
sum = sum+dayclose(cnt);
}
mav = sum/P;
if sdate >= startdate and
dayindex() == 0 and
dayopen() < mav*0.953 and
dayclose(1)*1.05 > dayopen() and dayopen() > dayclose(1)*0.97 and count < 1 Then{
buy("매수");
buyP = C;
count = 1;
}
if MarketPosition() == 1 and
C <= Buyp*0.94 Then{
buy("추가매수");
BuyP = C;
}
if MarketPosition() == 1 and
C >= mav*0.99 Then{
exitlong("청산1");
count = 0;
}
##참조종목
if MarketPosition() == 1 and
data2(C) >= data2(ma(c,PP))*0.98 Then{
exitlong("청산2");
count = 0;
}
즐거운 하루되세요
> 부상전에탭치자 님이 쓴 글입니다.
> 제목 : 코스피 업종 종합챠트 이용한 수식도 가능한가요?
> 가능하다면
밑에 식에다가
=======================
코스피 업종 종합챠트 의 일봉챠트 현재가
>=
코스피 업종 종합챠트 의 일봉챠트 의 실시간 (17)ma *0.98 //괄호부분은 제가 조정할수 있게끔 해주세요//
일때 매수청산
=======================
을 하나 더해주세요
밑의 식에는 이미 매수청산이 있는데요
이미 있는 매수청산 or 위의 매수청산 만족하면 매수청산 되도록 해주세요
감사합니다
input : P(6),startdate(20080923);
var : sum(0),mav(0),cnt(0),BuyP(0),count(0);
sum = 0;
for cnt = 0 to P-1{
sum = sum+dayclose(cnt);
}
mav = sum/P;
if sdate >= startdate and
dayindex() == 0 and
dayopen() < mav*0.953 and
dayclose(1)*1.05 > dayopen() and dayopen() > dayclose(1)*0.97 and count < 1 Then{
buy("매수");
buyP = C;
count = 1;
}
if MarketPosition() == 1 and
C <= Buyp*0.94 Then{
buy("추가매수");
BuyP = C;
}
if MarketPosition() == 1 and
C >= mav*0.99 Then{
exitlong("청산");
count = 0;
}
다음글
이전글