1110110101001111110011101010001111011000010010001011111011110011101000110100101101010010110100011101111011100110111010101101101101011011010011000011101111011101001000111011101111101100001011111110110100110111010111011100011111101101101001100010111001100101010011111001110010101110110100110100110001010110010111111100011100111101111111011101110111100000101010001010110011010010100001110000010110001001 1011000100111110010110000111111101010001010011101000110110000100111011110001000110111011011101110000010100011110100000111010011011010011001110110010101100110010101100011111101000010011101000011001101001111110110011000110110111001011100000000000111100110100001101101100001110100000000000001000010111001110000000010110000101010101010111110110011100101110100011110110001111000111000001101101000011011000 1100010011101100101011110011010010101000010001111010010110100000000100100101101101110011011000110001111111110000011100001111011110011110010110000100100110000101001011001010100110101100101010111110011011101110111010101010010101011100001001001010101010100001011110100111011100111111101100000010111111001100011111111011101111110100001001011101101011000111110101101110001100010011011110100010111010110000 0000010011001010010011101001100001000000110000001011100011100010110111001000011100100111111000101110000111000101101010010100101010011001111100100110010101110011000001110011000000111010001110010001101110101000110111010111010001100101010001000110100011000100100011000100111110111010000110001100100111011001111001110111010111101000110100101001111100010101000011110011100110100111001100100110111100100000 1110111100110000010010101100110010010110101101111101010100010110111100010100010100010000010110010100011100111011100110100100100110010011010101011110000111010000111111110000101101010111010011010111100011101010101110100010110100010011111100011110000111111111111000001010100001110001100111100000110111111011110001101110100111001001100100000100001100110001101011101111010011011000000111011110011011101011 0101110001100001011111000010110101011001110101111010110010000000110100101010101000110100100001111000100001000111001101110011010001111110001111001101100011100100110011000010101111101111000011100000010101101001000100001111001001000001110101011111010001100001010010111001101101011000110000011011001001001100001110010110100100100100011000001011011011011011011101100001100100111110000010111100011011111000 1011101100100101000010110010111111100110111110101111111011000011010110111100100000010101001011000011101101001100000111011111001010101100010001010000111011110101001101110010000101001010011001000110101011110111111011011000000111000011000001110010111111110110001101000000111111110111110011111101001010001110111000000111100001101011000101011000101010001110111101011100101011010001100000101000010011100000 0110010100111010011011011100111101111101011011101001101100111000000100101100111101010111000100101101110001101100010100110011111000111011011010001010110010000100010111110101101011111110001001001001010100001110110110000001101111001001111011010000011011001100000010110110111110101110011000010011000110010101011100011110100100001000011000111101101010110010001110001110010100101001010010001001011001010101 0111100010011000100011110000011100001011101101111100000011011000100011010010100111010111010010001011110111011001110111010001000001111010001100001011011110011110111001001100001100000011101000111010110111101010001100001001010001000111010111110110100010100010010110100110110011000011100100001000001111001111110100101010010001111110000011101011010110000100001100001010001001011100000011001110000111001001 1001101110010011011101000011010101100110111000101111011110000101100110100111011111010110000010110011011001110111000101010101010110010001101000000010001011110000011110110110000110000100001100100001001011011110100111010111100000100100101110100000100000010101011000000001101001110010100101000001001110010101111110101111011000011010011010011001001110010011101010010111011101000011010110011101101111001111 0010010111110001010000011011100001111100001100111111110001011000101001100001000110111110010010001110010000100001100010100010011000111010001001110111111000001110001111001001101101010000011001011001110101100100111001100010101101010010011011110000000011010110111111000001011100100010011011011111000010100001011011001010110000001011111010000101001010110001111010011010110001010111010011110000110110111101 0011110101100100110010101011010100101010011010110101001111000010001111110010001110111100011000000001111100110001111011010000101010011011000011110101100100011010010100000010100100100001010101010110101101101011010001011111100001010011100111100100011111110011001001000100000001101101011111110111100001010111010110001010010101110101100100101000001111110001101001110110010111101001000110110000100000101111 0000101000101110011110101000011100000011110001011010101101101111100000110011010000101000001011101111101001101101110000110111110000010100111100001100101101101011011100110111101010110101011111010100001000000110101000000001100100000010110101000111010001000111011100000100101000100000000110111110101110101001111110010111011110111001110001010000100001011011101010001011011111110101001000101111100010010101 0000010001001101011110000011101001010011100101010010010100011110101110111011100011110110010101111101000100001111011110000001100111000101000111111100001011000101011010001000100000100101110010001111001101111010011011000001011010011110111010111101000100001010100001001011101111100101111100001110001100111011000010000011111000010110000111100111110011111011010101001010000010010110101010001001001010000110 1111010111011000010111110001011001110111011010010000010000100100000110001100001010000011110001011101000111110000001110111001011000011011100010011100100010001110011100000101110010011100010000110110010110101000011110010011100111110001010010011010011110001001110111010101111101101110000110001100111110011000110011100010001010100001011011111111010011111110101000111111101001111110011110111111000001100010 1110111011000000000010101001111000010000011001101011100101001000100000000101001110110101101000101110110111011000101110101001101110011001011011110011100100110010111101111011111111101000101111101001000101000001010000010011110101101111110011011100001010110010111000010010001101111111010100101110000110100011101000001011000110011001111010100110011111001011010011100000100000110000101110011011010010010001 0100110110011011010000001000001010110000111111011000110100010001001101001011101011111010101110110110110111001000110110111101101000111100110010101001100010110101100011101100011011000101100000100010010011010110010001011001100001011011010000011101110010000000010110011101010100100001000110001110011000011101110011011101000000010111101111010000000000000110001101111000101111010110011111011110100100011000 0010111111001010110010100010010110011010111010110010110000010011101100000001000111001001010101111111000101110110010010110110011001110111110010110001010010011010110111110101001000001111010010101100101101001001101100000000111101000101000110010101100000111110010001000010110001011100111000011111101010001111010101000011000010111000010010010010100111001000111011110100100100110000001001001000000001000011 1011000110111110001010010100011011111001001001000001101011000001101001110101001111010100000110101011111010100011001100101010010011111110000100011000111011101111111101110001011111000111111000001101100101101101000100011110110110101001110010011100000100010100011110000010110101000110010100010100101100000110011001001011110001101100001111100111010101100001111110111110011110000010000111000100101001101011 0010001001010011100011010101001010101111010111010111110010111001001110100000001111110001001001001011000000001100000010111001010110000110111111101010001010110100111011011010111011011010111110010010111000110100101011101110100010100100100001110011000101001100100000100011001100000000111000111000111010110111110011010111111010011111010001111001000101010111110000101011111010111101100111011100001010001101 1110100100111100100100000100100011110100011010101000101000110011011111111110111110100010110100011001111001101011001010001011001111000100000010101001010101000110100001110010111001111111101101000111100101101101010111110111011001101111100010010000101111101111001101101001001011111010101011011011100101111010001100110000001111010011011000001011011101001000100111101001010000101101010000111111000010101000 0010000011011001110000110010110110010010101011101110110110101101100101001111011100000000100101010110101101010111000110001100110010011101011110110010000011101010110100010101111000111111001001001011011000111111011011101111111110100011110011101011111110110110011011001111100000100000011111101110100101010000110001110111001111101010011000011101110100001001010100110011111110000011101000111011001110000011 1010100110001111000111001001100000000000101001101111111000101101100001111000001110011000100100011001000010010101101001101010011101100101111001010101111001011010001000010001111001100011010110010000110000111001100110001010001011000101001010011101110111101010100001001000011111001000101011011010111001101000110010110011011111000000000110100000111111111001000100101010100100001010100110000101101001101111 1101001101110010100111010101101010111110110100010100110011001010110101010011101001100011110010101100010101101011011011111100100011000010111001110001011101111110001001111000001000110001011001110111110001001101110100011100110111010010101101110000100110010111001010111111101001000010100010110101100101111010110011101011011010000001101101111011110101010001101011110001000001110100010011110111110011110011 0010001010001000000110100001001011001110011010100100110010110000110111101001011101111001111110001111000111010000000100110011011101001100111110111011011010000000001000111011110100110011100011011111111000010111101010011011110010010010011100001110101011101100110110110010110010001110110001110010011010000111101111110110001111010100111110101110100011110101101001101111001010100111101101000001100101000000 1000100001010110010010000111101101100110101101001110001001010010011100110001110101101100001001011101011010000011100110111000111100001000110000101000110101111001000010110110011001000000101010100110110000001100011000111011111100011001001111000000000101011000011000000011110000110000100111001111111110100100100110000000100011011110011001011011000001111111001001000011001011111100101010111111001100000011 0011000000101101100101011001101111011111101111000110110011110100101001101100000011101010100011100100000000010001101100100000111110100010001100010100010000000100101011100100100101011100101100011111100111111010101000110110010110111110101100011000100101011101101100000110111111110001000110111110100001011010111010111111101110011000111011000100111000101101001110001101111011111000110010011110010111010000 0011001000110001111011011101110111011101110011010100011110110000010011011111001011000010100111101001100001000110010011001111010011111011001010100010001110001001000100111110001111010001010100000111010100011010000111100100001010011000011101110110110111000111010011100101010101111000110010110001110011100000100010111110100001011110111100111011110000101100110000000001000101010010101101010111011111111111 1010110100011010110001000111000100001000010101100101000001101011101100111101010001101110010001100001001101101101100101101111101101100111101010101111000000101100011010010100101001010001111100110011110100100011001001101011011111011000001110111010001000110100110110110010000001110111010111111011100111111001001000100000011110001001010101000010100011010100010011110001011011011111000100110011111001011111 0100101001110000110011011000000100110100111101001110010010110001000111101001000011010110001101101110011001100111011010111110101010010010000000001100010111001110101010011101101000101010100011001101010111010001111100001101000011000010001100110000100100010100101100011001011111110111100010101100111110111001110011100011110100000100101010100000001001110111001100101111101101101110010100101011011001000001 1110010010100101010111011100010111001000011111001100011100001001110001000101110100110000101100111101010101110111001100100001001010111001100000110101011110001010011001111110101011110110111101011111000101101010000010000100001111100101100010110001000011000010001101000010001000001010110110101011011110111100000100011111101100110001111111111011000011110101001101111111010001011001010010000000101111011001 0011000011110001010010001111011010011111001010101110101110000001101100110110000010001101001111001101100101100011111100110011101000001100110011000010110001101100001000100001100110001101001100100111011001000111101000010000011001101001011101010100001011010001000000000011100000011010000110100010010110000001101101010111100011000110111110111100110100001100001101010111000111011010010000010110010001110000 0100001111110001001110101010100110101100110111100101011101100110010000011011011111000001101111010101101111001111000010010101101101111001000110001111100110111110011000100010000100000100111110001100101101101000000010010011011011001010101111101000101100101011010010001101010011010010100110111111100010010011001111011010101011011100100000110010101101111010101010000100011110100011100110010111110101000001 0101001001100001100111101000101110110100011001011001111110000011000000000001001000111000100101001100110100100011001011111110010001001011111100111000100011000111110111100100110100110111010010101101111000101111111101111111111011111111110100101011101101100000001001101110101010111111001111001110100000010010010111011001101100000000111010011011000010011100101001100101110000110000110001101111000001010001 0111000000100001011010000010110000011110011100111001111100000000111000001101011001000100000100000100100011101111001000111010101101100010001001000101111001100011100011100100010010101101100010001011111010100011110000000000001100101011011101101110001111001010110000110010100110111111111011111101010110001000100001111011100100000100101110110001010111011101101001100000010000111111011110010000010111010001 1001111001010100011111100111110010101010111101011110110000110100000001110101111010000100010010110110100110100101100100000001010001110111001000011001000011110111011010100111100101001100010110001111111000100001111000000011011010001011111011001001110011001100001111000110101011110100111101110001110101101101000001101100011101100001000011010111101101100100100101000001010010111000100010101001001001100101 0001100100000100100000010100000011111010111000001010111000011100100001100001010101011101010011010001000000010001111101000111101111100000000000111100101001100000110110101111101000100110111111100100111000011111100111000010111100001000001001010110011000010011101010011010110110000000100101010011001101010001001011101100100101010111010001101001001010000001010011101011110111101110111010001010111000011100 1001000011110010001110010101111100010010000100110011111110101111000101110100010110100111111111000100111100001100001110001111001110010010011101101000011001100010111101000110000110101111001011010011001111001001001100011001000000000111110111111010110000100101100111111010000010101110011000000101011100110111011100111101110101110101101100111011101110111010010010110111100100011000011011101001101111101111 0000101010000110010111000110111111010011010101010101000000001011001000100111011101001011110010110011001010100000010110111101100000110001001010110110000001001011101101000000100100100101001110111001001001110101010001011000100001000001000101011110011001101101000110110101011111100111111110010010000100000100111101011110100011000101111111000100011101000111011110110110110111101101101100011000110010100100 1010110010110000011111000111011010011101010111011001000101001110011000110001010100101010011010110100001101110101110010100110000111000101010110010110001111111100111111100001101010110100111111101010010101111110010011110001000010110011011101111111010111011000000110001011111111110011010100011001000100100001101011101001000111111011111000001011010101001101010011111101010010100001000010001001100101010101 0010110000100110101001111100110010001010001101110010001100100011111111000110000100110011010110100111100001111111010011001011101100101010001110101011011001110001011000111011100000010101101001000111100100100101011010011000111011110111001010011101111101000100110011000100011010011100101010110110001000011110100010011010100110110101111010100001001101011001100100111000111011010001001110001100000110011000 1101000100001110101001011100100111000110000100110110100001101100110110011101010101111100000101110011110110010100001111011110010100011000011011000010001011111101101111111010100110000010111010101011111111001011000011101011011101111010111100000000011100101001001110101111010000000000110000111011101011101000001110000110110111111000010000000100000001110010010000110000000001011101101100010001111111110001 0000000101110000100010110101000010001011011110110001011011101001101101001000011011101101000101101100001101010001110010111101001010110111100011110000000101110110010101011011110101000011111000001001001001110100011111110001011000000001101001101000000110001000110111100011011101111010110101110101000111101010110001000000101001110001100000001001000011110010101000011001100011110011010101111011100010000111 0001101100110011010101100110000000110111111110011111110011001001111111011001001110101101110000111011111011010100111001001111010001000111001100110010000010001001001101100110100000011010111101010010100011111111111111111010111111111100001100101101000101001001111000100101011110101111111001001101101010110111100010100111011101010110101011011000111100100000010101001111111100101010011101110000000110100100 0000100001000101111110101001101010111011001100001101000111011011001011010001101111110111000100110111100100111110000010011110100000001100110110001100000011101110101001110111001101101100110011011111100011111101101011001011010011110101011100011111001100001110101000111011001001010101010000110111001000011001111111111110000000111011110111010000001000100110001001111110101101100110010110001010001110110001 0001100101010000010011110001010011100010101101010111111010011100110111011010111110111111010010010111111010001011001001010011011000110010100100001101101111111001111001110101101110010011001011010011001011101010001000111111100010111110111111110100000100101000001101101100001100011011101110001101011001101100111011111001010110011110111110010001100001101010110011101110011101001010100101111001011000010100 0011001011011010111010111011110101111011101101100101110000010100011100100011100110010110011111000010011011100001010001000111001111010101110011111110001011000001000110001001010010010010011010110001101111010111110100100000011110111010100101101101111010011111011001010010000010110000110001011110101010010111001110000010010110010011011100100011001011001100000100000010101110100111111111101110010001100101 0111000011001101010110111101001010111101011011000110001100000101110011111001010111101011000100011000111110100100110111111110010001101101101111100101101011110001011011010001111110111110001011000100101000000011111101001111110011110000000011000110010101011110010100011000010010000100011001011101000111111101010001010011100110000011100110111010011110011010000001100011011101000000001000001111111110101111 1000110100100101111011001110101001110010110010111010000000010001111001110100011011001110100010111011011111011111011001000001011101011001000110001011000001100001111011111000100011110000011010111000111111101001110000110010000111000000111100010100111100101010011100111000011100100001000100000111100110011010100100110011001001010110110001011110110001101101100111110101001001011111100000100011110111001001 1000101110010110100101011001100100011011011110001111001110111111100101001001011111110111010110101001110000110010001011010111111001001111100011110111010010101011110110101111111111000011000110100110110000100100000100001001010001001010011000101010000001110101010110101111111000010000011011001000010100110100100111100010010000101010101001000101001000101000010011011011010010001010000000101000101110001100 0110010110000111110000101000111110110101111011010110001010000011000010010011101011001011011110000001001101101010111001001110001011111011110000100111000110101110100100110101001011011000101010100111011101000011101100111101010000010110000111100010001011000010111101001000111010010011101100000111101011111100110101111001110011110011100000100101110110010110101011101111101011101101111001000001010001000111 1110110010010110111111010111010101111001101000011101111100000101100110101010101011010101101100010010010000011011011000010001100001101001011110010110000011011001111110011110000111000111100101100011001001100100011010101010111101110001110101100100010111011111000010110110111111010100010101101100100000110101000101111001001110010011000010000010111001010111111111001000110001100111100111001010101101011000 0111011010000011101100100000000101001101111010001110110101001111101000100111101110111111101000110111000111111100100101111011001111010001010011101001000010000011001010111110111110010011010001101110100001000010011000001111110011101101111100011100100000010110011110010001010110100101011001001101001101011101001100100000011011011101011110011110001011101100011000110100011111011101100000010011010111000010 0010011110110000110101001000110111001001010010001101001101101111001111111101010011100111110001011011110010001000100011100101100100000111111110010011100001011111101111010000000101011010011001011100110111110101011111010001001000100100001000110010010101111101110111111011101110100101001111110101110111001111110101001101111000010101100000110111110001111000101111100010110000100100100111101100100101100111 1010001010111101010011001100100110011110011110000001110010111100111010010011110010011010101011100101100100100100000000010000111100000000101000000100011010100001101010111100011011111100110010101000011001000111011011111110101100010011011011011110110010010111111100100000101110110110011111011111100111001101101001111001000011101110110000110010001101101011000101000001100010001111000111010111101111111001 0101101010010000011001111101001001111010011011101111111100101111011101101110101000110011011000000011101001101100110111011101011001001100101001001011011110010101010011111110110011011110100111110101100110001110100110010100110111000010101111011000110000110101110101000001001110010110011001011110101001011110110000111100001011000010100000111101011000110110010001001100110111111010000001010100011001100100 1000110111010011111011010010011110101010110111001010010101001101011110010000011000110111011010010111101001100001011001101010111000110100010000110101001001100011101011001101101001111101100111101001010010110111010001000001011011101000101001111101110111011101111000111100001001100000001001001001111000100000101101111101100101100011001101011000101011101011111111111101111010110011011010000000100000110000 1011001101110111101011010001111001101000110000010001000011111110110011010101001010011011011100011100011001001111111100010000010010110111100101001001101011010001100010101100110011111000111100111011101101000001001101111101110010111000000100100100010000011000111100011111011111011000100011000101100001100111000010000000010100010110010001011001011000010111011101101100110101011011111000010001110000110000 1011100100110010000110111011110111001100000000110010110010010011100110001110101100001101111111101111011101100011001011100101000011010100110111001101000010111101011100101010110000011001111111111001011000111011000111000001011001101100101100001001111000010011110001000100100100010001100011001101011111000100111100001010001001001010001000101101110111011010011011010010110101010100011100110101010111011010 0010111101111010001010111110000000010100110110111110110110001001110110010001001001011100000110010010100010101111001011100010011010001010111010001100100011110100010110000011011110010000001000000010101010011101011001101101010010111101101110100101010001101010000101001001111000000100001100100101110000010000000101010000011100010011000000000111010100111100101001011010101111111000010101110011001100011010 0000101011111000100100101100000111110111000011010000011101100111110010100101110101100111011100100010111010101100111001010101101100010011001011000010110000111000111001001010001011100111001011101000000001100111100000001001111000101111011010011110100110101011111101100000010010000010011001001001101111111001101010101101110111110000000110000101111000010010011001111000110001101101101001010010000000010100 1000010001010000011011011101010111011001101111111110011001011000110110111011000101101100011010000101111011001001110000000110010011110000000111111100111111010110001110111101101101101111110000010111111001110101011101011011110111010110011100110101110100101000000110100100001111100000001110011011110000010011101110110001000111001111000010101000110010011111000001101101001011011000111010010100110111111111 0011011110101100010101101001110001001001011110000000110110011010111010001010010110101100011101101001010011101110111110101010100101100100010010111110100101011100101001101101000110110010110111000111110110101000111011011010101110000011110000100010100111100000000111111101101010101111001011001110111000011111100101110001011101101000011001000100100111101101000100011111000000110100110100111001100011100000 0011000100110010010100101011100101110000100000000001111110101110010001110000100001100101011101111110110111001100101010011100011101000000001110110011001110110111111000101011110111110000101010110111110010111000100111101100001101000000100010011111110010100001110001010000010010111100100110111100000101100011100001100101111001100000000111110101110110100001001111011111000010011001111001010101000111111011 0111111100000100011000001001101010101110111101100000000010111100100110001101100010011111001111010110001010001001001010110100110101010111010011110011000011000001111101100001000100110001001000111011011111011111101111110101000011000111101011110011100100001010010100100010001000011010100011100111100010110010010101101101010101110010100000100010110001011110100111010010110010010100101111100111111110100000 0101100001010011100000010001000101101101011100011110001000001101111111101100110101101100011000010001010110100000011001111111101110001100110111011001101001001101100011100000010011000001000011010000111100100001101111111100011001100101011110110111101001001111101100000000111110010001101110100101001001100110000110010000100101111010010101000111101010011111000110110101011100000001101000111010000110100001 1000010101011011110110011000110110111110110011011000111001101111001111001010111100000100111110010011010110111011101010000000110111110111101101100001010011111100000001111100010111000011100111100011100011100100001000000001110101111011011101010111110001100000101010110011110000001011101001000000111011111101011111101110110001111110110110010110001111110100111101011100010000111000111110111111101101000110 0001111111111000011001001010100110111110001001101001000110110000000011111100110011101000010110000101111000000101111000111001011100011000101011100101100010101100000100001011001001110100111000011100101111110100111010010110010001011010010001111110000111101010011100001011101010011001011011101000110101000111011100001111110100100110110000010100011010001010100011111000101001001011011011011000100000011110 0110010110000111100110011110101101001000011010111010001101100011001111011001010101101100011001010100011010000111011100011110101111000101001000001110111011000000011111110011000000110000000011111101011100101100000000111111010010011100111011101011010010101001100100100100110001110011101011000011111111100001111110001101100011001110011110010111110110010001100101101001010110111011010011011111001000100110 1110000000001101001100100000100000000001010111001111100000011100111111001001110000011101001110101011111011000001100011011000111111000001100101001011001000010110110110110100000001001001010001000000001010111011101110001100110000001011101010111110011111001100111100011001001010111110101001010101010001101110110110000110000000100101011111111100011101111000110010001101000000000111000101010111111111101011 1000000101001001111111111000110011001110011110010110000100101001101110010101011000000110001010110000101010110100100100101000000011011000000010010000111100011010100110010000100110101010011011110001010111110010110100011011001001110011110101011101100011101110101111001011000010000111100000111000000001010010001010000011110110110110000000111000000100001101010111110101011000010010000001011101001001010011 1100100010001001000001010100010010000111100001110000111110001101010111011010010101101011100100111000110000110111111100001111010100101010100111010000001100111000111110011010011010000000000100100000001110000111010110001111000110100010101010111100111100000101100011101011111001011101101101010110110100100101111001010111110111111001011010111010001100101000111010101010111000101110100010111000101111001000 1010010010101010011001010010001000111011011111000001001011010101110000001111011000001011011010101010101010000110000101111000101000000001101011100011000111100010101011100011011001001001001110011000000100001101111011110101010111101111111001000111101111010001010100100000010010101101101001000101101100110011110100100000000000000011111111011100111000110101010001011000001100011101110110001000111100111000 0111011000100100010100001001111110101010011010001010001110000100011111010110000000110100010111010010001101001110101001010000110101111101000011011100100011011110111111000011011111011110001111110010000111010000100000100110110101111111010000100001000100100101111110100110110101001010011010110001111000101101000101100000010010000100101110101011000010000101011111100110110000101001000110011011000101001101 0111111111011101100000101001010011011111001111011000010110010110110011101111011000010010001011001000111110011011100101000110111010010110010111100111011101010011000110000101100000010110100000100001000010111110100110001101111000010010000011001110101011001000001110110010110000101110111001111101111011100100011111110101010011001010110100001100011101001101000001010100100101000111000001000001101111100000 1010011000111000001100010110100111010011110111011011001101101000001011111010110111110010100011100010111000000010011010101111101101010111001100100110001100010100100001010110100010110100001110111010111001101011011010100001001001101110101011111011111001001100101100110011100110011010110000001100000100110010011010110101000111100101110011001111111101100000100010100101100011000001010001011000101101011101 0011011010110010110000010010100011111010100100000110111001000011001100011101111111111110001110010000101011001101110111010011011010011001011100110111001111111001101001111010001000101010000111101011011110110001011100100101111001111110100001010011010111100010110010110010000001010101000110011111101000000010000110100001010100111110010101110001110111001111111101000001010101110010010111001100110010110110 0001000101010011001010100111000100000110111010110001110101000011000010110101000000100101001111000111100110011111110011000011100100110010001000010101011110110110101001000110010001101010010010001000111111001100001111001010001100101010100110110111111000000000001101100010111011100011010111001100100000111000100000000011010010101111101101011101110100001110010111011101100100111111010011011100011011010011 0110100111010110100000000011111001010000101100000000101100100010110101100110011111101111111101110110101000011010011101101011000101000110111011110110101000101010111001011011110101111111110001010100001110100000111110011101111101011010101110101001110000010011001111011101100111111000101001101111100000010110101100001100000100000000110010010001100000011101000100010101001101010010010001001101101010000010 1101000010010011100100111000011010010100011101111010100010001011001101000010110100010111100111000101001101101001100011111111000111100100011110111111000110110101100101111110110110011110101001000100111001101101011000100000010100111001011101011100000000111100110000010110011010001000100000110101110101101100101110000100000001000101111011101001011100110101001100110010101110110011111110111101110010110111 0011111101011000110111111010100100001011101110011011101001100001110111111101101111001001110011001110001010111011100100110001100100110010001000001100110001011110100010110001101000110111001011111100000000000110000100110011010001100001011010110101011001101000010111100110000000010000110110000010010010001010111010001110101011110101100110011000110000100000110000111111010100010001101111011011010010110001 0010001100100101111110110001100011011100010010001001101000000100101111000100111111011000111010100111011011010100011011000011111101100010100010101000111010011100100000111110000100100001010111000101111001111001001101000000100111001001111100011011100010111001011010010011110101111110001110101011000100001110011111101001010000000000100010001100000100010011111010000100101011100011101010011110111100010110 0100001110111010000000110001011011000001101110000000000001110111001100001001100110001100000000010100000111010000111000001101111101010111110111111101100001000101110000010100010101111001101100100101011001110000110111100010010001100010111110111110101001100100001111011010001110110100011001110100010010001011101110110000101111000111010110001101010010110000101111111001111100111000111010011110000011011100 1000010010110000000000000011001010001100101010100100000100111011101101111111001101100100010000010000100111001010010110001011100101001000011010110000100011100100101101100101111100011101000111110010111100001010010111101101100111111101110001001110111001110010010001110100011100110011011011111010011010001111110100111101110110000100010110000011111000111000011101001110100000111111111101011111111011011100 0101100111001011011001100011011011001000000110101111010011111111110110111000110010010111111110010001100001111000001110100111011010001010001101010100111011101100001000111111011010001101110010010001110011000100110111111010001110010110111111001110001100111011001100111101010001100111110101101010110001100011111011111100111001100011011001101111100011100000101111100111100111000010100010011010111000111111 1111101100111100110111010111001001110000111001110101011001010001111011010110100111000010011111111101001011110101100011010110000101001111110010100101011001011000000101100100100110110000001001001101111001011000110000001011010101011001011110000010111110011110110010001011011010000000101111010000100110001010000001111101000110011011100100111100111001010110010110011011011110111110111000001001010110100100 0011110001110000010101001001010000101100011001011101101101101000110100100110011110010111110100011010001101110101000001111110010001010001101010011100111010111110111010111000001001010111101111000111001011000010000001110011110001000001100110110100110110000010001011101110100001111001111000011011100000001011011010110001111100010000010101110000100001001010111011101111111110001110001001000101001101111010 1111011111001101000110100111010001111101001010010010100000111100011000011011000111110001000101011101100000010011010011100010101101101111110101100000011001011100100001100111101001011011100101111110000111100000000011100101111001111110010100010110100010110110100001110010010000010101111110011001001001000101110000000100101010101001011011010010100010100011010001110000010100011100100101001011110100001000 0001001111000000101111100101100100001111111100011110000101001101110000000011010111101011011111011010010010111000010100010101001101011011000100010011111101100110001011101110101110010000111011010000010110111101110011110100101100101000001000100111011101101101100101001111111001011010000010000011011100110010010011100100001101100010100010000011101000111111010110100010000011101101001111001111010001111000 1101000011100111010010111001110001110001010101100110100001110100110001110011110111000101100100110000110000100010000110011000001111101000100010101101000101010111100100100010010000001001110100110110000111000000100000010111110000110100100100101010011011010101100101001110001001100010100110100011010001010101001001011010001110100000010100010100111110101101111111100100000111001100111011110111110010011000 0001001100000101101010001011001010011010000100011101011000000111111110001101010001011001110001100011011110110010100100001101101100110101001010111111000110000011110111111101000100111010010000001000111100011101000010001101101010001110101011011010011001011001000101011000001110000111001011010010011101100100110011010001001000001100110110011100010101000111010111000011001010011011010001010001101110110011 1001010101011110110001101100110100011011111001010100100100000110100110101101000011000001110011001111001001001101010111011110111111101110010100110110100101111111110100111111000010000000110010101011011000110011011010000110101101110100111000111010001110000010101011100001100111101100110110010110101001101000010111010100011011101110010101011110001000011111110100111110111001011001010010110111100010010110 1110000111001100001101000100100001100111111000000011010000010011010000001010111000100010000000110100111001111111100000111000001101100010101000101111011011011001111111101101111101011011000100011111111110100100100000010010001111111110101001110101100010011111111101010100100110111000010100100100010000110110100101110101101101011011001101100110001010011111101110000001111010010001000000111001011101011000 0111010000000000011101111010111011101001100101101100100110100010000100100000100111111000100011010111110110000001100110001101100111110010101010110011001100011010111101010110101001010010111001011100111111100111001000100010101010111011001110000110110010001100001110111100100111011010000001001100001111000010110101011110001111110111110101010100110100011011011011110111010001001010100100001110110101011111 1111011111110011111101101000011011011101110000000001000100111111000001100011000101010000110010100111111001011011011100110001101011101110110001010010101101000011110000100100001011001011011011010011001011111010010111101001000111111100101110010001101001100101001100011111110001100111000110011010010000100000000111010011010111001000101011000111101010100110000010111010110100100111111010111111101110010010 1101111011011010101100110011011001111111011000001111001001010101101110011110100011001101100001011100000101110101011011100110011110010110100010010011000110010111010110011100101010010101111001010100110010111011101001011110010000010111010010000110000010010111011000010001000110001100001111001010011101110001001111001111000101001010100110010111100000010010000100011100011101010101011110100111010110001011 0100100100011101111101110100111001101110011110100001010010110111000000000000100101000011111110110010001001011001000001100110110010011011011111101001111110111010101100010101101000010000010001111001010110001100001001100011010001000110110100110000100001101001001100100110011111101101000111010100001100011101101100110000111101111000001011101010011001101100111110010000101011110110010100001110000110001010 0110111001111001100000010011010100100001110001101101100101000100010010101110100010100110011010110100101110110101000111101000011110011100101100101010011111100000101110000111000111101000000011010001101010001100011001111010100100111110111110000001011111110001000110100111010010001100101011000001100110101111110100100010010111111010110100111100100010011110000110000010110000010010101100110101010011110111 0111101011110010011100001011101001101100111011100000011000011010000111111100101101101101000010100011101001010101101100110001001111101010001010001010101111011100001110100001010100011111101111111100111110100010110000111111010001011101011001101011010000100000011011101100101001010111111111101101111110000100111101001110101011010000000000101010000000010010101111001011000101001010100110100101101001000011 1110100000011110110001111011000010101100001110010011100010100011011101111001110000110011010000010100101000000001000101000100001000000111110111001011011111111010100010000000111000101100000110000010001001011001101101111100011011000111111110011001101100001100111010011101101100100001100110001011101110100001101000101111010011000001111000110010100011110010000101101111010101010101011100100100110011011111
cTrader AlgocTrader

【cTrader】チャート上に他通貨ペア情報を表示する【Tools】

2/14/2021

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

SymbolWatch

チャート上に他の通貨ペアのBidとAskをリアルタイムで表示するインジケーターを作りました。作っておいてなんですが、実用性は微妙かもしれません。

あえていうならチャート画面でトレードしながら他通貨ペアのプライスの動きだけ確認したい場合には役立つかも・・・そんなケースあるか知りませんが。

どちらかというと、シンボル毎にリアルタイムな情報を表示するためのサンプルコードとしてお役立てください。

BidとAskではなくて、各時間足毎に判定したトレンドの向きとか表示させるように改良するといい感じに役立つツールになるかもしれません。MT4だとそんなツールよく見ますよね。

 

機能概要

指定したウォッチリストにあるシンボルのbidとaskをチャート上に表示させます。それだけです。

 

パラメータ

WatchListName

ウォッチリストの名前を指定します。指定しなければ先頭のウォッチリストを読み込みます。

 

ダウンロード

ソースコード付きです。ぜひ改良して使えるツールにしてあげてください。そして気が向いたら配布してください。

 

 

ソースコード部分解説

WatchListを使ってみた

何に使うのかイマイチ想像がつかなかったWatchListの使い道を思いつきました。ユーザーにいくつかシンボル名を指定してもらうときのパラメータ代わりに使うといいかもしれません。WatchList上の通貨ペアの追加情報をチャートに表示させるツールみたいなのも、もしかしたら需要あるかもしれませんね。

なんにせよ一覧に表示するSymbolを指定してもらう必要があるときにWatchListが使えます。Parameterで文字列で指定してもらってもいいですが、一つ一つ指定するのも面倒ですし、指定時に名前を間違えられると目的のSymbolをうまく取得できません

しかし専用のWatchListを作ってもらって、そのWatchList名をパラメータに渡してもらう、とすればシンボル名の齟齬もなく読み込むことができます。

// --- 指定されたウォッチリストを取得、なければ先頭を使う、それもなければ例外投げる
var watchList = Watchlists.FirstOrDefault(w => w.Name == WatchListName) ?? Watchlists.FirstOrDefault();
if (watchList == null) throw new ArgumentException();

今回のコードでは指定されたWatchListが見つからない場合先頭のWatchListを使うようにしてますが、cBotなんかの場合、エラーメッセージを表示する方が親切だと思います。

注意点としてはWatchListにあるSymbol名だからといって、必ずSymbols.GetSymbolが成功するとは限らないこと。ここは失敗してnullで返ってくる可能性も考慮し、nullを取り除く処理をしてます。

// --- ウォッチリストからSymbolを取得する。一つも取得できなければ例外投げる
var symbols = Symbols.GetSymbols(watchList.SymbolNames.ToArray()).Where(s => s != null);
if (symbols.Count() == 0) throw new ArgumentException();

 

28行目の処理はGetSymbolsにWatchList内のシンボル名を配列化してそのまま渡して、Symbolの配列を得て、そこからnullを取り除いています。

あとはこのsymbolsに含まれるそれぞれのSymbolの情報を表示させてあげるだけです。

 

他の通貨ペアをリアルタイム処理

起動してもらうとわかりますが、適用したチャートに値動きがなくても、パネル内の価格は更新されます。

先日のこの記事の3の方法を実際に使ってみたツールになります。

今回は上記に比べてやってることはシンプルです。各シンボルのSymbolPanelクラス内でTicksイベントに処理を追加してあげるだけ。

            // ---イベント(コンストラクタ内)
            _symbol.Tick += OnSymbolTick;

        }
        //-----------------------------
        // 毎Tick行う処理(価格の更新)
        private void OnSymbolTick(SymbolTickEventArgs args) {
            _bidText.Text = _symbol.Bid.ToString(_format);
            _askText.Text = _symbol.Ask.ToString(_format);
            if (_exBid < _symbol.Bid) _bidText.ForegroundColor = BullColor;
            else if (_exBid > _symbol.Bid) _bidText.ForegroundColor = BearColor;
            else _bidText.ForegroundColor = BaseColor;
            if (_exAsk < _symbol.Ask) _askText.ForegroundColor = BullColor;
            else if (_exAsk > _symbol.Ask) _askText.ForegroundColor = BearColor;
            else _askText.ForegroundColor = BaseColor;
            _exBid = _symbol.Bid;
            _exAsk = _symbol.Ask;
        }

一部抜粋でわかりにくいかもしれませんが、コンストラクタ内で毎Tick行う処理をイベントに追加しているだけです。

インジケータ起動中にウォッチリストへの追加や削除があっても連動はしません。もしウォッチリストと連動させたい場合はWatchlists.WatchlistSymbolAddedとWatchlists.WatchlistSymbolRemovedイベントを拾って処理してあげてください。


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

新しいコメント

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

cTrader's Life

© 2025 ajinori