커뮤니티

수식 여쭤봅니다~

프로필 이미지
부자청년28
2019-07-04 09:54:28
244
글번호 130026
답변완료
안녕하세요~ 수식에서 2차매수가 일어나지 않아 다시 문의 드립니다. 개별주식 1분봉 차트에서 적용하는 수식입니다. 1차매수는 오늘 시가에서 매수 2차매수는 전일종가 대비 -2% 에서 매수 입니다. 1분봉에서 적용중인데 오늘시가 매수는 잘일어나는데 1차매수후 하락하여 전일 일봉 종가 대비 -2% 도달시에 2차매수가 일어나지 않습니다. 감사합니다~ ps .피라미딩 - 다른신호만 허용으로 체크를 안해서 그럴까요? ---------------------------------- input : 금액(300000),매수1(60),매수2(40); var : trade(false); if bdate != date[1] Then trade = true; if MarketPosition == 0 and TotalTrades > TotalTrades[1] Then trade = false; if NextBarSdate != sdate and NextBarOpen >= c and NextBarOpen <= C*1.04 Then { buy("b1",AtMarket,DEF,Floor((금액*(매수1/100))/NextBarOpen)); buy("b2",Atlimit,NextBarOpen*0.98,Floor((금액*(매수2/100))/(NextBarOpen*0.98))); } if MarketPosition == 1 then { if trade == true and MaxEntries == 1 and stime >= 90000 and stime < 93000 and dayopen(0) >= DayClose(1) and dayopen(0) <= DayClose(1)*1.04 Then buy("b2.",Atlimit,dayopen(0)*0.98,Floor((금액*(매수2/100))/(dayopen(0)*0.98))); if countif(LatestExitName(0) == "bp1",BarsSinceEntry) < 1 Then ExitLong("bp1",atlimit,AvgEntryPrice*1.03,"",Floor(CurrentContracts*0.7),1); if countif(LatestExitName(0) == "bp1",BarsSinceEntry) < 1 Then ExitLong("bp2",atlimit,AvgEntryPrice*1.06,"",Floor(CurrentContracts*0.7),1); ExitLong("bp3",atlimit,AvgEntryPrice*1.09); if LatestExitName(0) == "bp1" or LatestExitName(0) == "bp2" then { ExitLong("bx",AtStop,highest(H,BarsSinceEntry)*0.98); } if countif(LatestExitName(0) == "bl1",BarsSinceEntry) < 1 Then ExitLong("bl1",AtStop,AvgEntryPrice*0.95,"",floor(CurrentContracts*0.5),1); ExitLong("bl2",AtStop,AvgEntryPrice*0.93); } SetStopEndofday(151800);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-07-04 11:03:14

안녕하세요 예스스탁입니다. 추가진입하는 수식은 항상 적용시에 피라미딩을 설정해 주셔야 합니다. 피라미딩 설정이 허용안함이면 추가진입이 발생하지 않습니다. 다른진입신호만 허용으로 설정하고 적용하시면 됩니다. 테스트 결과 추가진입이 발생합니다. 즐거운 하루되세요 > 부자청년28 님이 쓴 글입니다. > 제목 : 수식 여쭤봅니다~ > 안녕하세요~ 수식에서 2차매수가 일어나지 않아 다시 문의 드립니다. 개별주식 1분봉 차트에서 적용하는 수식입니다. 1차매수는 오늘 시가에서 매수 2차매수는 전일종가 대비 -2% 에서 매수 입니다. 1분봉에서 적용중인데 오늘시가 매수는 잘일어나는데 1차매수후 하락하여 전일 일봉 종가 대비 -2% 도달시에 2차매수가 일어나지 않습니다. 감사합니다~ ps .피라미딩 - 다른신호만 허용으로 체크를 안해서 그럴까요? ---------------------------------- input : 금액(300000),매수1(60),매수2(40); var : trade(false); if bdate != date[1] Then trade = true; if MarketPosition == 0 and TotalTrades > TotalTrades[1] Then trade = false; if NextBarSdate != sdate and NextBarOpen >= c and NextBarOpen <= C*1.04 Then { buy("b1",AtMarket,DEF,Floor((금액*(매수1/100))/NextBarOpen)); buy("b2",Atlimit,NextBarOpen*0.98,Floor((금액*(매수2/100))/(NextBarOpen*0.98))); } if MarketPosition == 1 then { if trade == true and MaxEntries == 1 and stime >= 90000 and stime < 93000 and dayopen(0) >= DayClose(1) and dayopen(0) <= DayClose(1)*1.04 Then buy("b2.",Atlimit,dayopen(0)*0.98,Floor((금액*(매수2/100))/(dayopen(0)*0.98))); if countif(LatestExitName(0) == "bp1",BarsSinceEntry) < 1 Then ExitLong("bp1",atlimit,AvgEntryPrice*1.03,"",Floor(CurrentContracts*0.7),1); if countif(LatestExitName(0) == "bp1",BarsSinceEntry) < 1 Then ExitLong("bp2",atlimit,AvgEntryPrice*1.06,"",Floor(CurrentContracts*0.7),1); ExitLong("bp3",atlimit,AvgEntryPrice*1.09); if LatestExitName(0) == "bp1" or LatestExitName(0) == "bp2" then { ExitLong("bx",AtStop,highest(H,BarsSinceEntry)*0.98); } if countif(LatestExitName(0) == "bl1",BarsSinceEntry) < 1 Then ExitLong("bl1",AtStop,AvgEntryPrice*0.95,"",floor(CurrentContracts*0.5),1); ExitLong("bl2",AtStop,AvgEntryPrice*0.93); } SetStopEndofday(151800);