- 精华
- 0
- 在线时间
- 41 小时
- UID
- 230466
- 积分
- 122
- 帖子
- 72
- 阅读权限
- 40
- 注册时间
- 2016-3-20
- 最后登录
- 2016-6-8
- 精华
- 0
- UID
- 230466
- 积分
- 122
- 帖子
- 72
- 主题
- 13
- 阅读权限
- 40
- 注册时间
- 2016-3-20
- 最后登录
- 2016-6-8
|
If(MarketPosition == 0) // 空仓时
{
If( daymavalue[1]>=1 )
{
hh88=Open+myval32;
Buy(lots,hh88); // 条件满足,首次开仓多 1 手
Commentary("11111111111111:");
}
}
If(MarketPosition == 0 ) // 空仓时
{
If(daymavalue[1]<=-1 )
{
hh88=Open-myval32;
SellShort(lots,hh88); // 条件满足,首次开仓空 1 手
Commentary("22222222222222222222:");
}
}
If(MarketPosition == -1 and daymavalue[1]>=1 ) // 空仓时 多
{
If(LastEntryTime+LastEntryDate+0.01<=Date+T )
{
hh88=Open+myval32;
Buy(lots,hh88); // 条件满足,首次开仓 1 手
Commentary("33333333333333333:");
}Else If (Close[1]>=HighestValue[2] ) // 空仓时 多 Or Close[1]>=LastEntryPrice+hh3*2
{
hh88=Open+myval32;
Buy(lots,hh88); // 条件满足,首次开仓 1 手
Commentary("444444444444444444444:");
}
}
If(MarketPosition == 1 and daymavalue[1]<=-1 ) // 多仓时 空
{
If(LastEntryTime+LastEntryDate+0.01<=Date+T )
{
hh88=Open-myval32;
SellShort(lots,hh88);
Commentary("555555555555555555:");
}Else If (Close[1]<=LowestValue[2]) // 多仓时 空 Or Close[1]<=LastEntryPrice-hh3*2
{
hh88=Open-myval32;
SellShort(lots,hh88);
Commentary("6666666666666666:");
}
}
|
|