커뮤니티

수식부착

프로필 이미지
시골길
2009-02-05 08:18:30
898
글번호 20006
답변완료
input : N(10),dnv(2),upv(5)); input : loss1(5),loss2(3),Profit1(5),Profit2(3)(18); var : cnt(0),count(0),Bval1(0), Bval2(0),Bidx1(0),Bidx2(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if stime >= 090000 and stime < 143000 Then{ if MarketPosition() == 0 and ma(c,5)>ma(c,40) and count < 1 Then{ buy("aa",OnClose,def,1); Bval1 =C; ## 첫번째 진입가 Bidx1 = index; } if MarketPosition() == 1 and CurrentEntries() == 1 and ma(c,5) > ma(c,20) and crossup(C, Bval1*1.26) then{ buy("bb",OnClose,def,1); Bval2 = c; ## 두번째 진입가 Bidx2 = index; } ## 손절 if MarketPosition() == 1 Then{ If CurrentEntries == 1 Then{ exitlong("XL1",AtStop,Bval1*(1-loss1/100),"",1,1); } If CurrentEntries == 2 Then{ exitlong("XL2",AtStop,Bval2*(1-loss2/100),"",1,1); } SetStopEndofday(143000); 상기식에서 첫번재진입신호가 나오면 매수하지 않고 수치만 기억하고 있다가 두번째신호가 나오면 매수 하려고 합니다. 여기에다 추가적으로 세번재신호를 10시부터13시까지 매매는 2번으로 하고 전일의 저점을 하향을 하면 매도하고 매도포지션은 2%손절,3%이익시 청산하는 수시을 추가하려고합니다. 감사드립니다.
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2009-02-05 15:23:12

안녕하세요 예스스탁입니다. 문의하신 부분에 대해 정확히 이해하지 못했습니다. 문의하신 부분이 진입제한이 2회인지 3회인지 피라미딩시 포지션 누적을 제한하시는 건지 정확치 않습니다. 자세한 내용 부탁드립니다. > 시골길 님이 쓴 글입니다. > 제목 : 수식부착 > input : N(10),dnv(2),upv(5)); input : loss1(5),loss2(3),Profit1(5),Profit2(3)(18); var : cnt(0),count(0),Bval1(0), Bval2(0),Bidx1(0),Bidx2(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if stime >= 090000 and stime < 143000 Then{ if MarketPosition() == 0 and ma(c,5)>ma(c,40) and count < 1 Then{ buy("aa",OnClose,def,1); Bval1 =C; ## 첫번째 진입가 Bidx1 = index; } if MarketPosition() == 1 and CurrentEntries() == 1 and ma(c,5) > ma(c,20) and crossup(C, Bval1*1.26) then{ buy("bb",OnClose,def,1); Bval2 = c; ## 두번째 진입가 Bidx2 = index; } ## 손절 if MarketPosition() == 1 Then{ If CurrentEntries == 1 Then{ exitlong("XL1",AtStop,Bval1*(1-loss1/100),"",1,1); } If CurrentEntries == 2 Then{ exitlong("XL2",AtStop,Bval2*(1-loss2/100),"",1,1); } SetStopEndofday(143000); 상기식에서 첫번재진입신호가 나오면 매수하지 않고 수치만 기억하고 있다가 두번째신호가 나오면 매수 하려고 합니다. 여기에다 추가적으로 세번재신호를 10시부터13시까지 매매는 2번으로 하고 전일의 저점을 하향을 하면 매도하고 매도포지션은 2%손절,3%이익시 청산하는 수시을 추가하려고합니다. 감사드립니다.
프로필 이미지

시골길

2009-02-05 15:35:26

input : N(10),dnv(2),upv(5)); input : loss1(5),loss2(3),Profit1(5),Profit2(3)(18); var : cnt(0),count(0),Bval1(0), Bval2(0),Bidx1(0),Bidx2(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if stime >= 090000 and stime < 143000 Then{ if MarketPosition() == 0 and ma(c,5)>ma(c,40) and count < 1 Then{ buy("aa",OnClose,def,1); Bval1 =C; ## 첫번째 진입가 Bidx1 = index; } if MarketPosition() == 1 and CurrentEntries() == 1 and ma(c,5) > ma(c,20) and crossup(C, Bval1*1.26) then{ buy("bb",OnClose,def,1); Bval2 = c; ## 두번째 진입가 Bidx2 = index; } ## 손절 if MarketPosition() == 1 Then{ If CurrentEntries == 1 Then{ exitlong("XL1",AtStop,Bval1*(1-loss1/100),"",1,1); } If CurrentEntries == 2 Then{ exitlong("XL2",AtStop,Bval2*(1-loss2/100),"",1,1); } SetStopEndofday(143000); 상기식에서 첫번재진입식은 매수하지 않고 기억만 해두게 바꾸어주시고 그신호에 따라 두번째진입시 매수에 나갈수 있게 부탁합니다. 그리고 추가적으로 10시부터13시까지 전일의 저점을 하향을 하면 매도하고 매도포지션은 2%손절,3%이익시 청산하는대 하루에 두번만 하고 싶습니다. 결국 첫번째 진입식("aa")을 수정해주시고 3번째 진입식을 추가부탁합니다. 감사드립니다.
프로필 이미지

예스스탁 예스스탁 답변

2009-02-05 15:58:01

안녕하세요 예스스탁입니다. input : N(10),dnv(2),upv(5); input : loss1(5),loss2(3),Profit1(5),Profit2(3); var : cnt(0),count(0),Bval1(0), Bval2(0),Bidx1(0),Bidx2(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if stime >= 090000 and stime < 143000 Then{ if MarketPosition() == 0 and ma(c,5)>ma(c,40) Then{ Bval1 =C; Bidx1 = index; Condition1 = True; } if MarketPosition() == 0 and count == 0 and Condition1 == True and ma(c,5) > ma(c,20) and crossup(C, Bval1*1.26) then{ buy("bb",OnClose,def,1); Bval2 = c; Bidx2 = index; } if MarketPosition() == 1 and CurrentEntries() == 1 and ma(c,5) > ma(c,20) and crossup(C, Bval2*1.26) then{ buy("CC",OnClose,def,1); } } if stime >= 100000 and stime <= 130000 Then{ if CrossDown(c,daylow(1)) Then sell(); } ## 손절 if MarketPosition() == 1 Then{ If CurrentEntries == 1 Then{ exitlong("XL1",AtStop,Bval1*(1-loss1/100),"",1,1); } If CurrentEntries == 2 Then{ exitlong("XL2",AtStop,Bval2*(1-loss2/100),"",1,1); } } if MarketPosition() == 1 Then{ ExitShort("Sloss",AtStop,EntryPrice*1.02,"",1,1); ExitShort("Sprofit",AtLimit,EntryPrice*0.97,"",1,1); } SetStopEndofday(143000); 두번째 진입부터 신호가 발생하며 세번째 진입시 두번째 진입의 26% 위에서 세번째가 발생합니다. 10시부터 12사이에 전일저가를 하향하면 매도진입하며 2%손절 3% 이익시 청산입니다. 즐거운 하루되세요 > 시골길 님이 쓴 글입니다. > 제목 : Re : Re : 수식재부탁합니다 > input : N(10),dnv(2),upv(5)); input : loss1(5),loss2(3),Profit1(5),Profit2(3)(18); var : cnt(0),count(0),Bval1(0), Bval2(0),Bidx1(0),Bidx2(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if stime >= 090000 and stime < 143000 Then{ if MarketPosition() == 0 and ma(c,5)>ma(c,40) and count < 1 Then{ buy("aa",OnClose,def,1); Bval1 =C; ## 첫번째 진입가 Bidx1 = index; } if MarketPosition() == 1 and CurrentEntries() == 1 and ma(c,5) > ma(c,20) and crossup(C, Bval1*1.26) then{ buy("bb",OnClose,def,1); Bval2 = c; ## 두번째 진입가 Bidx2 = index; } ## 손절 if MarketPosition() == 1 Then{ If CurrentEntries == 1 Then{ exitlong("XL1",AtStop,Bval1*(1-loss1/100),"",1,1); } If CurrentEntries == 2 Then{ exitlong("XL2",AtStop,Bval2*(1-loss2/100),"",1,1); } SetStopEndofday(143000); 상기식에서 첫번재진입식은 매수하지 않고 기억만 해두게 바꾸어주시고 그신호에 따라 두번째진입시 매수에 나갈수 있게 부탁합니다. 그리고 추가적으로 10시부터13시까지 전일의 저점을 하향을 하면 매도하고 매도포지션은 2%손절,3%이익시 청산하는대 하루에 두번만 하고 싶습니다. 결국 첫번째 진입식("aa")을 수정해주시고 3번째 진입식을 추가부탁합니다. 감사드립니다.