指数期货网

GHOST TRADER交易系统

[日期:2007-08-08] 指数期货网http://www.zsqhw.com  来源:  [字体: ]


Building Winning Trading Systems with TradeStation书里的6个交易系统之一的WLD版。
ChartScript Description
This trading system is disclosed in the book "Building Winning Trading Systems with TradeStation," by George Pruitt and John R. Hill. Pruitt and Hill are the principals of Futures Truth, the independent trading system testing company. In that capacity they have seen and forward tested literally thousands of trading systems and have developed informed opinions about what works and what doesn't work in the markets. Their recommendations thus merit consideration.

The strategy of this system is predicated on the thesis that winning trades are more likely to follow losing trades. Therefore, to implement this strategy the system is "ghost" or paper traded in the background and a real trade is entered only after a ghost or real losing trade. The ghost trading accurately simulates the action of Wealth-Lab to the extent that entry and exit conditions are evaluated, market position is maintained, simulated entry and exit prices are calculated, and hypothetical profits determined. However, the ghost system does not enter real trades. That is left to the real system which enters a real trade only following a real or ghost losing trade, logs that trade, and uses it in the determination of back test performance. The authors suggest that this system is mostly a template demonstrating how background ghost trading may be used to develop information for the use and benefit of foreground real trading.

The core trading logic itself is simple enough. Long and short trades are entered stop when the 9-day RSI crosses under/over the 70/30 critical levels preconditioned by the 9-day EMA being outside a channel formed by the 19-day EMA of highs and lows. Positions are closed stop when the EMA penetrates the highest high/lowest low of the past 20 days.

This system was back tested over five years against the WL-100 portfolio. The real system alone gave a RAR=34.7% and 148/425=34.8% winners. Using the ghost system and entering a new real trade only after a losing ghost or real trade yielded a RAR=20.7% and 144/426=33.8% winners thus calling the losing trade hypothesis into question. Alternatively, using the ghost system and entering a new trade only after a winning ghost or real trade resulted in a RAR=76.6% and 103/316=32.6% winners. It therefore appears, at least for this core logic, watchlist, and backtest period, that when you're hot you're hot!
q


WealthScript Code
Below is the WealthScript code for this ChartScript.

 

var Bar,paneRSI,myPosition :integer;
var myEntryPrice,myExitPrice,myProfit :float;
HideVolume;
myPosition:= 0;
myProfit:= -1;

for Bar:= 21 to BarCount-1 do
begin

{--------------------Ghost System--------------------}
{Simulate system, offset by one bar, in every respect to determine if last trade was loss}

if myPosition = 0 then
begin
if EMA(Bar-1,#Close,9) > EMA(Bar-1,#High,19) then
if CrossUnderValue(Bar-1,RSISeries(#Close,9),70) then
if PriceHigh(Bar) > PriceHigh(Bar-1) then
begin
myEntryPrice:= Max(PriceOpen(Bar),PriceHigh(Bar-1));
myPosition:= +1;
end;

if EMA(Bar-1,#Close,9) < EMA(Bar-1,#Low,19) then
if CrossOverValue(Bar-1,RSISeries(#Close,9),30) then
if PriceLow(Bar) < PriceLow(Bar-1) then
begin
myEntryPrice:= Min(PriceOpen(Bar),PriceLow(Bar-1));
myPosition:= -1;
end;
end;

if ((myPosition = +1) and (PriceLow(Bar) < Lowest(Bar-1,#Low,20))) then
begin
myExitPrice:= Min(Lowest(Bar-1,#Low,20),PriceOpen(Bar));
myProfit:= myExitPrice - myEntryPrice;
myPosition:= 0;
end;

if ((myPosition = -1) and (PriceHigh(Bar) > Highest(Bar-1,#High,20))) then
begin
myExitPrice:= Max(Highest(Bar-1,#High,20),PriceOpen(Bar));
myProfit:= myEntryPrice - myExitPrice;
myPosition:= 0;
end;

{-------------------Real System--------------------}
{Real trades are entered only if the last ghost or real trade resulted in a loss, i.e. myProfit < 0}
{myProfit:= -1;}

if ((MarketPosition = 0) and (myProfit < 0)) then
begin
if EMA(Bar,#Close,9) > EMA(Bar,#High,19) then
if CrossUnderValue(Bar,RSISeries(#Close,9),70) then
BuyAtStop(Bar+1,PriceHigh(Bar),'');
if EMA(Bar,#Close,9) < EMA(Bar,#Low,19) then
if CrossOverValue(Bar,RSISeries(#Close,9),30) then
ShortAtStop(Bar+1,PriceLow(Bar),'');
end;

if MarketPosition = +1 then
SellAtStop(Bar+1,Lowest(Bar,#Low,20),LastPosition,'');
if MarketPosition = -1 then
CoverAtStop(Bar+1,Highest(Bar,#High,20),LastPosition,'');
end;

{----------Plotting----------}
DrawLabel('GHOST TRADER',0);
DrawLabel('19-day EMA(hi/lo): dotted lines',0);
DrawLabel('9-day EMA(close): solid line',0);
PlotSeries(EMASeries(#High,19),0,#Blue,#Dotted);
PlotSeries(EMASeries(#low,19),0,#Blue,#Dotted);
PlotSeries(EMASeries(#Close,9),0,#Blue,#Thin);

共2页: 上一页 1 [2] 下一页

看完这篇新闻有何感觉

[推荐] [返回顶部] [打印本页] [关闭窗口]
  
Alimama提供的广告
黑马乐园
   机构推荐个股 建议逢低关注
   今日选股思路 后市可积极关注
   机构群英会强烈推荐的个股名单(8.25)
   高手过招 后市有望继续上攻
   本周股评家最看好的个股名单
   实力机构周末荐股精选名单(8.23)
   机构强力推荐28只中线成长股(8.23)
   湖南海利:长阳包阴 值得期待
市场传闻
   澳洋顺昌:中期净利增八成
   SST幸福:股改方案实施
   中国太保;中期净利润同比增长44.2%
   青岛海尔:每股收益同比增长45.91%
   太平洋证券:上半年巨亏4.47亿
   股期大涨 奥运过后时间表有眉目?
   美股上涨拉动 恒指涨347点或1.70%
   权重股护盘 沪指已翻红
博客热图
水立方 水立方 鸟巢 鸟巢
热门影音
期货基础 期货基础 期货基础 期货基础

 





|
|




 
 
 
焦点新闻
热点新闻      
·证监会第一时间兑现“救市”承诺
·会诊小摩报告:救市方案或更大
·证监会出组合拳救市 股市影响几何
·五大利好传天下 求证结果难乐观
·央行数据作证:热钱外流 放松信贷
·[中港台] 新疆库车暴力袭击事件系恐怖分子所为-国
·四大迹象预示市场底政策利好救市
·九大机构预测今日大盘走势
·央行"前所未有"重视稳定
·今日股票期货内参0821
·取消石油补贴势在必行
·传保监会敦促保险公司减持A股
图片新闻
国际油价创4年来最大单日跌幅 奥运后行情会怎么走?
印度三处入手改造贫富差距 奥运会后怎么保持黄金时代
生活补贴随物价涨跌 机构预测下周反弹空间不大
阿里妈妈提供的广告
网站地图 | RSS订阅 | 高级搜索 | 收藏本站 | 法律声明 | 联系我们

本站所有文章、数据仅供参考,使用前务请仔细阅读,风险自负
Copyright © 2007 指数期货网 All Right Reserved
Email:cnzsqhw@gmail.com 闽ICP备07016904号   QQ在线客服
中国网通提供宽带支持