2016年9月27日 星期二

【MultiCharts】【訊號】站上均線買進,跌破布林通道賣出

input:len1(61),s1(0.025),aa(11),bb(2.575);

value1=BollingerBand(close,aa,bb);
value2=BollingerBand(close,aa,-bb);

if close cross over Average(close,len1) then
 buy next bar at market;
if close cross under Average(close,len1) then
 sellshort next bar at market;

 if marketposition> 0 then 
  sell next bar at entryprice*(1-s1) stop;
 if marketposition<0 then
  buytocover next bar at entryprice*(1+s1) stop;
 

 if marketposition> 0 and close cross under value1 then 
  sell next bar at entryprice*(1-s1) stop;
 if marketposition<0 and close cross over value2 then
  buytocover next bar at entryprice*(1+s1) stop;
 

沒有留言:

張貼留言