커뮤니티

수식 문의

프로필 이미지
회원
2013-12-23 19:29:47
161
글번호 70749
답변완료
안녕하세요 이식에 5프로 수익시 절반매도 하는 식 넣어주세요 input : 지정일(20130802),투입금액(1000000); var : idx(0),vol(0); if CodeCategory == 1 Then{ if BasePrice < 50000 Then vol = int(int(투입금액/C)/10)*10; Else vol = int(투입금액/C); } if CodeCategory == 2 Then vol = int(투입금액/C); var1 = ma(c,5); #5일선 상향돌파이고 양봉이면 다음봉시가 매수 if sdate >= 지정일 Then{ if crossup(c,var1) and (C > O or (H == L)) Then{ buy("b",AtMarket,def,vol); exitlong("bx1",AtStop,L-PriceScale); } if MarketPosition == 1 Then{ ExitLong("bx1.",AtStop,L[BarsSinceEntry+1]-PriceScale); if C >= EntryPrice*1.05 and L <= var1 and C < O Then ExitLong("bx2",AtMarket); } } SetStopProfittarget(100,PercentStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-12-26 09:26:27

안녕하세요 예스스탁입니다. input : 지정일(20130802),투입금액(1000000); var : idx(0),vol(0),xvol(0); if CodeCategory == 1 Then{ if BasePrice < 50000 Then vol = int(int(투입금액/C)/10)*10; Else vol = int(투입금액/C); } if CodeCategory == 2 Then vol = int(투입금액/C); var1 = ma(c,5); #5일선 상향돌파이고 양봉이면 다음봉시가 매수 if sdate >= 지정일 Then{ if MarketPosition == 0 and crossup(c,var1) and (C > O or (H == L)) Then{ buy("b",AtMarket,def,vol); exitlong("bx1",AtStop,L-PriceScale); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then #기준가 5만원 미만 xvol = int(int(MaxContracts*0.5)/10)*10; Else xvol = int(MaxContracts*0.5); ExitLong("bx1.",AtStop,L[BarsSinceEntry+1]-PriceScale); ExitLong("BP",AtStop,EntryPrice*1.05,"",Xvol,1); if C >= EntryPrice*1.05 and L <= var1 and C < O Then ExitLong("bx2",AtMarket); } } SetStopProfittarget(100,PercentStop); 즐거운 하루되세요 > HI_jh***** 님이 쓴 글입니다. > 제목 : 수식 문의 > 안녕하세요 이식에 5프로 수익시 절반매도 하는 식 넣어주세요 input : 지정일(20130802),투입금액(1000000); var : idx(0),vol(0); if CodeCategory == 1 Then{ if BasePrice < 50000 Then vol = int(int(투입금액/C)/10)*10; Else vol = int(투입금액/C); } if CodeCategory == 2 Then vol = int(투입금액/C); var1 = ma(c,5); #5일선 상향돌파이고 양봉이면 다음봉시가 매수 if sdate >= 지정일 Then{ if crossup(c,var1) and (C > O or (H == L)) Then{ buy("b",AtMarket,def,vol); exitlong("bx1",AtStop,L-PriceScale); } if MarketPosition == 1 Then{ ExitLong("bx1.",AtStop,L[BarsSinceEntry+1]-PriceScale); if C >= EntryPrice*1.05 and L <= var1 and C < O Then ExitLong("bx2",AtMarket); } } SetStopProfittarget(100,PercentStop);