커뮤니티
트렝일링 스탑 질문!
2009-08-20 15:47:23
739
글번호 24334
if MarketPosition == 1 and IsEntryName("b") Then{
SetstopTrailing(0.5,PRICESCALE*20,pointstop,0);
}
이거랑
if MarketPosition == 1 and IsEntryName("b") Then{
if highest(H,BarsSinceEntry) >= EntryPrice+(PriceScale*20) Then
exitlong("bnbtr",AtStop,highest(H,BarsSinceEntry)-0.5);
}
같은거 아닌가요??
차이가 나는데 왜그런지 이유를 알고 싶습니다.
답변 1
예스스탁 예스스탁 답변
2009-08-20 17:14:15
안녕하세요
예스스탁입니다.
SetstopTrailing(0.5,PRICESCALE*20,pointstop,0);
은 하나의 봉의 움직임을 모두 감시하여 신호를 발생하게 됩니다.
즉 동일봉에서 상승과 하락조건이 모두 만족하면 신호가 발생할 수 있습니다.
하지만 아래의 식은 고가가 진입가+20틱이상을 기록한 봉 다음봉 부터
신호가 발생하게 됩니다.
if MarketPosition == 1 and IsEntryName("b") Then{
if highest(H,BarsSinceEntry) >= EntryPrice+(PriceScale*20) Then
exitlong("bnbtr",AtStop,highest(H,BarsSinceEntry)-0.5);
}
또한
if MarketPosition == 1 and IsEntryName("b") Then{
SetstopTrailing(0.5,PRICESCALE*20,pointstop,0);
}
라고만 작성하시면 첫 트레일링스탑으로 청산이 나간 이후에는
모둔 진입에 대해 발동하게 됩니다.
if MarketPosition == 1 and IsEntryName("b") Then
SetstopTrailing(0.5,PRICESCALE*20,pointstop,0);
Else
SetstopTrailing(0,0);
위와 같이 진입이 b가 아닐때는 사용을 해제하는 내용이 들어가 주어야 합니다.
즐거운 하루되세요
> 도감서생 님이 쓴 글입니다.
> 제목 : 트렝일링 스탑 질문!
> if MarketPosition == 1 and IsEntryName("b") Then{
SetstopTrailing(0.5,PRICESCALE*20,pointstop,0);
}
이거랑
if MarketPosition == 1 and IsEntryName("b") Then{
if highest(H,BarsSinceEntry) >= EntryPrice+(PriceScale*20) Then
exitlong("bnbtr",AtStop,highest(H,BarsSinceEntry)-0.5);
}
같은거 아닌가요??
차이가 나는데 왜그런지 이유를 알고 싶습니다.
다음글
이전글