大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人
打印本文
關(guān)閉窗口
哎呦
作者:開拓者 TB 來源:cxh99.com 發(fā)布時(shí)間:2014年12月05日
咨詢內(nèi)容:
本帖最后由 haoliangbohai 于 2014-11-28 16:04 編輯
關(guān)于oops交易系統(tǒng),就是跳空回調(diào)后買入。 勝率挺高的,優(yōu)化后能到60%以上,盈利能力也可以。就是交易次數(shù)有點(diǎn)少。就算在《完美的日內(nèi)交易商2》書中給出的例子,82年4月到98年交易SP500也才177次。可以做為策略池中的一個(gè)。針對(duì)一日的缺口的代碼:
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; //跌破前日最高價(jià)
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; //漲破前日最低價(jià)
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)) //當(dāng)日平倉
{
Sell(1,Close);
BuyToCover(1,Close);
}
}
End
TB技術(shù)人員:
謝謝!先頂后看
TB客服:
這個(gè)系統(tǒng)很有名,謝謝分享
網(wǎng)友回復(fù):
開盤區(qū)間突破交易系統(tǒng)
發(fā)現(xiàn)這個(gè)很好用啊,開始還挺鄙視這種交易系統(tǒng),認(rèn)為太簡(jiǎn)單了,看過 拉里.威廉斯的《短線交易秘訣》后感覺還挺好用的。比上一個(gè)好用多了。如果能夠把日趨勢(shì)考慮進(jìn)去,做到日間的,收益率感覺還能上去。看的比較粗糙,分別用前一日開盤和收盤的差,以及最高和最低差表示波幅回測(cè)了下,發(fā)現(xiàn)用最高價(jià)最低價(jià)的差乘以0.25為區(qū)間效果不錯(cuò)。感覺以這個(gè)為基礎(chǔ)可以實(shí)盤模擬啊。
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)) //當(dāng)日平倉
{
Sell(1,Close);
BuyToCover(1,Close);
}
}
End
復(fù)制代碼
PS:止損止盈從第一個(gè)粘貼過來的
網(wǎng)友回復(fù):
本帖最后由 趨勢(shì)跟蹤 于 2014-11-22 08:02 編輯
四樓的源碼雖然有點(diǎn)問題,但源碼一定要頂!
打印本文
關(guān)閉窗口
主站蜘蛛池模板:
日本一级毛片免费播放
|
狠狠操亚洲
|
日韩成人精品视频
|
国产成人免费a在线资源
|
久久精品资源
|
婷婷亚洲五月色综合
|
天天操天天草
|
日日干日日射
|
国产精品99久久久久久夜夜嗨
|
久久精品一区二区三区中文字幕
|
baoyu777永久免费视频
|
国产精品二区高清在线
|
成人亚洲精品一区二区
|
在线视频不卡国产在线视频不卡
|
国产精品视频不卡
|
精品福利在线视频
|
久久精品国产曰本波多野结衣
|
亚洲欧美成人在线
|
久久福利免费视频
|
亚洲一区二区三区四
|
伊人久久精品亚洲精品一区
|
国产精品大片天天看片
|
精品一区 二区三区免费毛片
|
中国产一级毛片
|
91视频网页
|
精品视频免费
|
国产免费播放一区二区
|
加勒比色综合
|
高清一区二区亚洲欧美日韩
|
亚洲 欧美 日韩 在线
|
亚洲七七久久精品中文国产
|
亚洲综合视频在线
|
成人一级片在线观看
|
国产综合影院
|
欧美高清精品
|
久久青草91线频免费观看
|
中文字幕国产在线观看
|
国产成人综合久久亚洲精品
|
国内自拍 在线播放 网红
|
久久久亚洲欧洲日产国码二区
|
国产福利影院
|