多周期条件下为什么以下tb语言代码开仓后持续90分钟亏损50个点都无法触发止损呢?后续所有止损无一触发 请老师给点指导 以下代码回测中多个品种出现明显满足所有止损条件的情况下连续60分钟亏损逾50多个点都无法触发任何止损
If(MarketPosition == -1 && BarsSinceEntry >= 1) // 有空仓且至少持有一根完整K线
{
// ---------- 1. 更新最大浮盈(序列变量)----------
//MaxProfits = Max(PositionProfit, MaxProfits[1]);
// ---------- 2. 止损逻辑 ----------
If((ma5_1m[2] > ma5_1m[3] and ma5_1m[1] > ma5_1m[2]) or macdDiff_5m_pre>macdDea_5m_pre)
{
my_sexist_price = Close;
BuyToCover(0, Close);
Commentary("空仓均线/MACD5止损");
Commentary("my_sexist_price:" + Text(my_sexist_price));
MaxProfits = 0;
}
Else If(H > my_sentry_price + 10 * MinPoint) //&& difxs
{
my_sexist_price = Close;
BuyToCover(0, Close);
Commentary("1档亏损10点空仓止损");
Commentary("my_sexist_price:" + Text(my_sexist_price));
MaxProfits = 0;
}
Else If(H >= my_sentry_price + 20 * MinPoint)
{
my_sexist_price = Close;
BuyToCover(0, Close);
Commentary("2档亏损20点空仓止损");
Commentary("my_sexist_price:" + Text(my_sexist_price));
MaxProfits = 0;
}