- 精华
- 0
- 在线时间
- 28 小时
- UID
- 167458
- 积分
- 24
- 帖子
- 16
- 阅读权限
- 10
- 注册时间
- 2012-3-1
- 最后登录
- 2016-9-22
- 精华
- 0
- UID
- 167458
- 积分
- 24
- 帖子
- 16
- 主题
- 8
- 阅读权限
- 10
- 注册时间
- 2012-3-1
- 最后登录
- 2016-9-22
|
If(MarketPosition==1&&BarsSinceEntry>0 ) // 有多仓的情况
{
If(HighestAfterEntry[1] >= EntryPrice * (1+Stop_win/100)) //Stop_win=6
{
If(Low <= HighestAfterEntry[1] *(1-LOSS1/100) )//LOSS1=2
{
MyExitPrice = HighestAfterEntry[1] *(1-LOSS1/100) ;
If(Open < MyExitPrice)
MyExitPrice = Open; //
Sell(0,MyExitPrice-MinPoint);
bLongStoped1=True;
myHighestAfterEntry=HighestAfterEntry[1];
Commentary("多仓跟踪止盈");
}
}
}
//
Commentary("之=="+text(HighestAfterEntry[1] *(1-LOSS1/100)-MinPoint));
if(MarketPosition==-1&&BarsSinceEntry>0 ) // 有空仓的情况
{
If(LowestAfterEntry[1] <= EntryPrice * (1-Stop_win/100) ) //
{
If(High >= LowestAfterEntry[1]*(1+LOSS1/100) )//
{
MyExitPrice = LowestAfterEntry[1]*(1+LOSS1/100);
If(Open > MyExitPrice)
MyExitPrice = Open;
BuyToCover(0,MyExitPrice+MinPoint);
bShortStoped1=True;
myLowestAfterEntry=LowestAfterEntry[1];
Commentary("空仓跟踪止盈");
}
}
} |
|