커뮤니티

시스템식 부탁합니다

프로필 이미지
이재찬
2012-01-21 22:20:16
461
글번호 46864
답변완료
수고하십니다 하루 3번~10번정도 신호가 나오는데 제일처음 나오는 신호는 진입을 안하고 두번째 나오는 신호부터 거래가 시작되도록 하는 식을 부탁합니다 그리고 오후 2시부터는 거래를 끝내는 수식도 같이 넣어주시면 고맙겠습니다 아래는 거래제한 수식을 첨부하는데 그것을 수정하여 제가 원하는 수식을 만들어 주시면 고맙겠습니다 Input : Period1(5), Period2(20), Number(1); Var : maV1(0),maV2(0), buyCond(False), sellCond(False), cnt(0); maV1 = ma(C, Period1); maV2 = ma(C, Period2); buyCond = crossup(maV1, maV2); sellCond = crossdown(maV1, maV2); If date[1] != date Then // 문장1 cnt = 0; If buyCond and cnt < Number Then { // 문장2 buy(); cnt = cnt +1; } if sellCond then //문장3 exitlong(); If sellCond and cnt < Number Then { //문장4 sell(); cnt = cnt +1; } if buyCond then //문장5 exitshort();
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-01-25 12:36:13

안녕하세요 예스스탁입니다. Input : Period1(5), Period2(20), Number(10); Var : maV1(0),maV2(0), buyCond(False), sellCond(False), cnt(0); maV1 = ma(C, Period1); maV2 = ma(C, Period2); buyCond = crossup(maV1, maV2); sellCond = crossdown(maV1, maV2); If date[1] != date Then cnt = 0; If buyCond or Sellcond Then cnt = cnt +1; If buyCond and cnt >= 2 and cnt < Number and stime < 140000 Then { buy(); } if sellCond then exitlong(); If sellCond and cnt >= 2 and cnt < Number and stime < 140000 Then { sell(); } if buyCond then exitshort(); 즐거운 하루되세요 > 이재찬 님이 쓴 글입니다. > 제목 : 시스템식 부탁합니다 > 수고하십니다 하루 3번~10번정도 신호가 나오는데 제일처음 나오는 신호는 진입을 안하고 두번째 나오는 신호부터 거래가 시작되도록 하는 식을 부탁합니다 그리고 오후 2시부터는 거래를 끝내는 수식도 같이 넣어주시면 고맙겠습니다 아래는 거래제한 수식을 첨부하는데 그것을 수정하여 제가 원하는 수식을 만들어 주시면 고맙겠습니다 Input : Period1(5), Period2(20), Number(1); Var : maV1(0),maV2(0), buyCond(False), sellCond(False), cnt(0); maV1 = ma(C, Period1); maV2 = ma(C, Period2); buyCond = crossup(maV1, maV2); sellCond = crossdown(maV1, maV2); If date[1] != date Then // 문장1 cnt = 0; If buyCond and cnt < Number Then { // 문장2 buy(); cnt = cnt +1; } if sellCond then //문장3 exitlong(); If sellCond and cnt < Number Then { //문장4 sell(); cnt = cnt +1; } if buyCond then //문장5 exitshort();