커뮤니티

수정좀 부탁 드리겠습니다

프로필 이미지
데스나이트
2013-10-13 23:46:30
141
글번호 68397
답변완료
안녕하세요 날씨가 춥네요 감기 조심하세요 청산식 수정좀 부탁 드리겠습니다 . 아래 매수1.(0.550) 매수2. (0.382) 매수3.(0.236) 만약 현재 매수가 1회 그러니 1차매수만 하였더라도 61.80% 보유주식 전량 청산 2차 까지 매수한 상황이라도 61.80% 보유주식 전량 청산 3차 까지 매수한 상황이라면 50%에서 보유수량의 60%청산 분할 청산1회하고 그리고 나머지 보유 수량은 61.8%전량 청산 식 으로 수정 부탁 드립니다 저점 + (고점 -저점) 계산 작도식의 50%자리와 61.8자리 입니다 그러니 매수 자리에서 위 방향이 맞지요? 청산식만 수정 부탁 드리겠습니다 감사합니다 . input : 고점(15900),저점(3850),투자금액(10000000); var : 매수1(0),매수2(0),매수3(0),진입수량1(0),진입수량2(0),진입수량3(0); var : 분할청산수량(0); 매수1 = 저점+(고점-저점)*0.550; 매수2 = 저점+(고점-저점)*0.382; 매수3 = 저점+(고점-저점)*0.236; if CodeCategoryEx == 11 and BasePrice < 50000 Then{ 진입수량1 = int(int((투자금액*0.20)/C)/10)*10; 진입수량2 = int(int((투자금액*0.30)/C)/10)*10; 진입수량3 = int(int((투자금액*0.50)/C)/10)*10; } Else{ 진입수량1 = int((투자금액*0.20)/C); 진입수량2 = int((투자금액*0.30)/C); 진입수량3 = int((투자금액*0.50)/C); } if MarketPosition == 0 and L > 매수1 Then buy("1차매수",AtLimit,매수1,진입수량1); if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if CurrentEntries == 1 then buy("2차매수",AtLimit,매수2,진입수량1); if CurrentEntries == 2 then buy("3차매수",AtLimit,매수3,진입수량1); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ 분할청산수량 = int(int(MaxContracts*0.5)/10)*10; } Else{ 분할청산수량 = int(MaxContracts*0.5); } if CurrentEntries == 1 Then ExitLong("청산1차",Atlimit,고점);//전량청산 if CurrentEntries == 2 Then{ if CurrentContracts == MaxContracts Then ExitLong("청산21",Atlimit,매수1,"",분할청산수량,1); if CurrentContracts < MaxContracts Then ExitLong("청산22",Atlimit,고점); //나머지 전량청산 } if CurrentEntries == 3 Then{ if CurrentContracts == MaxContracts Then ExitLong("청산31",Atlimit,매수2,"",분할청산수량,1); if CurrentContracts < MaxContracts Then ExitLong("청산32",Atlimit,매수1);//나머지 전량청산 } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-10-14 16:16:05

안녕하세요 예스스탁입니다. input : 고점(15900),저점(3850),투자금액(10000000); var : 매수1(0),매수2(0),매수3(0),진입수량1(0),진입수량2(0),진입수량3(0); var : 분할청산수량(0),청산1(0),청산2(0); 매수1 = 저점+(고점-저점)*0.550; 매수2 = 저점+(고점-저점)*0.382; 매수3 = 저점+(고점-저점)*0.236; 청산1 = 저점+(고점-저점)*0.618; 청산2 = 저점+(고점-저점)*0.500; if CodeCategoryEx == 11 and BasePrice < 50000 Then{ 진입수량1 = int(int((투자금액*0.20)/C)/10)*10; 진입수량2 = int(int((투자금액*0.30)/C)/10)*10; 진입수량3 = int(int((투자금액*0.50)/C)/10)*10; } Else{ 진입수량1 = int((투자금액*0.20)/C); 진입수량2 = int((투자금액*0.30)/C); 진입수량3 = int((투자금액*0.50)/C); } if MarketPosition == 0 and L > 매수1 Then buy("1차매수",AtLimit,매수1,진입수량1); if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if CurrentEntries == 1 then buy("2차매수",AtLimit,매수2,진입수량1); if CurrentEntries == 2 then buy("3차매수",AtLimit,매수3,진입수량1); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ 분할청산수량 = int(int(MaxContracts*0.6)/10)*10; } Else{ 분할청산수량 = int(MaxContracts*0.6); } #매수 2회까지는 청산1가격에 도달하면 전량청산 if MaxEntries <= 2 Then ExitLong("청산1",Atlimit,청산1);//전량청산 #매수 3회 후에는 청산2가격에서 60% 청산, 청산1가격에서 나머지 청산 if MaxEntries == 3 Then{ if CurrentContracts == MaxContracts Then ExitLong("청산21",Atlimit,청산2,"",분할청산수량,1); if CurrentContracts < MaxContracts Then ExitLong("청산22",Atlimit,청산1);//나머지 전량청산 } } 즐거운 하루되세요 > 데스나이트 님이 쓴 글입니다. > 제목 : 수정좀 부탁 드리겠습니다 > 안녕하세요 날씨가 춥네요 감기 조심하세요 청산식 수정좀 부탁 드리겠습니다 . 아래 매수1.(0.550) 매수2. (0.382) 매수3.(0.236) 만약 현재 매수가 1회 그러니 1차매수만 하였더라도 61.80% 보유주식 전량 청산 2차 까지 매수한 상황이라도 61.80% 보유주식 전량 청산 3차 까지 매수한 상황이라면 50%에서 보유수량의 60%청산 분할 청산1회하고 그리고 나머지 보유 수량은 61.8%전량 청산 식 으로 수정 부탁 드립니다 저점 + (고점 -저점) 계산 작도식의 50%자리와 61.8자리 입니다 그러니 매수 자리에서 위 방향이 맞지요? 청산식만 수정 부탁 드리겠습니다 감사합니다 . input : 고점(15900),저점(3850),투자금액(10000000); var : 매수1(0),매수2(0),매수3(0),진입수량1(0),진입수량2(0),진입수량3(0); var : 분할청산수량(0); 매수1 = 저점+(고점-저점)*0.550; 매수2 = 저점+(고점-저점)*0.382; 매수3 = 저점+(고점-저점)*0.236; if CodeCategoryEx == 11 and BasePrice < 50000 Then{ 진입수량1 = int(int((투자금액*0.20)/C)/10)*10; 진입수량2 = int(int((투자금액*0.30)/C)/10)*10; 진입수량3 = int(int((투자금액*0.50)/C)/10)*10; } Else{ 진입수량1 = int((투자금액*0.20)/C); 진입수량2 = int((투자금액*0.30)/C); 진입수량3 = int((투자금액*0.50)/C); } if MarketPosition == 0 and L > 매수1 Then buy("1차매수",AtLimit,매수1,진입수량1); if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if CurrentEntries == 1 then buy("2차매수",AtLimit,매수2,진입수량1); if CurrentEntries == 2 then buy("3차매수",AtLimit,매수3,진입수량1); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ 분할청산수량 = int(int(MaxContracts*0.5)/10)*10; } Else{ 분할청산수량 = int(MaxContracts*0.5); } if CurrentEntries == 1 Then ExitLong("청산1차",Atlimit,고점);//전량청산 if CurrentEntries == 2 Then{ if CurrentContracts == MaxContracts Then ExitLong("청산21",Atlimit,매수1,"",분할청산수량,1); if CurrentContracts < MaxContracts Then ExitLong("청산22",Atlimit,고점); //나머지 전량청산 } if CurrentEntries == 3 Then{ if CurrentContracts == MaxContracts Then ExitLong("청산31",Atlimit,매수2,"",분할청산수량,1); if CurrentContracts < MaxContracts Then ExitLong("청산32",Atlimit,매수1);//나머지 전량청산 } }