예스스탁
예스스탁 답변
2021-09-28 13:37:26
안녕하세요
예스스탁입니다.
if MarketPosition <= 0 and crossup(c,Highest(H,5)[1]) Then
Buy("b",OnClose,DEf,3);
if MarketPosition >= 0 and CrossDown(c,Highest(H,5)[1]) Then
Sell("s",OnClose,DEf,3);
if MarketPosition == 1 Then
{
if Highest(H,BarsSinceEntry) >= EntryPrice+5 Then
ExitLong("btr",AtStop,Highest(H,BarsSinceEntry)-10);
ExitLong("bp1",AtLimit,EntryPrice+30,"",1,1);
ExitLong("bp2",AtLimit,EntryPrice+50,"",1,1);
ExitLong("bl1",AtStop,EntryPrice-10,"",1,1);
ExitLong("bl2",AtStop,EntryPrice-20,"",1,1);
ExitLong("bl3",AtStop,EntryPrice-30,"",1,1);
}
if MarketPosition == -1 Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-5 Then
ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+10);
ExitShort("sp1",AtLimit,EntryPrice-30,"",1,1);
ExitShort("sp2",AtLimit,EntryPrice-50,"",1,1);
ExitShort("sl1",AtStop,EntryPrice+10,"",1,1);
ExitShort("sl2",AtStop,EntryPrice+20,"",1,1);
ExitShort("sl3",AtStop,EntryPrice+30,"",1,1);
}
즐거운 하루되세요
> 매력의도가니 님이 쓴 글입니다.
> 제목 : 수식 문의드립니다.
> 안녕하세요
수식 문의드립니다.
<진입>
5일 최고가(혹은 최저가) 돌파시 3계약 진입
<청산>
1. 1계약 : 5포인트 상승(하락)시부터 트레일링스탑 시작. 최고가 대비 10포인트 하락시 청산
2. 1계약 : 30포인트 상승(하락)시 or 1번기준 충족시 청산
3. 1계약 : 50포인트 상승(하락)시 or 1번기준 충족시 청산
<손절>
1. 1계약 : 진입가 대비 10포인트 하락(상승)시 손절
2. 1계약 : 진입가 대비 20포인트 하락(상승)시 손절
3. 1계약 : 진입가 대비 30포인트 하락(상승)시 손절
부탁드립니다!