커뮤니티

수식 요청드립니다.

프로필 이미지
트레이더365
2025-12-07 23:16:28
65
글번호 228750
답변완료

안녕하세요. 



1. 피라미딩으로 매수 또는 매도 포지션에 진입한다고 하였을때,

누적된 계약이 2계약이고 2계약 모두 수익권일시 1계약만 청산되도록 하는 수식을 부탁드립니다.


2. 피라미딩으로 매수 또는 매도 포지션에 진입한다고 하였을때,

누적된 계약이 2계약이고 2계약 중 1계약 또는 2계약 모두가 100 pt 이상 수익시 1계약만 청산되도록 하는 수식을 부탁드립니다.


감사합니다.

시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-09 13:27:10

안녕하세요 예스스탁입니다. 1 if MarketPosition == 1 Then { if CurrentContracts == 2 Then ExitLong("bx",AtLimit,AvgEntryPrice+PriceScale*1,"",1,1); } if MarketPosition == -1 Then { if CurrentContracts == 2 Then ExitShort("sx",AtLimit,AvgEntryPrice-PriceScale*1,"",1,1); } 2 Array : EP[20](0); if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then EP[MaxEntries] = LatestEntryPrice(0); if CurrentContracts == 2 Then { ExitLong("bx1",AtLimit,EP[1]+100,"",1,1); ExitLong("bx2",AtLimit,EP[2]+100,"",1,1); } } if MarketPosition == -1 Then { if CurrentContracts > CurrentContracts[1] Then EP[MaxEntries] = LatestEntryPrice(0); if CurrentContracts == 2 Then { ExitShort("sx1",AtLimit,EP[1]-100,"",1,1); ExitShort("sx2",AtLimit,EP[2]-100,"",1,1); } } 즐거운 하루되세요