If(cross1 && MarketPosition<>1)
{
Buy(1,a1+offSetDots);
}
//If(cross2 && MarketPosition<>-1)
{
SellShort(1,a2-offSetDots);
}
stopLossPoint = stopLossSet * MinMove * PriceScale;
If(MarketPosition == 1)
{
myEntryPrice = AvgEntryPrice;
If(low <= myEntryPrice - stopLossPoint)
{
myExitPrice = myEntryPrice - stopLossPoint;
If(open < myExitPrice) myExitPrice = open;
Sell(0,myExitPrice);//myExitPrice
}
}
else If (MarketPosition == -1)
{
myEntryPrice = AvgEntryPrice;
看不了,代码都不完整,而且格式也乱七八糟的