커뮤니티
수고많으십니다
2012-08-18 09:15:02
270
글번호 53884
수식작성 부탁드립니다
전일 움직임을 당일 시가 대비 각각 2.7%이하,2.7~4%,4~5.2% ,5.2% 이상의 4단계로 설정한후
이에맟춰 전일의 움직임이
2.7%이하인 경우는 다음날 시가 1%에서
2.7~4%일경우는 시가대비 1.25%에서
4~5.2%일경우는 시가대비 1.5%에서
5.2%이상일 경우는 시가대비 2.5%에서
매수,매도신호가 나오게 해주세요 (종가로당일채널돌파)
1일1회진입
최적화할수잇도록변수처리해주세요
감사합니다
답변 1
예스스탁 예스스탁 답변
2012-08-20 10:23:25
안녕하세요
예스스탁입니다.
input : preday1(2.7),preday2(4.0),preday3(5.2);
input : per1(1.0),per2(1.25),per3(1.5),per4(2.5);
input : N(1);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
var1 = dayhigh(1)-daylow(1)/daylow(1)*100;
if var1 < preday1 and count < 1 Then{
if crossup(c,dayopen*(1+per1/100)) then
buy();
if CrossDown(c,dayopen*(1-per1/100)) then
Sell();
}
if var1 >= preday1 and var1 < preday2 and count < 1 Then{
if crossup(c,dayopen*(1+per2/100)) Then
buy();
if CrossDown(c,dayopen*(1-per2/100)) Then
sell();
}
if var1 >= preday2 and var1 < preday3 and count < 1 Then{
if crossup(c,dayopen*(1+per3/100)) Then
buy();
if CrossDown(c,dayopen*(1-per3/100)) Then
sell();
}
if var1 >= preday3 and count < 1 Then{
if crossup(c,dayopen*(1+per4/100)) Then
buy();
if CrossDown(c,dayopen*(1-per4/100)) Then
sell();
}
즐거운 하루되세요
> CSI300 님이 쓴 글입니다.
> 제목 : 수고많으십니다
> 수식작성 부탁드립니다
전일 움직임을 당일 시가 대비 각각 2.7%이하,2.7~4%,4~5.2% ,5.2% 이상의 4단계로 설정한후
이에맟춰 전일의 움직임이
2.7%이하인 경우는 다음날 시가 1%에서
2.7~4%일경우는 시가대비 1.25%에서
4~5.2%일경우는 시가대비 1.5%에서
5.2%이상일 경우는 시가대비 2.5%에서
매수,매도신호가 나오게 해주세요 (종가로당일채널돌파)
1일1회진입
최적화할수잇도록변수처리해주세요
감사합니다