// 过滤集合竞价和小节休息
If((BarType==0||BarType==4||BarType==5) And CurrentTime > 0.205855 And CurrentTime < 0.210005) Return;
If((BarType==0||BarType==4||BarType==5) And CurrentTime > 0.085555 And CurrentTime < 0.090005) Return;
If(Time == 0.2100 And CurrentTime < 0.210005) Return;
If(Time == 0.0900 And CurrentTime < 0.090005) Return;
If(Time == 0.1030 And CurrentTime < 0.103005) Return;
If((Time == 0.1300 Or Time == 0.1330) And CurrentTime < 0.133005) Return;
// 初次进场
If(!bLongStoped And MarketPosition == 0 And High >= UpperBand)
{
Buy(Lots,Max(Open,UpperBand));
bLongStoped = false;
Commentary("初次进场");
}
// 再次进场
If(bLongStoped And MarketPosition == 0 And High >= UpperBand And High >= HigherAfterEntry)
{
Buy(Lots,Max(Open,Max(UpperBand,HigherAfterEntry)));
bLongStoped = false;
Commentary("再次进场");
}