커뮤니티

26425 재질문 입니다.

프로필 이미지
몸통공격
2012-09-26 23:13:42
234
글번호 55109
답변완료
답변 주신대로 했으나 역시나 신호가 반복하여 나오니 다시 검토 부탁 드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-09-27 16:36:29

안녕하세요 예스스탁입니다. input : Period1(2),period2(5); input : Vol3(1),value(0); var : count(0),cnt(0),SA1(0); var : a(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1;} a = fffff(0.9)/gggg(hhhh*1.1); value1 = ######; value2 = ######; value3 = ######; Condition2 = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition == 0 and (IsExitName("bx1") or IsExitName("bx2") or IsExitName("bx3") or IsExitName("bx4") or IsExitName("bx7") or IsExitName("bx8") or IsExitName("bx11") or IsExitName("bx12")); Condition3 = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition == 0 and (IsExitName("sx1") or IsExitName("sx2") or IsExitName("sx5") or IsExitName("sx6") or IsExitName("sx9") or IsExitName("sx10") or IsExitName("sx13") or IsExitName("sx14")); #당일 첫진입 if count == 0 Then { If (매수조건) then buy("b1"); If (매도조건) then Sell("s1"); } #당일 첫진입 이후 반대포지션에 리버스 if count > 0 then{ If (MarketPosition == -1 and 매수조건) then buy("b2"); If (MarketPosition == 1 and 매도조건) then Sell("s2"); } #당일 첫진입 이후 무포지션에 상태(청산 후 한봉뒤부터) if count > 0 and MarketPosition == 0 and BarsSinceExit(1) then{ If (매수조건) and Condition2 == false then buy("b3"); If (매도조건) and Condition3 == false then Sell("s3"); } ##익절조건## if MarketPosition == 1 Then{ if (익절조건1) Then exitlong("bx1",Atlimit,EntryPrice+1.2); if (익절조건2) Then exitlong("bx2",Atlimit,EntryPrice+0.9); } if MarketPosition == -1 Then{ if (익절조건1) Then ExitShort("sx1",Atlimit,EntryPrice-1.2); if (익절조건2) Then ExitShort("sx2",Atlimit,EntryPrice-0.9); } if MarketPosition == 1 Then{ if (익절조건3) Then exitlong("bx3",Atlimit,EntryPrice+2.0); if (익절조건4) Then exitlong("bx4",Atlimit,EntryPrice+1.5); } if MarketPosition == -1 Then{ if (익절조건3) Then ExitShort("sx5",Atlimit,EntryPrice-2.0); if (익절조건4) Then ExitShort("sx6",Atlimit,EntryPrice-1.5); } if MarketPosition == 1 Then{ if (익절조건5) Then exitlong("bx7",Atlimit,EntryPrice+3.0); if (익절조건6) Then exitlong("bx8",Atlimit,EntryPrice+2.5); } if MarketPosition == -1 Then{ if (익절조건5) Then ExitShort("sx9",Atlimit,EntryPrice-3.0); if (익절조건6) Then ExitShort("sx10",Atlimit,EntryPrice-2.5); } if MarketPosition == 1 Then{ if (익절조건7) Then exitlong("bx11",Atlimit,EntryPrice+6.5); if (익절조건8) Then exitlong("bx12",Atlimit,EntryPrice+4.5); } if MarketPosition == -1 Then{ if (익절조건7) Then ExitShort("sx13",Atlimit,EntryPrice-6.5); if (익절조건8) Then ExitShort("sx14",Atlimit,EntryPrice-4.5); } # 매수청산 If (매수청산 조건) Then { Exitlong(); } # 매도청산 If (매도청산 조건) Then { Exitshort(); } SetStopLoss(1.0,PointStop); SetStopEndofday(150000); 즐거운 하루되세요 > 몸통공격 님이 쓴 글입니다. > 제목 : 26425 재질문 입니다. > 답변 주신대로 했으나 역시나 신호가 반복하여 나오니 다시 검토 부탁 드립니다. 감사합니다.