2013년 6월 22일 토요일

Expansion Pivots

var : BarRange(0),loss(0);

BarRange = H-L;

if MarketPosition() == 0 Then{
 if BarRange == Highest(BarRange,10) and
  crossup(c,ma(c,50)) Then{
  buy("매수",AtStop,H);
 }
 if BarRange == Highest(BarRange,10) and
  CrossDown(c,ma(c,50)) Then{
  Sell("매도",AtStop,L);
 }
}

if MarketPosition() != 0 Then{
 exitlong("매수청산",AtStop,C[BarsSinceEntry()]-PriceScale);
 exitshort("매도청산",atstop,C[BarsSinceEntry()]+PriceScale);
}

댓글 없음:

댓글 쓰기