Vortex 指標出場條件
本帖最後由 lantis 於 13-9-14 09:22 編輯有人有使用過這指標嗎?有人看得出出場條件是如何下的?
如果用 原始碼 SetDollarTrailing( TR * StopFactor ) 條件做回測, 結果幾乎進出都是同一根棒, 不像附圖大多是好幾根棒之後才出場
http://www.traders.com/Documentation/FEEDbk_docs/2010/01/TradersTips.html#TT1
很抱歉, 原圖就是這麼小
http://www.traders.com/Documentation/FEEDbk_docs/2010/01/IMAGES/TTFig1.gif
inputs:
Length( 14 ),
StopFactor( 2 ) ; { number of true ranges }
variables:
VMPlus( 0 ),
VMMinus( 0 ),
VMPlusSum( 0 ),
VMMinusSum( 0 ),
TR( 0 ),
TRSum( 0 ),
VIPlusSumRge( 0 ),
VIMinusSumRge( 0 ),
SignalTradeNum( 0 ),
BuySignal( false ),
ShortSignal( false ),
StopPrice( 0 ) ;
VMPlus = AbsValue( High - Low ) ;
VMMinus = AbsValue( Low - High ) ;
VMPlusSum = Summation( VMPlus, Length ) ;
VMMinusSum = Summation( VMMinus, Length ) ;
TR = TrueRange ;
TRSum = Summation( TR, Length ) ;
if TRSum <> 0then
begin
VIPlusSumRge = VMPlusSum / TRSum ;
VIMinusSumRge = VMMinusSum / TRSum ;
end ;
if VIPlusSumRge crosses over VIMinusSumRge then
begin
SignalTradeNum = TotalTrades ;
BuySignal = true ;
ShortSignal = false ;
StopPrice = High ;
end
else if VIPlusSumRge crosses under VIMinusSumRge then
begin
SignalTradeNum = TotalTrades ;
BuySignal = false ;
ShortSignal = true ;
StopPrice = Low ;
end ;
if BuySignal and TotalTrades = SignalTradeNum and
MarketPosition <> 1 then
Buy next bar StopPrice stop ;
if ShortSignal and TotalTrades = SignalTradeNum and
MarketPosition <> -1 then
SellShort next bar at StopPrice stop ;
SetStopShare ;
SetDollarTrailing( TR * StopFactor ) ;
分別用1分.2分.3分粗略看過.進出頻率過大.也會漏失最主要的大波段. set指令的問題...
把最後一行拿掉....會有不一樣的結果..
謝謝
不過看起來怎麼改都沒有好的績效
頁:
[1]