커뮤니티

stochastics K_D 문의

프로필 이미지
시스템최고
2008-06-12 15:54:51
969
글번호 15710
답변완료
stochastics K_D에서 강제청산의 목표가를 임의로 입력하고 시스템매매시 몇번의 목표가로 이익을 확정한후 Total 목표가가 1pt일때 거래를 중지하는 시스템 식은 어떻게 작성하나요?
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2008-06-13 09:03:41

안녕하세요 예스스탁입니다. 1. 당일 수익이 1포인트 이상이면 더이상 진입하지 않는 식입니다. Input : Period(12), Period1(5), Period2(5); var : cnt(0),Profit(0); Profit = 0; for cnt = 0 to 10{ if Sdate == EntryDate(cnt) Then Profit = Profit + PositionProfit(cnt); } value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); # 매수/매도청산 If CrossUP(value1, value2) and Profit < 1 Then { Buy(); } # 매수청산 If CrossDown(value1, value2) Then { ExitLong(); } # 매도/매수청산 If CrossDown(value1, value2) and Profit < 1 Then { sell(); } # 매도청산 If CrossUP(value1, value2) Then { ExitShort(); } 2. 당일 목표이익이 N번 발생하면 더이상 진입하지 않는 식입니다. Input : Period(12), Period1(5), Period2(5),목표이익(0.5),N(3); var : cnt(0),count(0); count = 0; for cnt = 0 to 10{ if Sdate == EntryDate(cnt) and PositionProfit(cnt) >= 목표이익 Then count = count+1; } value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); # 매수/매도청산 If CrossUP(value1, value2) and count < N Then { Buy(); } # 매수청산 If CrossDown(value1, value2) Then { ExitLong(); } # 매도/매수청산 If CrossDown(value1, value2) and count < N Then { sell(); } # 매도청산 If CrossUP(value1, value2) Then { ExitShort(); } 즐거운 하루되세요 > 시스템최고 님이 쓴 글입니다. > 제목 : stochastics K_D 문의 > stochastics K_D에서 강제청산의 목표가를 임의로 입력하고 시스템매매시 몇번의 목표가로 이익을 확정한후 Total 목표가가 1pt일때 거래를 중지하는 시스템 식은 어떻게 작성하나요?