커뮤니티

수식문의드립니다.

프로필 이미지
태양으로
2016-07-25 18:35:56
162
글번호 100366
답변완료
수식문의드립니다. 첫번째 수식문의 1. 현재가가 (전일종가+1틱) 이면 3계약 매수 손절은 10틱 3계약 , 익절 (1계약 10틱익절, 1계약 20틱익절, 1계약 30틱익절) 2. 익절 1계약 체결되면 손절은 5틱 2계약으로 변경, 익절 2계약 체결되면 손절은 1틱 1계약으로 변경 3. 익절 3계약 체결되면 손절계약은 없애고, 손절 모두체결되면 익절계약 모두 없앱니다. 두번째 수식문의 1. 현재가가 전일종가+1틱 이면 1계약 매수 손절 2틱, 익절 20틱 2. 현재가가 전일종가-1틱이면 1계약 매도 손절 2틱, 익절 20틱 4. 한번이라도 익절이 되면 당일거래 종료 또는 당일 익절합이 10틱이면 당일거래종료 5. 당일 거래시간은 9시 00분 부터 오후 3시까지만 감사합니다. */
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-07-26 13:53:23

안녕하세요 예스스탁입니다. 1 if NextBarSdate != sdate Then buy("b1",AtStop,C+PriceScale*1,3); if NextBarSdate == sdate and H < DayClose(1)+PriceScale*1 Then buy("b",AtStop,DayClose(1)+PriceScale*1,3); if MarketPosition == 1 Then{ ExitLong("BP1",atlimit,EntryPrice+PriceScale*10,"",1,1); ExitLong("BP2",atlimit,EntryPrice+PriceScale*20,"",1,1); ExitLong("BP3",atlimit,EntryPrice+PriceScale*30,"",1,1); if MaxContracts == 3 Then ExitLong("bx3",AtStop,EntryPrice-PriceScale*10); if MaxContracts == 2 Then ExitLong("bx2",AtStop,EntryPrice-PriceScale*5); if MaxContracts == 1 Then ExitLong("bx1",AtStop,EntryPrice-PriceScale*1); } 2 if NextBarSdate != sdate Then{ buy("b1",AtStop,C+PriceScale*1,1); sell("s1",AtStop,C-PriceScale*1,1); } if NextBarSdate == sdate and H < DayClose(1)+PriceScale*1 and MarketPosition <= 0 Then buy("b",AtStop,DayClose(1)+PriceScale*1,1); if NextBarSdate == sdate and L > DayClose(1)-PriceScale*1 and MarketPosition >= 0 Then Sell("s",AtStop,DayClose(1)-PriceScale*1,1); SetStopLoss(PriceScale*2,PointStop); SetStopProfittarget(PriceScale*20,PointStop); 3 매수진입과 매도진입의 가격차이와 손절폭이 같습니다. 매수진입후 2틱 내려가면 전일종가-1틱이므로 따로 손절식을 추가하지 않았습니다. Buy와 Sell은 진입함수로 진입시 반대포지션이 있으면 자동으로 청산하고 진입합니다. var : Xcond(false); if NextBarSdate != sdate Then{ Xcond = false; buy("b1",AtStop,C+PriceScale*1,1); sell("s1",AtStop,C-PriceScale*1,1); } if TotalTrades > TotalTrades[1] and IsExitName("StopProfittarget",1) == true Then Xcond = true; if stime >= 090000 and stime < 150000 and Xcond == false then{ if NextBarSdate == sdate and H < DayClose(1)+PriceScale*1 and MarketPosition <= 0 Then buy("b",AtStop,DayClose(1)+PriceScale*1,1); if NextBarSdate == sdate and L > DayClose(1)-PriceScale*1 and MarketPosition >= 0 Then Sell("s",AtStop,DayClose(1)-PriceScale*1,1); } SetStopProfittarget(PriceScale*20,PointStop); 즐거운 하루되세요 > 태양으로 님이 쓴 글입니다. > 제목 : 수식문의드립니다. > 수식문의드립니다. 첫번째 수식문의 1. 현재가가 (전일종가+1틱) 이면 3계약 매수 손절은 10틱 3계약 , 익절 (1계약 10틱익절, 1계약 20틱익절, 1계약 30틱익절) 2. 익절 1계약 체결되면 손절은 5틱 2계약으로 변경, 익절 2계약 체결되면 손절은 1틱 1계약으로 변경 3. 익절 3계약 체결되면 손절계약은 없애고, 손절 모두체결되면 익절계약 모두 없앱니다. 두번째 수식문의 1. 현재가가 전일종가+1틱 이면 1계약 매수 손절 2틱, 익절 20틱 2. 현재가가 전일종가-1틱이면 1계약 매도 손절 2틱, 익절 20틱 4. 한번이라도 익절이 되면 당일거래 종료 또는 당일 익절합이 10틱이면 당일거래종료 5. 당일 거래시간은 9시 00분 부터 오후 3시까지만 감사합니다. */