커뮤니티

수식 여쭤봅니다~ㅎ

프로필 이미지
부자청년28
2019-07-21 21:55:45
214
글번호 130528
답변완료
안녕하세요? 수식 여쭤봅니다. 거래는 60분봉에서 하려고 합니다. 매수금액 과 이평선 설정을 변수로 조정할수 있었음 합니다. **매수) 1차매수 주가가 위에서 부터 떨어져서 분봉상 400일선 5% 까지 근접하는순간 물량의 30% 매수 2차매수 주가가 위에서 부터 떨어져서 분봉상 400일선을 데드크로스 하는 순간 물량의 30% 매수 3차매수 주가가 위에서 부터 떨어져서 분봉상 400일선에서 -5% 까지 떨어지는 순간 물량의 40% 매수 **매도) 1차 매수든 2차매수든 3차매수든 매수가 일어나고 3% 상승시 가진 물량의 30% 매도 6% 상승시 가진 물량의 50% 매도 10% 상승시 가진 물량 전부 매도 **이익보전) 1차 매수든 2차매수든 3차매수든 매수가 일어나고 3% 상승후 다시 1.5%로 떨어질시 가진물량의 50% 매도 3% 상승후 다시 1%로 떨어질시 전부 매도 6% 상승후 다시 3.5%로 떨어질시 가진 물량의 50% 매도 6% 상승후 다시 3%로 떨어질시 가진 물량 전부 매도 10% 상승후 다시 8%떨어질시 가진 물량의 50% 매도 10% 상승후 다시 7%떨어질시 가진 물량 전부 매도 **날짜 지남에 따라 매도) 매수후 +1일 09시30분에 가진 물량의 20% 매도 매수후 +2일 09시30분에 가진 물량의 20% 매도 매수후 +3일 09시30분에 가진 물량의 20% 매도 매수후 +4일 09시30분에 가진 물량 전부 매도 **손절) 현재 매수 평단가에서 -15% 하락시 가진 물량의 50% 매도 -20% 하락시 전부 매도 **어떤 식으로든 전체 물량이 매도된 날에 재매수 금지) 감사합니다~
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-07-23 13:08:27

안녕하세요 예스스탁입니다. input : 금액(100000000); var : idx(0); var1 = ma(C,400); if MarketPosition == 0 and L > var1*1.05 Then buy("b1",atlimit,var1*1.05,Floor((금액*0.3)/min(NextBarOpen,var1*1.05))); if MarketPosition == 1 then { if bdate != bdate[1] Then { idx = idx+1; } if MaxEntries == 1 and L > var1 Then buy("b2",atlimit,var1,Floor((금액*0.3)/min(NextBarOpen,var1))); if MaxEntries == 2 and L > var1*0.95 Then buy("b3",atlimit,var1*0.95,Floor((금액*0.4)/min(NextBarOpen,var1*0.95))); if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp2" Then Condition2 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp3" Then Condition3 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp11" Then Condition11 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp12" Then Condition12 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp21" Then Condition21 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp22" Then Condition22 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp31" Then Condition31 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bp32" Then Condition32 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bl1" Then Condition4 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bl2" Then Condition5 = true; if Condition1 == false Then ExitLong("bp1",atlimit,AvgEntryPrice*1.03,"",Floor(CurrentContracts*0.3),1); if Condition2 == false Then ExitLong("bp2",atlimit,AvgEntryPrice*1.06,"",Floor(CurrentContracts*0.5),1); if Condition3 == false Then ExitLong("bp3",atlimit,AvgEntryPrice*1.09); if Condition1 == true then { if Condition11 == false Then ExitLong("bp11",AtStop,EntryPrice*1.015,"",Floor(CurrentContracts*0.5),1); if Condition12 == false Then ExitLong("bp12",AtStop,EntryPrice*1.01); } if Condition2 == true then { if Condition21 == false Then ExitLong("bp21",AtStop,EntryPrice*1.035,"",Floor(CurrentContracts*0.5),1); if Condition22 == false Then ExitLong("bp22",AtStop,EntryPrice*1.03); } if Condition3 == true then { if Condition31 == false Then ExitLong("bp31",AtStop,EntryPrice*1.08,"",Floor(CurrentContracts*0.5),1); if Condition32 == false Then ExitLong("bp32",AtStop,EntryPrice*1.7); } if stime >= 93000 and stime[1] < 93000 then { if idx == 1 Then ExitLong("bx1",OnClose,def,"",Floor(CurrentContracts*0.2),1); if idx == 2 Then ExitLong("bx2",OnClose,def,"",Floor(CurrentContracts*0.2),1); if idx == 3 Then ExitLong("bx3",OnClose,def,"",Floor(CurrentContracts*0.2),1); if idx == 4 Then ExitLong("bx4"); } if Condition4 == false Then ExitLong("bl1",AtStop,AvgEntryPrice*0.85,"",Floor(CurrentContracts*0.5),1); if Condition5 == false Then ExitLong("bl2",AtStop,AvgEntryPrice*1.80); } Else { idx = 0; Condition1 = false; Condition2 = false; Condition3 = false; Condition11 = false; Condition12 = false; Condition21 = false; Condition22 = false; Condition31 = false; Condition31 = false; Condition4 = false; Condition5 = false; } 즐거운 하루되세요 > 부자청년28 님이 쓴 글입니다. > 제목 : 수식 여쭤봅니다~ㅎ > 안녕하세요? 수식 여쭤봅니다. 거래는 60분봉에서 하려고 합니다. 매수금액 과 이평선 설정을 변수로 조정할수 있었음 합니다. **매수) 1차매수 주가가 위에서 부터 떨어져서 분봉상 400일선 5% 까지 근접하는순간 물량의 30% 매수 2차매수 주가가 위에서 부터 떨어져서 분봉상 400일선을 데드크로스 하는 순간 물량의 30% 매수 3차매수 주가가 위에서 부터 떨어져서 분봉상 400일선에서 -5% 까지 떨어지는 순간 물량의 40% 매수 **매도) 1차 매수든 2차매수든 3차매수든 매수가 일어나고 3% 상승시 가진 물량의 30% 매도 6% 상승시 가진 물량의 50% 매도 10% 상승시 가진 물량 전부 매도 **이익보전) 1차 매수든 2차매수든 3차매수든 매수가 일어나고 3% 상승후 다시 1.5%로 떨어질시 가진물량의 50% 매도 3% 상승후 다시 1%로 떨어질시 전부 매도 6% 상승후 다시 3.5%로 떨어질시 가진 물량의 50% 매도 6% 상승후 다시 3%로 떨어질시 가진 물량 전부 매도 10% 상승후 다시 8%떨어질시 가진 물량의 50% 매도 10% 상승후 다시 7%떨어질시 가진 물량 전부 매도 **날짜 지남에 따라 매도) 매수후 +1일 09시30분에 가진 물량의 20% 매도 매수후 +2일 09시30분에 가진 물량의 20% 매도 매수후 +3일 09시30분에 가진 물량의 20% 매도 매수후 +4일 09시30분에 가진 물량 전부 매도 **손절) 현재 매수 평단가에서 -15% 하락시 가진 물량의 50% 매도 -20% 하락시 전부 매도 **어떤 식으로든 전체 물량이 매도된 날에 재매수 금지) 감사합니다~