커뮤니티

수식변경 요청

프로필 이미지
깜피
2016-06-01 17:19:23
122
글번호 98691
답변완료
47960번을 다음과 같이 변경해주셨는데, 기존식으로는 진입에 문제가 없었는데 1분봉 적용 시 매수 진입이 안되는 경우가 많이 발생하고 있습니다. 전버젼에서 수정요청드렸던 익영업일에 청산하는 부분도 당일 2:45분에 청산이되고 있는데 수정 부탁드리겠습니다. 감사합니다.^^ input: 매수금액1(10000000),매수금액2(10000000),지정일(20160601); var : Ev(0),Xv(0),Xcond(false),Nday(0); if bdate != bdate[1] Then{ Nday = Nday+1; 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 and NextBarOpen < C*1.05 and NextBarSdate == sdate 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 highest(H,BarsSinceEntry) < EntryPrice*1.05 and MaxContracts == CurrentContracts Then buy("bb",Atlimit,EntryPrice*0.98,Floor(매수금액2/C)); if CurrentContracts > CurrentContracts[1] Then{ Ev = AvgEntryPrice; Xv = Floor(MaxContracts*(1/3)); } if MaxEntries >=1 Then{ if Condition11 == false Then exitlong("BL1",AtStop,AvgEntryPrice*0.97,"",xv,1); if Condition12 == false Then exitlong("BL3",AtStop,AvgEntryPrice*0.96); 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.20); if MaxEntries == 1 and highest(H,BarsSinceEntry) >= EntryPrice*1.05 Then ExitLong("btr",AtStop,highest(H,BarsSinceEntry)*0.95); } if sdate > Nday[BarsSinceEntry]+1 and stime == 144500 Then exitlong("bx"); } else{ Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition23 = false; }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-06-02 16:49:23

안녕하세요 예스스탁입니다. 식을 수정했습니다. 지정일의 첫봉 종가에 진입하고 다음날 14시30분에 청산되게 수정했습니다. input: 매수금액1(10000000),매수금액2(10000000),지정일(20160525); var : Ev(0),Xv(0),Xcond(false),Nday(0); if bdate != bdate[1] Then{ Nday = Nday+1; Xcond = false; } if TotalTrades > TotalTrades[1] and (LatestExitName(1) == "BL1" or LatestExitName(1) == "BL2") Then Xcond = true; if MarketPosition == 0 and NextBarSdate == 지정일 and Xcond == false and NextBarOpen < C*1.05 and dayindex == 0 Then buy("b",OnClose,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 highest(H,BarsSinceEntry) < EntryPrice*1.05 and MaxContracts == CurrentContracts Then buy("bb",Atlimit,EntryPrice*0.98,Floor(매수금액2/C)); if CurrentContracts > CurrentContracts[1] Then{ Ev = AvgEntryPrice; Xv = Floor(MaxContracts*(1/3)); } if MaxEntries >=1 Then{ if Condition11 == false Then exitlong("BL1",AtStop,AvgEntryPrice*0.97,"",xv,1); if Condition12 == false Then exitlong("BL3",AtStop,AvgEntryPrice*0.96); 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.20); if MaxEntries == 1 and highest(H,BarsSinceEntry) >= EntryPrice*1.05 Then ExitLong("btr",AtStop,highest(H,BarsSinceEntry)*0.95); } if Nday > Nday[BarsSinceEntry]+1 and stime == 144500 Then exitlong("bx"); } else{ Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition23 = false; } 즐거운 하루되세요 > 깜피 님이 쓴 글입니다. > 제목 : 수식변경 요청 > 47960번을 다음과 같이 변경해주셨는데, 기존식으로는 진입에 문제가 없었는데 1분봉 적용 시 매수 진입이 안되는 경우가 많이 발생하고 있습니다. 전버젼에서 수정요청드렸던 익영업일에 청산하는 부분도 당일 2:45분에 청산이되고 있는데 수정 부탁드리겠습니다. 감사합니다.^^ input: 매수금액1(10000000),매수금액2(10000000),지정일(20160601); var : Ev(0),Xv(0),Xcond(false),Nday(0); if bdate != bdate[1] Then{ Nday = Nday+1; 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 and NextBarOpen < C*1.05 and NextBarSdate == sdate 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 highest(H,BarsSinceEntry) < EntryPrice*1.05 and MaxContracts == CurrentContracts Then buy("bb",Atlimit,EntryPrice*0.98,Floor(매수금액2/C)); if CurrentContracts > CurrentContracts[1] Then{ Ev = AvgEntryPrice; Xv = Floor(MaxContracts*(1/3)); } if MaxEntries >=1 Then{ if Condition11 == false Then exitlong("BL1",AtStop,AvgEntryPrice*0.97,"",xv,1); if Condition12 == false Then exitlong("BL3",AtStop,AvgEntryPrice*0.96); 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.20); if MaxEntries == 1 and highest(H,BarsSinceEntry) >= EntryPrice*1.05 Then ExitLong("btr",AtStop,highest(H,BarsSinceEntry)*0.95); } if sdate > Nday[BarsSinceEntry]+1 and stime == 144500 Then exitlong("bx"); } else{ Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition23 = false; }