커뮤니티

분할매도

프로필 이미지
티끌
2016-11-28 14:32:21
103
글번호 104405
답변완료
3~5%사이 수익에서 최고가대비30%하락시 보유주식수의 33%청산 5~7%사이 수익에서 최고가대비30%하락시 보유주식수의 33%청산 10%이상 수익에서 최고가대비30%하락시 나머지 청산 이걸 산식으로 부탁드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-11-28 14:46:11

안녕하세요 예스스탁입니다. var : HH(0),Bxcond1(false),Bxcond2(false),Bxcond3(false); var : LL(0),Sxcond1(false),Sxcond2(false),Sxcond3(false); if MarketPosition == 1 then{ HH = highest(H,BarsSinceEntry); if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx1" Then Bxcond1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx2" Then Bxcond2 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx3" Then Bxcond3 = true; if Bxcond1 == false and HH >= EntryPrice*1.03 and HH < EntryPrice*1.05 Then ExitLong("Bx1",AtStop,HH-(HH-EntryPrice)*0.3,"",Floor(MaxContracts*(1/3)),1); if Bxcond2 == false and HH >= EntryPrice*1.05 and HH < EntryPrice*1.07 Then ExitLong("Bx2",AtStop,HH-(HH-EntryPrice)*0.3,"",Floor(MaxContracts*(1/3)),1); if Bxcond3 == false and HH >= EntryPrice*1.10 Then ExitLong("Bx3",AtStop,HH-(HH-EntryPrice)*0.3); } Else{ Bxcond1 = false; Bxcond2 = false; Bxcond3 = false; } if MarketPosition == -1 then{ LL = Lowest(L,BarsSinceEntry); if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Sx1" Then Sxcond1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Sx2" Then Sxcond2 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Sx3" Then Sxcond3 = true; if Sxcond1 == false and LL <= EntryPrice*0.97 and LL < EntryPrice*0.95 Then ExitShort("Sx1",AtStop,LL+(EntryPrice-LL)*0.3,"",Floor(MaxContracts*(1/3)),1); if Sxcond2 == false and LL <= EntryPrice*0.95 and LL < EntryPrice*0.93 Then ExitShort("Sx2",AtStop,LL+(EntryPrice-LL)*0.3,"",Floor(MaxContracts*(1/3)),1); if Sxcond3 == false and LL <= EntryPrice*0.90 Then ExitShort("Sx3",AtStop,LL+(EntryPrice-LL)*0.3); } Else{ Sxcond1 = false; Sxcond2 = false; Sxcond3 = false; } 즐거운 하루되세요 > 티끌 님이 쓴 글입니다. > 제목 : 분할매도 > 3~5%사이 수익에서 최고가대비30%하락시 보유주식수의 33%청산 5~7%사이 수익에서 최고가대비30%하락시 보유주식수의 33%청산 10%이상 수익에서 최고가대비30%하락시 나머지 청산 이걸 산식으로 부탁드립니다