首页 > 编程知识 正文

开拓者tb自带领航交易策略,交易开拓者TB

时间:2023-05-03 06:50:05 阅读:254836 作者:3449

Params
Numeric lots(1);
Numeric fndmn(0);
Numeric length(30);
Vars
NumericSeries lengthday;
//NumericSeries length;
NumericSeries mta;
NumericSeries mtb;
Numeric LRSlope;
Numeric LRAngle;
Numeric LRIntercept;
Numeric LRValue;
Numeric LRSlope1;
Numeric LRAngle1;
Numeric LRIntercept1;
Numeric LRValue1;
NumericSeries MT;
Numeric SMAvalue;
NumericSeries mtOut;
Begin
lengthday=length;//NthCon(Date!=Date[1],1);
//if(Date!=Date[-1] And Date!=CurrentDate) length=lengthday;
LinearReg(Close,length,0,LRSlope, LRAngle, LRIntercept, LRValue);
mta=LRSlope;

LinearReg(mta,length,0,LRSlope1, LRAngle1, LRIntercept1, LRValue1);
mtb=LRSlope1;
mt=mtamtb50;

if(MarketPosition0 And mt[1]>fndmn And mta[1]>0 )
{
Buy(lots,Open);
}
if(MarketPosition0 And mt[1]>fndmn And mta[1]<0 )
{ }
/*
if(MarketPosition!=0 And mt[1]<0)
{
Sell(0,Open);
BuyToCover(0,Open);
}*/
if(MarketPosition1 And mt[1]<0) Sell(0,Open);
if(MarketPosition-1 And mt[1]<0) BuyToCover(0,Open);

End

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。