커뮤니티
HPI and 종가채널 돌파 전략에서 함수
2008-11-17 18:03:27
789
글번호 18205
아래 식에서 HPI 함수 좀 알려주세요.
시스메틱 카페에서 받은 전략입니다;;
input : Mult(100),Factor(1),Length(10);
var : HPIval(0),CountL(5),CountS(5);
HPIval = HPI(Mult,Factor);
Condition1 = C > Highest(H,Length)[1];
Condition2 = HPIval > Highest(Hpival,Length)[1] and HPIval > 0;
Condition3 = Close < Lowest(L,length)[1];
Condition4 = HPIval < Lowest(HPIval,length)[1] and HPIval < 0;
CountL = CountL+1;
CountS = CountS+1;
if Condition1 and Condition2 and CountL > 5 Then
CountL = 1;
if Condition3 and Condition4 and countS > 5 Then
countS = 1;
if CountL <= 5 Then
buy("매수",atstop,H[countL]+1);
if CountS <= 5 Then
Sell("매도",atstop,L[countL]-1);
exitlong("Tr매수청산",atstop,lowest(L,4));
ExitShort("Tr매도청산",atstop,Highest(H,4));
if HPIval < 0 Then
ExitLong("매수청산");
if HPIval > 0 Then
ExitShort("매도청산");
답변 1
예스스탁 예스스탁 답변
2009-12-23 10:36:16
안녕하세요
예스스탁입니다.
사용자 함수 올려드립니다.
C:₩예스트레이더31₩YesLang₩Functions
폴더에 다운받으시길 바랍니다.
파일명에서 18401_는 삭제하시기 바랍니다.
파일명은 HPI.yfu 입니다.
즐거운 하루되세요
> 파라독스 님이 쓴 글입니다.
> 제목 : HPI and 종가채널 돌파 전략에서 함수
> 아래 식에서 HPI 함수 좀 알려주세요.
시스메틱 카페에서 받은 전략입니다;;
input : Mult(100),Factor(1),Length(10);
var : HPIval(0),CountL(5),CountS(5);
HPIval = HPI(Mult,Factor);
Condition1 = C > Highest(H,Length)[1];
Condition2 = HPIval > Highest(Hpival,Length)[1] and HPIval > 0;
Condition3 = Close < Lowest(L,length)[1];
Condition4 = HPIval < Lowest(HPIval,length)[1] and HPIval < 0;
CountL = CountL+1;
CountS = CountS+1;
if Condition1 and Condition2 and CountL > 5 Then
CountL = 1;
if Condition3 and Condition4 and countS > 5 Then
countS = 1;
if CountL <= 5 Then
buy("매수",atstop,H[countL]+1);
if CountS <= 5 Then
Sell("매도",atstop,L[countL]-1);
exitlong("Tr매수청산",atstop,lowest(L,4));
ExitShort("Tr매도청산",atstop,Highest(H,4));
if HPIval < 0 Then
ExitLong("매수청산");
if HPIval > 0 Then
ExitShort("매도청산");