커뮤니티

수익실현

프로필 이미지
큰바위얼굴
2018-06-29 12:40:32
170
글번호 120177
답변완료
수식부탁합니다. 1번 수식 3% 수익후 즉시 ( 매도, 매수) 이익실현 합니다 6% 수익후 즉시 ( 매도, 매수 )이익실현 합니다. 2번 수식 3% 수익후 1%하락시 즉시 ( 매도, 매수) 이익실현 합니다 6% 수익후 1%하락시 즉시 ( 매도, 매수 )이익실현 합니다. 3번 수식 3% 수익후 종가 ( 매도, 매수) 이익실현 합니다 6% 수익후 종가 ( 매도, 매수 )이익실현 합니다. 2번 수식 3% 수익후 1%하락시 종가 ( 매도 ,매수) 이익실현 합니다 6% 수익후 1%하락시 종가 ( 매도, 매수 )이익실현 합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-07-02 10:58:35

안녕하세요 예스스탁입니다. 청산은 별도로 지정하지 않으면 전량청산입니다. 3%,6% 2개로 적으셨으므로 절반씩 청산하는 내용으로 올려드립니다. 1 if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false then ExitLong("bx1",AtLimit,EntryPrice*1.03,"",Floor(MaxContracts*0.5),1); if Condition2 == false Then ExitLong("bx2",AtLimit,EntryPrice*1.06); } Else { Condition1 = true; Condition2 = true; } if MarketPosition == -1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition3 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition4 = true; if Condition3 == false Then ExitShort("sx1",AtLimit,EntryPrice*0.97,"",Floor(MaxContracts*0.5),1); if Condition4 == false Then ExitShort("sx2",AtLimit,EntryPrice*0.94); } Else { Condition3 = true; Condition4 = true; } 2 if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false and highest(H,BarsSinceEntry) >= EntryPrice*1.03 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)*0.99,"",Floor(MaxContracts*0.5),1); if Condition2 == false and highest(H,BarsSinceEntry) >= EntryPrice*1.06 Then ExitLong("bx2",AtStop,highest(h,BarsSinceEntry)*0.99); } Else { Condition1 = true; Condition2 = true; } if MarketPosition == -1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition3 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition4 = true; if Condition3 == false and lowest(L,BarsSinceEntry) <= EntryPrice*0.97 Then ExitShort("sx1",AtStop,lowest(L,BarsSinceEntry)*1.01,"",Floor(MaxContracts*0.5),1); if Condition3 == false and lowest(L,BarsSinceEntry) <= EntryPrice*0.94 Then ExitShort("sx2",AtStop,lowest(L,BarsSinceEntry)*1.01); } Else { Condition3 = true; Condition4 = true; } 3 if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false and C >= EntryPrice*1.03 then ExitLong("bx1",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition2 == false and C >= EntryPrice*1.06 Then ExitLong("bx2"); } Else { Condition1 = true; Condition2 = true; } if MarketPosition == -1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition3 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition4 = true; if Condition3 == false and C <= EntryPrice*0.97 Then ExitShort("sx1",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition4 == false and C <= EntryPrice*0.94 Then ExitShort("sx2"); } Else { Condition3 = true; Condition4 = true; } 4 if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false and highest(C,BarsSinceEntry) >= EntryPrice*1.03 and C <= highest(C,BarsSinceEntry)*0.99 Then ExitLong("bx1",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition2 == false and highest(C,BarsSinceEntry) >= EntryPrice*1.06 and C <= highest(C,BarsSinceEntry)*0.99 Then ExitLong("bx2"); } Else { Condition1 = true; Condition2 = true; } if MarketPosition == -1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition3 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition4 = true; if Condition3 == false and lowest(C,BarsSinceEntry) <= EntryPrice*0.97 and C >= lowest(c,BarsSinceEntry)*1.01 Then ExitShort("sx1",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition3 == false and lowest(C,BarsSinceEntry) <= EntryPrice*0.94 and C >= lowest(C,BarsSinceEntry)*1.01 Then ExitShort("sx2"); } Else { Condition3 = true; Condition4 = true; } 즐거운 하루되세요 > 큰바위얼굴 님이 쓴 글입니다. > 제목 : 수익실현 > 수식부탁합니다. 1번 수식 3% 수익후 즉시 ( 매도, 매수) 이익실현 합니다 6% 수익후 즉시 ( 매도, 매수 )이익실현 합니다. 2번 수식 3% 수익후 1%하락시 즉시 ( 매도, 매수) 이익실현 합니다 6% 수익후 1%하락시 즉시 ( 매도, 매수 )이익실현 합니다. 3번 수식 3% 수익후 종가 ( 매도, 매수) 이익실현 합니다 6% 수익후 종가 ( 매도, 매수 )이익실현 합니다. 2번 수식 3% 수익후 1%하락시 종가 ( 매도 ,매수) 이익실현 합니다 6% 수익후 1%하락시 종가 ( 매도, 매수 )이익실현 합니다