커뮤니티
ATR 청산식 변환 부탁드립니다.
2009-02-15 23:28:51
957
글번호 20250
다음 TradeStation ATR 청산식(Big Prifit Stop)을 YT에 적용하려면 어떻게 식을 고치면 될까요? 식을 수정해 주시면 정말 감사하겠습니다.
Parameter: BigProfitATRs(7), ATRLength(10), ExitBarLen(3)
Variables: ATRVal(0), PosHL(0)
ATRVal = AverageTrueRange( ATRLength ) * BigProfitATRs
if BarsSinceEntry(0) = 0 then
PosHL = Close
end if
if MarketPosition = 1 then
if Close > PosHL then
PosHL = Close
end if
if PosHL > EntryPrice(0) + ATRVal then
ExitLong ("ATR BigPoint|n Long Stop") Next Bar at Lowest(Low,ExitBarLen) Stop
end if
end if
if MarketPosition = -1 then
if Close < PosHL then
PosHL = Close
end if
if PosHL < EntryPrice(0) - ATRVal then
ExitShort ("ATR BigPoint|n Short Stop") Next Bar at Highest(High,ExitBarLen) Stop
end if
end if
답변 1
예스스탁 예스스탁 답변
2009-02-16 15:06:34
안녕하세요
예스스탁입니다.
input : BigProfitATRs(7), ATRLength(10), ExitBarLen(3);
Variables: ATRVal(0), PosHL(0);
ATRVal = ATR(ATRLength)*BigProfitATRs;
if BarsSinceEntry(0) == 0 then
PosHL = Close;
if MarketPosition == 1 then{
if Close > PosHL then
PosHL = Close;
if PosHL > EntryPrice(0) + ATRVal then
ExitLong("ATR BigPoint|n Long Stop",AtStop,Lowest(Low,ExitBarLen));
}
if MarketPosition == -1 then{
if Close < PosHL then
PosHL = Close;
if PosHL < EntryPrice(0) - ATRVal then
ExitShort ("ATR BigPoint|n Short Stop",AtStop,Highest(High,ExitBarLen));
}
즐거운 하루되세요
> CJ_coco 님이 쓴 글입니다.
> 제목 : ATR 청산식 변환 부탁드립니다.
> 다음 TradeStation ATR 청산식(Big Prifit Stop)을 YT에 적용하려면 어떻게 식을 고치면 될까요? 식을 수정해 주시면 정말 감사하겠습니다.
Parameter: BigProfitATRs(7), ATRLength(10), ExitBarLen(3)
Variables: ATRVal(0), PosHL(0)
ATRVal = AverageTrueRange( ATRLength ) * BigProfitATRs
if BarsSinceEntry(0) = 0 then
PosHL = Close
end if
if MarketPosition = 1 then
if Close > PosHL then
PosHL = Close
end if
if PosHL > EntryPrice(0) + ATRVal then
ExitLong ("ATR BigPoint|n Long Stop") Next Bar at Lowest(Low,ExitBarLen) Stop
end if
end if
if MarketPosition = -1 then
if Close < PosHL then
PosHL = Close
end if
if PosHL < EntryPrice(0) - ATRVal then
ExitShort ("ATR BigPoint|n Short Stop") Next Bar at Highest(High,ExitBarLen) Stop
end if
end if
다음글