大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频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 編輯
四樓的源碼雖然有點問題,但源碼一定要頂!
打印本文
關閉窗口
主站蜘蛛池模板:
久久黄色免费视频
|
在线播放国产精品
|
亚洲国产精品综合福利专区
|
久久精品亚洲牛牛影视
|
成人国产免费
|
久久免费视频播放
|
亚洲午夜网
|
尹人香蕉网
|
亚洲精品国产经典一区二区
|
亚洲成人在线观看视频
|
久久免费精品高清麻豆
|
中文字幕在线观看
|
91精品视频在线播放
|
亚洲精品6久久久久中文字幕
|
久久久久这里只有精品
|
久久亚洲国产精品一区二区
|
国产成人99精品免费视频麻豆
|
免费观看成人久久网免费观看
|
非常色的视频
|
91宅男
|
手机看片99
|
天天干天天操天天
|
深夜视频在线免费
|
www.亚洲成人.com
|
久久日本精品国产精品白
|
999在线观看视频
|
免费在线中文字幕
|
久久综合久久鬼色
|
站长推荐国产精品视频
|
91中文字幕在线观看
|
99在线精品视频
|
91青青青青青爽在线
|
久久咪咪
|
色综合色狠狠天天综合色hd
|
国产精品国内免费一区二区三区
|
99热在线看
|
日本免费的一级绿象
|
日日干天天草
|
国内精品久久久久久不卡影院
|
国产精品午夜高清在线观看
|
夜夜操com
|