커뮤니티

이유를 모르겠습니다. ㅠㅠ

프로필 이미지
바나
2019-05-07 11:22:55
205
글번호 128441
답변완료
수정된 수식을 바탕으로 프로그램을 돌렸는데 오늘 하락시작인데도 종목들을 매수 하지 않습니다... ㅠㅠ 뭐가 잘못된건지.. 모르겠네요.. -> 전날에 비해 하락시작할 경우에만 다음 봉때 1매수(5분기준), 장중에 하락하더라도 매수금지. -> 볼밴 하단을 터치하면 매수2~4(5분기준) 하지만 1매수가 이루어 지지 않으면 그날은 매수하지 않음 -> 고로 음봉 시작인날에만 매수진행. -> 지금까지 수정해왔던 내용들인데 막상 하니까 프로그램 돌린거 18개 종목중 1개종목만 매수됐네요... 거의 대부분 하락시작이었는데 말이죠. 그 1종목 마저 차트에 매수표시가 안되네요;; 제가 오늘 테스트 했던 종목이 필룩스. 평화정공. 심텍홀딩스. 대성산업. 테라셈. 서연이화. 성우하이텍. 유진기업. 세종공업. 휴비스. BGF. 삼보판지. 한화갤러리. 국일신동. 현대로템. 유니테스트. 한류AI센터 등등 인데. 평화정공 한개만 매수 되었네요. Input : 투자금액(1000000),Period(20), MultiD(2), N(1),시작일(20190507),시작시간(090000),청산시간(150000); Input : loss(5); var : e(0),x(0),count(0),Tcond(false),BBup(0),BBdn(0); var : HH(0),Bxcond1(false),Bxcond2(false),Bxcond3(false); var : LL(0),Sxcond1(false),Sxcond2(false),Sxcond3(false); Array : VV[5](0),XX[5](0); BBup = BollBandUp(Period,MultiD); BBdn = BollBandDown(Period,MultiD); vv[0] = floor((투자금액*0.1)/NextBarOpen); vv[1] = floor((투자금액*0.2)/NextBarOpen); vv[2] = floor((투자금액*0.3)/NextBarOpen); vv[3] = floor((투자금액*0.4)/NextBarOpen); if sdate >= 시작일 and stime >= 시작시간 Then Tcond = true; if bdate != bdate[1] Then count = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then count = count+1; if Tcond == true then { if (TotalTrades == 0 or MarketPosition == 0 and BarsSinceExit(1) > 2) then { if MarketPosition == 0 and count >= 1 and count < N and CrossDown(c,bbdn) and C <= DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b1",atmarket,def,vv[MaxEntries]); } if MarketPosition == 0 and NextBarSdate != sdate and NextBarOpen <= C Then { buy("b11",atmarket,def,vv[MaxEntries]); } } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { e = e +1; if e == 1 then XX[e] = CurrentContracts; Else XX[e] = CurrentContracts-CurrentContracts[1]; } #두번째 매수 if MarketPosition == 1 and e == 1 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b2",atmarket,def,vv[MaxEntries]); } #세번재매수 if MarketPosition == 1 and e == 2 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b3",atmarket,def,vv[MaxEntries]); } #네번재매수 if MarketPosition == 1 and e == 3 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b4",atmarket,def,vv[MaxEntries]); } 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.02 and HH < EntryPrice*1.05 Then ExitLong("Bx1",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(1/5)),1); if Bxcond2 == false and HH >= EntryPrice*1.06 and HH < EntryPrice*1.10 Then ExitLong("Bx2",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(2/5)),1); if Bxcond3 == false and HH >= EntryPrice*1.12 Then ExitLong("Bx3",AtStop,HH-(HH-EntryPrice)*0.1); if (stime >= 청산시간 and stime[1] < 청산시간) and C > AvgEntryPrice then { ExitLong("bx"); } if C >= AvgEntryPrice*1.01 Then ExitLong("x"); }}
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-05-07 11:24:20

안녕하세요 예스스탁입니다. 시작일과 시작시간 설정때문인것 같습니다. 날짜와 시간은 봉완성시(다음봉시가수신)에 최종 판단됩니다. b11진입이 오늘 시가 수신되면 즉시 신호가 발생하는데 시초가 수신될떄 최종완성봉은 전일마지막봉입니다. 시가기준으로 날짜와 시간을 체크하게 수정했습니다. Input : 투자금액(1000000),Period(20), MultiD(2), N(1),시작일(20190507),시작시간(090000),청산시간(150000); Input : loss(5); var : e(0),x(0),count(0),Tcond(false),BBup(0),BBdn(0); var : HH(0),Bxcond1(false),Bxcond2(false),Bxcond3(false); var : LL(0),Sxcond1(false),Sxcond2(false),Sxcond3(false); Array : VV[5](0),XX[5](0); BBup = BollBandUp(Period,MultiD); BBdn = BollBandDown(Period,MultiD); vv[0] = floor((투자금액*0.1)/NextBarOpen); vv[1] = floor((투자금액*0.2)/NextBarOpen); vv[2] = floor((투자금액*0.3)/NextBarOpen); vv[3] = floor((투자금액*0.4)/NextBarOpen); if NextBarSdate >= 시작일 and NextBarStime >= 시작시간 Then Tcond = true; if bdate != bdate[1] Then count = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then count = count+1; if Tcond == true then { if (TotalTrades == 0 or MarketPosition == 0 and BarsSinceExit(1) > 2) then { if MarketPosition == 0 and count >= 1 and count < N and CrossDown(c,bbdn) and C <= DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b1",atmarket,def,vv[MaxEntries]); } if MarketPosition == 0 and NextBarSdate != sdate and NextBarOpen <= C Then { buy("b11",atmarket,def,vv[MaxEntries]); } } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { e = e +1; if e == 1 then XX[e] = CurrentContracts; Else XX[e] = CurrentContracts-CurrentContracts[1]; } #두번째 매수 if MarketPosition == 1 and e == 1 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b2",atmarket,def,vv[MaxEntries]); } #세번재매수 if MarketPosition == 1 and e == 2 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b3",atmarket,def,vv[MaxEntries]); } #네번재매수 if MarketPosition == 1 and e == 3 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b4",atmarket,def,vv[MaxEntries]); } 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.02 and HH < EntryPrice*1.05 Then ExitLong("Bx1",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(1/5)),1); if Bxcond2 == false and HH >= EntryPrice*1.06 and HH < EntryPrice*1.10 Then ExitLong("Bx2",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(2/5)),1); if Bxcond3 == false and HH >= EntryPrice*1.12 Then ExitLong("Bx3",AtStop,HH-(HH-EntryPrice)*0.1); if (stime >= 청산시간 and stime[1] < 청산시간) and C > AvgEntryPrice then { ExitLong("bx"); } if C >= AvgEntryPrice*1.01 Then ExitLong("x"); }} 즐거운 하루되세요 > 바나 님이 쓴 글입니다. > 제목 : 이유를 모르겠습니다. ㅠㅠ > 수정된 수식을 바탕으로 프로그램을 돌렸는데 오늘 하락시작인데도 종목들을 매수 하지 않습니다... ㅠㅠ 뭐가 잘못된건지.. 모르겠네요.. -> 전날에 비해 하락시작할 경우에만 다음 봉때 1매수(5분기준), 장중에 하락하더라도 매수금지. -> 볼밴 하단을 터치하면 매수2~4(5분기준) 하지만 1매수가 이루어 지지 않으면 그날은 매수하지 않음 -> 고로 음봉 시작인날에만 매수진행. -> 지금까지 수정해왔던 내용들인데 막상 하니까 프로그램 돌린거 18개 종목중 1개종목만 매수됐네요... 거의 대부분 하락시작이었는데 말이죠. 그 1종목 마저 차트에 매수표시가 안되네요;; 제가 오늘 테스트 했던 종목이 필룩스. 평화정공. 심텍홀딩스. 대성산업. 테라셈. 서연이화. 성우하이텍. 유진기업. 세종공업. 휴비스. BGF. 삼보판지. 한화갤러리. 국일신동. 현대로템. 유니테스트. 한류AI센터 등등 인데. 평화정공 한개만 매수 되었네요. Input : 투자금액(1000000),Period(20), MultiD(2), N(1),시작일(20190507),시작시간(090000),청산시간(150000); Input : loss(5); var : e(0),x(0),count(0),Tcond(false),BBup(0),BBdn(0); var : HH(0),Bxcond1(false),Bxcond2(false),Bxcond3(false); var : LL(0),Sxcond1(false),Sxcond2(false),Sxcond3(false); Array : VV[5](0),XX[5](0); BBup = BollBandUp(Period,MultiD); BBdn = BollBandDown(Period,MultiD); vv[0] = floor((투자금액*0.1)/NextBarOpen); vv[1] = floor((투자금액*0.2)/NextBarOpen); vv[2] = floor((투자금액*0.3)/NextBarOpen); vv[3] = floor((투자금액*0.4)/NextBarOpen); if sdate >= 시작일 and stime >= 시작시간 Then Tcond = true; if bdate != bdate[1] Then count = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then count = count+1; if Tcond == true then { if (TotalTrades == 0 or MarketPosition == 0 and BarsSinceExit(1) > 2) then { if MarketPosition == 0 and count >= 1 and count < N and CrossDown(c,bbdn) and C <= DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b1",atmarket,def,vv[MaxEntries]); } if MarketPosition == 0 and NextBarSdate != sdate and NextBarOpen <= C Then { buy("b11",atmarket,def,vv[MaxEntries]); } } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { e = e +1; if e == 1 then XX[e] = CurrentContracts; Else XX[e] = CurrentContracts-CurrentContracts[1]; } #두번째 매수 if MarketPosition == 1 and e == 1 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b2",atmarket,def,vv[MaxEntries]); } #세번재매수 if MarketPosition == 1 and e == 2 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b3",atmarket,def,vv[MaxEntries]); } #네번재매수 if MarketPosition == 1 and e == 3 and count < N and CrossDown(c,bbdn) and C < DayClose(1) and dayopen < DayClose(1) and NextBarSdate == sdate Then { buy("b4",atmarket,def,vv[MaxEntries]); } 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.02 and HH < EntryPrice*1.05 Then ExitLong("Bx1",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(1/5)),1); if Bxcond2 == false and HH >= EntryPrice*1.06 and HH < EntryPrice*1.10 Then ExitLong("Bx2",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(2/5)),1); if Bxcond3 == false and HH >= EntryPrice*1.12 Then ExitLong("Bx3",AtStop,HH-(HH-EntryPrice)*0.1); if (stime >= 청산시간 and stime[1] < 청산시간) and C > AvgEntryPrice then { ExitLong("bx"); } if C >= AvgEntryPrice*1.01 Then ExitLong("x"); }}