커뮤니티

수식 수정 부탁드립니다.

프로필 이미지
깜피
2016-04-28 09:11:51
145
글번호 97538
답변완료
안녕하세요. 손절이 나온 경우 당일에 진입을 금지할 수 있도록 수식 수정 부탁드리겠습니다. 감사합니다. -------------------------------------------------------------------------------- input: 매수금액1(10000000),매수금액2(10000000),지정일(20160426); var : Ev(0),Xv(0); if MarketPosition == 0 and NextBarSdate > sdate and NextBarSdate == 지정일 Then buy("b",AtMarket,def,Floor(매수금액1/C)); if MarketPosition == 1 Then{ if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BL1" Then Condition11 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BL2" Then Condition12 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP1" Then Condition21 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP2" Then Condition22 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP3" Then Condition23 = true; if MaxEntries == 1 and CurrentContracts >= CurrentContracts[1] and Condition12 == false Then buy("bb",Atlimit,EntryPrice*0.97,Floor(매수금액2/C)); if CurrentContracts > CurrentContracts[1] Then{ Ev = AvgEntryPrice; Xv = Floor(MaxContracts*(1/3)); } if MaxEntries == 2 Then{ if Condition11 == false Then exitlong("BL1",AtStop,AvgEntryPrice*0.97,"",xv,1); if Condition12 == false Then exitlong("BL3",AtStop,AvgEntryPrice*0.94); if Condition21 == false Then exitlong("BP1",AtLimit,AvgEntryPrice*1.05,"",xv,1); if Condition22 == false Then exitlong("BP2",AtLimit,AvgEntryPrice*1.10,"",xv,1); if Condition23 == false Then exitlong("BP3",AtLimit,AvgEntryPrice*1.15); } if sdate > EntryDate and stime == 143000 Then exitlong(); } else{ Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition23 = false; }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-05-02 12:44:36

안녕하세요 예스스탁입니다. input: 매수금액1(10000000),매수금액2(10000000),지정일(20160426); var : Ev(0),Xv(0),Xcond(false); if bdate != bdate[1] Then Xcond = false; if TotalTrades > TotalTrades[1] and (LatestExitName(1) == "BL1" or LatestExitName(1) == "BL2") Then Xcond = true; if MarketPosition == 0 and NextBarSdate > sdate and NextBarSdate == 지정일 and Xcond == false Then buy("b",AtMarket,def,Floor(매수금액1/C)); if MarketPosition == 1 Then{ if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BL1" Then{ Condition11 = true; Xcond = true; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BL2" Then{ Condition12 = true; Xcond = true; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP1" Then Condition21 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP2" Then Condition22 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP3" Then Condition23 = true; if MaxEntries == 1 and CurrentContracts >= CurrentContracts[1] and Condition12 == false Then buy("bb",Atlimit,EntryPrice*0.97,Floor(매수금액2/C)); if CurrentContracts > CurrentContracts[1] Then{ Ev = AvgEntryPrice; Xv = Floor(MaxContracts*(1/3)); } if MaxEntries == 2 Then{ if Condition11 == false Then exitlong("BL1",AtStop,AvgEntryPrice*0.97,"",xv,1); if Condition12 == false Then exitlong("BL3",AtStop,AvgEntryPrice*0.94); if Condition21 == false Then exitlong("BP1",AtLimit,AvgEntryPrice*1.05,"",xv,1); if Condition22 == false Then exitlong("BP2",AtLimit,AvgEntryPrice*1.10,"",xv,1); if Condition23 == false Then exitlong("BP3",AtLimit,AvgEntryPrice*1.15); } if sdate > EntryDate and stime == 143000 Then exitlong(); } else{ Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition23 = false; } 즐거운 하루되세요 > 깜피 님이 쓴 글입니다. > 제목 : 수식 수정 부탁드립니다. > 안녕하세요. 손절이 나온 경우 당일에 진입을 금지할 수 있도록 수식 수정 부탁드리겠습니다. 감사합니다. -------------------------------------------------------------------------------- input: 매수금액1(10000000),매수금액2(10000000),지정일(20160426); var : Ev(0),Xv(0); if MarketPosition == 0 and NextBarSdate > sdate and NextBarSdate == 지정일 Then buy("b",AtMarket,def,Floor(매수금액1/C)); if MarketPosition == 1 Then{ if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BL1" Then Condition11 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BL2" Then Condition12 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP1" Then Condition21 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP2" Then Condition22 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "BP3" Then Condition23 = true; if MaxEntries == 1 and CurrentContracts >= CurrentContracts[1] and Condition12 == false Then buy("bb",Atlimit,EntryPrice*0.97,Floor(매수금액2/C)); if CurrentContracts > CurrentContracts[1] Then{ Ev = AvgEntryPrice; Xv = Floor(MaxContracts*(1/3)); } if MaxEntries == 2 Then{ if Condition11 == false Then exitlong("BL1",AtStop,AvgEntryPrice*0.97,"",xv,1); if Condition12 == false Then exitlong("BL3",AtStop,AvgEntryPrice*0.94); if Condition21 == false Then exitlong("BP1",AtLimit,AvgEntryPrice*1.05,"",xv,1); if Condition22 == false Then exitlong("BP2",AtLimit,AvgEntryPrice*1.10,"",xv,1); if Condition23 == false Then exitlong("BP3",AtLimit,AvgEntryPrice*1.15); } if sdate > EntryDate and stime == 143000 Then exitlong(); } else{ Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition23 = false; }