커뮤니티

부탁드립니다.

프로필 이미지
라떼처럼
2019-07-29 09:39:02
249
글번호 130719
답변완료
손절 청산식 하나만 더 추가 부탁드립니다. input: 손절틱(100) 매수 개수가 5개 이상이고 진입된 전체 손익이 손절틱 이상이면 매수 전체 손절 매도 개수가 5개 이상이고 진입된 전체 손익이 손절틱 이상이면 매도 전체 손절 var : ll(0),hh(0); if index == 0 Then buy(); if index == 100 Then buy(); if index == 200 Then buy(); if index == 300 Then buy(); if index == 400 Then buy(); if MarketPosition == -1 then { if CurrentContracts > CurrentContracts[1] Then { hh = h; ll = L; } if h > hh Then hh = h; if l < ll Then ll = l; if ll <= AvgEntryPrice-(PriceScale*500)/CurrentContracts Then ExitShort("sp2",AtStop,LL+(AvgEntryPrice-LL)*0.01); //매도 진입 수가 5개 이상이고 전체 수익이 +100틱 이상이었다가 다시 0이 되면 청산 if CurrentContracts >= 5 and MaxPositionProfit >= PriceScale*100 Then ExitShort("sl2",AtStop,AvgEntryPrice); } if MarketPosition == 1 then { if CurrentContracts > CurrentContracts[1] Then { hh = h; ll = l; } if h > hh Then hh = h; if l < ll Then ll = l; #if hh >= AvgEntryPrice+(PriceScale*500)/CurrentContracts Then # ExitLong("bp2",AtStop,hh-(hh-AvgEntryPrice)*0.01); //매수 진입 수가 5개 이상이고 전체 수익이 +100틱 이상이었다가 다시 0이 되면 청산 if CurrentContracts >= 5 and MaxPositionProfit >= PriceScale*100 Then ExitLong("bl2",AtStop,AvgEntryPrice); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-07-29 15:52:35

안녕하세요 예스스탁입니다. input: 손절틱(100); var : ll(0),hh(0); if index == 0 Then buy(); if index == 100 Then buy(); if index == 200 Then buy(); if index == 300 Then buy(); if index == 400 Then buy(); if MarketPosition == -1 then { if CurrentContracts > CurrentContracts[1] Then { hh = h; ll = L; } if h > hh Then hh = h; if l < ll Then ll = l; if ll <= AvgEntryPrice-(PriceScale*500)/CurrentContracts Then ExitShort("sp2",AtStop,LL+(AvgEntryPrice-LL)*0.01); //매도 진입 수가 5개 이상이고 전체 수익이 +100틱 이상이었다가 다시 0이 되면 청산 if CurrentContracts >= 5 and MaxPositionProfit >= PriceScale*100 Then ExitShort("sl2",AtStop,AvgEntryPrice); if CurrentContracts >= 5 Then ExitShort("sl3",AtStop,AvgEntryPrice-PriceScale*손절틱); } if MarketPosition == 1 then { if CurrentContracts > CurrentContracts[1] Then { hh = h; ll = l; } if h > hh Then hh = h; if l < ll Then ll = l; #if hh >= AvgEntryPrice+(PriceScale*500)/CurrentContracts Then # ExitLong("bp2",AtStop,hh-(hh-AvgEntryPrice)*0.01); //매수 진입 수가 5개 이상이고 전체 수익이 +100틱 이상이었다가 다시 0이 되면 청산 if CurrentContracts >= 5 and MaxPositionProfit >= PriceScale*100 Then ExitLong("bl2",AtStop,AvgEntryPrice); if CurrentContracts >= 5 Then ExitLong("bl3",AtStop,AvgEntryPrice+PriceScale*손절틱); } 즐거운 하루되세요 > 라떼처럼 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 손절 청산식 하나만 더 추가 부탁드립니다. input: 손절틱(100) 매수 개수가 5개 이상이고 진입된 전체 손익이 손절틱 이상이면 매수 전체 손절 매도 개수가 5개 이상이고 진입된 전체 손익이 손절틱 이상이면 매도 전체 손절 var : ll(0),hh(0); if index == 0 Then buy(); if index == 100 Then buy(); if index == 200 Then buy(); if index == 300 Then buy(); if index == 400 Then buy(); if MarketPosition == -1 then { if CurrentContracts > CurrentContracts[1] Then { hh = h; ll = L; } if h > hh Then hh = h; if l < ll Then ll = l; if ll <= AvgEntryPrice-(PriceScale*500)/CurrentContracts Then ExitShort("sp2",AtStop,LL+(AvgEntryPrice-LL)*0.01); //매도 진입 수가 5개 이상이고 전체 수익이 +100틱 이상이었다가 다시 0이 되면 청산 if CurrentContracts >= 5 and MaxPositionProfit >= PriceScale*100 Then ExitShort("sl2",AtStop,AvgEntryPrice); } if MarketPosition == 1 then { if CurrentContracts > CurrentContracts[1] Then { hh = h; ll = l; } if h > hh Then hh = h; if l < ll Then ll = l; #if hh >= AvgEntryPrice+(PriceScale*500)/CurrentContracts Then # ExitLong("bp2",AtStop,hh-(hh-AvgEntryPrice)*0.01); //매수 진입 수가 5개 이상이고 전체 수익이 +100틱 이상이었다가 다시 0이 되면 청산 if CurrentContracts >= 5 and MaxPositionProfit >= PriceScale*100 Then ExitLong("bl2",AtStop,AvgEntryPrice); }