打印本文打印本文 关闭窗口关闭窗口

AR&BR的EasyLanguage语法代码分享

作者:未知 来源:本站原创 发布时间:2016年03月31日

TradeStation语法分享(2)—AR&BR

 

input:n(26),up_AR(1.5),up_BR(3),down_AR(0.5),down_BR(0.5);
variable:AR_value1(0),AR_value2(0),BR_value1(0),BR_value2(0),AR(0),BR(0);
AR_value1 = summation(high - open , n);
AR_value2 = summation(open - low , n);
BR_value1 = summation(high - close[1] , n);
BR_value2 = summation(close[1] - low , n);
AR = AR_value1 / AR_value2;
BR = BR_value1 / BR_value2;
if AR > up_AR and BR > up_BR then
sell next bar at market;
if AR < down_AR and BR < down_BR then
exitshort next bar at market;

if AR > up_AR and BR > up_BR then
exitlong next bar at market;
//WWW.CXH99.COM
if AR < down_AR and BR < down_BR then
buy next bar at market;

打印本文打印本文 关闭窗口关闭窗口