1000001111010010000011000100101010100101111010111101000111100001100101100001000110000110001001000111100111000001100110101011011010100100110101100100110111111000100100010001111010000110000010010110001010010111100110111001011100001101101011001100010000101001011111100011010011000111010101101011100001010101010011110001000110010100001100101000000011000001110000010100000010010111001110110110010111110100 1110000010010010001001001011111101101110011001010000010111111110001111001100011101001001011101100111010111000001011010000110001110011100001110001100100001100000011010000110000101101110001100101100101001011011010000001100011010100111101010100011011101001101100010001100000011001011101100100010111010110100011000001111001001100101101010101010011010101010001000110100001110001011111000111010010000010110 0000011101111111100010101111110110110011110001110010010110000001000100100101001000010111100010100111001101101111010111111110101110001001011000100100100100111000100111001100111000011101111100101010000100110111001101001110000000100000110011010010110000000101110100001110011010111011000000011011111100001101100010100101011100110100011000100100011011110001010100001110100010000100011101111000110111011010 0000000110000010100101010011110110101101011000011100000011001100100001000000111011101111111011010100010101100001100100111100001000100101000010111111000001111011111101101111001100000000011110011101010001010010101010110100110110001000110100101101111011110101101000110101010100101011111110100101111101101110001100111001111011100100011010111001011011010001001011011100001001001001101001001101010011111101 0010111011110011001010100010110000000110000101001000010011110010100001110001011111010110101100101110111100111110110011011010011001000010111000100001001111100111000001111101000111110100010001000101110010111111100010111100100111000001110111100100001101110000101100010011100001001100111001101000110010100000000010111010011010001000110101011010101111100110011001011000110101001100110000111111010010001010 1001111001110101010010111111100100001111011011011111001110001000000110111010001110011110101000101111111001101100001100100101101000101100001101010001000110101111000000100000000111000011010101011110100111110111000100010110010111011100100110011010000011000101101001011000100110001101101001110110011110111000011000011010110111010001010000001100001110101110010011011101011101000010111000100001111100000101 0101001000000011111111011011011011011100000110110101100110101010011011000011000101010000000101110111001001111000000001111010110110001100110011100011101101001101001001101111001101111000000111001011001000110000001110011100100000110100011010001111110010001011000011001010011100000011101001110110100011001011101101101100110010011000001000101111011011101010101001110010101001001101000110100101100011001011 1010000001000001110111101100000110010100101011001001001100111001001100100010100011000100111100110111110000010011110011111111001100110011011000111101110000100100000111011101001101011000011011001010100010111101100011110000001000000011010010110000000001111111001010110100011111111111000001001111100111001000101000111001101110110000001100111101001001001011001100001001001011000000001101011110011111010111 1111111101110001010001000011010000000000011000111111111011100111011011010000000001101111111000111000001001101011010001011000101000100000010100110111101000000100111001010100101010110000001101011110110110111110100001010101011001000010110110111101010000100001011010001111111111000000011100000101011000001010101100110111101000011000111100110010110100101010110100111101001011000011000000000111111110000010 0101000111011101011110100111000110110111110110111010000110010001111111010101010100110110100001000010011100001000101111100010101110110000110011100100110101000101000111001100101100110000100010000101000100011000010000101011000100111001011110001101110000011001100101001000001110101011011101011010000110111011111100110100100000110100110110111010010010000000010011000001101111011100110110111010110110011100 0001111110011011100010011111001000001010111110000111010000010011110111000110101011100110001000011111000000010011000110000001110011100100110111110101001111000110000010100001001100110011110001110000100010100000101001100000100101011100010110101010011100101000111011100010001001100011000100000001101110010001001011111110101101111101000000110000111011110011000001010100100111000111011001000101101100000001 0011111111000011001101110011110000010001100011111000000111000101101010101000110101111010100001110010111010001100000011001010110011011001101100111100100011000100001010001001101011101111111111010100101110011100000010000010000011110010000110101011011101111100101100000010100111100000010110100111010010010001011000100110001111011101000011010010011001001011011010100111111011110001100111010110101111001001 1101111000001001011001101111110010110011110101111110010100100010110100010110110001001010010010011001001010000000100101000011011011110110110110101010001010110001111010011010010100011100000100100010010011110110010111000001100000101100011010100110011111111101001010011000101110001110000001100000111110111010011100000011101011010110101010110011011111101110110100101001111011110101011111010101000100001011 0011101111011001010011001001101000000010010011010010001101010011101010110000001010000100110011000100010011101101101000111100011101001010101010011011001101011100110001110001000101000110100101110010001000011000011110001111001001010011000011010100011110000111101000011110011110011000001001000001000000101010010100100011001100010001000011101111000100110011011111011111110110110110110110011101000100111101 0001111000100101000101010011010001010110000010000100110101001001110001010101001000100110101001010010100111000000110000101100110100110010000101110100100010111100110000010110010000011101000011111100100110000101110011110110001000111001110011010011110110110101111001101100111000010111110101111101110001111101001000101100101101000011100110000110100110110110010001100010011000101000110010010010100101011010 0011001101000111111111101101101001011111001001000100001001001011101111001000101010011010110110001000010111011010111001010111101010011011111110100100001101111000100011000101001001110111100110011111100101001110101000000000100101101111111000010001101110001011110100110010111100001011100100111100000010001010111010110100110011100011000011111000101010001010010111101110101111000110001011100000001101001000 1101100111000110011111111000000010011001001111011110001101100000101001111011001001110100010110101011101111101111100101000000111011001101101111111101010100101001001100000001100101101110001001100101010011000000010001101000001001110011101010110111001010001111110001000101111100000001010011011110000100011111100101010001011111000010110100110010011001100111001000011011011010111101011111100100110110110010 0010010101100010111010110111100100001000001000100111101000110011001011000110010100001101101110111011110010101100111111101000110111001111011011000000011101100011110100110010000010100000100000111101001110010110001101001001110010110100001111101001100111100001110010011101010011101010011011111011100010111001111101111110010010010010011001111000111011000010000001101001101100100001001000010101011001010000 0010011011101010010010101011000100111101010011010111011110010111101011011100000101100011001000001111110110010011011010111101111001110011100111000101000100010011001010101100001111011110010000111110101010000101001001111001000000110000100110100010001100110110101100010000100010011101110100010011000000101100011010000011100001110011001111011001101101010101100100101100000010010101111110010111111010011100 1110001011111101000111100010110100001100111101000001010000000111000110100110001110101111011011001010010000011000010011110100011100001111110001101100001010101110110011110100100100000011001000001101111000111110001111001101010010101110101011011111101111100111100101001000010011101100100111111100111110011010011101111000011001100111011111011011001111111011010011000011001110100110100011111000001110100100 0110001111110011010100101111010100010000101110000111000000010000000100011110001100101010011100010011100100010001100000101001001000001000101001100110001011010101110011011010111011000001011011101000111001010011100001011101001001001101100101000000011100000100011110111001001000100000011111111101111110001110110110110010101100011001111101011110110100000001001110010000000001100011011011000000000110010111 1101101110111010011100011111101011101011110100101000111000010101001110000111100001111010001101000000001110011011011011100001001000101000011110010010111000000101010001001001110001000001000001110111110100111010000000010110100101111110110010010110101110100010111110011100110000010101000110001100100011011110111110011001010000110101101011001110110001110011110011101000000011000101110111000001011111111110 0000001010110001111110110101101011000101001110011010011110011101100000110100010110110010110011011010110111110110000010010101000110011001100000111000010101010001010101100100010101010000111101100110000000110101100010110010101010011000011101000111010011111011111110110111011100111011000010100001001010110100101111100001010111100000100000010101111010100001011110111110011100100100111011000101000000100111 0100000100101011000111100000010110000010010000011001000011101001010001010110100001111110100100010001101101010111011101110100110010011101101111010000101011001001100111100000111100100011111101000111011111101101110111011110100010001010011001000110110100011011110110111010000110010001000010101100111000000010001000011101110100111001111011100010000101001000101010010000111110010101011000001110100110001000 0111011101110110110111010100010111011111000101101010111001100000110100111000010111100101010100111000010100110001011100010001100011100101111100011010111101111001001111111101100110011001010001010011000101100011110110000010000011111000001111011000000101101000000100100111010110010001000001100000111111011101010010101101110100111100101010111110011001100001011001110101000001101000011111001101010011111001 0000000011110000101100110000001101011000011101011010100010110100111000101001100101001111001010001100111100011101001011011011001100111000100110000011101111010100101000001000100110001111010010011100010111110100110110110010111001011010000011100000011001110000100101010100010100011011111100101010011010111010100101001100010100001001101000000110000011001100110111111111101000010100100110000011000000110110 0110000110100001110010110000011100001001110011111110011101101110111110011100000111010111101110110111110010010100111110011001010011010111111100011011110001001100111100101001101110010001100010010001110111000101110101101000010111000000001000101001001000110011011111011011010001100001111101001011110010000110000000111001101100111010010001000001101100000101101011000010010111101010111000110000100010001011 1101001101110101001011000010001001101110000000010110000000011000100001110011001001000011110110011110110011011111000010000000100011100010010101101101101000010100011100000100011000111001100000101011100100100011110010100100100101010101111001101101111010111000010011111101010011000000010101000001100000000110001101000000001010100110000000010111011101110101110010110101011001101110000100011011011101110111 0001011011011001000011010111101011111000101011001011101000000001101001100111111011011110001001101011011111011100011110110110110000110101101001010000110111001100110110101001000110110011001010001100100001010110110000100100110111011101101100110011100001001011101000101100100100011110110000010000001100000111001101101110111101110001001001001010110100000100001011000001001001111011010011111100010000000101 0110011011111100110101110011010100001100110111001000010101010110101101101100011101010010011111010100010011010010000101010111111100111011100000010001101110110111101010010111110010011010001010011100110110000110100110101000111100011011110000101110111110111011000101111111010011011000101010100101011010111010110110001001000100001111111000100011101010111010011010110111101111100101011010001001111010111001 0110000110110100101010011111100111001100011010010101101110000110011010001011011101001100101001111111011000000101111001110101110011111101000001010111100110001100000001111000011110010100011100000101001001010110000111101110000101111000010101001010001100001000111011100001110001110000000110011100111010010110100000001001000101010001011001110101000000000011011110100100100010010101001110001111101001100100 1001100001110110111111011010101101101001100100101110100101011011000100110000011010110011000100110000001001000011110010001101101110110111110110010110001110110011011000000011100010001001010110011111111010110110100001011000111100000110111110001110100100100001000101001010101000110010111011100000100001001100011000111001100100010101010101010001100111111011001001010100100101110000011000001101010110000100 1010110100001111111001011000111100011010000011101111011111010101001001110000010100010111101111001101001111100111011000000001000111010011110000100101100100011100010111011000001001000011101111110110100100011010010010111000111011001111010001011111101011011011001010011001101011010111101010110011011010001111000001111101101110100011001000000000000011011110110101011100011111000100010100101010001001011100 0001010001010010000000011000010011101010011000101011100110001111110010101111011110110100001011100010010101011101100011001101001101010000101110011001111011110011110111010010001100100101110100010100100000001100101110010100001100101011100110101000111001001101000100000010100101110000110100011101111001101010010100110011100010010011110111110111010101101000001001001011111011111110110001100110000101010000 1010101000000100111011101101000111110111010111110110111110001110110010001010111011011000010011101001110111011101111111110100001011011100100010001001100101000011011111100100110001100110100010000011011011000100001000010010111101100011001101111001100111000110111110111011000011101000100110011110011000000100000111100011000011111011000100111001000110010100000010110010010011111000000000000111000011100111 0110001110101000100110011011000010011100010001001111011101011010101011101000001010000011011111110101110100001011101011101011010000010101000110001000100001010111001100001011111011000000101101000101001001011111001011011101001101010000100001100010100001010010010100001010101101101001010110111000010001010101110010010101010100101100110001100000101110110101101110011101111101000100100100000101001010110100 1010010101001111010111110001010010101010101111011000110001110000000001101111100000011101111011110100010000010100100101101001111101000101000101110010110111010101101110001110100111001110110101111001000110100001000001001011100100000010100111001001100101110010100001011010110100100100010101100100011010010101000011001001000101101101010101100110101011010001000100111010011000010110111010010100101101111100 1111011101010111100011001000100001010011111011110111010010100010111010111111000101100101111110000111011110100010010110000011101111010100011110111111010001110111010011000100001101110111100100011000100011110110100001001010000000001001011011111101111100001111011110010001000000111011100110111111000111001010011110011111100000110011100101001011111011001000010110111110011010100001010100111100101010000100 0110010101110110011100111101111010000011010001100100110101111110001000000000100010000101111100101010101001100001000101000110101100010000001011110111101000110110000110111110100000100100001111011110011001001110111110011110110101010111011100001010010000000000001000000000011110101001110111011000111001011110011001010110000001100100101001010101100110001010011110101000101110101101110011001010010110010111 0101000110011101111101001101110000111000101001000111001001001000110111100010011011110110100010101101000010001000100001100010000110111010000011001111110011011010110101101101100011101100011011100001110101110010100101011111001100010001011000110101100110111000011101011010010100010001111111010011001100110001011110111100100111001011000010110000001011100100110100111011001001100111101100111110011011101110 0010110100011001101100111001010110001101011001010100000111000011000101000101110111000000011100100010111000011100010111110000010001000100010001011111100110010000011011111000010001001111101001010110101011001100000110101000001100100100100001111011010100010001000000111000110001010001110000000000011000010100110100010010010101001000110100011111011010011000110110010000100100111001010100011100111110100101 1000101100011001001001010000100101100010001001100100001110011110001111001101101100000010000110011111011100000011111101010011110000100100110111011000100000101000100010101111111100011001100110000001100001001011101010101100011101010010100100001110110110100100110100010000111001010100111101110111100100011110000100100111001010111101000011011100001010001000000011000000110110001110100111000010111100011100 1000001000011000110000111111010111110001010111100101001110110100011110011001110000111000001001011011010111100011001010001110001011000110000010011110010101101100101101011010100011100000001011001100101010011011111101011011001100110011000010110000110001111110001101010010001010100111010010110111001100001010110100011100001000110011011011100010011001010111010001001111011110111001001110010001110100010110 1110001000010000011100001011010010010000100010110000011011011010101100001101101000010011010000001111110011000000001110110011111000010001011010011010001110000011111011000101001111101000010010001110100001101100001011100111101101010010011100000000011011100001110011001010110001010001101101101110011011100110100101001101000011010110000001010100001011111101011110101111000101000101101101111011001100010100 0111010010011000111100100100111110100000110010100010101101011001110010110010010100110100110110100000011111111000111100010011100001001010010011101100010101010110101010111001111010101100011011110010001011111101111100010100010101010000001011000111011001010000111001100010001011111110011011000101100010101100001110001010000100101110001101100000001010011001011101000101100011011011010111101100010110110100 0100110001100110111010111010100001111011000011011011100000100101011101110101001100101001101011011111111000100010011110011110000110000110001101100001010011111001101100000100110001010110110111000010010111110110100111000010000010100111001101100000011100001000101110100110010111110011110111011111011011111111010111010100110011010010001011000101001111101101011100100010100001000110010011101001010000001111 1101100111111111101101001111011001110000100001000110000000110110001101110011110110001011000111100101010010001100111111001111000100100000111011010101100111101111001111111111000110111101110111010111001101110110000011011000000110101010001101010110111011110110100100100010111101101111010110000000101100010000100111011110011011001100110001000001011010100111100001011001111011110111000000111101100110101101 0010101101000111011101110110100111010100100101100000010011110111010000001011100011010100110001000101100100111010100100110001000101110001101000100111100011010001101000001011010101000010000101010011101111011100100101111011011100001110111000010101110111101010100100001110010001101010011000100011111001100101011010011010111011001111100100001111110011001000110111110111001111111001000100010111000011000111 0110100111111010101111010000101111001100010001011000110111110011111011001111100001100110101100111010010110100111010011010111011001110100001000000110100111101000010111101010101001000101101011101001010000101001101110000111100010101111000000100001010000110100110000100110000010101110111001000110000100001011010001100100010110000010100001011000111000101010111001001100110001000001110000101011111101000110 1111011010111011111001110110011010101101010011001101000010110001110011011110111010011101011010000011100100010011100111110101100111100110110110000100101000010101010000100110010001100101011111001001000111111111000000011010110100101110100000110011001110011101011010111111000100111110001111010101111100001100001111110010100111010010111111011110000100011001011111111011100111010000001101011011010011000010 1101010000000010010110001000000100110101011101000100001000110001010011100011001010100101001111111110001010011101001110000111000000011011110001010011101111011100111011011110011010001000101000110101111100010110110000101001011110110111001000001101111101001010111001110100110000101110110011101000011111100110110000100000011000011111110001000100100011010001000010100101001110010011100010010010100001001100 0001011010101010000110110100110101110001110111100101110011101111011000000000110001010001011110010101001110101111110010011111110100100101011110101101110100100011011010110111011100010010101111011100000000111101000000010011000100011100100011101101010101010110010000001011110100001001110011111001110001101100011001010111001000010101000101001010000111100110011010110101111001110111000000000000100011101000 0100111000010111000001111100010111000100001111110100110000001010001111010101111111111111100000111100001101001100111011101000001101010100010001110101011110010100001110010001101110100011101101101111011000110101001010100110110011001000110110001011011011101000000000011000010101100100100110111110110110001101100000100011000000010110010111101011010111000101110001111101101110001101100000011111101101001001 0010010100100011100011011000011111101000101010001010110010110000010001110100010101000011110010001000100001110100101010000111011100111010110110010111001111011100101110010010101010010000111110000011101010101101000100101011110000101001111101111110100011100111110100101011011010100011110111101011101100001000110000010101111101110110001000001000000001111111011101000011100011111100111001010111101000111001 0000010011001111111101010000000010011010100001101001111001110000001001010101011000011000100011010110011001001110011001100101010001010001110001011111000011001111110111110100010110010001110111101110010000000000010000001010010000010001111011100011101110000001000110111001111011001110111000101100101101100100110100011011110000111010011101010001011101001000111011101101101111100000100001010011000000111100 1000001100011111000100110010010011101010010100010011011011000110010000010101100111001111000101111001010101100000100000100100101010000010111101100111010100010111010110011011001011100111100011011110011000010111011110010100101000001011110111100000110001100101110101000010101111001011110011011111101011101010001010001011100100101001010010100000011001110001001111111011101011100011100101100011010101111110 1110100010100010011010110000010100100110101000100101000000110111011011011000111011011111010000110011101101011011101001111100111001010010101110010100010101111010001000100101001111010101001001011100000011011111101011100100011110011001100100100111100010111011000101110100101011111110010101010001100101111100111110100000011011101011000101110010011111011011011110000011001101111000010100111010111010000111 1100011011001011001111010100001001001001111111101000001011101111110010000001101110100111010000010101011000100100100111101101000000101100101101101111101001110110101000011011000011000111100001100110001101000111010010101101001000001110011011101001001111000110101000010010100100110010110010001111101100111000101000111000001000101011001011000110011001010100011001010110011111010001111011011100001000111111 1011101000001110001001011110010011101000110010001101011110011011011011001000100101010110101111010010011111011100111000111001111100111110010101001000110011011010010100111100100111110011111100010011001101111110001010011100100100010100001101100000100110010111000011111101110001100100010100011001110011100000010101101100101110001111010101010111100111100010111000111111111111111111010011111000100101001001 0000000101101100000010010001001110010100100111101100111101000100000111111001001011110101100011100010001010011110110111001100110001001011001000000110000001001000011011011011100101101000100010010000110111011000111100101110011101011000011101000000101111010010011000000001000011111000001100110101000101110011011111100011010101100100101101101110110000011111010011011110111110010001001010001110000100010100 0010000100100111010100010100001110110000000000001100100110101010110110101001011101010000000001101001100110110110000000001010100100110100001110101001101001101001011011111110101100100000000110101010011011101110100011100101110101101111100110011101111110000010000111101101001110101111010001100010010101010100000111001001001001000111110100101111001101011011101001000100111010001010011001011101110111011100 1011111011001010101010110010000101011101000011011001000110110000100000000110000100010001011100000001001110001000000011001100000000001101010000100101110010100101010000100100000100111101000001100000010101110001010110011011111111100100101001011100111000001100011111100000000000101100010001110100100011010100100011011101111110110101110101101000100011111101100101100110110100111000010101011011100000010101 1011011010111111010010001011111101110100101011111101000111000111000101010100111011111111010000100100001110001100101100100101111110110101101111011010100000111000010110101100100100010011100101100111011001101000001101110011111011100100010101010101111011110011100000001110011011101110011000011000001101100110001101011101011110100000110101111000101011101001101011111011011100100000111111001111100111100011 1100000001011101101101000010001101010010011011101001100111001011000011011000001110100110011111010011100101100001100000101000010110001010111111001110011111000100001110010110111011111110010000001001011110000100010100000101111010100111000011111111110010110100101001110111101011110100100000111000010110110101100111111110010100111100011010111110000101001001001011011100110111010101100110111110101001000010 0001011010001000001010010110000011000011110001001011101101101000100000000000111001011100111110010010110110111100011100110101110101000100000010000111111001001000101101101001101111010111010101101001001100100100100111100001001100000110100100011010000000111111000001101100100100111010000010110101010010010111011010011000001101111011110000010010011011100000000110000100001101001001111000001010100000111110 0000100011000101110110001100011001100110000100011001110111111001010111101000010000110101001001100111100110001110011111111110011101100111110010100111100000011110011010000110000011001100111000100000100011000001100111110001001010111011000001101110011001001000010011000001110110011001011011000110000110000000001110001110010000001010110100000101000100010110000110001010001010011111111111011000110110011101 1000101001110101111011101100100100010001010001001000000001100001011001101100001001111100010101011010001011100001110111100111001110110110111000101101111001010011101110110001000111011100100010111011011000111100010000001110000001011110100001001010100111011001011111111101110000110111101100010000010110010010110010011100010011001000010001100011110110001111111000100000011001001110011111110011101001111101 0101110101011001100100111101011001000110001000010010011110100100101011110001011100010100000110011110111100111110010110110101000010101111110010000110100101110101000011011110100001000000101000100011100010010000110011110110110111000010110001001110111001000111100110001000001111011001010000001111100110011110001101001100000101010110000011010000011100100011001101001011111100001010001111010111101101100111 0011011100111000111110011110110000010011110000011011111100110111111100111010110100001111111010011000101001010000010010110010010001011001011100100010111111011101111011110111000111111100100110010110101111001111100101010101111001100110001010100010100000111110001111011010101010101011111001001001111011000101000101110000011111011010101000100000010010110111100110110101001001000110000100001100000101111001 1011100000010000101100100101010000001001101100001110001011001011001000100010110110001000110100010101000010110010011111110010000100110110000101000110010010100101100010001111010100110000101101101100111101110000001001011100000100110000111100101111000010001111000001110101000000111001010010000100000110000111101001110000011011101010100101011001100001111111001000010001001011011011110111000111101000000011 0001001100001100101000001011001011001000000011000001010110001000000010010110000110110111001001110000000011010010101001000000111010100101110111101010101110100110010001110001000100101000100001010110110001100111000110011111111100111000011100110101011001101111001011100011101101100101011100000101010110101011110111000000111011010000010010111010111000111011111000010110110100111110101110000010001001111001 1101001101001011110101001111001011001000100001000100001011101101010000001000100111011011101111001101001100011100000110000111011101000100101111001100011010000001011100010001100100110011011110110011100101100111110010000100110000001011101110001110111111110101000010001001010000000010001000100000101000011011101000101001100101010000001110101111010111100101101110011010101000011001010101110100110001111000 0110110101010101110011010010001011011111000001101001001101010001100001101100011110010111101100101110000001100111010010101010111000111000101111101010000101110110101100010111100101011110001100011100011100111100111111001011111101110101101111011010011010101000111010110111011001001000011001011011001010011000001110010111010111101101100001010010111110101011001010001011011010110011001010010011110011101110 0101011110100100111111010110010110110011100110111001110110110110111101001100111010100000100011101101000000101111011010000100001110101011100101011001110101111111111110001101110000111010110100101010001011001101010110010101101100000001110100111110000111011111100010011110100110111101101101111111111001101100001110101000001010001101111111100101100110111010000010011110000001011010000111011110000110100000 0110000010001101011011111101010100100101000100110011010110000001110110010000001111100101111110111001001100000001011110111010001001000010000100001011100000111001000110111111011000111011101010111010100010111001111110100110100010100001000100000111000100100000110110111010011111110100001000110111111011010110011011101001100000000100010110111011001110000010101010100100111101000100001001011110010110101111 0111100001010110100110011110001110001011111110111110011111000001010101001101110010111110100101110000011101011100001110011101110111110111000000010101101010101101001011010110111001111000101011001111101001110010000011001101000010010110100100010010001101011100011110111000110000110101000001100111100000110110110111101011110000001000111101000100111100110001110010110000110010000100010100110001100010111100 0101001010001110000000000100001101000101111110110100011010001001100001011110110101111000101000110101001100101010110101001011100001001111011000010011100011010110101011111110000001101011110011010111101011010011110111011101111010111110001111010110111100110000101100011010010101011000010001011000000011001111011000001001100011111011000010011111011000000101011111101000100011111101110001010001001101011010 0000001000010101011110101001111010110000101000001000010000110110000000001000111101001101110111101010111111000000111101001110010101010001110001011101111001110101100111100001100011111110110001100111010011010011101010010111001100100000000001000000101010000001111011100110101100010100100010110011001010110010000010001010010101000111101100111011111111100000011000100000111111100011000011110000000110001011 0000010011011100100101101001010110101111101010011000111010001010001010100111100001010101001001010111100010101111000000010101000000101001100000101110111111011011000010001010010111011100000100001000101011011100001010001001101000001110001100010001110001101101111010110101100100100000000110110101010101001011101110110101000001010101001011010000001111000111100000110100101011111110010100110100000110011010 0101000000001110010001011110111001010001100101101110000010000001110110101000101000001000001111111001100111000010001101110001011101111011001011111000000001010100101110011000100101010111000100010101001010111111000101011100001101101000000001110110100101100111010001010100101100101010100101101110111011100100100101010101000000001111101110000011000111100111000001101000100011010001101010001100100100111100 1110111011111111000001100001010000101000000111011111010001110111101001110101110001101111111000101111000000111011101100011001101100011001010011100100101010001111010111100110100000000001011000001100011100000101001010010000011000100001010010000000110101010101100011000010110100001010001101011110111000011010111000011001011101011100100101111001111100010011011111011101001011010011101111100101110000010010 1100100010010001010000101001001010001101111101010011111000000100011101010110100110111000010100010001001101101111001011001101000100110111011111011010110011010101010011100101000000010001100110100101000101110000010011001000101010101110100001101100001000100010000001111111110000100000010110001101110010100001010111111110111110100011110100100110010000100100100011100110010011110100011100101001010011011001 1100110111001011001011000100011100110011010100000111101101100101001101001010101101000101110010011001011100011010000010100100011000000000100000010101111110100100001110001011111100011001001100001011100101111010101100001101100001001010100010110010101101001110011110110001100010010100001110100111110111101101000110111010101000101101110101010110100000110101010101011000100101000011101000001111000111101110 1100010001101001011100000000110110101110011101111000000111111000011001100111000010000001000001101111110110111101100111110110110111110110111101111101100011001000000110101100001000100000011100011101011010000100100101100001011110110101111010100001111000111100001101100101100101101010001011110011110001011101111100011100001010110010011010111100101111010110101000010110111111110101011100010000110101111100 0001000010011000010010000001100011100100001001001110110010000101111111111111001101010111100101111001000110000110001110110101011000100111101100110000011110011011100010101100001100101001111110001100101010001101111011100111110001011001100010001011111011100100110001111100000011100000101010100010010001110101010001100010001011000010011111111010110011101011011111000010111001110111101110000100001101010100 0010100100000110011111011000010100101100000011111010010000010100001011101010100110010100001011000101100010101001111110110100110110101101000101000000010101110011011111111010000010011110010000110101010100001100100111110100000001110011100110010111111000011000110101110101100000100110111110011001111100000000001001010011001001110111100100011111001100010011011101100010001001000110111000010111101001001000 0011011000111111010011010011100010101111100101001001001010000101011011011001100111100111010011010000000110100010100101110111100100010010000100001110110010111001000001001001011011010110101101100110000101110001101110111000000100100001111010111011001111101011111110011001000000001100101111001111101000001011110001101101010111111011001001100010111111001011010010101111110110111001100100000110011001010101 1010001110100111111011100100001001001111011100001111100111011001111011011011110110000101100000000011111100001111011101011011110110101110001010000101000010111010001000001001101000011000100011101100100011100111101000001101000100110111110100001001011101101100001101011001100010010110101101010010111100000011101111011110011101101010001111001101000100000100100000000101010110111010000011000001111100101010 1111011011011000000001100011110111001011110010001111011100111000100010110101001010010011111000011101110001000111100010010100001100000000111001010000001101110010110010001001101111010101011000011001000110011000011010110100011001000000100001100010011101010101000110011111110100110111100110001101000110011011000000000111100111111011000101011100000110001001001111000011010000101111111101011110011011000111 1100011010111011010001000110100010111011001010100011101110111001011111001110110000001110111011110111100010000001111010011001000011101110001100001100010101111110000101001101000111111111010110001001000010010100011100111000001001111000011010000101000111101010110100000001101110110000010011110011101001000011000111000000011011110011111000101000101110100000100111011100111101100001010000101111000000011010 1110110100101000010100001010011100001110101011010100010110010101110110111001001000111011110011110111011111000000101111001100100010110010011000100101000011000001000101000000100111111111111000101010101111001110011011001010101000110100100101001000100001111001101011110111001001100010011110101000000000100011100110000110011110101000010100110100100010010101110100010101010011101000010000111100000010001011 1011100111100110111110100011001110101111000101010001111101111111100000001001000000100000001110000000011110100001000000010000111001101100110011111001100101100101010101100011100001101101001011000011111000100100101000110001000010100111011011001000111010011000001100110011000001101110001010010110001110000110000000001000100011011100001101011111100000111000110100111100100111010101111110110011100010100001 0011100100100110101010110111001110111010101100110011101001011100110010001000100010111100101011111011001100111101100111110011101111111010000000011000111100000010011010000110010100000101100110010010000101011101110001010101111101111011101000110001011010011101001000011010010010011110101101100000101110110000111111101001001111011010100001111110010110100001000101000101101110001101110101000110111101011001 0111000110000111000011000110100111110111101101101100111001111110110000111010001011000111101100101111101011000001110101100101011000111110000011101110011100000100010000101000011011110111011010010100110010111111000110000000100100101001001000111111101110010101100110010011100101111101000011111111000100111100100001110110010011100100001111001110110101000000110001100110000000001010101110000101000110011001 0101111001011001000000000001100100010001111101101000111000100010010100101101010100101111011000011111001110100110001010101101011011011100010110011001001111101001000101001001001110000011110110111110111000010101001110110110000011010110010111110011000010011000010001101011101001001011000000101011000000011010011000010100100001011111101111111110100000111000100100100001001101010100000100111110111110001010 1111101111011000100011111110100110011011000111110011010111111011111000000101000010010011001111010110010010011001110001011010111101101011110111110111110001111100011000001010010001100010101100101100100000111100000110010101100100110001110101010001101110100100001011111000011001000110101100110111101001011000001000000000000101001010110011110000111010101111100010011010111000010111111001100011101010001111 1011101010001110101111111001110100000101111111101010001011111101111001010100001101110001000110110011110101000000010010100000101100010000010001110100010011001011101010111000000111110011000111001010110011000001001011010101100001101001001111010111101110111101011010110100111000010011010010101001001010000101110101000011110011101111100100110010010111110001101011000111110000011000111110011001110001001000 1110101000111000111011111100011101110011000101001111101100101110100110010100101100100011000101001011101111000111101110010001000110101110110111000100100101001001010001100001001000111000111011111011001100111001111010000101001001000000000101010110100101011010000101010001100001000110001011000001100100100101011001110010011010110001001000111100100100001110100011000110101011011000110111111100000000010100 0011011110000011101010001000101000111000001101110101110110001000101100000100010010100101111011110000110010110001001111010001100001001100110111000100011110100001111111111001111101000110000010101010110001110101110001101100110110101011111111000011001011000000110011110100111010011011101000101111101000010100000100011001100010001011101001000100011110110101010001010110100001000011100101000000011001000001 1010001101010001110001010000100111010010011000010010110111001011111101001111000010001100001100100100010010111101100010101000011011010010111001110011110111111011110001000110000100110011101010110010100111010110000011111000111001100001100000111101011001011110111010111001010000001111111110001101101011010001101011110111000111111100100111001101111010000111000011001100100101111111010100010001101010010001
cTrader AlgocTradercBot

チャート上に全決済ボタンを配置する

3/31/2024

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

ご要望いただきました

今回スキャルピングをする際にあったらいいなと思う事なのですが
『全決済ボタン』をクイックトレードボタン横に配置できないでしょうか?

決済の時のカーソル移動距離をなるべく少なく出来ればと思うのですがいかがでしょうか。

また素人の考えなので出来る出来ないはあると思いますが、クイックトレードボタンの大きさがもう少し大きくなればいいなと思っています。

確かにクイックトレードでエントリーして、カーソル下に持ってって決済して、というのはスキャルピングの時にはちょっと不便ですよね。

クイックトレードボタンの大きさは残念ながら変更できないのですが、決済ボタンを近くに置くだけであれば簡単ですのでcBotを作成しました。

 

AllCloseButton

単にクイックトレードボタン下に全決済ボタンを配置するだけのcBotです。

ボタンを押すと保有ポジションがすべて決済されます。本当にただそれだけです。

ダウンロード

なお、こちらソースコード付きのサンプルcBotの形です。

このまま使っていただいても構いませんが、ボタンサイズや配置位置などちょっとソースコード書き変えると自分好みに設定できます

ソースコード

「プログラムなんてできないし、ソースコード書き変えてなんて言われても・・・」という方も、まぁちょっと見てみてください。

見ていただければ、ボタンの見た目くらいはすぐに変えられそうというイメージがわくと思います。。


using System.Linq;
using cAlgo.API;

namespace cAlgo.Robots {
    [Robot(AccessRights = AccessRights.None)]
    public class AllCloseButton : Robot {
        protected override void OnStart() {
            // ----
            // ボタンを作る。チャート上のどこに配置するかもこの時に設定する。
            var button = new Button {
                Text = "All Close", // ボタン内のテキスト
                FontSize = 18, // フォントサイズ
                ForegroundColor = Color.White, // テキストの色
                BackgroundColor = Color.Green, // ボタンの背景色
                Width = 140, // ボタンの幅
                Height = 40, // ボタンの高さ
                VerticalAlignment = VerticalAlignment.Top, // 縦位置
                HorizontalAlignment = HorizontalAlignment.Center, // 横位置
                Margin = new Thickness(10, 70, 10, 10) // 配置時の(左,上,右,下)の余白。
                //余白上はクイックトレードボタン表示を想定して大き目設定。左右下の値はこの配置の場合実質無効。
            };

            // ---
            // ボタンをクリックしたときの動作を定義
            button.Click += args => {
                // 口座内の全てのポジションをクローズする。
                // クローズに成功したかどうかのチェックは省略。
                var positions = Positions.ToArray();
                // チャートの通貨ペアだけ対象にしたい場合は下の行を有効にする。(下行頭の"//"を消す)
                // positions = Positions.Where(p => p.SymbolName == SymbolName).ToArray();
                foreach (var position in positions) {
                    ClosePositionAsync(position);
                }
            };

            // ---
            // ボタンをチャートに追加
            Chart.AddControl(button);
        }

        protected override void OnTick() { }

        protected override void OnStop() { }
    }
}

 

ソースコードはこれで全部です。

ボタンのサイズやフォントサイズを変えるには単に数字を変えるだけですし、決済対象をチャート上の通貨ペアだけにするには行目の頭の”//”を消すだけです。

設置場所を変えたい場合はHorizontalAlignment(CenterかLeftかRight)、VerticalAlignment(CenterかTopかBottom), Margin(数値で設定)あたりをうまく調整してお好きな場所に表示させてください。

 

ソースコードを編集して、反映させるまでの流れ

初めてやる方のためにソースコード変更して、適用するときの流れだけ説明しておきます。

まず最初に上記リンクからダウンロードして、いつも通りcTraderに取り込むところまではやっておいてください。

そのあとは以下の画像のとおり。

これでもうAllCloseButtoncBotは自分仕様に変わっています。次cBotを起動したときには編集内容が反映されているはずです。

ちなみに、cBotを起動しっぱなしで編集してBuildした場合、起動中cBotはこのような表示になります。

これは「cBotが更新されたけど、起動中のcBotは古いままですよ~」っていう印です。一度停止して、再度開始すれば新しいものが起動します。

ぜひこれを機にcBot編集に手を出してみてください。

 

 


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

新しいコメント

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

cTrader's Life

© 2025 ajinori