커뮤니티

실행에문제점

프로필 이미지
큰바위얼굴
2004-06-03 13:23:08
1468
글번호 3917
답변완료
안녕하세요 예스스탁입니다. Input : shortPeriod(5), longPeriod(20), shortP(5), longP(20); Var : macdVal(0), 단기이평(0) , 중기이평(0); macdVal = MACD(shortPeriod, longPeriod); //MACD지표 단기이평 = ma(c, shortP); 중기이평 = ma(c, longP); if crossup(macdVal, 0) and crossup(단기이평, 중기이평) then buy(); if crossdown(macdVal, 0) or crossdown(단기이평, 중기이평) then exitlong(); if crossdown(macdVal, 0) and crossdown(단기이평, 중기이평) then sell(); if crossup(macdVal, 0) or crossup(단기이평, 중기이평) then exitshort(); (위에내용에서 ) if crossup(macdVal, 0) and crossup(단기이평, 중기이평) then buy(); if crossdown(macdVal, 0) or crossdown(단기이평, 중기이평) then exitlong(); 한후 또다시 macd 또는이평선이 매수신호가 동시에 형성시신호가없습니다. 즉.if crossdown(macdVal, 0) or crossdown(단기이평, 중기이평) then exitlong(); 한후 어느한쪽이원상복구시 신호가날수없는지 궁금합니다. 감사합니다. 1840참조 바람니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2004-06-04 08:35:58

안녕하세요? 예스스탁입니다... 작성된 식은 매수 이후 매수청산이 발생하더라도 다시 macd와 이평선이 동시에 조건을 만족하게 되면 재매수가 들어가는 식입니다.. 따라서 확인결과 식은 문의하신 내용대로 작성되었습니다.. 감사합니다... > 큰바위얼굴 님이 쓴 글입니다. > 제목 : 실행에문제점 > 안녕하세요 예스스탁입니다. Input : shortPeriod(5), longPeriod(20), shortP(5), longP(20); Var : macdVal(0), 단기이평(0) , 중기이평(0); macdVal = MACD(shortPeriod, longPeriod); //MACD지표 단기이평 = ma(c, shortP); 중기이평 = ma(c, longP); if crossup(macdVal, 0) and crossup(단기이평, 중기이평) then buy(); if crossdown(macdVal, 0) or crossdown(단기이평, 중기이평) then exitlong(); if crossdown(macdVal, 0) and crossdown(단기이평, 중기이평) then sell(); if crossup(macdVal, 0) or crossup(단기이평, 중기이평) then exitshort(); (위에내용에서 ) if crossup(macdVal, 0) and crossup(단기이평, 중기이평) then buy(); if crossdown(macdVal, 0) or crossdown(단기이평, 중기이평) then exitlong(); 한후 또다시 macd 또는이평선이 매수신호가 동시에 형성시신호가없습니다. 즉.if crossdown(macdVal, 0) or crossdown(단기이평, 중기이평) then exitlong(); 한후 어느한쪽이원상복구시 신호가날수없는지 궁금합니다. 감사합니다. 1840참조 바람니다.