커뮤니티

행복; 수식 작성 바랍니다

프로필 이미지
행복한가방
2014-02-20 08:55:45
162
글번호 72730
답변완료
한국의 금융산업 발전을 위해 불철주야 애쓰시는 귀하의 노고를 높이 평가합니다 시스템식 작성 바랍니다 ----------------------------------------------------------------- 수식작성 Q&A 34977 에 대한 답변 < 아래 > 와 관련된 질문입니다 ==================== < 아래 > ============================ If Date == 20140206 Then { IF MarketPosition == 0 and stime < 112000 Then { buy("b1x",AtStop,dayopen*(1+0.25/100),10); } If MarketPosition == 1 and stime < 112000 Then { If MaxContracts == CurrentContracts Then{ if CurrentContracts == 10 Then buy("b2x",AtStop,dayopen*(1+0.50/100),10); } if CurrentContracts == 20 Then ExitLong("el5_4x",AtStop,dayopen*(1+0.25/100),"",10,1); if CurrentContracts == 10 Then ExitLong("el5_5x",AtStop,dayopen,"",10,1); } If MarketPosition == 1 and stime >= 112000 Then { if stime >= 112000 and Condition1 == false Then{ Condition1 = true; ExitLong("b분할1",OnClose,def,"",Int(CurrentContracts*(1/3)),1); } if stime >= 130000 and Condition2 == false Then{ Condition2 = true; ExitLong("b분할2",OnClose,def,"",Int(CurrentContracts*(1/2)),1); } if stime >= 145000 and Condition3 == false Then { Condition3 = true; ExitLong("b분할3"); } } } if MarketPosition != 1 Then{ Condition1 = false; Condition2 = False; Condition3 = false; } =================================================================== << 시스템식 1 >> ================ < 진입 조건> - < 아래 >의 시스템식 중 진입조건식을 그대로 사용합니다 - 대상; 연결선물지수 - 주기; 틱봉(데이트레이딩) If Date == 20140206 Then { IF MarketPosition == 0 and stime < 113000 Then { buy("b1x",AtStop,dayopen*(1+0.25/100),10); } If MarketPosition == 1 and stime < 113000 Then { If MaxContracts == CurrentContracts Then{ if CurrentContracts == 10 Then buy("b2x",AtStop,dayopen*(1+0.50/100),10); } if CurrentContracts == 20 Then ExitLong("el2x",AtStop,dayopen*(1+0.25/100),"",10,1); if CurrentContracts == 10 Then ExitLong("el1x",AtStop,dayopen,"",10,1); } } < 청산 조건> - 1차 분할청산 ; EntryPrice 0.4% 이상 상승한 후 대비고점대비 0.3 % 하락하면 즉시 보유잔고(20계약)의 1/6(3계약)을 청산 ------ Int(CurrentContracts*(1/6) (1차 분할청산은 11시 이전에만 가능하면 1차 분할청산 후에는 진입 금지) - 2차 분할청산; 1차분할청산 후 5분 후에 즉시 보유잔고(17계약)의 1/5(3계약)을 청산 ------ Int(CurrentContracts*(1/5) - 3차 분할청산; 2차분할청산 후 5분 후에 즉시 보유잔고(14계약)의 1/4(3계약)을 청산 ------ Int(CurrentContracts*(1/4) - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(11계약)의 1/3(3계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(8계약)의 1/2(4계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(4계약)의 1/1(4계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 또는 - 1차 분할청산 조건에 부합하지 않은 경우에, 1차와 2차 및 3차 분할청산을 건너띄고 - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(20계약)의 1/3(6계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(14계약)의 1/2(7계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(7계약)의 1/1(7계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 << 시스템식 2 >> ================ < 진입 조건> - < 아래 >의 시스템식 중 진입조건식을 약간 변형합니다 - 대상; 연결선물지수 - 주기; 틱봉(데이트레이딩) If Date == 20140210 Then { IF MarketPosition == 0 and stime < 113000 Then { buy("b1x",AtLimit,dayopen*(1-0.18/100),10); } If MarketPosition == 1 and stime < 113000 Then { If MaxContracts == CurrentContracts Then{ if CurrentContracts == 10 Then buy("b2x",atlimit,dayopen*(1-0.36/100),10); } if CurrentContracts == 20 Then ExitLong("el2x",atlimit,dayopen*(1-0.18/100),"",10,1); if CurrentContracts == 10 Then ExitLong("el1x",atlimit,dayopen,"",10,1); } } < 청산 조건> - 1차 분할청산; EntryPrice 대비 0.36 % 하락하면 즉시 보유잔고(20계약)의 1/6(3계약)을 청산 ------ Int(CurrentContracts*(1/6) (1차 분할청산은 11시 이전에만 가능하면 1차 분할청산 후에는 진입 금지) - 2차 분할청산; 1차분할청산 후 5분 후에 즉시 보유잔고(17계약)의 1/5(3계약)을 청산 ------ Int(CurrentContracts*(1/5) - 3차 분할청산; 2차분할청산 후 5분 후에 즉시 보유잔고(14계약)의 1/4(3계약)을 청산 ------ Int(CurrentContracts*(1/4) - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(11계약)의 1/3(3계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(8계약)의 1/2(4계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(4계약)의 1/1(4계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 또는 - 1차 분할청산 조건에 부합하지 않은 경우에, 1차와 2차 및 3차 분할청산을 건너띄고 - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(20계약)의 1/3(6계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(14계약)의 1/2(7계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(7계약)의 1/1(7계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 수고하십시요^^
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-02-20 17:24:32

안녕하세요 예스스탁입니다. var : TM(0),TT(0); TM = TimeToMinutes(stime); If Date == 20140206 Then { IF MarketPosition == 0 and stime < 113000 and CurrentContracts == MaxContracts Then { buy("b1x",AtStop,dayopen*(1+0.25/100),10); } } if MarketPosition == 1 Then{ if CurrentContracts == MaxContracts Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.004 and stime < 110000 Then ExitLong("bx1",AtStop,highest(h,BarsSinceEntry)*0.997,"",Int(CurrentContracts*(1/6)),1); } if CurrentContracts < CurrentContracts and CurrentContracts[1] == MaxContracts Then{ TT = TM; } if CurrentContracts < MaxContracts[1] Then{ if (TM == TT+5 or (TM > TT+5 and TM[1] < TT+5)) and Condition2 == false Then{ ExitLong("bx2",OnClose,def,"",Int(CurrentContracts*(1/5)),1); Condition2 = true; } if (TM == TT+10 or (TM > TT+10 and TM[1] < TT+10)) and Condition3 == false Then{ ExitLong("bx3",OnClose,def,"",Int(CurrentContracts*(1/4)),1); Condition3 = true; } } if (stime == 113000 or (stime > 113000 and stime[1] < 113000)) and Condition4 == false Then{ ExitLong("bx4",OnClose,def,"",Int(CurrentContracts*(1/3)),1); Condition4 = true; } if (stime == 133000 or (stime > 130000 and stime[1] < 130000)) and Condition5 == false Then{ ExitLong("bx5",OnClose,def,"",Int(CurrentContracts*(1/2)),1); Condition5 = true; } if (stime == 143000 or (stime > 143000 and stime[1] < 143000)) and Condition6 == false Then{ ExitLong("bx6"); Condition6 = true; } } if MarketPosition != 1 Then{ Condition2 = false; Condition3 = false; Condition4 = false; Condition5 = false; Condition6 = false; } 2. var : TM(0),TT(0); TM = TimeToMinutes(stime); If Date == 20140206 Then { IF MarketPosition == 0 and stime < 113000 and CurrentContracts == MaxContracts Then { buy("b1x",AtStop,dayopen*(1+0.18/100),10); } } if MarketPosition == 1 Then{ if CurrentContracts == MaxContracts Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.004 and stime < 110000 Then ExitLong("bx1",AtStop,highest(h,BarsSinceEntry)*0.997,"",Int(CurrentContracts*(1/6)),1); } if CurrentContracts < CurrentContracts[1] and CurrentContracts[1] == MaxContracts Then{ TT = TM; } if CurrentContracts < MaxContracts Then{ if (TM == TT+5 or (TM > TT+5 and TM[1] < TT+5)) and Condition2 == false Then{ ExitLong("bx2",OnClose,def,"",Int(CurrentContracts*(1/5)),1); Condition2 = true; } if (TM == TT+10 or (TM > TT+10 and TM[1] < TT+10)) and Condition3 == false Then{ ExitLong("bx3",OnClose,def,"",Int(CurrentContracts*(1/4)),1); Condition3 = true; } } if (stime == 113000 or (stime > 113000 and stime[1] < 113000)) and Condition4 == false Then{ ExitLong("bx4",OnClose,def,"",Int(CurrentContracts*(1/3)),1); Condition4 = true; } if (stime == 133000 or (stime > 130000 and stime[1] < 130000)) and Condition5 == false Then{ ExitLong("bx5",OnClose,def,"",Int(CurrentContracts*(1/2)),1); Condition5 = true; } if (stime == 143000 or (stime > 143000 and stime[1] < 143000)) and Condition6 == false Then{ ExitLong("bx6"); Condition6 = true; } } if MarketPosition != 1 Then{ Condition2 = false; Condition3 = false; Condition4 = false; Condition5 = false; Condition6 = false; } 즐거운 하루되세요 > 행복한가방 님이 쓴 글입니다. > 제목 : 행복; 수식 작성 바랍니다 > 한국의 금융산업 발전을 위해 불철주야 애쓰시는 귀하의 노고를 높이 평가합니다 시스템식 작성 바랍니다 ----------------------------------------------------------------- 수식작성 Q&A 34977 에 대한 답변 < 아래 > 와 관련된 질문입니다 ==================== < 아래 > ============================ If Date == 20140206 Then { IF MarketPosition == 0 and stime < 112000 Then { buy("b1x",AtStop,dayopen*(1+0.25/100),10); } If MarketPosition == 1 and stime < 112000 Then { If MaxContracts == CurrentContracts Then{ if CurrentContracts == 10 Then buy("b2x",AtStop,dayopen*(1+0.50/100),10); } if CurrentContracts == 20 Then ExitLong("el5_4x",AtStop,dayopen*(1+0.25/100),"",10,1); if CurrentContracts == 10 Then ExitLong("el5_5x",AtStop,dayopen,"",10,1); } If MarketPosition == 1 and stime >= 112000 Then { if stime >= 112000 and Condition1 == false Then{ Condition1 = true; ExitLong("b분할1",OnClose,def,"",Int(CurrentContracts*(1/3)),1); } if stime >= 130000 and Condition2 == false Then{ Condition2 = true; ExitLong("b분할2",OnClose,def,"",Int(CurrentContracts*(1/2)),1); } if stime >= 145000 and Condition3 == false Then { Condition3 = true; ExitLong("b분할3"); } } } if MarketPosition != 1 Then{ Condition1 = false; Condition2 = False; Condition3 = false; } =================================================================== << 시스템식 1 >> ================ < 진입 조건> - < 아래 >의 시스템식 중 진입조건식을 그대로 사용합니다 - 대상; 연결선물지수 - 주기; 틱봉(데이트레이딩) If Date == 20140206 Then { IF MarketPosition == 0 and stime < 113000 Then { buy("b1x",AtStop,dayopen*(1+0.25/100),10); } If MarketPosition == 1 and stime < 113000 Then { If MaxContracts == CurrentContracts Then{ if CurrentContracts == 10 Then buy("b2x",AtStop,dayopen*(1+0.50/100),10); } if CurrentContracts == 20 Then ExitLong("el2x",AtStop,dayopen*(1+0.25/100),"",10,1); if CurrentContracts == 10 Then ExitLong("el1x",AtStop,dayopen,"",10,1); } } < 청산 조건> - 1차 분할청산 ; EntryPrice 0.4% 이상 상승한 후 대비고점대비 0.3 % 하락하면 즉시 보유잔고(20계약)의 1/6(3계약)을 청산 ------ Int(CurrentContracts*(1/6) (1차 분할청산은 11시 이전에만 가능하면 1차 분할청산 후에는 진입 금지) - 2차 분할청산; 1차분할청산 후 5분 후에 즉시 보유잔고(17계약)의 1/5(3계약)을 청산 ------ Int(CurrentContracts*(1/5) - 3차 분할청산; 2차분할청산 후 5분 후에 즉시 보유잔고(14계약)의 1/4(3계약)을 청산 ------ Int(CurrentContracts*(1/4) - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(11계약)의 1/3(3계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(8계약)의 1/2(4계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(4계약)의 1/1(4계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 또는 - 1차 분할청산 조건에 부합하지 않은 경우에, 1차와 2차 및 3차 분할청산을 건너띄고 - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(20계약)의 1/3(6계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(14계약)의 1/2(7계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(7계약)의 1/1(7계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 << 시스템식 2 >> ================ < 진입 조건> - < 아래 >의 시스템식 중 진입조건식을 약간 변형합니다 - 대상; 연결선물지수 - 주기; 틱봉(데이트레이딩) If Date == 20140210 Then { IF MarketPosition == 0 and stime < 113000 Then { buy("b1x",AtLimit,dayopen*(1-0.18/100),10); } If MarketPosition == 1 and stime < 113000 Then { If MaxContracts == CurrentContracts Then{ if CurrentContracts == 10 Then buy("b2x",atlimit,dayopen*(1-0.36/100),10); } if CurrentContracts == 20 Then ExitLong("el2x",atlimit,dayopen*(1-0.18/100),"",10,1); if CurrentContracts == 10 Then ExitLong("el1x",atlimit,dayopen,"",10,1); } } < 청산 조건> - 1차 분할청산; EntryPrice 대비 0.36 % 하락하면 즉시 보유잔고(20계약)의 1/6(3계약)을 청산 ------ Int(CurrentContracts*(1/6) (1차 분할청산은 11시 이전에만 가능하면 1차 분할청산 후에는 진입 금지) - 2차 분할청산; 1차분할청산 후 5분 후에 즉시 보유잔고(17계약)의 1/5(3계약)을 청산 ------ Int(CurrentContracts*(1/5) - 3차 분할청산; 2차분할청산 후 5분 후에 즉시 보유잔고(14계약)의 1/4(3계약)을 청산 ------ Int(CurrentContracts*(1/4) - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(11계약)의 1/3(3계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(8계약)의 1/2(4계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(4계약)의 1/1(4계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 또는 - 1차 분할청산 조건에 부합하지 않은 경우에, 1차와 2차 및 3차 분할청산을 건너띄고 - 4차 분할청산; 11시 30분이 되면 즉시 보유잔고(20계약)의 1/3(6계약)을 청산 ------ Int(CurrentContracts*(1/3) - 5차 분할청산; 13시 30분이 되면 즉시 보유잔고(14계약)의 1/2(7계약)을 청산 ------ Int(CurrentContracts*(1/2) - 6차 분할청산; 14시 30분이 되면 즉시 보유잔고(7계약)의 1/1(7계약)을 청산하여 ------ Int(CurrentContracts*(1/1) 잔고를 0으로 합니다 수고하십시요^^