At the entrance there are two candles A B. Candle B is transformed into C, according to the following table:
ABC 0 0 1 0 1 0 1 0 0 1 1 1 Based on the values of two candles A and B, the value of candle C is written to the new database. Moreover, the time of candles is timeA> timeB and timeC == timeB. In MQL, it will be C = ~ (A ^ B).