大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人
打印本文
關閉窗口
哎呦
作者:開拓者 TB 來源:cxh99.com 發布時間:2014年12月05日
咨詢內容:
本帖最后由 haoliangbohai 于 2014-11-28 16:04 編輯
關于oops交易系統,就是跳空回調后買入。 勝率挺高的,優化后能到60%以上,盈利能力也可以。就是交易次數有點少。就算在《完美的日內交易商2》書中給出的例子,82年4月到98年交易SP500也才177次。可以做為策略池中的一個。針對一日的缺口的代碼:
Params
Numeric gapsize(2); //缺口大小
Numeric breaksize(3); //突破大小
Numeric stoploss(10); //止損
Numeric takeprofit(20); //止盈
Vars
Bool isgap;
Bool temp;
Numeric enterprice;
NumericSeries HighestAfterEntry(0);
NumericSeries LowestAfterEntry(0);
Begin
isgap = OpenD(0)>HighD(1)+gapsize; //高開
temp = Low<HighD(1)-breaksize; //跌破前日最高價
enterprice = HighD(1)-breaksize-2;
If(isgap And temp And MarketPosition==0)
{
SellShort(1,enterprice);
LowestAfterEntry=Low;
}
isgap = OpenD(0)<LowD(1)-gapsize; //低開
temp = High>LowD(1)+breaksize; //漲破前日最低價
enterprice = LowD(1)+breaksize+2;
If(isgap And temp And MarketPosition==0)
{
Buy(1,enterprice);
HighestAfterEntry=High;
}
/*止損止盈部分*/
If (MarketPosition!=0 And BarsSinceEntry!=0)
{
If(MarketPosition==-1)
{
LowestAfterEntry = Min(LowestAfterEntry,Low);
If(High>EntryPrice And LowestAfterEntry>EntryPrice-takeprofit)
{
BuyToCover(1,EntryPrice-takeprofit); //空單止盈
LowestAfterEntry=0;
} Else If(High>EntryPrice+stoploss) //空單止損
{
BuyToCover(1,EntryPrice+stoploss);
LowestAfterEntry=0;
}
}
If(MarketPosition==1)
{
HighestAfterEntry = Max(HighestAfterEntry,High);
If(Low<EntryPrice And HighestAfterEntry>EntryPrice+takeprofit)
{
Sell(1,EntryPrice+takeprofit); //多單止盈
LowestAfterEntry=0;
} Else If(Low<EntryPrice-stoploss)
{
Sell(1,EntryPrice-stoploss); //多單止損
LowestAfterEntry=0;
}
}
If((Date[-1]!=InvalidInteger && Date!=Date[-1])||(Date[-1]==InvalidInteger && Date < CurrentDate)) //當日平倉
{
Sell(1,Close);
BuyToCover(1,Close);
}
}
End
TB技術人員:
謝謝!先頂后看
TB客服:
這個系統很有名,謝謝分享
網友回復:
開盤區間突破交易系統
發現這個很好用啊,開始還挺鄙視這種交易系統,認為太簡單了,看過 拉里.威廉斯的《短線交易秘訣》后感覺還挺好用的。比上一個好用多了。如果能夠把日趨勢考慮進去,做到日間的,收益率感覺還能上去。看的比較粗糙,分別用前一日開盤和收盤的差,以及最高和最低差表示波幅回測了下,發現用最高價最低價的差乘以0.25為區間效果不錯。感覺以這個為基礎可以實盤模擬啊。
Params
Numeric perc(0.1);
Numeric stoploss(10); //止損
Numeric takeprofit(20); //止盈
Vars
Bool con1; //開多條件
Bool con2; //開空條件
Numeric enterprice;
NumericSeries HighestAfterEntry(0);
NumericSeries LowestAfterEntry(0);
Begin
con1 = high > OpenD(0) + perc*Abs(HighD(1)-LowD(1)); //先用開盤收盤表示前一日波幅
con2 = Low < OpenD(0) - perc*Abs(HighD(1)-LowD(1));
If(MarketPosition==0 And con1)
{
Buy(1,OpenD(0) + perc*Abs(OpenD(1)-CloseD(1)));
HighestAfterEntry=High;
}
If(MarketPosition==0 And con2)
{
SellShort(1,OpenD(0) - perc*Abs(OpenD(1)-CloseD(1)));
LowestAfterEntry=Low;
}
/*止損止盈部分*/
If (MarketPosition!=0 And BarsSinceEntry!=0)
{
If(MarketPosition==-1)
{
LowestAfterEntry = Min(LowestAfterEntry,Low);
If(High>EntryPrice And LowestAfterEntry>EntryPrice-takeprofit)
{
BuyToCover(1,EntryPrice-takeprofit); //空單止盈
LowestAfterEntry=0;
} Else If(High>EntryPrice+stoploss) //空單止損
{
BuyToCover(1,EntryPrice+stoploss);
LowestAfterEntry=0;
}
}
If(MarketPosition==1)
{
HighestAfterEntry = Max(HighestAfterEntry,High);
If(Low<EntryPrice And HighestAfterEntry>EntryPrice+takeprofit)
{
Sell(1,EntryPrice+takeprofit); //多單止盈
LowestAfterEntry=0;
} Else If(Low<EntryPrice-stoploss)
{
Sell(1,EntryPrice-stoploss); //多單止損
LowestAfterEntry=0;
}
}
If((Date[-1]!=InvalidInteger && Date!=Date[-1])||(Date[-1]==InvalidInteger && Date < CurrentDate)) //當日平倉
{
Sell(1,Close);
BuyToCover(1,Close);
}
}
End
復制代碼
PS:止損止盈從第一個粘貼過來的
網友回復:
本帖最后由 趨勢跟蹤 于 2014-11-22 08:02 編輯
四樓的源碼雖然有點問題,但源碼一定要頂!
打印本文
關閉窗口
主站蜘蛛池模板:
亚洲天天更新
|
奇米影视资源
|
午夜按摩
|
深夜影院在线观看
|
永久黄网站色视频免费观看99
|
在线观看亚洲精品国产
|
亚洲视频在线a视频
|
欧美在线观看高清一二三区
|
成人老司机深夜福利久久
|
99热成人精品免费久久
|
久久精品国产免费
|
日本午夜色
|
欧美日韩性猛交xxxxx免费看
|
久久精品国产亚洲欧美
|
奇米影视小说
|
天天干夜夜爽天天操夜夜爽视频
|
亚洲国产精品成人午夜在线观看
|
高清中文字幕免费观在线
|
国产伦精品一区二区免费
|
色综合a怡红院怡红院首页 色综合h
|
四虎永久网址影院
|
草草草在线视频
|
国产成人精品日本亚洲麻豆
|
一级特级aaaa毛片免费观看
|
久久七国产精品
|
免费观看精品视频999
|
www.黄色在线
|
欧美88
|
一级a毛片免费观看久久精品
|
中文一区
|
久久精品店
|
欧洲黄色网
|
国产性一交一乱一伦一色一情
|
久久夜夜操
|
美日韩毛片
|
中文字幕亚洲综合
|
亚洲综合中文
|
久久高清
|
日本免费中文字幕在线看
|
一级片免费在线
|
91精品国产高清91久久久久久
|