con 为什么 会一直显示为1
2023-05-18 11:19
Vars
//此处添加变量
Series<Numeric> con;
OnInit()
{
con=0;
}
OnBar(ArrayRef<Integer> indexs)
{
if (longshort[1]> 50+boLength1 and MarketPosition == 0)
{
SellShort(0,open);
con = 1;
}
Commentary(\"con指标:\"+text(con) );
}
为什么以上代码在运行时 并没有满足建仓条件 CON指标就显示为1
而变成下面这样 就会显示为0
Vars
//此处添加变量
Series<Numeric> con;
OnInit()
{
con=0;
}
OnBar(ArrayRef<Integer> indexs)
{
if (longshort[1]> 50+boLength1 and MarketPosition == 0)
{
SellShort(0,open);
//con = 1;
}
Commentary(\"con指标:\"+text(con) );
}
评论区
查看全部