커뮤니티

부탁드립니다.

프로필 이미지
vmfha
2015-06-04 14:26:12
100
글번호 86784
답변완료
하기수식은 예스님이 작설해주신 당일수익포함... 수식입니다. 여기에 추가로 당일손실 80틱이면 시간관계없이 매매종료되게 부탁드립니다. p.s) 혹 , 예를들면 5분,10분에 각각 시스템을 적용하면 당연 각 차트마다 수익100틱, 손실 80틱이 되는거 맞는거죠? - 근데 같은차트에 계약수가 2계약이면 수익 200틱, 손실 160틱이 되는건가요? 왕초보질문입니다. --- 청산은 조건만족시, 진입은 봉완성시로 알고있는데...맞나요? 실제로는 청산도 봉완성시로 되는것 같은데... (하기식은 없지만 한신호당 40틱 익절조건이 들어가 있는데..조건이 만족되어 청산이...한신호는 52틱, 또한번은 27틱 익절이 되어서요..) 혹 시스템 설정에 "봉롼성" 조건에 체크되어 그런지요? "조건만족"시로 하게되면 진입도 조건만족되면 진입되지 않나요?) 혹 다른 방법이나 수식이 있으면 같이 부탁드립니다. input : 당일수익(100);#틱수 var : NP(0),PreNP(0),dayPL(0),Econd(false); NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 200000 or stime < 030000 then{ if crossup(SMIV,SMIS) Then buy(); if CrossDown(SMIV,SMIS) Then sell(); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); } if MarketPosition == -1 Then{ ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10); if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitShort("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl) ); } if stime == 030000 or (stime > 030000 and stime[1] < 030000) Then{ ExitLong(); ExitShort(); } 미리감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-06-04 15:00:11

안녕하세요 예스스탁입니다. 기존식은 1계약 기준으로 작성된 식이었습니다. 수량 감안해서 당일수익은 100틱, 당일손실은 80틱이면 청산하게 작성했습니다. 시스템 트레이딩 설정창의 강제청산에서 청산시점은 강제청산 함수를 이용할때 적용되는 옵션입니다. 아래식과 같이 exitlong이나 exitshort은 일반함수로 해당 옵션의 영향을 받지 않습니다. 모든 청산은 지정한 가격조건을 충족할때 즉시 발동되게 작성되 있습니다. 가격에 갭이 발생하면 지정한 값보다 크게 수익이나 손실이 발생할수 있습니다. input : 당일수익(100);#틱수 input : 당일손실(80);#틱수 var : NP(0),PreNP(0),dayPL(0),Econd(false); NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 200000 or stime < 030000 then{ if crossup(SMIV,SMIS) Then buy(); if CrossDown(SMIV,SMIS) Then sell(); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+(당일수익*PriceScale-daypl)/CurrentContracts); ExitLong("bx2",AtStop,EntryPrice-(당일손실*PriceScale+daypl)/CurrentContracts); } if MarketPosition == -1 Then{ ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10); if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitShort("sx1",AtLimit,EntryPrice-(당일수익*PriceScale-daypl)/CurrentContracts); ExitShort("sx2",AtStop,EntryPrice+(당일손실*PriceScale+daypl)/CurrentContracts); } if stime == 030000 or (stime > 030000 and stime[1] < 030000) Then{ ExitLong(); ExitShort(); } 즐거운 하루되세요 > vmfha 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 하기수식은 예스님이 작설해주신 당일수익포함... 수식입니다. 여기에 추가로 당일손실 80틱이면 시간관계없이 매매종료되게 부탁드립니다. p.s) 혹 , 예를들면 5분,10분에 각각 시스템을 적용하면 당연 각 차트마다 수익100틱, 손실 80틱이 되는거 맞는거죠? - 근데 같은차트에 계약수가 2계약이면 수익 200틱, 손실 160틱이 되는건가요? 왕초보질문입니다. --- 청산은 조건만족시, 진입은 봉완성시로 알고있는데...맞나요? 실제로는 청산도 봉완성시로 되는것 같은데... (하기식은 없지만 한신호당 40틱 익절조건이 들어가 있는데..조건이 만족되어 청산이...한신호는 52틱, 또한번은 27틱 익절이 되어서요..) 혹 시스템 설정에 "봉롼성" 조건에 체크되어 그런지요? "조건만족"시로 하게되면 진입도 조건만족되면 진입되지 않나요?) 혹 다른 방법이나 수식이 있으면 같이 부탁드립니다. input : 당일수익(100);#틱수 var : NP(0),PreNP(0),dayPL(0),Econd(false); NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 200000 or stime < 030000 then{ if crossup(SMIV,SMIS) Then buy(); if CrossDown(SMIV,SMIS) Then sell(); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); } if MarketPosition == -1 Then{ ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10); if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitShort("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl) ); } if stime == 030000 or (stime > 030000 and stime[1] < 030000) Then{ ExitLong(); ExitShort(); } 미리감사드립니다.