大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

您現在的位置:程序化交易>> 程序化交易>> 系統交易>>正文內容

Super Cobmo超級組合當沖交易系統[系統交易]

Super Cobmo超級組合當沖交易系統


今天想要報告的是Building Winning Trading Systems with TradeStation裡面的最后一個交易系統。名稱叫做Super Combo Day Trading Strategy,中文我翻譯成超級組合當沖交易系統。

 

 

這個系統的內容就像他的名字一樣,把相當多的觀念和技術組合起來,以致于讓這個系統太複雜,跟我認為交易系統應該要越簡單越好的觀念稍有出入。所以我就不仔細介紹這個當沖系統的觀念,只把他的程式碼分享出來。如果有人想試用這個系統的話,記得要在chart 裡面insert兩個symbol, 分別是這個商品的5min的線圖,和1日的線圖。因為這個系統會用到data2(也就是日線)的資料。我自己是簡單測試過臺指期的資料了,看來績效很爛,所以怕麻煩的人可以不用試了。

 

以下是EASYLANUAGE 語言

 

 

 

{Super Combo by George Pruitt

This intraday trading system will illustrate the multiple data handling

capabilities of TradeStation. All pertinent buy and sell calculations will be

based on daily bars and actual trades will be executed on 5-min bars. I have

made most of the parameters input variables.}

 

Inputs:waitPeriodMins(30),initTradesEndTime(1430),liqRevEndTime(1200),

thrustPrcnt1(0.30),thrustPrcnt2(0.60),breakOutPrcnt(0.25),

failedBreakOutPrcnt(0.25),protStopPrcnt1(0.25),protStopPrcnt2(0.15),

protStopAmt(3.00),breakEvenPrcnt(0.50),avgRngLength(10),avgOCLength(10);

Variables:averageRange(0),averageOCRange(0),canTrade(0),buyEasierDay(FALSE),

sellEasierDay(FALSE),buyBOPoint(0),sellBOPoint(0),longBreakPt(0),

shortBreakPt(0),longFBOPoint(0),shortFBOPoint(0),barCount(0),

intraHigh(0),intraLow(999999),buysToday(0),sellsToday(0),

currTrdType(0),longLiqPoint(0),shortLiqPoint(0),yesterdayOCRRange(0),

intraTradeHigh(0),intraTradeLow(999999);

{Just like we did in the pseudocode—let's start out with the daily bar

calculations. If Date <> Date[1]—first bar of day}

if(Date <> Date[1]) then {save time by doing these calculations once per day}

begin

averageRange = Average(Range,10) of Data2; {Data 2 points to daily bars}

yesterdayOCRRange = AbsValue(Open of Data2-Close of Data2);

averageOCRange = Average(AbsValue(Open of Data2-Close of Data2),10);

canTrade = 0;

if(yesterdayOCRRange< 0.85*averageOCRange) then canTrade = 1;

buyEasierDay = FALSE;

sellEasierDay = FALSE;

{See how we refer to Data2 - the daily data}

if(Close of Data2 <= Close[1] of Data2) then buyEasierDay = TRUE;

if(Close of Data2 > Close[1] of Data2) then sellEasierDay = TRUE;

if(buyEasierDay) then

begin

buyBOPoint = Open of data1 + thrustPrcnt1*averageRange;

sellBOPoint = Open of data1 - thrustPrcnt2*averageRange;

 

 

 

end;

if(sellEasierDay) then

begin

sellBOPoint = Open of data1 - thrustPrcnt1*averageRange;

buyBOPoint = Open of data1 + thrustPrcnt2*averageRange;

end;

longBreakPt = High of Data2 + breakOutPrcnt*averageRange;

shortBreakPt = Low of Data2 - breakOutPrcnt*averageRange;

shortFBOPoint = High of Data2 - failedBreakOutPrcnt*averageRange;

longFBOPoint = Low of Data2 + failedBreakOutPrcnt*averageRange;

{Go ahead and initialize any variables that we may need later on in the day}

barCount = 0;

intraHigh = 0;intraLow = 999999; {Didn't know you could do this}

buysToday = 0;sellsToday = 0;{You can put multiple statements on one

line}

currTrdType = 0;

end; {End of the first bar of data}

{Now let's trade and manage on 5-min bars}

if(High > intraHigh) then intraHigh = High;

if(Low < intraLow ) then intraLow = Low;

barCount = barCount + 1; {count the number of bars of intraday data}

if(barCount > waitPeriodMins/BarInterval and canTrade = 1) then

{have we waited long enough—wait PeriodMin is an input variable and

BarInterval is set by TradeStation. Wait PeriodMins = 30 and BarInterval = 5,

so 30/5 = 6}

begin

if(MarketPosition = 0) then

begin

intraTradeHigh = 0;

intraTradeLow = 999999;

end;

if(MarketPosition = 1) then

begin

intraTradeHigh = MaxList(intraTradeHigh,High);

buysToday = 1;

end;

if(MarketPosition =-1) then

begin

intraTradeLow = MinList(intraTradeLow,Low);

sellsToday = 1;

end;

if(buysToday = 0 and Time < initTradesEndTime) then

Buy("LBreakOut") next bar at buyBOPoint stop;

if(sellsToday = 0 and Time < initTradesEndTime) then

 

 

 

SellShort("SBreakout") next bar at sellBOPoint stop;

if(intraHigh > longBreakPt and sellsToday = 0 and Time <

initTradesEndTime) then

SellShort("SfailedBO") next bar at shortFBOPoint stop;

if(intraLow < shortBreakPt and buysToday = 0 and Time <

initTradesEndTime) then

Buy("BfailedBO") next bar at longFBOPoint stop;

{The next module keeps track of positions and places protective stops}

if(MarketPosition = 1) then

begin

longLiqPoint = EntryPrice - protStopPrcnt1*averageRange;

longLiqPoint = MinList(longLiqPoint,EntryPrice - protStopAmt);

if(MarketPosition(1) = -1 and BarsSinceEntry = 1 and

High[1] >= shortLiqPoint and shortLiqPoint < shortFBOPoint)

then

currTrdType = -2; {we just got long from a short liq reversal}

if(currTrdType = -2) then

begin

longLiqPoint = EntryPrice - protStopPrcnt2*averageRange;

longLiqPoint = MinList(longLiqPoint,EntryPrice -

protStopAmt);

end;{ www.weiqiv.net.cn }

if(intraTradeHigh >= EntryPrice + breakEvenPrcnt*averageRange)

then

longLiqPoint = EntryPrice; {BreakEven trade}

if(Time >= initTradesEndTime) then

longLiqPoint = MaxList(longLiqPoint,Lowest(Low,3)); {Trailing

stop}

if(Time < liqRevEndTime and sellsToday = 0 and

longLiqPoint <> EntryPrice and BarsSinceEntry >= 4) then

begin

SellShort("LongLiqRev") next bar at longLiqPoint stop;

end

else begin

Sell("LongLiq") next bar at longLiqPoint stop;

end;

end;

if(MarketPosition =-1) then

begin

shortLiqPoint = EntryPrice+protStopPrcnt1*averageRange;

shortLiqPoint = MaxList(shortLiqPoint,EntryPrice + protStopAmt);

if(MarketPosition(1) = 1 and BarsSinceEntry(0) = 1 and

Low [1] <= longLiqPoint and longLiqPoint > longFBOPoint) then

currTrdType = +2; {we just got long from a short liq reversal}

if(currTrdType = +2) then

begin

shortLiqPoint = EntryPrice + protStopPrcnt2*averageRange;

shortLiqPoint = MaxList(shortLiqPoint,EntryPrice + protStopAmt);

end;

 

 

 

if(intraTradeLow <= EntryPrice - breakEvenPrcnt*averageRange) then

shortLiqPoint = EntryPrice; {BreakEven trade}

if(Time >= initTradesEndTime) then

shortLiqPoint = MinList(shortLiqPoint,Highest(High,3));

{Trailing stop}

if(Time < liqRevEndTime and buysToday = 0 and

shortLiqPoint <> EntryPrice and BarsSinceEntry >= 4) then

begin

Buy("ShortLiqRev") next bar at shortLiqPoint stop;

end

else begin

BuyToCover("ShortLiq") next bar at shortLiqPoint stop;

end;

end;

end;

SetExitOnClose;

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 511411198   點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 国产亚洲欧美在在线人成 | 欧美网站色 | 韩国19禁青草福利视频在线 | 在线观看亚洲 | 日韩免费在线视频观看 | 亚洲综合精品成人 | 欧美一级α片毛片免费观看 | 99视频在线观看视频一区 | 青青青青青国产费线在线观看 | 欧美色欧美亚洲高清在线视频 | 久久精品国产大片免费观看 | 一级h片| 国内精品久久久久久麻豆 | 99精品国产福利在线观看 | 伊色综合久久之综合久久 | 亚洲网在线观看 | 亚洲伊人色一综合网 | 日日干天天草 | 麻豆狠色伊人亚洲综合网站 | 久久久99精品久久久久久 | 四虎影视1515hh四虎免费 | 国产精品66| 欧美日韩免费在线观看 | 久久精品视频一区二区三区 | 午夜欧美精品久久久久久久 | 老司机观看精品一区二区 | 亚洲日本香蕉视频 | 国产麻豆精品在线 | 伊人快播 | 热久久只有精品 | 老司机一级毛片 | 国产精品欧美日韩一区二区 | 欧美一级片网 | 韩日一区二区三区 | 日日射天天干 | 亚洲国产韩国一区二区 | 国产伦精品一区二区三区无广告 | 成人精品视频一区二区三区 | 伊人伊人网| 黄色影院在线观看视频 | 中文欧美一级强 |