커뮤니티

수식문의드립니다.

프로필 이미지
ksh003
2006-10-19 18:33:02
1044
글번호 11068
답변완료
수고많으십니다. 옵션거래식으로 부탁올림니다. 안녕하세요 예스스탁입니다. 문의하신 식은 다음과 같습니다. input : 투자금(1000000),P1(7),P2(7),P3(5), Period(12), Period1(5), Period2(3); Var : value1(0), value2(0); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); var3 = nthLowestbar(1,L,dayindex()+1); if Stime == 090300 then{ var1 = C; var2 = data1("c"); } if marketposition() == 0 and dayindex() > 0 then{ if C >= var1*(1+P1/100) and data1("C") <= var2*(1-P2/100) then buy("매수1", onclose, def, int(int(투자금/C)/10)*10); } if crossup(c,var3) and data1("C") >= var1*(1+P3/100) then buy("매수2", onclose, def, int(int(투자금/C)/10)*10); # 매도/매수청산 If CrossDown(value1, value2) Then { Exitlong(); } 현물용입니다. 위 계산에서는 10주 단위로 매매되게 하기 위한 식인데 코스닥 종목의 경우라면 buy("매수", onclose, def, int(ACCOUNT/C)/10*10); 로 작성하면 1주 단위까지 매매하게 됩니다. 즐거운 하루되세요 > ksh003 님이 쓴 글입니다. > 제목 : 수식문의드립니다. > 수고많으십니다. 아래식에 거래시 투자금액을 1,000,000원으로 고정하는식 부탁 올립니다. 감사합니다. input : P1(7),P2(7),P3(5), Period(12), Period1(5), Period2(3); Var : value1(0), value2(0); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); var3 = nthLowestbar(1,L,dayindex()+1); if Stime == 090300 then{ var1 = C; var2 = data1("c"); } if marketposition() == 0 and dayindex() > 0 then{ if C >= var1*(1+P1/100) and data1("C") <= var2*(1-P2/100) then buy(); } if crossup(c,var3) and data1("C") >= var1*(1+P3/100) then buy(); # 매도/매수청산 If CrossDown(value1, value2) Then { sell(); Exitlong(); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2006-10-20 09:12:29

안녕하세요 예스스탁입니다. 문의하신 식은 다음과 같습니다. input : 투자금(1000000),P1(7),P2(7),P3(5), Period(12), Period1(5), Period2(3); Var : value1(0), value2(0); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); var3 = nthLowestbar(1,L,dayindex()+1); if Stime == 090300 then{ var1 = C; var2 = data1("c"); } if marketposition() == 0 and dayindex() > 0 then{ if C >= var1*(1+P1/100) and data1("C") <= var2*(1-P2/100) then buy("매수1",onclose,def,int(투자금/(C*100000))); } if crossup(c,var3) and data1("C") >= var1*(1+P3/100) then buy("매수2",onclose,def,int(투자금/(C*100000))); # 매도/매수청산 If CrossDown(value1, value2) Then { Exitlong(); } 즐거운 하루되세요 > ksh003 님이 쓴 글입니다. > 제목 : 수식문의드립니다. > 수고많으십니다. 옵션거래식으로 부탁올림니다. 안녕하세요 예스스탁입니다. 문의하신 식은 다음과 같습니다. input : 투자금(1000000),P1(7),P2(7),P3(5), Period(12), Period1(5), Period2(3); Var : value1(0), value2(0); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); var3 = nthLowestbar(1,L,dayindex()+1); if Stime == 090300 then{ var1 = C; var2 = data1("c"); } if marketposition() == 0 and dayindex() > 0 then{ if C >= var1*(1+P1/100) and data1("C") <= var2*(1-P2/100) then buy("매수1", onclose, def, int(int(투자금/C)/10)*10); } if crossup(c,var3) and data1("C") >= var1*(1+P3/100) then buy("매수2", onclose, def, int(int(투자금/C)/10)*10); # 매도/매수청산 If CrossDown(value1, value2) Then { Exitlong(); } 현물용입니다. 위 계산에서는 10주 단위로 매매되게 하기 위한 식인데 코스닥 종목의 경우라면 buy("매수", onclose, def, int(ACCOUNT/C)/10*10); 로 작성하면 1주 단위까지 매매하게 됩니다. 즐거운 하루되세요 > ksh003 님이 쓴 글입니다. > 제목 : 수식문의드립니다. > 수고많으십니다. 아래식에 거래시 투자금액을 1,000,000원으로 고정하는식 부탁 올립니다. 감사합니다. input : P1(7),P2(7),P3(5), Period(12), Period1(5), Period2(3); Var : value1(0), value2(0); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); var3 = nthLowestbar(1,L,dayindex()+1); if Stime == 090300 then{ var1 = C; var2 = data1("c"); } if marketposition() == 0 and dayindex() > 0 then{ if C >= var1*(1+P1/100) and data1("C") <= var2*(1-P2/100) then buy(); } if crossup(c,var3) and data1("C") >= var1*(1+P3/100) then buy(); # 매도/매수청산 If CrossDown(value1, value2) Then { sell(); Exitlong(); }