逻辑混乱?代码哪里出错了呢
    OnBar(ArrayRef<Integer> indexs)
    {
        print("-----------");
        for i = 0 to GetArraySize(mysymbol)-1
        {   


            data[i].condition2=CurrentBarIndex-timerecord1[i]>coolDownPeriod;

            if (data[i].condition2)
            {
                temp0=1;
            }
            Else
            {
                temp0=0;
            }

            if (data[i].condition2);
            {
                //print(DateTimeToString(date + time)+data[i].SymbolName+text(data[i].close));
                timerecord1[i]=CurrentBarIndex;
                print("好运来");
                print("data[i].condition2:"+text(temp0));
            }
            
        }
        
        
    }

这是怎么回事呢?运行机制我有理解的偏差吗?

我前面订阅了100个股票,明明条件语句condition2是false,怎么if条件下面的代码还是执行了呢?

求解答!请技术老师帮帮忙^_^

这个代码哪错了?
哪里错了
不知道哪里错了?
哪里错了啊?
到底哪里错了!!
看看哪里错了,全都选中
这段代码哪里逻辑不对吗?哪位老师帮忙看看
为什么没有开仓记录,是哪里出错了吗
套利策略指标中,显示错误,代码问题在哪里了呢?
Log出来的那容去哪里看呢?
    OnBar(ArrayRef<Integer> indexs)
    {
        print("-----------");
        for i = 0 to GetArraySize(mysymbol)-1
        {   
            

            data[i].condition2=CurrentBarIndex-timerecord1[i]>coolDownPeriod;

            if (data[i].condition2)
            {
                temp0=1;
                if (data[i].condition2);
                {
                    timerecord1[i]=CurrentBarIndex;
                    print("好运来");
                    print("data[i].condition2:"+text(temp0));
                }
            }
            Else
            {
                temp0=0;
            }

            if (data[i].condition2);
            {
                timerecord1[i]=CurrentBarIndex;
                print("逻辑错误");
                print("data[i].condition2:"+text(temp0));
            }

            
        }
        
        
    }

这样写,会有如下输出:

同一个data[i].condition2,顺序执行,前面为false后面为ture?

 if (data[i].condition2);

好像这里多了个分号,是这个原因吗

加了分号的意思就是该分支结构结束了,控制不了后面大括号的语句了

           if (data[i].condition2)

           {

               temp0=1;

               if (data[i].condition2);

               {

                   timerecord1[i]=CurrentBarIndex;

                   print("好运来");

                   print("data[i].condition2:"+text(temp0));

               }

           }

           Else

           {

               temp0=0;

           }

我这样写,就没有输出,怎么回事?都是condition2?

if这一行后面加了分号,这一行等于白写