搜索内容

【期货开户】最低交易所手续费+1分钱,保证金可+0%广告
【外盘外汇开户】正规英国大国监管,行情稳定低点差广告

MT4 dual thrust系统原形源码[MT4公式]

外汇 0 202
生成海报
TOM2020
TOM2020 2021-09-13 07:34
阅读需:0

//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 Begin

HH = Highest(High,Mday);

HC = Highest(Close,Mday);

LL = Lowest(Low,Mday);

LC = Lowest(Close,Mday);

If (HH - LC) >= (HC - LL) Then Begin

SellRange = HH - LC;

End Else Begin

SellRange = 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 Begin

BuyRange = HH - LC;

End Else Begin

BuyRange = HC - LL;

End;

BuyTrig = K1*BuyRange;

SellTrig = K2*SellRange;

If MarketPosition = 0 Then Begin

Buy at Open of next bar + BuyTrig Stop;

Sell at Open of next bar - SellTrig Stop;

End;

If MarketPosition = -1 Then Begin

Buy at Open of next bar + Buytrig Stop;

End;

If MarketPosition = 1 Then Begin

Sell at Open of next bar - SellTrig Stop;

End;

End;


文章转自:外汇邦





免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,读者仅作参考,并自行核实相关内容。如有冒犯原创,可以提供相关证明联系本站进行删除处理

评论
  • 消灭零回复
广告合作方 广告申请

最新评论