커뮤니티

수식 문의

프로필 이미지
회원
2005-03-22 12:28:12
1941
글번호 6902
답변완료
Input : Period(20), D(2); var : 볼밴업(0), 볼밴다운(0),cnt(0); 볼밴업 = BollBandUp(Period,D); 볼밴다운 = BollBandDown(Period,D); if date != date[1] then{ cnt = 0;} if cnt < 1 and crossup(C, 볼밴다운) then buy("매수"); if cnt < 1 and crossdown(C, 볼밴업) then sell("매도"); if crossdown(C, 볼밴업) then exitlong("매수청산"); if crossdown(C, entryprice()-1.5) then{ exitlong("매수손절"); cnt = cnt + 1;} if crossup(C, 볼밴다운) then exitshort("매도청산"); if crossup(C, entryprice()+1.5) then{ exitshort("매도손절"); cnt = cnt +1;} 위 식에 추가로 -당일 누적 손실이 2.0 이상이면 강제청산하고 당일 재진입 금지 -당일 누적 수익이 2.5 이상이면 강제청산하고 당일 재진입 금지 하는 식을 부탁합니다. 수고하십시요.
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2005-03-23 09:45:40

안녕하세요 예스스탁입니다. 문의하신 식은 다음과 같습니다. Input : Period(20), D(2); var : 볼밴업(0), 볼밴다운(0),cnt(0),buyval(0),sellval(0); 볼밴업 = BollBandUp(Period,D); 볼밴다운 = BollBandDown(Period,D); if date != date[1] then{ cnt = 0; var2 = 0; } SetStopEndofday(1450); if var2 < 2.5 and var2 > -2 and cnt < 1 and crossup(C, 볼밴다운) then{ buy("매수"); Buyval = C; } if var2 < 2.5 and var2 > -2 and cnt < 1 and crossdown(C, 볼밴업) then{ sell("매도"); Sellval = C; } if marketposition() == 1 and crossdown(C, 볼밴업) then{ exitlong("매수청산"); var1 = C-buyval; var2 = var2 + var1; } if marketposition() == 1 and crossdown(C, entryprice()-1.5) then{ exitlong("매수손절"); cnt = cnt + 1; var1 = C-buyval; var2 = var2 + var1; } if marketposition() == -1 and crossup(C, 볼밴다운) then{ exitshort("매도청산"); var1 = sellval-C; var2 = var2+var1; } if marketposition() == -1 and crossup(C, entryprice()+1.5) then{ exitshort("매도손절"); cnt = cnt +1; var1 = sellval-C; var2 = var2+var1; } 즐거운 하루되세요 > guest 님이 쓴 글입니다. > 제목 : 수식 문의 > Input : Period(20), D(2); var : 볼밴업(0), 볼밴다운(0),cnt(0); 볼밴업 = BollBandUp(Period,D); 볼밴다운 = BollBandDown(Period,D); if date != date[1] then{ cnt = 0;} if cnt < 1 and crossup(C, 볼밴다운) then buy("매수"); if cnt < 1 and crossdown(C, 볼밴업) then sell("매도"); if crossdown(C, 볼밴업) then exitlong("매수청산"); if crossdown(C, entryprice()-1.5) then{ exitlong("매수손절"); cnt = cnt + 1;} if crossup(C, 볼밴다운) then exitshort("매도청산"); if crossup(C, entryprice()+1.5) then{ exitshort("매도손절"); cnt = cnt +1;} 위 식에 추가로 -당일 누적 손실이 2.0 이상이면 강제청산하고 당일 재진입 금지 -당일 누적 수익이 2.5 이상이면 강제청산하고 당일 재진입 금지 하는 식을 부탁합니다. 수고하십시요.
프로필 이미지

맵핵

2005-03-23 09:58:53

맵핵 님에 의해 삭제된 답변입니다.