1001001000110011000111100101111101001000111010100111011101001111011101000001011111010001001000001001101100101100101000001100111110100001100010101011110101100011011011110111010101000000111101000101010000101101011011101100111110101111110001101100011110110110111111101100100011101000100011010100100010100001000010011001101110110101100001101110010101001110001111010011111101111000100110101010111100000000 1100111110101001111000110010001000110001111000010100000010011000011101111101110100010110010100000100000100001111110110000001010100111101000011110000110101000001110001011110111100101011010100101010110001001100110011100010111011100100000001011110111000110011100011100000010011101111001010101011101010010011001010011011110110000110010111110111111110111011101110100011011001011111011110110111111101100101 1100011010101010101001110111001100101011010011111001111001111110100000000101110001000101111100100111101111001001110101101111000000101100000010101000100110100001010011101111110011010101101111010011110101100000111110100011101111100100000110110001110100101010000010000100101011011011011100011100110101001000010101011111000100011111010001100001001001001011110010000111011010011110011111001110110000001101 1000011110011100000101001110000110010111101111010101011010110001001000001100110000001001010010111101100110101011011100010110100001101111110100110101101000111001010001011010101100011100111111101011101111010101100111001110101010001111111100000110111001111011001101011111111110001011101000101100101010101111110011001010011101110010101101110101011100110101100101001101111101001011100111001001001001001111 1111101110001101001110010101111010100110000100111001001101000100001110000111010100101010111000101110000101100111000111001111000010100011010111001110001100100100110010100010101010000011111010101011100010111100000010001010001001100000000111000010011101110000000101100000101011100010110000010000010111001101110000000001111011111010001001110000110101001100111111111101001001010100111111100110000000000110 0110111000001000100001001001000111001110110001111001010100111110000011001110110010110001011000111111001010101110000011100011101001011000000110111101001111001001011011101111001111101011111001000110111000000010011101101010111110010000100100111101110000100110011101000000000111011111110111011110000011011010011001101000000110100011111010000101011010011100110100100101111001100011000101111110001110000010 0001000111001001101011101100110100000101011111001010000100001101001011111011000001011010100100010010100101011010100010110000110100000000000110110010111011111110001001010000011011000101000001111010100001101111101001010010011011001101101011100000101000110111000011000000010000000000000101000001000100110001110011000000001010001101110001100010100010010111100111010000001110011011111111010011101010001010 0100101000000010110101111001011011001010010110101000010111010110111101000101000111101011001100111010000101101101000100101001101101110001101011000101000100111111111111001010011111011111111101100010100101111101100101111000111111110101110110110101011011010101011010000010001110111110010111010111101001101100101101011011011111000111111010010010100001001101010001111111001000001001111110001101000001110000 0010001111100000100110110101010101001110100101101111000000101101100100001100011111011011101001100000110101100110110001010010111010011011000111101000100100000010100011100101000010110010111110001001100110011110110011011110010101110100010100000011000000001001011010101111110110111110101010100001011010110110010001010000100001100110001011111001110100001101110010010101100101010111001000111111110011100000 0000111110000000110010001101011000010001101100000000011101010011100010101000000011010011101011011101011001100110110011100101110101100100100100110000101010101001100011101001101001111110101101100000100111010100001001011101010100001101010011101011100001100000001001010101111100000101101101001011001100111101111011101100011101001110010011111001010111101101010000110011000101011011000100000101110001100000 1100010111001100001101000010100111110000010100000111010010101101111110011110010110101110010001010010010111000111000011001000000001011001001000011010001001110110110011011100101011000001000011100101111110111111100111001000000011011000100101101100110101001110110011111100100000101001101110101010110100100110010101011101101000011111001111010111000000000111000011111110010000100111110110111110010000111110 1001111101110010110011111011100011000010011101101001110010000101100100111100000001100000010111010100010110101111000001000101011100010110001100001010001001000011100101000000110011001111011100100111011011110010111010101011011011010111011110000011010101000000010000101111000111111011110001000100111001111111001001110101111110000000101110100101000111100011010010100011100101101001111001111010100111111110 0110110101110000111101011000110101010110100110111000000000100110001100000111110100100100010100100011111011001010101100111101101011000110001110101100100010110100011011110100111010001100100011000101010000010110101100111111001100100111011100110010101111011001010101001110001000111001101101000101100011010101011110001100010101100010111110110101010110000000100100101011111000011000000110001000110011100000 1011110001100110000100111011011100001001111001110011110011100111011111101100000011001011001000000010010111000001010011001001000001110101111111110110010000000101010011011000111000011100000111101000011011101111001000001011100110110100111011011000110001010000000100111001001110011010001110011101001011100011110011000101101011000011100000110001111001101011111011111111101010110010100000110110111101111111 1111011010010100000001001101011111111101111000011100110001001100000111000001101100000100101100110011100101111111110100111010000100110101111111111111001100100101100010011001010101100111101110110101011010100101111011111110100001000000111010001010011010011000101011111010101011101111100000100010010010010111010000101100001000111011011100011010011100010110000101000111111100010101010010111000110111110000 1110111111110111110001100011000100000101101111000100111111001000111011111011001001100010101011011010100001001101001101001100100110110010000111100110100001100000000011011000101101111011101101000011111100110001001100000011100010100111000010000000100100111111110001110101010100010001010101011111101111011011111100100111110001101000110111101011010000011101101101010000000101111110100101010000110000001111 0101101110110101110100000101100001110101101010100010001000000011111100000011110010011000011101101111011101000100101010111000001001110100010001011001110101001110111111110111110101001110110001011101001111000101101101000001010001001111001010111011001000111011111001110100011100111010100101011001000101100111011110110101111111100110010001110011101110110010100100100101110010100111110000000110100110010001 1001101101101110100111100000101111011111001100111100100010001001011000111011101010011011111101011111110110000111000110000101101111101011111000101110010010010100111001011010000100100000101000111110000011000000000000110011011001010010011010111111011101001101011101100001010101101101101000111011110011110110110111010001100111000001001111010110011011011011101011000011010111101001010001100101001000000011 1100111001000100110001000001000101100100000001110010011110001001111011011111000110011101001000001101101010110101100001101111100110110111010100111101110011111101011000101100101101011101000001100110111110001010010110001110000101000011101011110100101110110111011110010110100100111000111010110101100101011010110111110111011010100000011001011100100101011010110000010011111010001110110001111011010111101100 1000000101111111011010110011011100101111101000101110000000001101110000001000111000111011111010000010111101101110001101010010111111001101010010111011001001010011101100001011100011000010100001011100111101111101001011001000010010010001110110000000010001101010110001100101000111011111101001001101000110011101101100110100110101101001011111110000001001100001110110111001111101011110110101110110110010011001 0000001100011011001011010100001111010011110011110000110111101001001101011100011110101011110010111010011111110101101010011100101011000011101011111111110101100110100001001001010011101110000011111110101010100010010101000010101001010100010000111101001100001101110100010000000111110111110111001001010101000011011100000010000001111110010010101010101111111010011011000111101111010100101110111110101101001001 0111001111111111001100111010001010011011011110100001000010010010110000011001100111000000100000111100001000011110011010001011000010110111100101001101100110011000100101100011110111110101010111011010100010000100101111000000011001110110010101110010111000000100100001010101100110011001110000010010000101111110010111110000100001000011111000011101110111011110001010100010001100111100010111101000001001001111 0011101001011011100100000000101010110001000110001100111111101110111100000000010101011101111111000000001101011111001001001111111001111110011001111111010101000110100100000101110111000001101100100011111100110001111111111110001001001111000101101110111000010010001010111000011001010110011110001111010100000001101010001100110011010001010100000001111011011010011100001010010100100111010001111010101100000100 0001000110001010011000111011001001000001000111000010000101011110111111000110111110011011010010101000110010110100011110111101011100110000011001101010010101011101010111010010010011011110000000010000100100001101011111100011100000100001011101100011001010000011001001101001010000000000111111000110011000101101011001110101000111011110001101110010101110111101011000011111001110101001111110111100000111010001 0000000101011010011001111010111101111101010111110111110000010011110111111000100101100001010011100111011011110101010100111001011110100010110101101001000101110000111101100111110100100111110110100110000100000111010000001100000001010001000101010111111100110010101111000110110100100100100001010010011101100110110011110011001000101010010000011011001100111110010101010100011000110111101010011100100111001111 1111011111111101100110011110001011100101111011001010101111010000101101101010110010011001100101001111101111111010110100001111111110110011011111101111000110111110110100100000001011101011110110111001100011001001110110000000001011111011110010110110001010100101100101100101010100110100111000111111111100000000110110101101011011110111011011101011000001100111110111110110000111011001110100100000010010110111 1011001101110000000101011110011011000001010111110010011011110100100000100010000100111100001011110011100111100001101001100001110001101110010000100110110011000111011001000011101011001011110110110110111010000110000011100001110010010100111110110011000111110110001000011001101011001101110011011000101101111011011110101010001011011011001100011000011110001011110111111000100110000011100110000010001000010100 1110010011100010111000101010001111001000110011101010110000011111001110111110001001100011100100110001011010110001000111010010110100111111101000111100001100000111000100111001111000001011101110001001011101100100010101100100010011011101111011110111000001110010010101010010110101111101100100111000110011111100111000111001110100100000011000111001110100100100100001001011110000101011000110011110001111001110 0001111000111101011100111110000100100010110100111001110000011001110011001110111101101001101011000000001110010010010110111001110001001010110110000010010001110101010010011110011010101100001011011011100010010010100010000000001111110010000101000001011110101010101110111000110111100110000100110001001000001110101101001100110111000111011010000000000010000101010101100111001100100000011110101101100100110101 1100100000100011000001100001111001101011111110001111110010101011111101001101000000110010000000010011100000001110001110010001111111100100111110010101011100101001011000010100111000011010000011101110011001001100010101011010010111110111001111111100100011101011110101010011011011001001101101000101101111110111010000011101000110010011110010110000111001001011110011101001011011101001000001000010101001101110 0001011110110110000101101011011000011010111101110100110011001110010000000000110000010111101000100010111000010011110011100000101001111100111111110111100011001100100001101110000011011100110000111111101000101111100101011011010111111100000111010101000101000111001001011010010011110101000000111000010001011100001100000110101011010000101001101100011101001100010100110011111111111101100011011101111100100001 1101010101000100010100010111100000011110001110101110001000100011010111110110010010010010000111010001001101101000101101010110101101011100001011101000100001110000011000111001000011010000110001100111000010000000101010000001001111011010011011101110010000000110000111010111101110111010000101001001110010111000101011001001110011011000001000101100101100111010000110101011110101111011010100100000001100001111 1101100001110010100101110001100000000100111101101101111010000101111101111010111001100101101100001110111010000110011101001011111010000011001100001100111110010011101011101000011000000001000111010111000110010001100000000101100100111111110110001111010110100100110100000010000111111001001101000001011011010011011001010001100111101001010101011110110011011101100000110000010000000111011000010100011110101101 0100101000111100111011011110111101010101010101111101100000100110000111101101110011111001000011111011000101010100111011110101011100000000010100100001010011000010001001000100011010010111010000110010000101001000110100110100011100001001110110110110101001100011010010010010001110101011100011000100000011101100011010010100011101010101101000011100111000010001111011010110011101111001000101001011111101111110 1001011000100110011010111100011001000010111000011000010001110110101101010100001001111101111100111001001101101111111100110111100010010010101001101011000001101001001010001010110101000000110000101100011100100110001101101000001100100111101001000100000100010111100111010011111001100011111111000010010110110000110101000001010000111011001011000010111000000000010000001011101010110000011100000111111111001111 1010010101000010000111101110101001111010010011001101010101101000011110011100100011111110110000100110100100111110001100110111100101010011001110010110110001101000010001111001010001100010011011000100111100001000110011101101011110010111011010110101001001000011001001100000110111100100100001111001110100010010011110001000011011001001000001100110000011101010100000101010100110000111000100000010010010011011 1110010011010001100010100010000001100111110011001111011100111010101100000010101100101110100001110011011100101101000000001000101110011011000111111000011100001000000110011000000100001011010000001000011111111010101000000010001110111010101000010000011010100111010100100110001101110100001010011110000110011110010101111011011111100100100111110001001010010011001111001001011101010100100011000010100001110000 1111010110110001100001010001000110101001000111000101100111011010001101111010010011000000011100001101111101101101110101010111111111111011000101101011000000110000001011011001110111001000001001011100000101000001011111100100001010000111001001010000011100001100100100000000111100111111001000000110001110001101111100011101110100110000111100000000110010011110010011001010111000100000000110101111101011100111 1100001100100001101001101110110101101110101100100100010011000101011001010001111110000010101100010011101000110101100101010011000100000000100001000010100111000000101000011111001011110010000111000001001010010011010011100000011011111000111011100000111010101111110010101001100101000100100011111011010111011010001001001111110101010110000111101010100010111110111111100101110001101111100001001100010111100010 1001101011100000010011101110001100000111110101010001011001011101001100111001011000001111111011111010000010110101011111110001101000000111011111101001100111111011100100111010100100110001111111110011111010010110001000010001010111001011000101011111110111011101100011010101100000000001110111011100010011011110100101101100110010001111000010101000101011100110011100001010110100010100100011000001010100001111 0001100101111000010010101000110000000101110010100100100001000011010110100111010001111001110111100001001011001100101111111101101001111110011001101001011111101011100011110001001110111010010011000001011100100100000011011000110101111111001110110001011001100000101010101110001010101001010111001001110100001010111000111111100100100011000000000100010000100100011001100110110110001110111011111101111101101111 0111010010111001000010000011111001001100101000100100110111110011101001001010001110110110111011011010111001010110010100011101000001101010011100110111101101100000110110000011110111011010110101100000000000010011000000111101010010010110011110011111110001000011000101001001010000100101100111000001000100111011100011111100011001111111010011000110100001011110100111110000101101100001101010101000000110111101 1011000111100011000001010000111110010000000000001011001000100011010011101010111011010100000111110011111010001101010001011011010101011110000110100001010010100011110101111010001010111011011001011111010101010110100001001101010011111101100111111001010000101001111110001100101010100000101110101011100111011110001110111001001101000100011010110110001100000110001110010011111000000100100111111101001111011011 0001001110000101010010101111010101010110001011011101110101111110111000000110011000011011000000111100111001100111011111000111100000001010111000000011110111110011111000101011011100001000111010111111101100110101001011110101000100001110101110011111100101000101101111000010111111001010000111110111101000101110010101011011111111010000101010100011100011000001100000100111111100010000111101110101001100101011 1000101011101101010111010100100001111001001010111111011111110000000101100001000100000110101101101011101001001010000000010000001101011000011100010110001001010101100111111001111010010100000101100010011000111001000111010100001100001000111101110001011000100010001011101011100001100001101101110101110010010100000101010000111111011111111010110000101110001010001001001101101000110100010011010100101101010011 0101000110101101110001010110101110111101111110011001101010110100010101110111101101001100011010101110100010011001001110000111000001110000001101101010010001010011000010010001011001111110101001001110111001101100000111111001010001101110110001010011101100001000111101111000001110101111111100110100000000010101010110100001111001001001110010000101101011001111010011111101110001110011011100001011101101110110 0111000010101000000010110000100110111010010110111011010110110010110110110001111101100000010100001101100011110011101101000111100110101111110000000001111010110110111111110111110001001101010010101011100000110100101010100101000111011000001010000011111100110000010101100100110111100100001110011110101111000101100001011010010101011111111000101100100011001101011001010000100011000101000110110111001010110001 0110111001011010111101001110000111111000000111101001000010010001100100011011001010101111111000000110010011111101101000101001000100000001010000001001010100010000110101010100000010001101101110110010100101001100101011011000000010100111000100001011001011011111110111100111010001000000011100111111100111101100001010110100100111000000101010001011010110010000111110100011100010110100001100100000111110100001 1010010101001001111001111100010111011001010000000010001000110011110110110011011111110011001011111010110000010000101101110110000011100011101000110100011000011010100100101010001110110110101100001011001110000011001011101100100110110110100001110111011111000001011000101011110101100101111011011000001111010110000011011111101011000000110100010000111111010010000001110011111000001101000010110110100111101001 1010011111111101011100111001010000000000000101110110110101001101011001010101010100000001011110011100000011001111001110010011100101000010000000111010011110111000100011111111010111101010111110100100010000101010111000001011010011010001010010111001000110110011000001111000000010111111001001011011110100100101100110011100110110011011111100000111100101011000011101010000011011000011011100001011110101111100 0100101001100100000000000010100110111000000011101001001101011111011100110010110101110110011111001010000100011110111001001011111000100101011111010111100101001110100000101010001010101100000111111010011010010001101111111101101111000101110001011111010001110110110100010001011000010101111110100000110000110001000100100110101001001100100000111001011000001110010011101110000111001101100011010010000010010111 1111100110010001010010010110111010010010111011011111001010100100111000011100100110010011111000111000011011000000011110111101001011010110001000100010010000100100100000000011011011110111101100001010101100110010011001011000110101010111111011001100011111000010110001011111100001101100010011111110111011011101100010111100000101110001001100011110101101100000111001011100100011111100011000001010110010011011 1101011111100111100000000111111100100101010111010111110011001110111010101011011110011000000111100111010111101011011001101001100100101010100110101000100011001011101101011010001011100010010001000001010000110000011110000000000101111111111111100010101110111000010101011000111101010001110000111100110110110001011010000100110101110111101010111101110110011111111110001111100000111111100010010001100001010110 1010011011111101110110100110001000001011000010110010011110000011011110011010011010101110000111010010001100100101011010111100111000011000111000001000101000111100001001011111100101001000100100000111101010111111101101011111011001111011100101001011010111010010000010010000011010110011100101011100001001110101100000010000111100010111100011010001000001011110111111111001000010111011110100010100110011100001 1010000101000100000101010110111111000001010001111001110010011010101111100100111011101101101100101110000011011110010010100100100100000111011010000011111010101010110011111100000010010101100011001001000110000000001100011111100001111010010110111010010011100100000000100110010011001111100001110011110010111111101011100010100101001110000010011011111101000000010100000101000111111111111001100101101100111000 0011101010011001010110110101111000101100111110011010000000100111011011000101011111100101101101000010001111110001100000110110001011110011101001111010100000110110001001100011010000010010001010011001010000101000010101010100111111101010010000011111000101010001100001001001111010001011011101111001010001011111100101000100111010110011001000110101101000101110110100001101011010011110100011100101001111010001 0110001001100000111100011000111110000110000011000100100111000010101011110010101100001101011111000000000001000111110111100110110011000001001011000100110101010110111100110101111100110000000111010110100000101110101111101110010011100100000100111111111101111101010011010100011010011011000101110111001110001101101111011110000001010000111000001101011010101110011011100000011010111101010000111001101000001101 1110001011101000010101011011001001100111100001110101011111101010101100011000111011111010011110010010101010011111101100100101001111001101111001000110001100110011111101100111110011010110000000111111010101101101000111110010101001101011011010101000001000010111100011000001011010010101101101001010100000100101101010111111110010011110010001011000011001010110011101111111010000110011001011101010010100101100 0011001111100100001111011000100100111011110001011001011001110101101101000101011001111100011101111111111000110110110110010111001011001000011100001111111001001001100001010010011010010000111010111010001110011110110101100110011011011110010101000010100011101110000110000110101111000110111000000110101111011000010110011101000110110111110011001010101110101111001110111110101010011011111001010001100100100000 0110101011101000101111010011101001001111100101000100100010011111010100101001111100100110101111101000001010001111001011000100101011110000000111011001010000100000001011011000000011110000001010110011000001010100101000011110000000011101101111011000000000011011110101000101100000000110001110100111001101001000001101011110000010010011111011010111110100111011011010101111100110011100011110110010001011000101 0100001111000011101101101001001000011111110010101010101011010001000111001011111001110011010001011011000001000010010000010101001100001110000001001110000000001101001101100101000010011101001101011001100110001101111111110111001010001010111011001010011010010100010101010000000110111110100001000001001001110111000000110000000111110001111100001000111011101100010001111100101000000111000010000101010010001010 1100010101010011011011000010001101100110101101111100000100100100011110000011000101001110100111001101000000101111010111011001111101001010001011111010010011111011000011101010110100110101010001101100011100100011001000111100010000010110011110111001110101011001100000000110100000011010111110111001010110000010101011101110110110111111011001101011101011000100110010001110000000011001101100111001010000001011 0100101110000001101100011001111001001100111010111011101101100111000101010010101110001001001110100100110110000010111011001101010000000010110000011001000000010000001100011001001001101011001100001011110100010000101001000111101110001100001110100101000111000000111000110010000100010001011110011000011100110010110101101010101011010000100110111111010000110111110011000111110000010101101110001010111100001101 0101011101000010111000000000010101101101011101100101110010101110101110000000010110101011001010000100010010111000111010010101101100001010010010110101011000001111101111101011111010011110001011100011010001000011011111011100100100011100111110000000000100111101010110000101101001111110010000101000111101001110010010001011001111111110011110010000011000010001010001111011111110011001000100001110111011001001 0111010000001111110101001100001101010001101110110001100011000100111110000001010110010010000100000011110010011010001010001110110010001000111001100111000111010110001110100101101110100001001000000110000100111010110100110010111011010001000001010101011001111010110011101011011111110010110100100001011001101010100101100001010101101111111001100000100100000010111010110100101101011011110001101111001101001111 0110110011101010100001011000100001000100101110000010100111000011111001011011011001001101010010101001000110110100001100100100100010011001000111101011100010010111100111100001101100010111111010110111100100110110010111111110111000010100111100110000010010110001101011011000110010010001100011000111000101111110001011110011100010011111001010010010000011111100100011010011011011010101100100010110111101011010 1101011101110011011011100010100110000011000110000110110001000010101000001111101111101101010111110001111000001001110110100010101010100111111100101001110011111100111111110010010001101001111000100101110101011000101001010001011000010000110010000011011111010000101100110000111001110101110111001101101111001001100100000010101001101110100100010011010100011000100000101010110100101101110001010111000000100001 1110100101110111100010001011101101011011010100001100010010001101111010100001101100010110110110001011100101111001000010011000101011100101001010001010010001101000011111000101111101110001010111101100110000111111011001011101010001011101010111111000000000011001010001000001110000010011110100110011110101110110101100011111101011001110001011011000011010010100010100011011000000011001111011110011110011100001 0010000010101100100001111100000011011001110110101000101110001000111001010011000110001111000100101010110010100100001001000110110001111110110011000110000111111111010110010111111001001100100111000110010001001000101111101010000000101100011110000011101111010000111000101100000100101110101011111011010100110111000101011100101111011000000110000110001010000101100001011000010100100101000101001110101001000101 0101100011101100011110000011011011111100000100010001000101111001110001111111100110000011100110010010101111110110001110000010100001100001111111101101110011011001000111111001101010011010011110011011111001000001001111101010011001111101101011000101111010011001101100110110111001110101110101010111100100100110010010010110000100001111001000011101000101111011110001011011110111000011000000000011010100010101 1111101100010000010001100011101111100000000001100011101010000011100101111000011110111101101101100111111111110011101110001111101000110100010101011100010101111001010000000110001101000000101000010001011100010010000010010011010010110011111000111000110011010110110011000000100000101110000010001001100111110010010000011000101000011101111111001010000010100010111101001011111010011001101001110000100010001011 1001010001111011110011001001100100110110100100010100010111100101110011011000000100110110001100001000101000001010110101101111110101010101110100000010111001000100100011111011101010001001111010111111011110111010100001010011111010100010001000110010011001111000010110001100011110010111001111111110110000001101100110010001001101000001101011100010111100001000011111001011001000110111000001001000000110101101 0010010111011110000011101110010110101100110110100101110110111110011011110111000001100001010000000000110010110011100110100011101000100010010011100010001000110000111110100110010100110011100110010101111001100000100101100110010100001101010001001111011100100000110111001110011111010110110111100110001110101111011110110101011101000100100011001101000001100011010100001010010000110101001100010100001100011001 0110011100100010000010100101110000011011101010010110111010111110001101110011101011010100001101111011110011011110110000101001011001010000000010010011110100000101011100111111010001011111010011100100101111000100100110111011001100010101011101001101101110000011011011100111001101011011101100001101000001011111111111000010001000000100010111100111001100001011000010010010110010001101110000010111111100100100 0010011110101000101110011101000011101001010111111000000011011010010010011011101100010110111000101000000100010100111011011100001001110000100011111101001111011000000101101000111111111100000110111000110001010110111001010110101100101111000011001100010111110100010011101010010001100111010001000100001110011000001000000010001111100111100110011111010000000110110001000110111110101100011100011010101110000100 0010100001101110100001101100011010010000001111110110000001001010110001001011000000100010011110110110111110010110100001101111110101001111000101001101101101001010110111111100110011100010011001111000100100111011001011011101101100000011010010101111010011011111000000101111100110011101111011101000010011000010011100111101110001100111111010011000010100111010111101010101101111001000010011000010100111101111 1100100110000110000010101011110011110110011110100101011001110101111011000100010001011011110110000111011111000100000111000011000100110100100010110101011111000101101100110110100111001010011001000100110000101011101010010100001011100101111011100110101110010000000100111000011000110001101101111001101001001001011001110111001010101100100010001100110010111011110000101010001000110011010110000011111000000100 0000011100001010010100110101111100111010111101000010011011110001000110011111000000000111010011111100111101110110100101111101111101100101111000011001000100110010010011001010110111101101000010010001111111001100111010101100010010000000010011001010001111111000100101101000010011001000000000010010010010001101010000101000101010100110001111100100101000000111110111010001011100101010110100101111011011101010 1111111011110110000010011001000010000111010001111000111011001000000110011010110100001000010101011110000001000011000111011001000100010111100000011110011011110101011011010111000000111001010110111010001100101001101000011110101110111001101111001101111000001001100100111111011001000000001100101000101100100010111010011000001000100011111110001000000011000100101011011001010000011000001011111100011010000001 0101101001110011100011101111011101000111011000110110000110110001010011010011110001000100110100000100111010100111111101101110101000010001111010011101001100000101001111111110100101000010010010110000101110110010100011101000011000010101110110111100001000100010010100001010010001100001010001011101110100011100101010101011000111111010111110001100111011111010000110111110100100111000000000000001100110110111 0111100010001011000101110111001110110111100101100110101001000011100111001110011100001011100100100011000001000101001011010100011000100100011011010011111101011101111111101011110101101101001111011000010100101001010110100100100000011100100110000001001001011000001011001000010110100011101001111101000110001000010010111110001011110111111000111110101100110000101110000001110100101111001110100101000100101101 1110001011011000001101000011100101100110000011011111001101010101100010011001101011001010011010011111001010101010000001101000000000011000011011010110101110100101100110000110100100000110110001000110101011001111111111100010111001101110110011101100011001111101101100001111010101101111101101101011101010011001001011011110110100010100001110100010010111000111110100001011100110000111011011010111011111001111 1100111111011000100000100011000001111010010010010000111111100001010101111110011001000001100011101001001110111111010100010000110011010001011010010110101100101110101100000010111110100001101101000001100010010001110010001011111000111111011110010101001001001100001001101010000101011001110110110110110111100101110111111100100011011100011101100001011101010000100101001010111110001001000110010010001101111100 1001110011011011001010010011101111110110011011010010101010111110011110111001100000111001111111101000100110001100101011101101010000010011010111110000000011000011111110001101101011011101100010111110010101000001001001000001000111110111111100011101111110110001100100101001001011111111110011110011000101100100001001110111011000000001101001001110010001011000101100100000000000000001110011011000001110101110 0010010010000001001001001001101101011001001100000110000001000010101010111101010110110000101010111011100011000100100010111000010111010000100100010011110100101100111000010111011001101100000101010111110011101000011100110010111101011010000011010010010101111101101100010111110101101110001110011111010001111001110111101001011000110001011100111000000100011011001010101010011011010110101111111111000101111101 1100111111100000010110010101011010010001011111011010101000100101011010111101101010010111111011111101011001101000001001110010110001111011101001011000001111111001001010000110011101011010000111110010101000010001001100110001011000101000010010110111010000000001000001101010100001110011011000110100110101011011110101101001000110100001110010011100100110110100101010110000000100110101110100001010000011100001 0100010101000110101011010110001100100010001000100100101100110010101001110010011111000111011101101100100110101001111101000111101000010111101110101011001001110011000011000101110111011001010111100000010001010001000010111000011001000001011001111010110000000001111100000100111111101101100100100100010101110101100110010110111010000011000010001100011010111010101011011011000101010001111001000110011010111000 1111011111010000100001000001110010011011100110110000100101100110011101111010101100011101000010110111000000101110011100010101010101101101010111101100011010111110010100111001101101001100001110000110000000000101110101110001000001011100011110011100111010110100100000100110000010110011011101100001100000010101100111001111011010100101010000001011001010010110000101010111101001101101010011101011100110101101 0100011101000000000010100100011011100011000010100100011010100011100001111111011101100110101011110011011111100011011011011010101111001010111011101100100000011111001001010000011010001000011000011001111101101011001101000011111010111111100101010110001110000000001011000001001001100000101100100011111011111001101100001000001011000011001101100010110001001111100011010001101101111110011001100100010101111100 0010001010100101011100010111110110101000001000111011101010001011010111001010101100100010111101101010000010011100100010010000010010111010111000101101011111111110001110110111010110110011011110101100010011010010111010000011111011010010100000101100100101101011011101001011000110010111110110010101000011010000101110011110111000001100101111010001111100101101111011110011101111111010001010110100000101000100 1111110111110110001111011100001110111011111111001011001111000000001110110110111110110011100011001010100010100010001010000110010011001001011111001111001110100011000010111111111001010000010010100011000000111110111010011011011111011101011010100010011100000110100111010100100110111010010101011101000110111100001111111100000000100011110111101101111011110111011110110101110110010000011001001100110111010111 0111110100110010100100011110101111111111111100100110111010110000000101111111001011110110010000000010000100101011010110110010101110110001111110101100100110100101001100010111111100110000110000000111011100100111010011010110100100100000010110010001000111011101000000000000111111011010101101101100100110100000101001011000001001000011111100011010011000010101011101100100000001100100000000001101011110101011 0011101011000010000010001011100110101001000011010111110001100000010101100110110111100110010100011010100000100010100110000001001011000111001111110010101100100000100110100001001001110110111110111110100001011010000100010011010011010101110111011100010100010011001001011010101010100011100010001010100111101110000100010011000010101101110011110010100111110010110001000100100110110111000100101000111110010100 0001101100011001010101101010000101101111000111100111000111011010100011111111111010011011100100100111101100001110111000001101100111101010011110011110011011100010001001000010011011000101000111100011101001101101000001010111000110100000101001010000010011000010001001101101010101101010100010111110101110000011100101011111000001010010010011110110001000001000000011100000010000110010101001010100010000000100 0111100011111001101100110000000111111111011000111110001100101110000001111001001010010100000000101111111010001101101000110011000010100010000001001001100000101010111111010010001011111001010101111011001011111010001101111100011100111110100100001001011000000111110001010101001101001110010010000111110001001001010101001011000010000110001101000111101101111101000011111010001110111000101001101001011111100111 0101000110100011000101000001111101000010100100101010011010110011100101010000011100010100101010000011100001010100100110001100101110011111101011100011001011001000111010010111111001011001100001111000110100011000110001001001100110011001110011111100001010010010111010111101001011100101010110100101000010111000110011001011001000000101010101110110101001111000000011000011101111110111101100111011111011110000 0100100101000111101001101100110010100111110100010110111011100110100111010100110101101000111011100011011111101011101111110011101100100011011101111101111111110101011110000001000010011101010100100000011101111111001110000110000111000010001111001001000010110101111001010101000001010111101111111010111101010001010101100100001100111010011110110110111110110110101110100001110100101000010101110010101000001010 0001110111000010101001011111010110001111101111011110101111011010000111111101101010110011010100010011100011011011000100011110101111000110010001110011010101011010111100111111011100000010111100101001000100011000011000100111111011110000101110100000010011001010001101101001000011010001001001010100010110001001001001110111010110110101001111110110001011011011010010100000000000011100101010011100010111011010 1010111111100101010000100000001100010100101101011001011000111001111101111101010011101010101011110111000011000001111100001010111111101101001011011001010010100110011100110111101100111000110101111101101001111110111010100000100001011010000011001110010101010010001100101001001001101010110100000011010010000011001010100000111000010110010101111011010100011100001111101110010110000110100001011111011101111100 1000011111001110001110001001101000011111010111111100101110100001011000100100001100100001110011001000011101100110111111011010001000000011001111001001110111101111100000101010100100011000100011101010000101111011001111110111010010101100110011110011000111111011001001100001001101110100000010100000001100011011010000010110011000100111110101101101110001000100111110111001111010101000010111011111010101010101
cTrader AlgocTrader

時間足切替時の表示位置を固定する 【cTrader tools】

11/22/2020 3/24/2021

4年以上前の記事です。内容が古くなっている可能性があります。

このときの短時間足の動きが見たい!

ある日のこと

過去にさかのぼって日足チャートを見ていたら、気になる値動きを見つけました。

「このときの1時間足や15分足の動きはどうなってるんだろう?」

そう思って、チャートの時間足をポチッと切り替えたら・・・

チャートのスクロールが戻った!今のどこだっけ!!

 

同じ経験した人もいるはず

cTraderでは時間足を変えると、自動的にスクロールが直近の時間まで戻ります。過去の値動きをより短い時間足で確認しようとするときは不便で仕方ありません。

「スクロールすればいいだけじゃん」と思うかもしれませんが、想像してみてください。

日足で数か月前のところにに気になる値動きを見つけたとしたら、15分足で数か月分さかのぼるためにどれだけスクロールしなければいけないか

 

インジケーターで解決

というわけで表示位置を固定できるインジケーターを作りました。簡単なのでソースコード付きで配布します。自由にいじってみてください。

[dl i] TimeSync [/dl]

ダウンロードしたalgoファイルをダブルクリックし、cTraderで開こうとすると、インストールするかどうか聞かれますので、そのままインストールしてください。これだけで、すでに使えるようになってますし、Automate画面からコードの編集も可能です。

使い方も簡単です。まずインジケーターのCustom項目からTimeSyncを選んで、チャートに追加してください。

そして長時間足で気になる値動きを見つけたらそこに縦線(垂直ライン:VerticalLine)を引きます。(チャート画面右側のツールバーから)

で、時間足を変えると自動的に縦線の位置までチャートがスクロールします。あまりに昔だとちょっと時間かかります。

 

パラメータ
DisplayAfter

スクロールした後、縦線の右側に何本のローソク足を表示するか。0だとチャートの一番右側に縦線が来て違和感があります。

DisplayLabel

左上に”TimeSync”と表示するかどうか。なにも表示されないとインジケーターが適用されてるかどうかわからないので基本表示推奨。ただ、他に左上に情報を表示するインジケーターやcBotを使用してる場合は、重なってうっとうしいのでfalseにしたほうがいいです。

TargetRecent

縦線が複数ある場合、これがYesだと一番右側(直近)のラインを基準にします。
Noだとどれが選ばれるかわかりません。(けど、仕組み上ほぼ最後に描かれた線になるはずです。)

 

 

ソースコード解説

ここからはプログラムする人用。まずは簡単なので中身見てみてください。1行ごとにしつこくコメントも入ってます。

 

仕組み

インジケーターは時間足が変わると同時に自動的に初期化されます

これを利用して、時間足が変わった際に初期化処理でチャート上から縦線を探してその場所までチャートをスクロールさせてるだけです。普通Indicatorでメイン部分となるCalculateは使いません。

 

メイン部分

ただでさえ簡単なソースコードですが、「縦線探してスクロール」だけならもっと単純化できます。

var lines = Chart.FindAllObjects<ChartVerticalLine>();
if(lines.Count() != 0) { 
    var index = Bars.OpenTimes.GetIndexByTime(lines.Last().Time);
    Chart.ScrollXTo(index);
}

インジケーターを新規作成して、この5行をInitialize()内にコピペすれば、もう出来上がりです。(縦線がチャートの一番左側に来るようスクロールされます)

まず、チャート内のすべての縦線を取得し、if文で縦線が存在してるかを確認、1本でもあれば配列の最後の縦線の時間からローソク足のインデックスを取得してその場所までスクロール、という流れです。

配布のソースコード内では直近の縦線を取得するための処理と表示位置の調整を行ってるので、少しコードが追加されてるだけです。

 

よく使うメソッド

TimeSeries->GetIndexByTime

上記の3行目をわかりやすく書くとこうなります。

TimeSeries times = Bars.OpenTimes;
times.GetIndexByTime(lines.Last().Time);

BarsのOpenTimesプロパティ(TimeSeries型)を取得して、TimeSeriesが持つメソッドGetIndexByTimeを使用しています。

これは時間からバー(ローソク足)の位置を表すindexを取得するためのメソッドです。

今回はスクロール位置の指定に使っているだけですが、取得したindexを利用してBars[index]などというようにその時間のデータを参照したりできます。

 

 

インジケーターはこんなこともできる

インジケーターというと移動平均だとかMACDだとかなんか価格から数値を計算してグラフみたいに表示するイメージだと思います。

もちろんその通りなんですが、cTraderで作るIndicatorではこんなツールっぽいものも作れるということが今回お伝えしたかった内容です。(MT4でもできますけど)

テンプレートにたった5行書き加えるだけでそこそこ使えそうなツールが出来上がるなんて感動しませんか?


まだコメントはありません

新しいコメント

コメントは承認後に公開されます。承認まで次のコメントは投稿できません。

cTrader's Life

© 2025 ajinori