커뮤니티

수식 문의 드립니다.

프로필 이미지
고운무지개
2015-07-09 10:09:49
107
글번호 88202
답변완료
전일 종가 > 일봉의 5일 이평 시가 매도 전일 종가 < 일봉의 5일 이평 시가 매수 손절, 익절 10틱 전일 손실이면 2배로 진입 손절 10틱 익절 수식은 2가지로 부탁합니다. 전량 익절 10틱 과 계약수의 반은 10틱, 나머지 반은 15틱과 트레일링 8틱 스탑 ---------------- 스토캐스틱 두번째 골드에서 매수 (스토캐스틱 골드 이후 열개의 봉 이내에서 다시 골드가 나오면 매수) 반대의 경우 매도 손절 10틱, 익절 10틱 두 가지 시스템 신호 수식 문의 드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-07-09 11:24:15

안녕하세요 예스스탁입니다. 시초가에 진입하기 위해서는 분봉에서 시간을 지정해 진입해야 합니다. 1-1, 1-2식은 1분봉이나 5분봉에 적용하시면 됩니다. 1-2의 청산의 경우 10틱 수익시 절반, 15틱 수익시 나머지수량 10틱 수익이후 8틱 거꾸로 가면 트레일링스탑이 되게 작성되었습니다. 1-1. input : P(5),기본진입수량(1); var : sum(0),cnt(0),mav(0); sum =0; for cnt = 0 to P-1{ sum = sum + DayClose(cnt); } mav = sum/P; if stime == 151500 Then{ if C > mav Then{ if MarketPosition == 0 Then{ if !(PositionProfit(1) < 0) Then buy("b11",AtMarket,def,기본진입수량); Else buy("b12",AtMarket,def,MaxContracts(1)*2); } if MarketPosition == -1 Then if PositionProfit < 0 Then buy("b21",AtMarket,def,MaxContracts*2); Else buy("b22",AtMarket,def,기본진입수량); } if C < mav Then{ if MarketPosition == 0 Then{ if !(PositionProfit(1) < 0) Then sell("s11",AtMarket,def,기본진입수량); Else sell("s12",AtMarket,def,MaxContracts(1)*2); } if MarketPosition == 1 Then if PositionProfit Then sell("s21",AtMarket,def,MaxContracts*2); Else sell("bs2",AtMarket,def,기본진입수량); } } SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*10,PointStop); 1-2 input : P(5),기본진입수량(1); var : sum(0),cnt(0),mav(0); sum =0; for cnt = 0 to P-1{ sum = sum + DayClose(cnt); } mav = sum/P; if stime == 151500 Then{ if C > mav Then{ if MarketPosition == 0 Then{ if !(PositionProfit(1) < 0) Then buy("b11",AtMarket,def,기본진입수량); Else buy("b12",AtMarket,def,MaxContracts(1)*2); } if MarketPosition == -1 Then if PositionProfit < 0 Then buy("b21",AtMarket,def,MaxContracts*2); Else buy("b22",AtMarket,def,기본진입수량); } if C < mav Then{ if MarketPosition == 0 Then{ if !(PositionProfit(1) < 0) Then sell("s11",AtMarket,def,기본진입수량); Else sell("s12",AtMarket,def,MaxContracts(1)*2); } if MarketPosition == 1 Then if PositionProfit Then sell("s21",AtMarket,def,MaxContracts*2); Else sell("bs2",AtMarket,def,기본진입수량); } } if MarketPosition == 1 Then{ #10틱 수익 if MaxContracts == 1 Then ExitLong("bx11",AtLimit,EntryPrice+PriceScale*10,"",1,1); if MaxContracts >= 2 Then ExitLong("bx12",AtLimit,EntryPrice+PriceScale*10,"",Floor(MaxContracts*0.5),1); #15틱 수익 ExitLong("bx2",AtLimit,EntryPrice+PriceScale*15); #10틱이상 수익후 8틱 감소 if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then ExitLong("bx21",atlimit,highest(H,BarsSinceEntry)-PriceScale*8); } if MarketPosition == -1 Then{ #10틱 수익 if MaxContracts == 1 Then ExitShort("sx11",AtLimit,EntryPrice-PriceScale*10,"",1,1); if MaxContracts >= 2 Then ExitShort("sx12",AtLimit,EntryPrice-PriceScale*10,"",Floor(MaxContracts*0.5),1); #15틱 수익 ExitShort("sx2",AtLimit,EntryPrice-PriceScale*15); #10틱이상 수익후 8틱 감소 if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("sx3",atlimit,Lowest(L,BarsSinceEntry)+PriceScale*8); } SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*10,PointStop); 3. Input : Period1(10), Period2(5),Period3(5); var : Stok(0),StoD(0); StoK = StochasticsK(Period1,Period2); StoD = StochasticsD(Period1,Period2,Period3); if crossup(stok,stod) and countif(crossup(stok,stod),10) >= 2 Then buy(); if CrossDown(stok,stod) and countif(CrossDown(stok,stod),10) >= 2 Then sell(); SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*10,PointStop); 즐거운 하루되세요 > 고운무지개 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다. > 전일 종가 > 일봉의 5일 이평 시가 매도 전일 종가 < 일봉의 5일 이평 시가 매수 손절, 익절 10틱 전일 손실이면 2배로 진입 손절 10틱 익절 수식은 2가지로 부탁합니다. 전량 익절 10틱 과 계약수의 반은 10틱, 나머지 반은 15틱과 트레일링 8틱 스탑 ---------------- 스토캐스틱 두번째 골드에서 매수 (스토캐스틱 골드 이후 열개의 봉 이내에서 다시 골드가 나오면 매수) 반대의 경우 매도 손절 10틱, 익절 10틱 두 가지 시스템 신호 수식 문의 드립니다. 감사합니다.