您需要 登录 才可以下载或查看,没有帐号?注册
//dual thrust系统原形源码
Inputs: K1(.5),K2(.5),Mday(1),Nday(1);Vars: BuyRange(0), SellRange(0);Vars: BuyTrig(0),SellTrig(0);Vars: HH(0),LL(0),HC(0),LC(0);If CurrentBar 1 Then BeginHH = Highest(High,Mday);HC = Highest(Close,Mday);LL = Lowest(Low,Mday);LC = Lowest(Close,Mday);If (HH - LC) = (HC - LL) Then BeginSellRange = HH - LC;End Else BeginSellRange = HC - LL;End;HH = Highest(High,Nday);HC = Highest(Close,Nday);LL = Lowest(Low,Nday);LC = Lowest(Close,Nday);If (HH - LC) = (HC - LL) Then BeginBuyRange = HH - LC;End Else BeginBuyRange = HC - LL;End;BuyTrig = K1*BuyRange;SellTrig = K2*SellRange;If MarketPosition = 0 Then BeginBuy at Open of next bar + BuyTrig Stop;Sell at Open of next bar - SellTrig Stop;End;If MarketPosition = -1 Then BeginBuy at Open of next bar + Buytrig Stop;End;If MarketPosition = 1 Then BeginSell at Open of next bar - SellTrig Stop;End;End;
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!