커뮤니티
수식문의
2017-04-14 11:30:01
171
글번호 108812
청산 수식 문의 드립니다.
//청산
매수 매도 포지션 시
아래 두조건으로 청산하고 싶습니다.
1. 100틱 상승하면 청산
2. 80틱까지 상승하다 50틱 떨어지면 청산
감사드립니다.
답변 1
예스스탁 예스스탁 답변
2017-04-14 13:57:19
안녕하세요
예스스탁입니다.
if MarketPosition == 1 then{
exitlong("bp",Atlimit,EntryPrice+PriceScale*100);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*80 Then
exitlong("btr",AtStop,highest(h,BarsSinceEntry)-PriceScale*50);
}
if MarketPosition == -1 then{
ExitShort("sp",Atlimit,EntryPrice-PriceScale*100);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*80 Then
ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*50);
}
즐거운 하루되세요
> 바바큰 님이 쓴 글입니다.
> 제목 : 수식문의
> 청산 수식 문의 드립니다.
//청산
매수 매도 포지션 시
아래 두조건으로 청산하고 싶습니다.
1. 100틱 상승하면 청산
2. 80틱까지 상승하다 50틱 떨어지면 청산
감사드립니다.