커뮤니티
스틉트레일링
2013-04-22 10:38:58
204
글번호 62310
1.5% 이익일때는 진입가의 +0.5일때 청산하고
그 미만일때는 0.7포인트 이익이면 0.7 포인트 하락하면 청산 하는 식
가능할까요
답변 1
예스스탁 예스스탁 답변
2013-04-22 18:13:58
안녕하세요
예스스탁입니다.
1.5% 이익이면 진입가 대비 0.5수익일때 청산
1.5% 이상 이익이 아니면 진입가에 돌아오면 청산하는 식입니다.
if MarketPosition == 1 Then{
if highest(H,BarsSinceEntry) >= EntryPrice*1.015 Then
exitlong("bx1",AtStop,EntryPrice+0.5);
Else
ExitLong("bx2",AtStop,EntryPrice);
}
if MarketPosition == -1 Then{
if lowest(L,BarsSinceEntry) <= EntryPrice*0.985 Then
ExitShort("sx1",AtStop,EntryPrice-0.5);
Else
ExitShort("sx2",AtStop,EntryPrice);
}
1.5이상 수익이 나지 않고 0.7포인트 이상 수익이면
아래식 이용하시면 됩니다.
if MarketPosition == 1 Then{
if highest(H,BarsSinceEntry) >= EntryPrice*1.015 Then
exitlong("bx1",AtStop,EntryPrice+0.5);
Else{
if highest(H,BarsSinceEntry) >= EntryPrice+0.7 Then
ExitLong("bx2",AtStop,EntryPrice);
}
}
if MarketPosition == -1 Then{
if lowest(L,BarsSinceEntry) <= EntryPrice*0.985 Then
ExitShort("sx1",AtStop,EntryPrice-0.5);
Else{
if Lowest(L,BarsSinceEntry) <= EntryPrice-0.7 Then
ExitShort("sx2",AtStop,EntryPrice);
}
}
즐거운 하루되세요
> 구다이전설 님이 쓴 글입니다.
> 제목 : 스틉트레일링
> 1.5% 이익일때는 진입가의 +0.5일때 청산하고
그 미만일때는 0.7포인트 이익이면 0.7 포인트 하락하면 청산 하는 식
가능할까요
이전글