커뮤니티
청산
2009-03-26 11:51:02
759
글번호 21208
안녕하세요
if MarketPosition == 1 Then
setstopprofittarget(100, PercentStop);
를 진입수량이3일때 목표율100.150.200%처럼 각각청산 할수 있으면 부탁 합니다
답변 1
예스스탁 예스스탁 답변
2009-03-26 17:38:28
안녕하세요
예스스탁입니다.
input : 목표율1(100),목표율2(150),목표율3(200);
if MarketPosition == 1 Then{
if CurrentContracts == 3 Then
ExitLong("BX1",Atlimit,EntryPrice*(1+목표율1/100),"",1,1);
if CurrentContracts == 2 Then
ExitLong("BX2",Atlimit,EntryPrice*(1+목표율2/100),"",1,1);
if CurrentContracts == 1 Then
ExitLong("BX3",Atlimit,EntryPrice*(1+목표율3/100),"",1,1);
}
if MarketPosition == -1 Then{
if CurrentContracts == 3 Then
ExitShort("SX1",Atlimit,EntryPrice*(1-목표율1/100),"",1,1);
if CurrentContracts == 2 Then
ExitShort("SX2",Atlimit,EntryPrice*(1-목표율2/100),"",1,1);
if CurrentContracts == 1 Then
ExitShort("SX3",Atlimit,EntryPrice*(1-목표율3/100),"",1,1);
}
즐거운 하루되세요
> 이광복 님이 쓴 글입니다.
> 제목 : 청산
> 안녕하세요
if MarketPosition == 1 Then
setstopprofittarget(100, PercentStop);
를 진입수량이3일때 목표율100.150.200%처럼 각각청산 할수 있으면 부탁 합니다