设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

技术分析:布林带交易系统TS

2015-1-22 14:51:56 http://rumen.southmoney.com 来源:股票入门

  技术分析:布林带交易系统TS。下面南方财富网的小编为你介绍技术分析:布林带交易系统TS。

  input: bollingerlengths(50),liqlength(50),roccalclength(30);

  var: upband(0),dnband(0),liqdays(50),roccalc(0);

  upband = bollingerband(close,bollingerlengths, 1.25);

  dnband = bollingerband(close,bollingerlengths, -1.25);

  rocCalc = Close - Close[rocCalcLength-1];

  if MarketPosition 《》 1 and rocCalc 》 0 then Buy(“BanditBuy”) tomorrow upBand stop;

  if MarketPosition 《》-1 and rocCalc 《 0 then sell(“BanditSell”) tomorrow dnBand stop;

  if(MarketPosition = 0) then liqDays = liqLength;

  if(MarketPosition 《》 0) then begin

  liqDays = liqDays - 1;

  liqDays = MaxList(liqDays,10);

  end;

  if(MarketPosition = 1 and Average(Close,liqDays) 《 upBand) then

  exitlong(“Long Liq”) tomorrow Average(Close,liqDays) stop;

  if(MarketPosition = -1 and Average(Close,liqDays) 》 dnBand) then

  exitshort(“Short Liq”) tomorrow Average(Close,liqDays) stop;

  此交易系统引自“build wining trade system with tradestation”一书

  更多技术分析:布林带交易系统TS的相关信息请关注南方财富网。

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。